Class: AWSCDK::RDS::RotationSingleUserOptions

Inherits:
CommonRotationUserOptions
  • Object
show all
Defined in:
rds/rotation_single_user_options.rb

Overview

Options to add the multi user rotation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(automatically_after: nil, endpoint: nil, exclude_characters: nil, rotate_immediately_on_update: nil, security_group: nil, vpc_subnets: nil) ⇒ RotationSingleUserOptions

Returns a new instance of RotationSingleUserOptions.

Parameters:

  • automatically_after (AWSCDK::Duration, nil) (defaults to: nil)

    Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.

  • endpoint (AWSCDK::EC2::IInterfaceVPCEndpoint, nil) (defaults to: nil)

    The VPC interface endpoint to use for the Secrets Manager API.

  • exclude_characters (String, nil) (defaults to: nil)

    Specifies characters to not include in generated passwords.

  • rotate_immediately_on_update (Boolean, nil) (defaults to: nil)

    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.

  • security_group (AWSCDK::EC2::ISecurityGroup, nil) (defaults to: nil)

    The security group for the Lambda rotation function.

  • vpc_subnets (AWSCDK::EC2::SubnetSelection, nil) (defaults to: nil)

    Where to place the rotation Lambda function.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'rds/rotation_single_user_options.rb', line 13

def initialize(automatically_after: nil, endpoint: nil, exclude_characters: nil, rotate_immediately_on_update: nil, security_group: nil, vpc_subnets: nil)
  @automatically_after = automatically_after
  Jsii::Type.check_type(@automatically_after, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "automaticallyAfter") unless @automatically_after.nil?
  @endpoint = endpoint
  Jsii::Type.check_type(@endpoint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklJbnRlcmZhY2VWcGNFbmRwb2ludCJ9")), "endpoint") unless @endpoint.nil?
  @exclude_characters = exclude_characters
  Jsii::Type.check_type(@exclude_characters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "excludeCharacters") unless @exclude_characters.nil?
  @rotate_immediately_on_update = rotate_immediately_on_update
  Jsii::Type.check_type(@rotate_immediately_on_update, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "rotateImmediatelyOnUpdate") unless @rotate_immediately_on_update.nil?
  @security_group = security_group
  Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.nil?
  @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets
  Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil?
end

Instance Attribute Details

#automatically_afterAWSCDK::Duration? (readonly)

Note:

Default: - 30 days

Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.

Returns:



32
33
34
# File 'rds/rotation_single_user_options.rb', line 32

def automatically_after
  @automatically_after
end

#endpointAWSCDK::EC2::IInterfaceVPCEndpoint? (readonly)

Note:

Default: https://secretsmanager..amazonaws.com

The VPC interface endpoint to use for the Secrets Manager API.

If you enable private DNS hostnames for your VPC private endpoint (the default), you don't need to specify an endpoint. The standard Secrets Manager DNS hostname the Secrets Manager CLI and SDKs use by default (https://secretsmanager..amazonaws.com) automatically resolves to your VPC endpoint.



42
43
44
# File 'rds/rotation_single_user_options.rb', line 42

def endpoint
  @endpoint
end

#exclude_charactersString? (readonly)

Note:

Default: " %+~`#$&*()|[]{}:;<>?!'/@\"\"

Specifies characters to not include in generated passwords.

Returns:

  • (String, nil)


47
48
49
# File 'rds/rotation_single_user_options.rb', line 47

def exclude_characters
  @exclude_characters
end

#rotate_immediately_on_updateBoolean? (readonly)

Note:

Default: true

Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.

Returns:

  • (Boolean, nil)


52
53
54
# File 'rds/rotation_single_user_options.rb', line 52

def rotate_immediately_on_update
  @rotate_immediately_on_update
end

#security_groupAWSCDK::EC2::ISecurityGroup? (readonly)

Note:

Default: - a new security group is created

The security group for the Lambda rotation function.

Returns:



57
58
59
# File 'rds/rotation_single_user_options.rb', line 57

def security_group
  @security_group
end

#vpc_subnetsAWSCDK::EC2::SubnetSelection? (readonly)

Note:

Default: - same placement as instance or cluster

Where to place the rotation Lambda function.



62
63
64
# File 'rds/rotation_single_user_options.rb', line 62

def vpc_subnets
  @vpc_subnets
end

Class Method Details

.jsii_propertiesObject



64
65
66
67
68
69
70
71
72
73
# File 'rds/rotation_single_user_options.rb', line 64

def self.jsii_properties
  {
    :automatically_after => "automaticallyAfter",
    :endpoint => "endpoint",
    :exclude_characters => "excludeCharacters",
    :rotate_immediately_on_update => "rotateImmediatelyOnUpdate",
    :security_group => "securityGroup",
    :vpc_subnets => "vpcSubnets",
  }
end

Instance Method Details

#to_jsiiObject



75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'rds/rotation_single_user_options.rb', line 75

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "automaticallyAfter" => @automatically_after,
    "endpoint" => @endpoint,
    "excludeCharacters" => @exclude_characters,
    "rotateImmediatelyOnUpdate" => @rotate_immediately_on_update,
    "securityGroup" => @security_group,
    "vpcSubnets" => @vpc_subnets,
  })
  result.compact
end