@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.083Z") @Stability(value=Stable) public class ApiKey extends Resource implements IApiKey
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>");
| Modifier and Type | Class and Description |
|---|---|
static class |
ApiKey.Builder
A fluent builder for
ApiKey. |
software.amazon.jsii.JsiiObject.InitializationModeIApiKey.Jsii$Default, IApiKey.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
ApiKey(software.constructs.Construct scope,
String id) |
|
ApiKey(software.constructs.Construct scope,
String id,
ApiKeyProps props) |
protected |
ApiKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ApiKey(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IApiKey |
fromApiKeyId(software.constructs.Construct scope,
String id,
String apiKeyId)
Import an ApiKey by its Id.
|
String |
getKeyArn()
The API key ARN.
|
String |
getKeyId()
The API key ID.
|
Grant |
grantRead(IGrantable grantee)
Permits the IAM principal all read operations through this key.
|
Grant |
grantReadWrite(IGrantable grantee)
Permits the IAM principal all read and write operations through this key.
|
Grant |
grantWrite(IGrantable grantee)
Permits the IAM principal all write operations through this key.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected ApiKey(software.amazon.jsii.JsiiObjectRef objRef)
protected ApiKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public ApiKey(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
ApiKeyProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public ApiKey(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static IApiKey fromApiKeyId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String apiKeyId)
scope - This parameter is required.id - This parameter is required.apiKeyId - This parameter is required.@Stability(value=Stable) @NotNull public Grant grantRead(@NotNull IGrantable grantee)
grantee - The principal to grant access to. This parameter is required.@Stability(value=Stable) @NotNull public Grant grantReadWrite(@NotNull IGrantable grantee)
grantee - The principal to grant access to. This parameter is required.@Stability(value=Stable) @NotNull public Grant grantWrite(@NotNull IGrantable grantee)
grantee - The principal to grant access to. This parameter is required.@Stability(value=Stable) @NotNull public String getKeyArn()
Copyright © 2022. All rights reserved.