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.apigateway.CfnApiKey
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:02.495Z")
@Stability(Stable)
public class CfnApiKey
extends CfnResource
implements IInspectable, ITaggable
The
AWS::ApiGateway::ApiKey
resource creates a unique key that you can distribute to clients who are executing API Gateway Method
resources that require an API key.
To specify which API key clients must use, map the API key with the RestApi
and Stage
resources that include the methods that require a key.
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.apigateway.*; CfnApiKey cfnApiKey = CfnApiKey.Builder.create(this, "MyCfnApiKey") .customerId("customerId") .description("description") .enabled(false) .generateDistinctId(false) .name("name") .stageKeys(List.of(StageKeyProperty.builder() .restApiId("restApiId") .stageName("stageName") .build())) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .value("value") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnApiKey
.static interface
StageKey
is a property of the AWS::ApiGateway::ApiKey resource that specifies the stage to associate with the API key.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnApiKey
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnApiKey
(software.amazon.jsii.JsiiObjectRef objRef) CfnApiKey
(software.constructs.Construct scope, String id, CfnApiKeyProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe ID for the API key.An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.The description of the ApiKey.Specifies whether the ApiKey can be used by callers.Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value.getName()
A name for the API key.DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.getTags()
Tag Manager which manages the tags for this resource.The key-value map of strings.getValue()
Specifies a value of the API key.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setCustomerId
(String value) An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.void
setDescription
(String value) The description of the ApiKey.void
setEnabled
(Boolean value) Specifies whether the ApiKey can be used by callers.void
setEnabled
(IResolvable value) Specifies whether the ApiKey can be used by callers.void
setGenerateDistinctId
(Boolean value) Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value.void
setGenerateDistinctId
(IResolvable value) Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value.void
A name for the API key.void
setStageKeys
(List<Object> value) DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.void
setStageKeys
(IResolvable value) DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.void
setTagsRaw
(List<CfnTag> value) The key-value map of strings.void
Specifies a value of the API key.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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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, @Nullable 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.
-
CfnApiKey
@Stability(Stable) public CfnApiKey(@NotNull software.constructs.Construct scope, @NotNull String id) - 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.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrApiKeyId
The ID for the API key.For example:
abc123
. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getCustomerId
An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace. -
setCustomerId
An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace. -
getDescription
The description of the ApiKey. -
setDescription
The description of the ApiKey. -
getEnabled
Specifies whether the ApiKey can be used by callers. -
setEnabled
Specifies whether the ApiKey can be used by callers. -
setEnabled
Specifies whether the ApiKey can be used by callers. -
getGenerateDistinctId
Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value. -
setGenerateDistinctId
Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value. -
setGenerateDistinctId
Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value. -
getName
A name for the API key. -
setName
A name for the API key. -
getStageKeys
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. -
setStageKeys
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. -
setStageKeys
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. -
getTagsRaw
The key-value map of strings. -
setTagsRaw
The key-value map of strings. -
getValue
Specifies a value of the API key. -
setValue
Specifies a value of the API key.
-