@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:14.743Z") @Stability(value=Stable) public class CfnRotationSchedule extends CfnResource implements IInspectable
Configures rotation for a secret. You must already configure the secret with the details of the database or service. If you define both the secret and the database or service in an AWS CloudFormation template, then define the AWS::SecretsManager::SecretTargetAttachment resource to populate the secret with the connection details of the database or service before you attempt to configure rotation.
When you configure rotation for a secret, AWS CloudFormation automatically rotates the secret one time.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.secretsmanager.*;
CfnRotationSchedule cfnRotationSchedule = CfnRotationSchedule.Builder.create(this, "MyCfnRotationSchedule")
.secretId("secretId")
// the properties below are optional
.hostedRotationLambda(HostedRotationLambdaProperty.builder()
.rotationType("rotationType")
// the properties below are optional
.kmsKeyArn("kmsKeyArn")
.masterSecretArn("masterSecretArn")
.masterSecretKmsKeyArn("masterSecretKmsKeyArn")
.rotationLambdaName("rotationLambdaName")
.superuserSecretArn("superuserSecretArn")
.superuserSecretKmsKeyArn("superuserSecretKmsKeyArn")
.vpcSecurityGroupIds("vpcSecurityGroupIds")
.vpcSubnetIds("vpcSubnetIds")
.build())
.rotationLambdaArn("rotationLambdaArn")
.rotationRules(RotationRulesProperty.builder()
.automaticallyAfterDays(123)
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnRotationSchedule.Builder
A fluent builder for
CfnRotationSchedule. |
static interface |
CfnRotationSchedule.HostedRotationLambdaProperty
Specifies that you want to create a hosted Lambda rotation function.
|
static interface |
CfnRotationSchedule.RotationRulesProperty
A structure that defines the rotation configuration for the secret.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnRotationSchedule(Construct scope,
String id,
CfnRotationScheduleProps props)
Create a new `AWS::SecretsManager::RotationSchedule`.
|
protected |
CfnRotationSchedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnRotationSchedule(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
getCfnProperties() |
Object |
getHostedRotationLambda()
To use these values, you must specify `Transform: AWS::SecretsManager-2020-07-23` at the beginning of the CloudFormation template.
|
String |
getRotationLambdaArn()
The ARN of the Lambda function that can rotate the secret.
|
Object |
getRotationRules()
A structure that defines the rotation configuration for this secret.
|
String |
getSecretId()
The ARN or name of the secret to rotate.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setHostedRotationLambda(CfnRotationSchedule.HostedRotationLambdaProperty value)
To use these values, you must specify `Transform: AWS::SecretsManager-2020-07-23` at the beginning of the CloudFormation template.
|
void |
setHostedRotationLambda(IResolvable value)
To use these values, you must specify `Transform: AWS::SecretsManager-2020-07-23` at the beginning of the CloudFormation template.
|
void |
setRotationLambdaArn(String value)
The ARN of the Lambda function that can rotate the secret.
|
void |
setRotationRules(CfnRotationSchedule.RotationRulesProperty value)
A structure that defines the rotation configuration for this secret.
|
void |
setRotationRules(IResolvable value)
A structure that defines the rotation configuration for this secret.
|
void |
setSecretId(String value)
The ARN or name of the secret to rotate.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnRotationSchedule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnRotationSchedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnRotationSchedule(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnRotationScheduleProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getSecretId()
To reference a secret also created in this template, use the Ref function with the secret's logical ID.
@Stability(value=Stable)
public void setSecretId(@NotNull
String value)
To reference a secret also created in this template, use the Ref function with the secret's logical ID.
@Stability(value=Stable) @Nullable public Object getHostedRotationLambda()
When you enter valid values for RotationSchedule.HostedRotationLambda , Secrets Manager launches a Lambda that performs rotation on the secret specified in the secret-id property. The template creates a Lambda as part of a nested stack within the current stack.
@Stability(value=Stable)
public void setHostedRotationLambda(@Nullable
CfnRotationSchedule.HostedRotationLambdaProperty value)
When you enter valid values for RotationSchedule.HostedRotationLambda , Secrets Manager launches a Lambda that performs rotation on the secret specified in the secret-id property. The template creates a Lambda as part of a nested stack within the current stack.
@Stability(value=Stable)
public void setHostedRotationLambda(@Nullable
IResolvable value)
When you enter valid values for RotationSchedule.HostedRotationLambda , Secrets Manager launches a Lambda that performs rotation on the secret specified in the secret-id property. The template creates a Lambda as part of a nested stack within the current stack.
@Stability(value=Stable) @Nullable public String getRotationLambdaArn()
If you don't specify this parameter, then the secret must already have the ARN of a Lambda function configured.
To reference a Lambda function also created in this template, use the Ref function with the function's logical ID.
@Stability(value=Stable)
public void setRotationLambdaArn(@Nullable
String value)
If you don't specify this parameter, then the secret must already have the ARN of a Lambda function configured.
To reference a Lambda function also created in this template, use the Ref function with the function's logical ID.
@Stability(value=Stable) @Nullable public Object getRotationRules()
@Stability(value=Stable)
public void setRotationRules(@Nullable
CfnRotationSchedule.RotationRulesProperty value)
@Stability(value=Stable)
public void setRotationRules(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.