@Generated(value="jsii-pacmak/1.29.0 (build 41df200)", date="2021-06-02T09:55:48.021Z") @Stability(value=Experimental) public class SecretTargetAttachment extends Resource implements ISecretTargetAttachment, ISecret
| Modifier and Type | Class and Description |
|---|---|
static class |
SecretTargetAttachment.Builder
(experimental) A fluent builder for
SecretTargetAttachment. |
software.amazon.jsii.JsiiObject.InitializationModeISecretTargetAttachment.Jsii$Default, ISecretTargetAttachment.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
SecretTargetAttachment(software.constructs.Construct scope,
String id,
SecretTargetAttachmentProps props) |
protected |
SecretTargetAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
SecretTargetAttachment(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
RotationSchedule |
addRotationSchedule(String id,
RotationScheduleOptions options)
(experimental) Adds a rotation schedule to the secret.
|
AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement)
(experimental) Adds a statement to the IAM resource policy associated with this secret.
|
ISecret |
attach(ISecretAttachmentTarget target)
(experimental) Attach a target to this secret.
|
void |
denyAccountRootDelete()
(experimental) Denies the `DeleteSecret` action to all principals within the current account.
|
static ISecretTargetAttachment |
fromSecretTargetAttachmentSecretArn(software.constructs.Construct scope,
String id,
String secretTargetAttachmentSecretArn) |
protected String |
getArnForPolicies()
(experimental) Provides an identifier for this secret for use in IAM policies.
|
protected Boolean |
getAutoCreatePolicy() |
IKey |
getEncryptionKey()
(experimental) The customer-managed encryption key that is used to encrypt this secret, if any.
|
String |
getSecretArn()
(experimental) The ARN of the secret in AWS Secrets Manager.
|
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.
|
String |
getSecretName()
(experimental) The name of the secret.
|
String |
getSecretTargetAttachmentSecretArn()
(experimental) Same as `secretArn`.
|
SecretValue |
getSecretValue()
(experimental) Retrieve the value of the stored secret as a `SecretValue`.
|
Grant |
grantRead(IGrantable grantee)
(experimental) Grants reading the secret value to some role.
|
Grant |
grantRead(IGrantable grantee,
List<String> versionStages)
(experimental) Grants reading the secret value to some role.
|
Grant |
grantWrite(IGrantable grantee)
(experimental) Grants writing and updating the secret value to some role.
|
SecretValue |
secretValueFromJson(String jsonField)
(experimental) Interpret the secret as a JSON object and return a field's value from it as a `SecretValue`.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected SecretTargetAttachment(software.amazon.jsii.JsiiObjectRef objRef)
protected SecretTargetAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public SecretTargetAttachment(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
SecretTargetAttachmentProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static ISecretTargetAttachment fromSecretTargetAttachmentSecretArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String secretTargetAttachmentSecretArn)
scope - This parameter is required.id - This parameter is required.secretTargetAttachmentSecretArn - This parameter is required.@Stability(value=Experimental) @NotNull public 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 public 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 public ISecret attach(@NotNull ISecretAttachmentTarget target)
@Stability(value=Experimental) public void denyAccountRootDelete()
denyAccountRootDelete in interface ISecret@Stability(value=Experimental) @NotNull public Grant grantRead(@NotNull IGrantable grantee, @Nullable List<String> versionStages)
@Stability(value=Experimental) @NotNull public Grant grantRead(@NotNull IGrantable grantee)
@Stability(value=Experimental) @NotNull public Grant grantWrite(@NotNull IGrantable grantee)
grantWrite in interface ISecretgrantee - This parameter is required.@Stability(value=Experimental) @NotNull public SecretValue secretValueFromJson(@NotNull String jsonField)
secretValueFromJson in interface ISecretjsonField - This parameter is required.@Stability(value=Experimental) @NotNull protected String getArnForPolicies()
If there is a full ARN, this is just the ARN; if we have a partial ARN -- due to either importing by secret name or partial ARN -- then we need to add a suffix to capture the full ARN's format.
@Stability(value=Experimental) @NotNull protected Boolean getAutoCreatePolicy()
@Stability(value=Experimental) @NotNull public 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 public 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 public String getSecretTargetAttachmentSecretArn()
getSecretTargetAttachmentSecretArn in interface ISecretTargetAttachment@Stability(value=Experimental) @NotNull public SecretValue getSecretValue()
getSecretValue in interface ISecret@Stability(value=Experimental) @Nullable public 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 public 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 ISecretCopyright © 2021. All rights reserved.