Interface ISecret.Jsii$Default
- All Superinterfaces:
software.constructs.IConstruct,software.constructs.IConstruct.Jsii$Default,software.constructs.IDependable,software.constructs.IDependable.Jsii$Default,IResource,IResource.Jsii$Default,ISecret,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
ISecretTargetAttachment.Jsii$Default
- All Known Implementing Classes:
ISecret.Jsii$Proxy,ISecretTargetAttachment.Jsii$Proxy
- Enclosing interface:
ISecret
ISecret.-
Nested Class Summary
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IDependable
software.constructs.IDependable.Jsii$Default, software.constructs.IDependable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default, IResource.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.secretsmanager.ISecret
ISecret.Jsii$Default, ISecret.Jsii$Proxy -
Method Summary
Modifier and TypeMethodDescriptiondefault RotationScheduleaddRotationSchedule(String id, RotationScheduleOptions options) Adds a rotation schedule to the secret.default AddToResourcePolicyResultaddToResourcePolicy(PolicyStatement statement) Adds a statement to the IAM resource policy associated with this secret.default voidapplyRemovalPolicy(RemovalPolicy policy) Apply the given removal policy to this resource.default ISecretattach(ISecretAttachmentTarget target) Attach a target to this secret.default voidDenies theDeleteSecretaction to all principals within the current account.default IKeyThe customer-managed encryption key that is used to encrypt this secret, if any.default ResourceEnvironmentgetEnv()The environment this resource belongs to.default software.constructs.NodegetNode()The tree node.default StringThe ARN of the secret in AWS Secrets Manager.default StringThe full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix.default StringThe name of the secret.default SecretValueRetrieve the value of the stored secret as aSecretValue.default StackgetStack()The stack in which this resource is defined.default GrantgrantRead(IGrantable grantee, List<String> versionStages) Grants reading the secret value to some role.default GrantgrantWrite(IGrantable grantee) Grants writing and updating the secret value to some role.default SecretValueInterpret the secret as a JSON object and return a field's value from it as aSecretValue.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getNode
@Stability(Stable) @NotNull default software.constructs.Node getNode()The tree node.- Specified by:
getNodein interfacesoftware.constructs.IConstruct- Specified by:
getNodein interfacesoftware.constructs.IConstruct.Jsii$Default- Specified by:
getNodein interfaceIResource.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:
getEnvin interfaceIResource- Specified by:
getEnvin interfaceIResource.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStackin interfaceIResource- Specified by:
getStackin interfaceIResource.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:
getSecretArnin interfaceISecret
-
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:
getSecretNamein interfaceISecret
-
getSecretValue
Retrieve the value of the stored secret as aSecretValue.- Specified by:
getSecretValuein interfaceISecret
-
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:
getEncryptionKeyin interfaceISecret
-
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
secretArnin most cases, but is undefined when a full ARN is not available (e.g., secrets imported by name).- Specified by:
getSecretFullArnin interfaceISecret
-
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:
applyRemovalPolicyin interfaceIResource- Specified by:
applyRemovalPolicyin interfaceIResource.Jsii$Default- Parameters:
policy- This parameter is required.
-
addRotationSchedule
@Stability(Stable) @NotNull default RotationSchedule addRotationSchedule(@NotNull String id, @NotNull RotationScheduleOptions options) Adds a rotation schedule to the secret.- Specified by:
addRotationSchedulein interfaceISecret- Parameters:
id- This parameter is required.options- This parameter is required.
-
addToResourcePolicy
@Stability(Stable) @NotNull default 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:
addToResourcePolicyin interfaceISecret- Parameters:
statement- This parameter is required.
-
attach
Attach a target to this secret. -
denyAccountRootDelete
@Stability(Stable) default void denyAccountRootDelete()Denies theDeleteSecretaction to all principals within the current account.- Specified by:
denyAccountRootDeletein interfaceISecret
-
grantRead
@Stability(Stable) @NotNull default Grant grantRead(@NotNull IGrantable grantee, @Nullable List<String> versionStages) Grants reading the secret value to some role. -
grantWrite
Grants writing and updating the secret value to some role.- Specified by:
grantWritein interfaceISecret- 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:
secretValueFromJsonin interfaceISecret- Parameters:
key- This parameter is required.
-