Secret
This class encapsulates and extends the ROS resource type ALIYUN::KMS::Secret, which is used to create a secret and store the initial version of the secret.
Initializers
import com.aliyun.ros.cdk.kms.Secret;
Secret.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.secretData(java.lang.String)
.secretData(IResolvable)
.secretName(java.lang.String)
.secretName(IResolvable)
.versionId(java.lang.String)
.versionId(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .dkmsInstanceId(java.lang.String)
// .dkmsInstanceId(IResolvable)
// .enableAutomaticRotation(java.lang.Boolean)
// .enableAutomaticRotation(IResolvable)
// .encryptionKeyId(java.lang.String)
// .encryptionKeyId(IResolvable)
// .extendedConfig(IResolvable)
// .extendedConfig(java.util.Map<java.lang.String, java.lang.Object>)
// .forceDeleteWithoutRecovery(java.lang.Boolean)
// .forceDeleteWithoutRecovery(IResolvable)
// .recoveryWindowInDays(java.lang.Number)
// .recoveryWindowInDays(IResolvable)
// .rotationInterval(java.lang.String)
// .rotationInterval(IResolvable)
// .secretDataType(java.lang.String)
// .secretDataType(IResolvable)
// .secretType(java.lang.String)
// .secretType(IResolvable)
// .versionStages(IResolvable)
// .versionStages(java.util.List<java.lang.String)
// .versionStages(IResolvable>)
.build();
| Name | Type | Description |
|---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
secretData |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property secretData: The value of the secret that you want to create. |
secretName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property secretName: The name of the secret. |
versionId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property versionId: The version number of the initial version. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: The description of the secret. |
dkmsInstanceId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property dkmsInstanceId: The ID of the dedicated KMS instance. |
enableAutomaticRotation |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property enableAutomaticRotation: Specifies whether to enable automatic rotation. |
encryptionKeyId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property encryptionKeyId: The ID of the KMS CMK that is used to encrypt the secret value. |
extendedConfig |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property extendedConfig: The extended configuration of the secret. |
forceDeleteWithoutRecovery |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property forceDeleteWithoutRecovery: Specifies whether to forcibly delete the secret. |
recoveryWindowInDays |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property recoveryWindowInDays: Specifies the recovery period of the secret if you do not forcibly delete it. |
rotationInterval |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property rotationInterval: The interval for automatic rotation. |
secretDataType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property secretDataType: The type of the secret value. |
secretType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property secretType: The type of the secret. |
versionStages |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property versionStages: The stage labels that mark the secret version. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
secretDataRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property secretData: The value of the secret that you want to create.
Secrets Manager encrypts the secret value and stores it in the initial version.
secretNameRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property secretName: The name of the secret.
versionIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property versionId: The version number of the initial version.
Version numbers are unique in each secret object.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of the secret.
dkmsInstanceIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dkmsInstanceId: The ID of the dedicated KMS instance.
enableAutomaticRotationOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableAutomaticRotation: Specifies whether to enable automatic rotation.
Valid values: true: specifies to enable automatic rotation. false: specifies to disable automatic rotation. This is the default value.
encryptionKeyIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property encryptionKeyId: The ID of the KMS CMK that is used to encrypt the secret value.
If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret. Note The KMS CMK must be a symmetric key.
extendedConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property extendedConfig: The extended configuration of the secret.
This parameter specifies the properties of the secret of the specific type.
forceDeleteWithoutRecoveryOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property forceDeleteWithoutRecovery: Specifies whether to forcibly delete the secret.
If this parameter is set to true, the secret cannot be recovered. Valid values: true false (default value)
recoveryWindowInDaysOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property recoveryWindowInDays: Specifies the recovery period of the secret if you do not forcibly delete it.
Default value: 30
rotationIntervalOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property rotationInterval: The interval for automatic rotation.
Valid values: 6 hours to 8,760 hours (365 days). The value is in the integer[unit] format. The unit can be d (day), h (hour), m (minute), or s (second). For example, both 7d and 604800s indicate a seven-day interval.
secretDataTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property secretDataType: The type of the secret value.
Valid values: text (default value) binary
secretTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property secretType: The type of the secret.
Valid values: Generic: specifies a generic secret. Rds: specifies a managed ApsaraDB RDS secret. RAMCredentials: specifies a managed RAM secret. ECS: specifies a managed ECS secret.
versionStagesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property versionStages: The stage labels that mark the secret version.
ACSCurrent will be marked as DefaultIf you do not specify it, Secrets Manager marks it with "ACSCurrent".
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.kms.Secret;
Secret.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrArn |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Arn: The Alibaba Cloud Resource Name (ARN). |
attrSecretName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SecretName: The name of the secret. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrArnRequired
public IResolvable getAttrArn();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attrSecretNameRequired
public IResolvable getAttrSecretName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute SecretName: The name of the secret.