Class: AWSCDK::RDS::ServerlessClusterProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RDS::ServerlessClusterProps
- Defined in:
- rds/serverless_cluster_props.rb
Overview
Properties for a new Aurora Serverless v1 Cluster.
Instance Attribute Summary collapse
-
#backup_retention ⇒ AWSCDK::Duration?
readonly
The number of days during which automatic DB snapshots are retained.
-
#cluster_identifier ⇒ String?
readonly
An optional identifier for the cluster.
-
#copy_tags_to_snapshot ⇒ Boolean?
readonly
Whether to copy tags to the snapshot when a snapshot is created.
-
#credentials ⇒ AWSCDK::RDS::Credentials?
readonly
Credentials for the administrative user.
-
#default_database_name ⇒ String?
readonly
Name of a database which is automatically created inside the cluster.
-
#deletion_protection ⇒ Boolean?
readonly
Indicates whether the DB cluster should have deletion protection enabled.
-
#enable_data_api ⇒ Boolean?
readonly
Whether to enable the Data API.
-
#engine ⇒ AWSCDK::RDS::IClusterEngine
readonly
What kind of database to start.
-
#parameter_group ⇒ AWSCDK::RDS::IParameterGroup?
readonly
Additional parameters to pass to the database engine.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
-
#scaling ⇒ AWSCDK::RDS::ServerlessScalingOptions?
readonly
Scaling configuration of an Aurora Serverless database cluster.
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
Security group.
-
#storage_encryption_key ⇒ AWSCDK::KMS::IKey?
readonly
The KMS key for storage encryption.
-
#subnet_group ⇒ AWSCDK::Interfaces::AWSRDS::IDBSubnetGroupRef?
readonly
Existing subnet group for the cluster.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The VPC that this Aurora Serverless v1 Cluster has been created in.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Where to place the instances within the VPC.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(engine:, backup_retention: nil, cluster_identifier: nil, copy_tags_to_snapshot: nil, credentials: nil, default_database_name: nil, deletion_protection: nil, enable_data_api: nil, parameter_group: nil, removal_policy: nil, scaling: nil, security_groups: nil, storage_encryption_key: nil, subnet_group: nil, vpc: nil, vpc_subnets: nil) ⇒ ServerlessClusterProps
constructor
A new instance of ServerlessClusterProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(engine:, backup_retention: nil, cluster_identifier: nil, copy_tags_to_snapshot: nil, credentials: nil, default_database_name: nil, deletion_protection: nil, enable_data_api: nil, parameter_group: nil, removal_policy: nil, scaling: nil, security_groups: nil, storage_encryption_key: nil, subnet_group: nil, vpc: nil, vpc_subnets: nil) ⇒ ServerlessClusterProps
Returns a new instance of ServerlessClusterProps.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'rds/serverless_cluster_props.rb', line 23 def initialize(engine:, backup_retention: nil, cluster_identifier: nil, copy_tags_to_snapshot: nil, credentials: nil, default_database_name: nil, deletion_protection: nil, enable_data_api: nil, parameter_group: nil, removal_policy: nil, scaling: nil, security_groups: nil, storage_encryption_key: nil, subnet_group: nil, vpc: nil, vpc_subnets: nil) @engine = engine Jsii::Type.check_type(@engine, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLklDbHVzdGVyRW5naW5lIn0=")), "engine") @backup_retention = backup_retention Jsii::Type.check_type(@backup_retention, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "backupRetention") unless @backup_retention.nil? @cluster_identifier = cluster_identifier Jsii::Type.check_type(@cluster_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterIdentifier") unless @cluster_identifier.nil? @copy_tags_to_snapshot = Jsii::Type.check_type(@copy_tags_to_snapshot, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "copyTagsToSnapshot") unless @copy_tags_to_snapshot.nil? @credentials = credentials Jsii::Type.check_type(@credentials, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLkNyZWRlbnRpYWxzIn0=")), "credentials") unless @credentials.nil? @default_database_name = default_database_name Jsii::Type.check_type(@default_database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultDatabaseName") unless @default_database_name.nil? @deletion_protection = deletion_protection Jsii::Type.check_type(@deletion_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deletionProtection") unless @deletion_protection.nil? @enable_data_api = enable_data_api Jsii::Type.check_type(@enable_data_api, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableDataApi") unless @enable_data_api.nil? @parameter_group = parameter_group Jsii::Type.check_type(@parameter_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLklQYXJhbWV0ZXJHcm91cCJ9")), "parameterGroup") unless @parameter_group.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @scaling = scaling.is_a?(Hash) ? ::AWSCDK::RDS::ServerlessScalingOptions.new(**scaling.transform_keys(&:to_sym)) : scaling Jsii::Type.check_type(@scaling, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLlNlcnZlcmxlc3NTY2FsaW5nT3B0aW9ucyJ9")), "scaling") unless @scaling.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? @storage_encryption_key = storage_encryption_key Jsii::Type.check_type(@storage_encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "storageEncryptionKey") unless @storage_encryption_key.nil? @subnet_group = subnet_group Jsii::Type.check_type(@subnet_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19yZHMuSURCU3VibmV0R3JvdXBSZWYifQ==")), "subnetGroup") unless @subnet_group.nil? @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.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
#backup_retention ⇒ AWSCDK::Duration? (readonly)
Default: Duration.days(1)
The number of days during which automatic DB snapshots are retained.
Automatic backup retention cannot be disabled on serverless clusters. Must be a value from 1 day to 35 days.
69 70 71 |
# File 'rds/serverless_cluster_props.rb', line 69 def backup_retention @backup_retention end |
#cluster_identifier ⇒ String? (readonly)
Default: - A name is automatically generated.
An optional identifier for the cluster.
74 75 76 |
# File 'rds/serverless_cluster_props.rb', line 74 def cluster_identifier @cluster_identifier end |
#copy_tags_to_snapshot ⇒ Boolean? (readonly)
Default: - true
Whether to copy tags to the snapshot when a snapshot is created.
79 80 81 |
# File 'rds/serverless_cluster_props.rb', line 79 def @copy_tags_to_snapshot end |
#credentials ⇒ AWSCDK::RDS::Credentials? (readonly)
Default: - A username of 'admin' and SecretsManager-generated password
Credentials for the administrative user.
84 85 86 |
# File 'rds/serverless_cluster_props.rb', line 84 def credentials @credentials end |
#default_database_name ⇒ String? (readonly)
Default: - Database is not created in cluster.
Name of a database which is automatically created inside the cluster.
89 90 91 |
# File 'rds/serverless_cluster_props.rb', line 89 def default_database_name @default_database_name end |
#deletion_protection ⇒ Boolean? (readonly)
Default: - true if removalPolicy is RETAIN, false otherwise
Indicates whether the DB cluster should have deletion protection enabled.
94 95 96 |
# File 'rds/serverless_cluster_props.rb', line 94 def deletion_protection @deletion_protection end |
#enable_data_api ⇒ Boolean? (readonly)
Default: false
Whether to enable the Data API.
100 101 102 |
# File 'rds/serverless_cluster_props.rb', line 100 def enable_data_api @enable_data_api end |
#engine ⇒ AWSCDK::RDS::IClusterEngine (readonly)
What kind of database to start.
61 62 63 |
# File 'rds/serverless_cluster_props.rb', line 61 def engine @engine end |
#parameter_group ⇒ AWSCDK::RDS::IParameterGroup? (readonly)
Default: - no parameter group.
Additional parameters to pass to the database engine.
105 106 107 |
# File 'rds/serverless_cluster_props.rb', line 105 def parameter_group @parameter_group end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: - RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
110 111 112 |
# File 'rds/serverless_cluster_props.rb', line 110 def removal_policy @removal_policy end |
#scaling ⇒ AWSCDK::RDS::ServerlessScalingOptions? (readonly)
Default: - Serverless cluster is automatically paused after 5 minutes of being idle. minimum capacity: 2 ACU maximum capacity: 16 ACU
Scaling configuration of an Aurora Serverless database cluster.
115 116 117 |
# File 'rds/serverless_cluster_props.rb', line 115 def scaling @scaling end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: - a new security group is created if vpc was provided. If the vpc property was not provided, no VPC security groups will be associated with the DB cluster.
Security group.
120 121 122 |
# File 'rds/serverless_cluster_props.rb', line 120 def security_groups @security_groups end |
#storage_encryption_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - the default master key will be used for storage encryption
The KMS key for storage encryption.
125 126 127 |
# File 'rds/serverless_cluster_props.rb', line 125 def storage_encryption_key @storage_encryption_key end |
#subnet_group ⇒ AWSCDK::Interfaces::AWSRDS::IDBSubnetGroupRef? (readonly)
Default: - a new subnet group is created if vpc was provided. If the vpc property was not provided, no subnet group will be associated with the DB cluster
Existing subnet group for the cluster.
130 131 132 |
# File 'rds/serverless_cluster_props.rb', line 130 def subnet_group @subnet_group end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
Default: - the default VPC in the account and region will be used
The VPC that this Aurora Serverless v1 Cluster has been created in.
135 136 137 |
# File 'rds/serverless_cluster_props.rb', line 135 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - the VPC default strategy if not specified.
Where to place the instances within the VPC.
If provided, the vpc property must also be specified.
142 143 144 |
# File 'rds/serverless_cluster_props.rb', line 142 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'rds/serverless_cluster_props.rb', line 144 def self.jsii_properties { :engine => "engine", :backup_retention => "backupRetention", :cluster_identifier => "clusterIdentifier", :copy_tags_to_snapshot => "copyTagsToSnapshot", :credentials => "credentials", :default_database_name => "defaultDatabaseName", :deletion_protection => "deletionProtection", :enable_data_api => "enableDataApi", :parameter_group => "parameterGroup", :removal_policy => "removalPolicy", :scaling => "scaling", :security_groups => "securityGroups", :storage_encryption_key => "storageEncryptionKey", :subnet_group => "subnetGroup", :vpc => "vpc", :vpc_subnets => "vpcSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'rds/serverless_cluster_props.rb', line 165 def to_jsii result = {} result.merge!({ "engine" => @engine, "backupRetention" => @backup_retention, "clusterIdentifier" => @cluster_identifier, "copyTagsToSnapshot" => @copy_tags_to_snapshot, "credentials" => @credentials, "defaultDatabaseName" => @default_database_name, "deletionProtection" => @deletion_protection, "enableDataApi" => @enable_data_api, "parameterGroup" => @parameter_group, "removalPolicy" => @removal_policy, "scaling" => @scaling, "securityGroups" => @security_groups, "storageEncryptionKey" => @storage_encryption_key, "subnetGroup" => @subnet_group, "vpc" => @vpc, "vpcSubnets" => @vpc_subnets, }) result.compact end |