AWS::Location::APIKey - AWS CloudFormation

AWS::Location::APIKey

The API key resource in your AWS account, which lets you grant actions for Amazon Location resources to the API key bearer.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Location::APIKey", "Properties" : { "Description" : String, "ExpireTime" : String, "ForceDelete" : Boolean, "ForceUpdate" : Boolean, "KeyName" : String, "NoExpiry" : Boolean, "Restrictions" : ApiKeyRestrictions, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Location::APIKey Properties: Description: String ExpireTime: String ForceDelete: Boolean ForceUpdate: Boolean KeyName: String NoExpiry: Boolean Restrictions: ApiKeyRestrictions Tags: - Tag

Properties

Description

Updates the description for the API key resource.

Required: No

Type: String

Minimum: 0

Maximum: 1000

Update requires: No interruption

ExpireTime

The optional timestamp for when the API key resource will expire in ISO 8601 format.

Required: No

Type: String

Pattern: ^([0-2]\d{3})-(0[0-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-4]):([0-5]\d):([0-6]\d)((\.\d{3})?)Z$

Update requires: No interruption

ForceDelete

ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter true to delete the key or to false to not preemptively delete the API key.

Valid values: true, or false.

Note

This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.

Required: No

Type: Boolean

Update requires: No interruption

ForceUpdate

The boolean flag to be included for updating ExpireTime or Restrictions details. Must be set to true to update an API key resource that has been used in the past 7 days. False if force update is not preferred.

Required: No

Type: Boolean

Update requires: No interruption

KeyName

A custom name for the API key resource.

Requirements:

  • Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).

  • Must be a unique API key name.

  • No spaces allowed. For example, ExampleAPIKey.

Required: Yes

Type: String

Pattern: ^[-._\w]+$

Minimum: 1

Maximum: 100

Update requires: Replacement

NoExpiry

Whether the API key should expire. Set to true to set the API key to have no expiration time.

Required: No

Type: Boolean

Update requires: No interruption

Restrictions

The API key restrictions for the API key resource.

Required: Yes

Type: ApiKeyRestrictions

Update requires: No interruption

Tags

Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and filter your resources by labelling them.

Required: No

Type: Array of Tag

Minimum: 0

Maximum: 200

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the name of the APIKey.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The Amazon Resource Name (ARN) for the resource. Used when you need to specify a resource across all AWS.

CreateTime

The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

KeyArn

The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all AWS.

UpdateTime

The timestamp for when the API key resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.