CfnAPIKeyProps
- class aws_cdk.aws_location.CfnAPIKeyProps(*, key_name, restrictions, description=None, expire_time=None, force_delete=None, force_update=None, no_expiry=None, tags=None)
Bases:
object
Properties for defining a
CfnAPIKey
.- Parameters:
key_name (
str
) – 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 (
Union
[IResolvable
,ApiKeyRestrictionsProperty
,Dict
[str
,Any
]]) – The API key restrictions for the API key resource.description (
Optional
[str
]) – Updates the description for the API key resource.expire_time (
Optional
[str
]) – The optional timestamp for when the API key resource will expire in ISO 8601 format .force_delete (
Union
[bool
,IResolvable
,None
]) – ForceDelete bypasses an API key’s expiry conditions and deletes the key. Set the parametertrue
to delete the key or tofalse
to not preemptively delete the API key. Valid values:true
, orfalse
. .. epigraph:: This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.force_update (
Union
[bool
,IResolvable
,None
]) – The boolean flag to be included for updatingExpireTime
or Restrictions details. Must be set totrue
to update an API key resource that has been used in the past 7 days.False
if force update is not preferred.no_expiry (
Union
[bool
,IResolvable
,None
]) – Whether the API key should expire. Set totrue
to set the API key to have no expiration time.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – 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.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-location-apikey.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_location as location cfn_aPIKey_props = location.CfnAPIKeyProps( key_name="keyName", restrictions=location.CfnAPIKey.ApiKeyRestrictionsProperty( allow_actions=["allowActions"], allow_resources=["allowResources"], # the properties below are optional allow_referers=["allowReferers"] ), # the properties below are optional description="description", expire_time="expireTime", force_delete=False, force_update=False, no_expiry=False, tags=[CfnTag( key="key", value="value" )] )
Attributes
- description
Updates the description for the API key resource.
- expire_time
//www.iso.org/iso-8601-date-and-time-format.html>`_ .
- See:
- Type:
The optional timestamp for when the API key resource will expire in `ISO 8601 format <https
- Type:
//docs.aws.amazon.com/https
- force_delete
ForceDelete bypasses an API key’s expiry conditions and deletes the key.
Set the parameter
true
to delete the key or tofalse
to not preemptively delete the API key.Valid values:
true
, orfalse
. .. epigraph:This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.
- force_update
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.
- key_name
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
.
- no_expiry
Whether the API key should expire.
Set to
true
to set the API key to have no expiration time.
- restrictions
The API key restrictions for the API key resource.
- 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.