Class CfnApiKey
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::ApiGateway::ApiKey
.
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();
-
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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCreate a newAWS::ApiGateway::ApiKey
.CfnApiKey
(Construct scope, String id, CfnApiKeyProps props) Create a newAWS::ApiGateway::ApiKey
.protected
CfnApiKey
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnApiKey
(software.amazon.jsii.JsiiObjectRef objRef) -
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()
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
Specifies a value of the API key.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
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 Construct scope, @NotNull String id, @Nullable CfnApiKeyProps props) Create a newAWS::ApiGateway::ApiKey
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
CfnApiKey
Create a newAWS::ApiGateway::ApiKey
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
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
The key-value map of strings.The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters. -
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.This parameter is deprecated and should not be used.
-
setGenerateDistinctId
Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value.This parameter is deprecated and should not be used.
-
setGenerateDistinctId
Specifies whether (true
) or not (false
) the key identifier is distinct from the created API key value.This parameter is deprecated and should not be used.
-
getName
A name for the API key.If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
-
setName
A name for the API key.If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
-
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. -
getValue
Specifies a value of the API key. -
setValue
Specifies a value of the API key.
-