Skip to main content

api_keys

Creates, updates, deletes, gets or lists an api_keys resource.

Overview

Nameapi_keys
TypeResource
Idaws.wafv2.api_keys

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
api_key_summariesarrayThe array of key summaries. If you specified a Limit in your request, this might not be the full list.
application_integration_urlstringThe CAPTCHA application integration URL, for use in your JavaScript implementation.
next_markerstringWhen you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. (pattern: <code>.\S.</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_api_keysselectregionRetrieves a list of the API keys that you've defined for the specified scope. API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see WAF client application integration in the WAF Developer Guide.
create_api_keyinsertregion, Scope, TokenDomainsCreates an API key that contains a set of token domains. API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see WAF client application integration in the WAF Developer Guide. You can use a single key for up to 5 domains. After you generate a key, you can copy it for use in your JavaScript integration.
delete_api_keydeleteregionDeletes the specified API key. After you delete a key, it can take up to 24 hours for WAF to disallow use of the key in all regions.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves a list of the API keys that you've defined for the specified scope. API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see WAF client application integration in the WAF Developer Guide.

SELECT
api_key_summaries,
application_integration_url,
next_marker
FROM aws.wafv2.api_keys
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an API key that contains a set of token domains. API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see WAF client application integration in the WAF Developer Guide. You can use a single key for up to 5 domains. After you generate a key, you can copy it for use in your JavaScript integration.

INSERT INTO aws.wafv2.api_keys (
Scope,
TokenDomains,
region
)
SELECT
'{{ Scope }}' /* required */,
'{{ TokenDomains }}' /* required */,
'{{ region }}'
RETURNING
api_key
;

DELETE examples

Deletes the specified API key. After you delete a key, it can take up to 24 hours for WAF to disallow use of the key in all regions.

DELETE FROM aws.wafv2.api_keys
WHERE region = '{{ region }}' --required
;