Interface CfnAPIKeyProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnAPIKeyProps.Jsii$Proxy
CfnAPIKey.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.location.*;
CfnAPIKeyProps cfnAPIKeyProps = CfnAPIKeyProps.builder()
.keyName("keyName")
.restrictions(ApiKeyRestrictionsProperty.builder()
.allowActions(List.of("allowActions"))
.allowResources(List.of("allowResources"))
// the properties below are optional
.allowReferers(List.of("allowReferers"))
.build())
// the properties below are optional
.description("description")
.expireTime("expireTime")
.forceDelete(false)
.forceUpdate(false)
.noExpiry(false)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnAPIKeyPropsstatic final classAn implementation forCfnAPIKeyProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnAPIKeyProps.Builderbuilder()default StringUpdates the description for the API key resource.default StringThe optional timestamp for when the API key resource will expire in ISO 8601 format .default ObjectForceDelete bypasses an API key's expiry conditions and deletes the key.default ObjectThe boolean flag to be included for updatingExpireTimeor Restrictions details.A custom name for the API key resource.default ObjectWhether the API key should expire.The API key restrictions for the API key resource.getTags()Applies one or more tags to the map resource.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getKeyName
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.
- See Also:
-
getRestrictions
The API key restrictions for the API key resource.Returns union: either
IResolvableorCfnAPIKey.ApiKeyRestrictionsProperty- See Also:
-
getDescription
Updates the description for the API key resource.- See Also:
-
getExpireTime
The optional timestamp for when the API key resource will expire in ISO 8601 format .- See Also:
-
getForceDelete
ForceDelete bypasses an API key's expiry conditions and deletes the key.Set the parameter
trueto delete the key or tofalseto not preemptively delete the API key.Valid values:
true, orfalse.This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.
Returns union: either
BooleanorIResolvable- See Also:
-
getForceUpdate
The boolean flag to be included for updatingExpireTimeor Restrictions details.Must be set to
trueto update an API key resource that has been used in the past 7 days.Falseif force update is not preferred.Returns union: either
BooleanorIResolvable- See Also:
-
getNoExpiry
Whether the API key should expire.Set to
trueto set the API key to have no expiration time.Returns union: either
BooleanorIResolvable- See Also:
-
getTags
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 Also:
-
builder
- Returns:
- a
CfnAPIKeyProps.BuilderofCfnAPIKeyProps
-