Class CfnAPIKey
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.location.CfnAPIKey
- All Implemented Interfaces:
IInspectable,ITaggableV2,IAPIKeyRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:43.038Z")
@Stability(Stable)
public class CfnAPIKey
extends CfnResource
implements IInspectable, IAPIKeyRef, ITaggableV2
The API key resource in your AWS account, which lets you grant actions for Amazon Location resources to the API key bearer.
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.*;
CfnAPIKey cfnAPIKey = CfnAPIKey.Builder.create(this, "MyCfnAPIKey")
.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 TypeClassDescriptionstatic interfaceAPI Restrictions on the allowed actions, resources, and referers for an API key resource.static final classA fluent builder forCfnAPIKey.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.location.IAPIKeyRef
IAPIKeyRef.Jsii$Default, IAPIKeyRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAPIKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAPIKey(software.amazon.jsii.JsiiObjectRef objRef) CfnAPIKey(software.constructs.Construct scope, String id, CfnAPIKeyProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IAPIKeyReffromAPIKeyArn(software.constructs.Construct scope, String id, String arn) Creates a new IAPIKeyRef from an ARN.static IAPIKeyReffromKeyName(software.constructs.Construct scope, String id, String keyName) Creates a new IAPIKeyRef from a keyName.A reference to a APIKey resource.The Amazon Resource Name (ARN) for the resource.The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.The Amazon Resource Name (ARN) for the API key resource.The timestamp for when the API key resource was last updated in ISO 8601 format:YYYY-MM-DDThh:mm:ss.sssZ.Tag Manager which manages the tags for this resource.Updates the description for the API key resource.The optional timestamp for when the API key resource will expire in ISO 8601 format .ForceDelete bypasses an API key's expiry conditions and deletes the key.The boolean flag to be included for updatingExpireTimeor Restrictions details.A custom name for the API key resource.Whether the API key should expire.The API key restrictions for the API key resource.getTags()Applies one or more tags to the map resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) Updates the description for the API key resource.voidsetExpireTime(String value) The optional timestamp for when the API key resource will expire in ISO 8601 format .voidsetForceDelete(Boolean value) ForceDelete bypasses an API key's expiry conditions and deletes the key.voidsetForceDelete(IResolvable value) ForceDelete bypasses an API key's expiry conditions and deletes the key.voidsetForceUpdate(Boolean value) The boolean flag to be included for updatingExpireTimeor Restrictions details.voidsetForceUpdate(IResolvable value) The boolean flag to be included for updatingExpireTimeor Restrictions details.voidsetKeyName(String value) A custom name for the API key resource.voidsetNoExpiry(Boolean value) Whether the API key should expire.voidsetNoExpiry(IResolvable value) Whether the API key should expire.voidsetRestrictions(IResolvable value) The API key restrictions for the API key resource.voidThe API key restrictions for the API key resource.voidApplies one or more tags to the map resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAPIKey
protected CfnAPIKey(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAPIKey
protected CfnAPIKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAPIKey
@Stability(Stable) public CfnAPIKey(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAPIKeyProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
fromAPIKeyArn
@Stability(Stable) @NotNull public static IAPIKeyRef fromAPIKeyArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IAPIKeyRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromKeyName
@Stability(Stable) @NotNull public static IAPIKeyRef fromKeyName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String keyName) Creates a new IAPIKeyRef from a keyName.- Parameters:
scope- This parameter is required.id- This parameter is required.keyName- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getApiKeyRef
A reference to a APIKey resource.- Specified by:
getApiKeyRefin interfaceIAPIKeyRef
-
getAttrArn
The Amazon Resource Name (ARN) for the resource.Used when you need to specify a resource across all AWS .
-
getAttrCreateTime
The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. -
getAttrKeyArn
The Amazon Resource Name (ARN) for the API key resource.Used when you need to specify a resource across all AWS .
-
getAttrUpdateTime
The timestamp for when the API key resource was last updated in ISO 8601 format:YYYY-MM-DDThh:mm:ss.sssZ. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getKeyName
A custom name for the API key resource. -
setKeyName
A custom name for the API key resource. -
getRestrictions
The API key restrictions for the API key resource.Returns union: either
IResolvableorCfnAPIKey.ApiKeyRestrictionsProperty -
setRestrictions
The API key restrictions for the API key resource. -
setRestrictions
The API key restrictions for the API key resource. -
getDescription
Updates the description for the API key resource. -
setDescription
Updates the description for the API key resource. -
getExpireTime
The optional timestamp for when the API key resource will expire in ISO 8601 format . -
setExpireTime
The optional timestamp for when the API key resource will expire in ISO 8601 format . -
getForceDelete
ForceDelete bypasses an API key's expiry conditions and deletes the key.Returns union: either
BooleanorIResolvable -
setForceDelete
ForceDelete bypasses an API key's expiry conditions and deletes the key. -
setForceDelete
ForceDelete bypasses an API key's expiry conditions and deletes the key. -
getForceUpdate
The boolean flag to be included for updatingExpireTimeor Restrictions details.Returns union: either
BooleanorIResolvable -
setForceUpdate
The boolean flag to be included for updatingExpireTimeor Restrictions details. -
setForceUpdate
The boolean flag to be included for updatingExpireTimeor Restrictions details. -
getNoExpiry
Whether the API key should expire.Returns union: either
BooleanorIResolvable -
setNoExpiry
Whether the API key should expire. -
setNoExpiry
Whether the API key should expire. -
getTags
Applies one or more tags to the map resource. -
setTags
Applies one or more tags to the map resource.
-