@Internal public static interface ISecret.Jsii$Default extends ISecret, IResource.Jsii$Default
ISecret.ISecret.Jsii$Default, ISecret.Jsii$Proxy| Modifier and Type | Method and Description |
|---|---|
default RotationSchedule |
addRotationSchedule(String id,
RotationScheduleOptions options)
(experimental) Adds a rotation schedule to the secret.
|
default AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement)
(experimental) Adds a statement to the IAM resource policy associated with this secret.
|
default ISecret |
attach(ISecretAttachmentTarget target)
(experimental) Attach a target to this secret.
|
default void |
denyAccountRootDelete()
(experimental) Denies the `DeleteSecret` action to all principals within the current account.
|
default IKey |
getEncryptionKey()
(experimental) The customer-managed encryption key that is used to encrypt this secret, if any.
|
default ResourceEnvironment |
getEnv()
(experimental) The environment this resource belongs to.
|
default software.constructs.Node |
getNode()
The tree node.
|
default String |
getSecretArn()
(experimental) The ARN of the secret in AWS Secrets Manager.
|
default String |
getSecretFullArn()
(experimental) The full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix.
|
default String |
getSecretName()
(experimental) The name of the secret.
|
default SecretValue |
getSecretValue()
(experimental) Retrieve the value of the stored secret as a `SecretValue`.
|
default Stack |
getStack()
(experimental) The stack in which this resource is defined.
|
default Grant |
grantRead(IGrantable grantee,
List<String> versionStages)
(experimental) Grants reading the secret value to some role.
|
default Grant |
grantWrite(IGrantable grantee)
(experimental) Grants writing and updating the secret value to some role.
|
default SecretValue |
secretValueFromJson(String key)
(experimental) Interpret the secret as a JSON object and return a field's value from it as a `SecretValue`.
|
@Stability(value=Stable) @NotNull default software.constructs.Node getNode()
getNode in interface software.constructs.IConstructgetNode in interface software.constructs.IConstruct.Jsii$DefaultgetNode in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default ResourceEnvironment getEnv()
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.
getEnv in interface IResourcegetEnv in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default Stack getStack()
getStack in interface IResourcegetStack in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default String getSecretArn()
Will return the full ARN if available, otherwise a partial arn.
For secrets imported by the deprecated fromSecretName, it will return the secretName.
getSecretArn in interface ISecret@Stability(value=Experimental) @NotNull default String getSecretName()
For "owned" secrets, this will be the full resource name (secret name + suffix), unless the '@aws-cdk/aws-secretsmanager:parseOwnedSecretName' feature flag is set.
getSecretName in interface ISecret@Stability(value=Experimental) @NotNull default SecretValue getSecretValue()
getSecretValue in interface ISecret@Stability(value=Experimental) @Nullable default IKey getEncryptionKey()
When not specified, the default KMS key for the account and region is being used.
getEncryptionKey in interface ISecret@Stability(value=Experimental) @Nullable default String getSecretFullArn()
This is equal to secretArn in most cases, but is undefined when a full ARN is not available (e.g., secrets imported by name).
getSecretFullArn in interface ISecret@Stability(value=Experimental) @NotNull default RotationSchedule addRotationSchedule(@NotNull String id, @NotNull RotationScheduleOptions options)
addRotationSchedule in interface ISecretid - This parameter is required.options - This parameter is required.@Stability(value=Experimental) @NotNull default AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement)
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.
addToResourcePolicy in interface ISecretstatement - This parameter is required.@Stability(value=Experimental) @NotNull default ISecret attach(@NotNull ISecretAttachmentTarget target)
@Stability(value=Experimental) default void denyAccountRootDelete()
denyAccountRootDelete in interface ISecret@Stability(value=Experimental) @NotNull default Grant grantRead(@NotNull IGrantable grantee, @Nullable List<String> versionStages)
@Stability(value=Experimental) @NotNull default Grant grantWrite(@NotNull IGrantable grantee)
grantWrite in interface ISecretgrantee - the principal being granted permission. This parameter is required.@Stability(value=Experimental) @NotNull default SecretValue secretValueFromJson(@NotNull String key)
secretValueFromJson in interface ISecretkey - This parameter is required.Copyright © 2021. All rights reserved.