Class ApiKey
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.apigateway.ApiKey
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IApiKey
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:44.695Z")
@Stability(Stable)
public class ApiKey
extends Resource
implements IApiKey
An API Gateway ApiKey.
An ApiKey can be distributed to API clients that are executing requests for Method resources that require an Api Key.
Example:
IApiKey importedKey = ApiKey.fromApiKeyId(this, "imported-key", "<api-key-id>");
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.apigateway.IApiKey
IApiKey.Jsii$Default, IApiKey.Jsii$Proxy
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.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
ApiKey
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ApiKey
(software.amazon.jsii.JsiiObjectRef objRef) ApiKey
(software.constructs.Construct scope, String id, ApiKeyProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IApiKey
fromApiKeyId
(software.constructs.Construct scope, String id, String apiKeyId) Import an ApiKey by its Id.The API key ARN.getKeyId()
The API key ID.grantRead
(IGrantable grantee) Permits the IAM principal all read operations through this key.grantReadWrite
(IGrantable grantee) Permits the IAM principal all read and write operations through this key.grantWrite
(IGrantable grantee) Permits the IAM principal all write operations through this key.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
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.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ApiKey
protected ApiKey(software.amazon.jsii.JsiiObjectRef objRef) -
ApiKey
protected ApiKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ApiKey
@Stability(Stable) public ApiKey(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ApiKeyProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
ApiKey
- Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
fromApiKeyId
@Stability(Stable) @NotNull public static IApiKey fromApiKeyId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String apiKeyId) Import an ApiKey by its Id.- Parameters:
scope
- This parameter is required.id
- This parameter is required.apiKeyId
- This parameter is required.
-
grantRead
Permits the IAM principal all read operations through this key.- Parameters:
grantee
- The principal to grant access to. This parameter is required.
-
grantReadWrite
Permits the IAM principal all read and write operations through this key.- Parameters:
grantee
- The principal to grant access to. This parameter is required.
-
grantWrite
Permits the IAM principal all write operations through this key.- Parameters:
grantee
- The principal to grant access to. This parameter is required.
-
getKeyArn
The API key ARN. -
getKeyId
The API key ID.
-