AWS::Location::APIKeyThe API key resource in your AWS account, which lets you grant actions for Amazon Location resources to the API key bearer.
import { CfnAPIKey } from 'aws-cdk-lib/aws-location';Or use the module namespace:
import * as location from 'aws-cdk-lib/aws-location';
// location.CfnAPIKeyConfiguration passed to the constructor as CfnAPIKeyProps.
keyNameRequiredstringA 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` .
restrictionsRequiredIResolvable | ApiKeyRestrictionsPropertyThe API key restrictions for the API key resource.
descriptionOptionalstringUpdates the description for the API key resource.
expireTimeOptionalstringThe optional timestamp for when the API key resource will expire in [ISO 8601 format](https://docs.aws.amazon.com/https://www.iso.org/iso-8601-date-and-time-format.html) .
forceDeleteOptionalboolean | IResolvableForceDelete 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` . > This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.
forceUpdateOptionalboolean | IResolvableThe 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.
noExpiryOptionalboolean | IResolvableWhether the API key should expire. Set to `true` to set the API key to have no expiration time.
tagsOptionalCfnTag[]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.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-locationAWS::Location::APIKey