Skip to content

SecretProps

Properties for defining a Secret.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-kms-secret

Initializer

import com.aliyun.ros.cdk.kms.SecretProps;
SecretProps.builder()
    .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();

Properties

Name Type 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.

secretDataRequired

public java.lang.Object getSecretData();
  • 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

public java.lang.Object getSecretName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property secretName: The name of the secret.


versionIdRequired

public java.lang.Object getVersionId();
  • 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

public java.lang.Object getDescription();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property description: The description of the secret.


dkmsInstanceIdOptional

public java.lang.Object getDkmsInstanceId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property dkmsInstanceId: The ID of the dedicated KMS instance.


enableAutomaticRotationOptional

public java.lang.Object getEnableAutomaticRotation();
  • 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

public java.lang.Object getEncryptionKeyId();
  • 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

public java.lang.Object getExtendedConfig();
  • 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

public java.lang.Object getForceDeleteWithoutRecovery();
  • 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

public java.lang.Object getRecoveryWindowInDays();
  • 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

public java.lang.Object getRotationInterval();
  • 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

public java.lang.Object getSecretDataType();
  • 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

public java.lang.Object getSecretType();
  • 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

public java.lang.Object getVersionStages();
  • 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".