CfnRotationScheduleMixinProps

class aws_cdk.mixins_preview.aws_secretsmanager.mixins.CfnRotationScheduleMixinProps(*, external_secret_rotation_metadata=None, external_secret_rotation_role_arn=None, hosted_rotation_lambda=None, rotate_immediately_on_update=None, rotation_lambda_arn=None, rotation_rules=None, secret_id=None)

Bases: object

Properties for CfnRotationSchedulePropsMixin.

Parameters:
  • external_secret_rotation_metadata (Union[IResolvable, Sequence[Union[IResolvable, ExternalSecretRotationMetadataItemProperty, Dict[str, Any]]], None]) – The list of metadata needed to successfully rotate a managed external secret.

  • external_secret_rotation_role_arn (Optional[str]) – The ARN of the IAM role that is used by Secrets Manager to rotate a managed external secret.

  • hosted_rotation_lambda (Union[IResolvable, HostedRotationLambdaProperty, Dict[str, Any], None]) – Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specify RotationLambdaARN instead. You must specify Transform: AWS::SecretsManager-2024-09-16 at the beginning of the CloudFormation template. Transforms are macros hosted by AWS CloudFormation that help you create and manage complex infrastructure. The Transform: AWS::SecretsManager-2024-09-16 transform automatically extends the CloudFormation stack to include a nested stack (of type AWS::CloudFormation::Stack ), which then creates and updates on your behalf during subsequent stack operations, the appropriate rotation Lambda function for your database or service. For general information on transforms, see the AWS CloudFormation documentation. For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret . For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .

  • rotate_immediately_on_update (Union[bool, IResolvable, None]) – Determines whether to rotate the secret immediately or wait until the next scheduled rotation window when the rotation schedule is updated. The rotation schedule is defined in RotationRules . The default for RotateImmediatelyOnUpdate is true . If you don’t specify this value, Secrets Manager rotates the secret immediately. If you set RotateImmediatelyOnUpdate to false , Secrets Manager tests the rotation configuration by running the `testSecret step <https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html>`_ of the Lambda rotation function. This test creates an AWSPENDING version of the secret and then removes it. .. epigraph:: When changing an existing rotation schedule and setting RotateImmediatelyOnUpdate to false : - If using AutomaticallyAfterDays or a ScheduleExpression with rate() , the previously scheduled rotation might still occur. - To prevent unintended rotations, use a ScheduleExpression with cron() for granular control over rotation windows. Rotation is an asynchronous process. For more information, see How rotation works .

  • rotation_lambda_arn (Optional[str]) –

    The ARN of an existing Lambda rotation function. To specify a rotation function that is also defined in this template, use the Ref function. For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret . For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster . To create a new rotation function based on one of the Secrets Manager rotation function templates , specify HostedRotationLambda instead.

  • rotation_rules (Union[IResolvable, RotationRulesProperty, Dict[str, Any], None]) – A structure that defines the rotation configuration for this secret.

  • secret_id (Optional[str]) –

    The ARN or name of the secret to rotate. This is unique for each rotation schedule definition. To reference a secret also created in this template, use the Ref function with the secret’s logical ID.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_secretsmanager import mixins as secretsmanager_mixins

cfn_rotation_schedule_mixin_props = secretsmanager_mixins.CfnRotationScheduleMixinProps(
    external_secret_rotation_metadata=[secretsmanager_mixins.CfnRotationSchedulePropsMixin.ExternalSecretRotationMetadataItemProperty(
        key="key",
        value="value"
    )],
    external_secret_rotation_role_arn="externalSecretRotationRoleArn",
    hosted_rotation_lambda=secretsmanager_mixins.CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty(
        exclude_characters="excludeCharacters",
        kms_key_arn="kmsKeyArn",
        master_secret_arn="masterSecretArn",
        master_secret_kms_key_arn="masterSecretKmsKeyArn",
        rotation_lambda_name="rotationLambdaName",
        rotation_type="rotationType",
        runtime="runtime",
        superuser_secret_arn="superuserSecretArn",
        superuser_secret_kms_key_arn="superuserSecretKmsKeyArn",
        vpc_security_group_ids="vpcSecurityGroupIds",
        vpc_subnet_ids="vpcSubnetIds"
    ),
    rotate_immediately_on_update=False,
    rotation_lambda_arn="rotationLambdaArn",
    rotation_rules=secretsmanager_mixins.CfnRotationSchedulePropsMixin.RotationRulesProperty(
        automatically_after_days=123,
        duration="duration",
        schedule_expression="scheduleExpression"
    ),
    secret_id="secretId"
)

Attributes

external_secret_rotation_metadata

The list of metadata needed to successfully rotate a managed external secret.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html#cfn-secretsmanager-rotationschedule-externalsecretrotationmetadata

external_secret_rotation_role_arn

The ARN of the IAM role that is used by Secrets Manager to rotate a managed external secret.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html#cfn-secretsmanager-rotationschedule-externalsecretrotationrolearn

hosted_rotation_lambda

Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specify RotationLambdaARN instead.

You must specify Transform: AWS::SecretsManager-2024-09-16 at the beginning of the CloudFormation template. Transforms are macros hosted by AWS CloudFormation that help you create and manage complex infrastructure. The Transform: AWS::SecretsManager-2024-09-16 transform automatically extends the CloudFormation stack to include a nested stack (of type AWS::CloudFormation::Stack ), which then creates and updates on your behalf during subsequent stack operations, the appropriate rotation Lambda function for your database or service. For general information on transforms, see the AWS CloudFormation documentation.

For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .

For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html#cfn-secretsmanager-rotationschedule-hostedrotationlambda

rotate_immediately_on_update

Determines whether to rotate the secret immediately or wait until the next scheduled rotation window when the rotation schedule is updated.

The rotation schedule is defined in RotationRules .

The default for RotateImmediatelyOnUpdate is true . If you don’t specify this value, Secrets Manager rotates the secret immediately.

If you set RotateImmediatelyOnUpdate to false , Secrets Manager tests the rotation configuration by running the `testSecret step <https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html>`_ of the Lambda rotation function. This test creates an AWSPENDING version of the secret and then removes it. .. epigraph:

When changing an existing rotation schedule and setting ``RotateImmediatelyOnUpdate`` to ``false`` :

- If using ``AutomaticallyAfterDays`` or a ``ScheduleExpression`` with ``rate()`` , the previously scheduled rotation might still occur.
- To prevent unintended rotations, use a ``ScheduleExpression`` with ``cron()`` for granular control over rotation windows.

Rotation is an asynchronous process. For more information, see How rotation works .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html#cfn-secretsmanager-rotationschedule-rotateimmediatelyonupdate

rotation_lambda_arn

The ARN of an existing Lambda rotation function.

To specify a rotation function that is also defined in this template, use the Ref function.

For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .

For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .

To create a new rotation function based on one of the Secrets Manager rotation function templates , specify HostedRotationLambda instead.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html#cfn-secretsmanager-rotationschedule-rotationlambdaarn

rotation_rules

A structure that defines the rotation configuration for this secret.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html#cfn-secretsmanager-rotationschedule-rotationrules

secret_id

The ARN or name of the secret to rotate. This is unique for each rotation schedule definition.

To reference a secret also created in this template, use the Ref function with the secret’s logical ID.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html#cfn-secretsmanager-rotationschedule-secretid