Skip to content

SecretProps

Properties for defining a Secret.

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

Initializer

import ros_cdk_kms
ros_cdk_kms.SecretProps(
  secret_data: typing.Union[str, IResolvable],
  secret_name: typing.Union[str, IResolvable],
  version_id: typing.Union[str, IResolvable],
  description: typing.Union[str, IResolvable] = None,
  dkms_instance_id: typing.Union[str, IResolvable] = None,
  enable_automatic_rotation: typing.Union[bool, IResolvable] = None,
  encryption_key_id: typing.Union[str, IResolvable] = None,
  extended_config: typing.Union[IResolvable, typing.Mapping[typing.Any]] = None,
  force_delete_without_recovery: typing.Union[bool, IResolvable] = None,
  recovery_window_in_days: typing.Union[typing.Union[int, float], IResolvable] = None,
  rotation_interval: typing.Union[str, IResolvable] = None,
  secret_data_type: typing.Union[str, IResolvable] = None,
  secret_type: typing.Union[str, IResolvable] = None,
  version_stages: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None
)

Properties

Name Type Description
secret_data typing.Union[str, ros_cdk_core.IResolvable] Property secretData: The value of the secret that you want to create.
secret_name typing.Union[str, ros_cdk_core.IResolvable] Property secretName: The name of the secret.
version_id typing.Union[str, ros_cdk_core.IResolvable] Property versionId: The version number of the initial version.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: The description of the secret.
dkms_instance_id typing.Union[str, ros_cdk_core.IResolvable] Property dkmsInstanceId: The ID of the dedicated KMS instance.
enable_automatic_rotation typing.Union[bool, ros_cdk_core.IResolvable] Property enableAutomaticRotation: Specifies whether to enable automatic rotation.
encryption_key_id typing.Union[str, ros_cdk_core.IResolvable] Property encryptionKeyId: The ID of the KMS CMK that is used to encrypt the secret value.
extended_config typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]] Property extendedConfig: The extended configuration of the secret.
force_delete_without_recovery typing.Union[bool, ros_cdk_core.IResolvable] Property forceDeleteWithoutRecovery: Specifies whether to forcibly delete the secret.
recovery_window_in_days typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property recoveryWindowInDays: Specifies the recovery period of the secret if you do not forcibly delete it.
rotation_interval typing.Union[str, ros_cdk_core.IResolvable] Property rotationInterval: The interval for automatic rotation.
secret_data_type typing.Union[str, ros_cdk_core.IResolvable] Property secretDataType: The type of the secret value.
secret_type typing.Union[str, ros_cdk_core.IResolvable] Property secretType: The type of the secret.
version_stages typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] Property versionStages: The stage labels that mark the secret version.

secret_dataRequired

secret_data: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.


secret_nameRequired

secret_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property secretName: The name of the secret.


version_idRequired

version_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property versionId: The version number of the initial version.

Version numbers are unique in each secret object.


descriptionOptional

description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: The description of the secret.


dkms_instance_idOptional

dkms_instance_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property dkmsInstanceId: The ID of the dedicated KMS instance.


enable_automatic_rotationOptional

enable_automatic_rotation: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, 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.


encryption_key_idOptional

encryption_key_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.


extended_configOptional

extended_config: typing.Union[IResolvable, typing.Mapping[typing.Any]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]]

Property extendedConfig: The extended configuration of the secret.

This parameter specifies the properties of the secret of the specific type.


force_delete_without_recoveryOptional

force_delete_without_recovery: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, 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)


recovery_window_in_daysOptional

recovery_window_in_days: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property recoveryWindowInDays: Specifies the recovery period of the secret if you do not forcibly delete it.

Default value: 30


rotation_intervalOptional

rotation_interval: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.


secret_data_typeOptional

secret_data_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property secretDataType: The type of the secret value.

Valid values: text (default value) binary


secret_typeOptional

secret_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.


version_stagesOptional

version_stages: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]

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".