api_keys
Creates, updates, deletes or gets an api_key
resource or lists api_keys
in a region
Overview
Name | api_keys |
Type | Resource |
Description | Definition of AWS::Location::APIKey Resource Type |
Id | aws.location.api_keys |
Fields
Name | Datatype | Description |
---|---|---|
create_time | string | The datetime value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ss.sssZ) |
description | string | |
expire_time | string | The datetime value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ss.sssZ) |
force_update | boolean | |
key_arn | string | |
key_name | string | |
no_expiry | boolean | |
restrictions | object | |
tags | array | An array of key-value pairs to apply to this resource. |
update_time | string | The datetime value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ss.sssZ) |
force_delete | boolean | |
arn | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | KeyName, Restrictions, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.location.api_keys (
KeyName,
Restrictions,
region
)
SELECT
'{{ KeyName }}',
'{{ Restrictions }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.location.api_keys (
Description,
ExpireTime,
ForceUpdate,
KeyName,
NoExpiry,
Restrictions,
Tags,
ForceDelete,
region
)
SELECT
'{{ Description }}',
'{{ ExpireTime }}',
'{{ ForceUpdate }}',
'{{ KeyName }}',
'{{ NoExpiry }}',
'{{ Restrictions }}',
'{{ Tags }}',
'{{ ForceDelete }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: api_key
props:
- name: Description
value: '{{ Description }}'
- name: ExpireTime
value: '{{ ExpireTime }}'
- name: ForceUpdate
value: '{{ ForceUpdate }}'
- name: KeyName
value: '{{ KeyName }}'
- name: NoExpiry
value: '{{ NoExpiry }}'
- name: Restrictions
value:
AllowActions:
- '{{ AllowActions[0] }}'
AllowResources:
- '{{ AllowResources[0] }}'
AllowReferers:
- '{{ AllowReferers[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: ForceDelete
value: '{{ ForceDelete }}'
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