Class ISecret.Jsii$Proxy
- All Implemented Interfaces:
IConstruct
,IConstruct.Jsii$Default
,IDependable
,IDependable.Jsii$Default
,IResource
,IResource.Jsii$Default
,ISecret
,ISecret.Jsii$Default
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IConstruct.Jsii$Default
- Enclosing interface:
- ISecret
-
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.core.IConstruct
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IDependable
IDependable.Jsii$Default, IDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.secretsmanager.ISecret
ISecret.Jsii$Default, ISecret.Jsii$Proxy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal RotationSchedule
addRotationSchedule
(String id, RotationScheduleOptions options) Adds a rotation schedule to the secret.addToResourcePolicy
(PolicyStatement statement) Adds a statement to the IAM resource policy associated with this secret.final void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.final ISecret
attach
(ISecretAttachmentTarget target) Attach a target to this secret.final void
Denies theDeleteSecret
action to all principals within the current account.final IKey
The customer-managed encryption key that is used to encrypt this secret, if any.final ResourceEnvironment
getEnv()
The environment this resource belongs to.final ConstructNode
getNode()
The construct tree node for this construct.final String
The ARN of the secret in AWS Secrets Manager.final String
The full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix.final String
The name of the secret.final SecretValue
Retrieve the value of the stored secret as aSecretValue
.final Stack
getStack()
The stack in which this resource is defined.final Grant
grantRead
(IGrantable grantee) Grants reading the secret value to some role.final Grant
grantRead
(IGrantable grantee, List<String> versionStages) Grants reading the secret value to some role.final Grant
grantWrite
(IGrantable grantee) Grants writing and updating the secret value to some role.final SecretValue
Interpret the secret as a JSON object and return a field's value from it as aSecretValue
.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, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
-
-
Method Details
-
getNode
The construct tree node for this construct.- Specified by:
getNode
in interfaceIConstruct
- Specified by:
getNode
in interfaceIConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIResource.Jsii$Default
- Specified by:
getNode
in interfaceISecret.Jsii$Default
-
getEnv
The environment this resource belongs to.For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
- Specified by:
getEnv
in interfaceIResource
- Specified by:
getEnv
in interfaceIResource.Jsii$Default
- Specified by:
getEnv
in interfaceISecret.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStack
in interfaceIResource
- Specified by:
getStack
in interfaceIResource.Jsii$Default
- Specified by:
getStack
in interfaceISecret.Jsii$Default
-
getSecretArn
The ARN of the secret in AWS Secrets Manager.Will return the full ARN if available, otherwise a partial arn. For secrets imported by the deprecated
fromSecretName
, it will return thesecretName
.- Specified by:
getSecretArn
in interfaceISecret
- Specified by:
getSecretArn
in interfaceISecret.Jsii$Default
-
getSecretName
The name of the secret.For "owned" secrets, this will be the full resource name (secret name + suffix), unless the '@aws-cdk/aws-secretsmanager:parseOwnedSecretName' feature flag is set.
- Specified by:
getSecretName
in interfaceISecret
- Specified by:
getSecretName
in interfaceISecret.Jsii$Default
-
getSecretValue
Retrieve the value of the stored secret as aSecretValue
.- Specified by:
getSecretValue
in interfaceISecret
- Specified by:
getSecretValue
in interfaceISecret.Jsii$Default
-
getEncryptionKey
The customer-managed encryption key that is used to encrypt this secret, if any.When not specified, the default KMS key for the account and region is being used.
- Specified by:
getEncryptionKey
in interfaceISecret
- Specified by:
getEncryptionKey
in interfaceISecret.Jsii$Default
-
getSecretFullArn
The full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix.This is equal to
secretArn
in most cases, but is undefined when a full ARN is not available (e.g., secrets imported by name).- Specified by:
getSecretFullArn
in interfaceISecret
- Specified by:
getSecretFullArn
in interfaceISecret.Jsii$Default
-
applyRemovalPolicy
Apply the given removal policy to this resource.The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Specified by:
applyRemovalPolicy
in interfaceIResource
- Specified by:
applyRemovalPolicy
in interfaceIResource.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceISecret.Jsii$Default
- Parameters:
policy
- This parameter is required.
-
addRotationSchedule
@Stability(Stable) @NotNull public final RotationSchedule addRotationSchedule(@NotNull String id, @NotNull RotationScheduleOptions options) Adds a rotation schedule to the secret.- Specified by:
addRotationSchedule
in interfaceISecret
- Specified by:
addRotationSchedule
in interfaceISecret.Jsii$Default
- Parameters:
id
- This parameter is required.options
- This parameter is required.
-
addToResourcePolicy
@Stability(Stable) @NotNull public final AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) Adds a statement to the IAM resource policy associated with this secret.If this secret was created in this stack, a resource policy will be automatically created upon the first call to
addToResourcePolicy
. If the secret is imported, then this is a no-op.- Specified by:
addToResourcePolicy
in interfaceISecret
- Specified by:
addToResourcePolicy
in interfaceISecret.Jsii$Default
- Parameters:
statement
- This parameter is required.
-
attach
Attach a target to this secret.- Specified by:
attach
in interfaceISecret
- Specified by:
attach
in interfaceISecret.Jsii$Default
- Parameters:
target
- The target to attach. This parameter is required.- Returns:
- An attached secret
-
denyAccountRootDelete
@Stability(Stable) public final void denyAccountRootDelete()Denies theDeleteSecret
action to all principals within the current account.- Specified by:
denyAccountRootDelete
in interfaceISecret
- Specified by:
denyAccountRootDelete
in interfaceISecret.Jsii$Default
-
grantRead
@Stability(Stable) @NotNull public final Grant grantRead(@NotNull IGrantable grantee, @Nullable List<String> versionStages) Grants reading the secret value to some role.- Specified by:
grantRead
in interfaceISecret
- Specified by:
grantRead
in interfaceISecret.Jsii$Default
- Parameters:
grantee
- the principal being granted permission. This parameter is required.versionStages
- the version stages the grant is limited to.
-
grantRead
Grants reading the secret value to some role. -
grantWrite
Grants writing and updating the secret value to some role.- Specified by:
grantWrite
in interfaceISecret
- Specified by:
grantWrite
in interfaceISecret.Jsii$Default
- Parameters:
grantee
- the principal being granted permission. This parameter is required.
-
secretValueFromJson
Interpret the secret as a JSON object and return a field's value from it as aSecretValue
.- Specified by:
secretValueFromJson
in interfaceISecret
- Specified by:
secretValueFromJson
in interfaceISecret.Jsii$Default
- Parameters:
key
- This parameter is required.
-