Class: AWSCDK::RDS::ServerlessClusterFromSnapshotProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RDS::ServerlessClusterFromSnapshotProps
- Defined in:
- rds/serverless_cluster_from_snapshot_props.rb
Overview
Properties for ServerlessClusterFromSnapshot.
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::SnapshotCredentials?
readonly
Master user credentials.
-
#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.
-
#snapshot_identifier ⇒ String
readonly
The identifier for the DB instance snapshot or DB cluster snapshot to restore from.
-
#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:, snapshot_identifier:, 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, subnet_group: nil, vpc: nil, vpc_subnets: nil) ⇒ ServerlessClusterFromSnapshotProps
constructor
A new instance of ServerlessClusterFromSnapshotProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(engine:, snapshot_identifier:, 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, subnet_group: nil, vpc: nil, vpc_subnets: nil) ⇒ ServerlessClusterFromSnapshotProps
Returns a new instance of ServerlessClusterFromSnapshotProps.
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_from_snapshot_props.rb', line 23 def initialize(engine:, snapshot_identifier:, 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, subnet_group: nil, vpc: nil, vpc_subnets: nil) @engine = engine Jsii::Type.check_type(@engine, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLklDbHVzdGVyRW5naW5lIn0=")), "engine") @snapshot_identifier = snapshot_identifier Jsii::Type.check_type(@snapshot_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snapshotIdentifier") @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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLlNuYXBzaG90Q3JlZGVudGlhbHMifQ==")), "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? @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.
76 77 78 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 76 def backup_retention @backup_retention end |
#cluster_identifier ⇒ String? (readonly)
Default: - A name is automatically generated.
An optional identifier for the cluster.
81 82 83 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 81 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.
86 87 88 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 86 def @copy_tags_to_snapshot end |
#credentials ⇒ AWSCDK::RDS::SnapshotCredentials? (readonly)
Default: - The existing username and password from the snapshot will be used.
Master user credentials.
Note - It is not possible to change the master username for a snapshot; however, it is possible to provide (or generate) a new password.
94 95 96 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 94 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.
99 100 101 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 99 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.
104 105 106 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 104 def deletion_protection @deletion_protection end |
#enable_data_api ⇒ Boolean? (readonly)
Default: false
Whether to enable the Data API.
110 111 112 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 110 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_from_snapshot_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.
115 116 117 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 115 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.
120 121 122 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 120 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.
125 126 127 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 125 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.
130 131 132 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 130 def security_groups @security_groups end |
#snapshot_identifier ⇒ String (readonly)
The identifier for the DB instance snapshot or DB cluster snapshot to restore from.
You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB instance snapshot.
68 69 70 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 68 def snapshot_identifier @snapshot_identifier 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.
135 136 137 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 135 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.
140 141 142 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 140 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.
147 148 149 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 147 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 149 def self.jsii_properties { :engine => "engine", :snapshot_identifier => "snapshotIdentifier", :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", :subnet_group => "subnetGroup", :vpc => "vpc", :vpc_subnets => "vpcSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'rds/serverless_cluster_from_snapshot_props.rb', line 170 def to_jsii result = {} result.merge!({ "engine" => @engine, "snapshotIdentifier" => @snapshot_identifier, "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, "subnetGroup" => @subnet_group, "vpc" => @vpc, "vpcSubnets" => @vpc_subnets, }) result.compact end |