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
Idawscc.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
force_updateboolean
key_arnstring
key_namestring
no_expiryboolean
restrictionsobject
tagsarrayAn array of key-value pairs to apply to this resource.
force_deleteboolean
arnstring
regionstringAWS region.

For more information, see AWS::Location::APIKey.

Methods

NameResourceAccessible byRequired Params
create_resourceapi_keysINSERTKeyName, Restrictions, region
delete_resourceapi_keysDELETEIdentifier, region
update_resourceapi_keysUPDATEIdentifier, PatchDocument, region
list_resourcesapi_keys_list_onlySELECTregion
get_resourceapi_keysSELECTIdentifier, region

SELECT examples

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 awscc.location.api_keys
WHERE
region = 'us-east-1' AND
Identifier = '{{ key_name }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.location.api_keys
SET PatchDocument = string('{{ {
"Description": description,
"ExpireTime": expire_time,
"ForceUpdate": force_update,
"NoExpiry": no_expiry,
"Restrictions": restrictions,
"Tags": tags,
"ForceDelete": force_delete
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ key_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.location.api_keys
WHERE
Identifier = '{{ key_name }}' AND
region = 'us-east-1';

Permissions

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

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-maps:GetTile,
geo-maps:GetStaticMap,
geo-places:Autocomplete,
geo-places:Geocode,
geo-places:GetPlace,
geo-places:ReverseGeocode,
geo-places:SearchNearby,
geo-places:SearchText,
geo-places:Suggest,
geo-routes:CalculateIsolines,
geo-routes:CalculateRouteMatrix,
geo-routes:CalculateRoutes,
geo-routes:OptimizeWaypoints,
geo-routes:SnapToRoads