interface CfnAPIKeyProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Location.CfnAPIKeyProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awslocation#CfnAPIKeyProps |
![]() | software.amazon.awscdk.services.location.CfnAPIKeyProps |
![]() | aws_cdk.aws_location.CfnAPIKeyProps |
![]() | aws-cdk-lib » aws_location » CfnAPIKeyProps |
Properties for defining a CfnAPIKey
.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-apikey.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_location as location } from 'aws-cdk-lib';
const cfnAPIKeyProps: location.CfnAPIKeyProps = {
keyName: 'keyName',
restrictions: {
allowActions: ['allowActions'],
allowResources: ['allowResources'],
// the properties below are optional
allowReferers: ['allowReferers'],
},
// the properties below are optional
description: 'description',
expireTime: 'expireTime',
forceDelete: false,
forceUpdate: false,
noExpiry: false,
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
key | string | A custom name for the API key resource. |
restrictions | IResolvable | Api | The API key restrictions for the API key resource. |
description? | string | Updates the description for the API key resource. |
expire | string | The optional timestamp for when the API key resource will expire in ISO 8601 format . |
force | boolean | IResolvable | ForceDelete bypasses an API key's expiry conditions and deletes the key. |
force | boolean | IResolvable | The boolean flag to be included for updating ExpireTime or Restrictions details. |
no | boolean | IResolvable | Whether the API key should expire. |
tags? | Cfn [] | Applies one or more tags to the map resource. |
keyName
Type:
string
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
.
restrictions
Type:
IResolvable
|
Api
The API key restrictions for the API key resource.
description?
Type:
string
(optional)
Updates the description for the API key resource.
expireTime?
Type:
string
(optional)
The optional timestamp for when the API key resource will expire in ISO 8601 format .
forceDelete?
Type:
boolean |
IResolvable
(optional)
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
.
This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.
forceUpdate?
Type:
boolean |
IResolvable
(optional)
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.
noExpiry?
Type:
boolean |
IResolvable
(optional)
Whether the API key should expire.
Set to true
to set the API key to have no expiration time.
tags?
Type:
Cfn
[]
(optional)
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.