Skip to main content

api_keys

Creates, updates, deletes or gets an api_key resource or lists api_keys in a region

Overview

Nameapi_keys
TypeResource
DescriptionDefinition of AWS::Location::APIKey Resource Type
Idaws.location.api_keys

Fields

NameDatatypeDescription
create_timestringThe datetime value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ss.sssZ)
descriptionstring
expire_timestringThe datetime value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ss.sssZ)
force_updateboolean
key_arnstring
key_namestring
no_expiryboolean
restrictionsobject
tagsarrayAn array of key-value pairs to apply to this resource.
update_timestringThe datetime value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ss.sssZ)
force_deleteboolean
arnstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTKeyName, Restrictions, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all api_keys in a region.

SELECT
region,
create_time,
description,
expire_time,
force_update,
key_arn,
key_name,
no_expiry,
restrictions,
tags,
update_time,
force_delete,
arn
FROM aws.location.api_keys
WHERE region = 'us-east-1';

Gets all properties from an individual api_key.

SELECT
region,
create_time,
description,
expire_time,
force_update,
key_arn,
key_name,
no_expiry,
restrictions,
tags,
update_time,
force_delete,
arn
FROM aws.location.api_keys
WHERE region = 'us-east-1' AND data__Identifier = '<KeyName>';

INSERT example

Use the following StackQL query and manifest file to create a new api_key resource, using stack-deploy.

/*+ create */
INSERT INTO aws.location.api_keys (
KeyName,
Restrictions,
region
)
SELECT
'{{ KeyName }}',
'{{ Restrictions }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.location.api_keys
WHERE data__Identifier = '<KeyName>'
AND region = 'us-east-1';

Permissions

To operate on the api_keys resource, the following permissions are required:

Create

geo:CreateKey,
geo:DescribeKey,
geo:TagResource,
geo:UntagResource,
geo:GetMapTile,
geo:GetMapStyleDescriptor,
geo:GetMapSprites,
geo:GetMapGlyphs,
geo:SearchPlaceIndexForText,
geo:SearchPlaceIndexForPosition,
geo:SearchPlaceIndexForSuggestions,
geo:GetPlace,
geo:CalculateRoute,
geo:CalculateRouteMatrix

Read

geo:DescribeKey

Update

geo:CreateKey,
geo:DescribeKey,
geo:TagResource,
geo:UntagResource,
geo:GetMapTile,
geo:GetMapStyleDescriptor,
geo:GetMapSprites,
geo:GetMapGlyphs,
geo:SearchPlaceIndexForText,
geo:SearchPlaceIndexForPosition,
geo:SearchPlaceIndexForSuggestions,
geo:GetPlace,
geo:CalculateRoute,
geo:CalculateRouteMatrix,
geo:UpdateKey

Delete

geo:DeleteKey,
geo:DescribeKey

List

geo:ListKeys