Class: Aws::RDS::DBClusterSnapshot
- Inherits:
-
Object
- Object
- Aws::RDS::DBClusterSnapshot
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-rds/db_cluster_snapshot.rb
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
-
#allocated_storage ⇒ Integer
Specifies the allocated storage size in gigabytes (GB).
-
#availability_zones ⇒ Array<String>
Provides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
-
#cluster_create_time ⇒ Time
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
- #cluster_id ⇒ String (also: #db_cluster_identifier)
-
#db_cluster_snapshot_arn ⇒ String
The Amazon Resource Name (ARN) for the DB cluster snapshot.
-
#engine ⇒ String
Specifies the name of the database engine.
-
#engine_version ⇒ String
Provides the version of the database engine for this DB cluster snapshot.
-
#iam_database_authentication_enabled ⇒ Boolean
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled; otherwise false.
-
#kms_key_id ⇒ String
If ‘StorageEncrypted` is true, the KMS key identifier for the encrypted DB cluster snapshot.
-
#license_model ⇒ String
Provides the license model information for this DB cluster snapshot.
-
#master_username ⇒ String
Provides the master username for the DB cluster snapshot.
-
#percent_progress ⇒ Integer
Specifies the percentage of the estimated data that has been transferred.
-
#port ⇒ Integer
Specifies the port that the DB cluster was listening on at the time of the snapshot.
-
#snapshot_create_time ⇒ Time
Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC).
- #snapshot_id ⇒ String (also: #db_cluster_snapshot_identifier)
-
#snapshot_type ⇒ String
Provides the type of the DB cluster snapshot.
-
#source_db_cluster_snapshot_arn ⇒ String
If the DB cluster snapshot was copied from a source DB cluster snapshot, the Amazon Resource Name (ARN) for the source DB cluster snapshot; otherwise, a null value.
-
#status ⇒ String
Specifies the status of this DB cluster snapshot.
-
#storage_encrypted ⇒ Boolean
Specifies whether the DB cluster snapshot is encrypted.
-
#vpc_id ⇒ String
Provides the VPC ID associated with the DB cluster snapshot.
Actions collapse
- #copy(options = {}) ⇒ DBClusterSnapshot
- #create(options = {}) ⇒ DBClusterSnapshot
- #delete(options = {}) ⇒ DBClusterSnapshot
- #restore(options = {}) ⇒ DBCluster
Associations collapse
- #cluster ⇒ DBCluster
- #events(options = {}) ⇒ Event::Collection
- #identifiers ⇒ Object deprecated private Deprecated.
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::DBClusterSnapshot
Returns the data for this DBClusterSnapshot.
-
#data_loaded? ⇒ Boolean
Returns ‘true` if this resource is loaded.
-
#initialize(*args) ⇒ DBClusterSnapshot
constructor
A new instance of DBClusterSnapshot.
-
#load ⇒ self
(also: #reload)
Loads, or reloads #data for the current DBClusterSnapshot.
Constructor Details
#initialize(cluster_id, snapshot_id, options = {}) ⇒ DBClusterSnapshot #initialize(options = {}) ⇒ DBClusterSnapshot
Returns a new instance of DBClusterSnapshot.
21 22 23 24 25 26 27 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 21 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @cluster_id = extract_cluster_id(args, ) @snapshot_id = extract_snapshot_id(args, ) @data = .delete(:data) @client = .delete(:client) || Client.new() end |
Instance Method Details
#allocated_storage ⇒ Integer
Specifies the allocated storage size in gigabytes (GB).
65 66 67 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 65 def allocated_storage data.allocated_storage end |
#availability_zones ⇒ Array<String>
Provides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
46 47 48 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 46 def availability_zones data.availability_zones end |
#client ⇒ Client
164 165 166 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 164 def client @client end |
#cluster ⇒ DBCluster
461 462 463 464 465 466 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 461 def cluster DBCluster.new( id: @cluster_id, client: @client ) end |
#cluster_create_time ⇒ Time
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
91 92 93 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 91 def cluster_create_time data.cluster_create_time end |
#cluster_id ⇒ String Also known as: db_cluster_identifier
32 33 34 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 32 def cluster_id @cluster_id end |
#copy(options = {}) ⇒ DBClusterSnapshot
328 329 330 331 332 333 334 335 336 337 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 328 def copy( = {}) = .merge(source_db_cluster_snapshot_identifier: @snapshot_id) resp = @client.copy_db_cluster_snapshot() DBClusterSnapshot.new( cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier, snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier, data: resp.data.db_cluster_snapshot, client: @client ) end |
#create(options = {}) ⇒ DBClusterSnapshot
212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 212 def create( = {}) = .merge( db_cluster_identifier: @cluster_id, db_cluster_snapshot_identifier: @snapshot_id ) resp = @client.create_db_cluster_snapshot() DBClusterSnapshot.new( cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier, snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier, data: resp.data.db_cluster_snapshot, client: @client ) end |
#data ⇒ Types::DBClusterSnapshot
Returns the data for this Aws::RDS::DBClusterSnapshot. Calls Client#describe_db_cluster_snapshots if #data_loaded? is ‘false`.
184 185 186 187 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 184 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
192 193 194 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 192 def data_loaded? !!@data end |
#db_cluster_snapshot_arn ⇒ String
The Amazon Resource Name (ARN) for the DB cluster snapshot.
142 143 144 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 142 def db_cluster_snapshot_arn data.db_cluster_snapshot_arn end |
#delete(options = {}) ⇒ DBClusterSnapshot
344 345 346 347 348 349 350 351 352 353 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 344 def delete( = {}) = .merge(db_cluster_snapshot_identifier: @snapshot_id) resp = @client.delete_db_cluster_snapshot() DBClusterSnapshot.new( cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier, snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier, data: resp.data.db_cluster_snapshot, client: @client ) end |
#engine ⇒ String
Specifies the name of the database engine.
59 60 61 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 59 def engine data.engine end |
#engine_version ⇒ String
Provides the version of the database engine for this DB cluster snapshot.
104 105 106 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 104 def engine_version data.engine_version end |
#events(options = {}) ⇒ Event::Collection
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 513 def events( = {}) batches = Enumerator.new do |y| = .merge( source_type: "db-cluster-snapshot", source_identifier: @snapshot_id ) resp = @client.describe_events() resp.each_page do |page| batch = [] page.data.events.each do |e| batch << Event.new( source_id: e.source_identifier, date: e.date, data: e, client: @client ) end y.yield(batch) end end Event::Collection.new(batches) end |
#iam_database_authentication_enabled ⇒ Boolean
True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled; otherwise false.
157 158 159 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 157 def iam_database_authentication_enabled data.iam_database_authentication_enabled end |
#identifiers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
538 539 540 541 542 543 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 538 def identifiers { cluster_id: @cluster_id, snapshot_id: @snapshot_id } end |
#kms_key_id ⇒ String
If ‘StorageEncrypted` is true, the KMS key identifier for the encrypted DB cluster snapshot.
136 137 138 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 136 def kms_key_id data.kms_key_id end |
#license_model ⇒ String
Provides the license model information for this DB cluster snapshot.
110 111 112 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 110 def license_model data.license_model end |
#load ⇒ self Also known as: reload
Loads, or reloads #data for the current Aws::RDS::DBClusterSnapshot. Returns ‘self` making it possible to chain methods.
db_cluster_snapshot.reload.data
174 175 176 177 178 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 174 def load resp = @client.describe_db_cluster_snapshots(db_cluster_snapshot_identifier: @snapshot_id) @data = resp.db_cluster_snapshots[0] self end |
#master_username ⇒ String
Provides the master username for the DB cluster snapshot.
97 98 99 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 97 def master_username data.master_username end |
#percent_progress ⇒ Integer
Specifies the percentage of the estimated data that has been transferred.
123 124 125 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 123 def percent_progress data.percent_progress end |
#port ⇒ Integer
Specifies the port that the DB cluster was listening on at the time of the snapshot.
78 79 80 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 78 def port data.port end |
#restore(options = {}) ⇒ DBCluster
448 449 450 451 452 453 454 455 456 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 448 def restore( = {}) = .merge(snapshot_identifier: @snapshot_id) resp = @client.restore_db_cluster_from_snapshot() DBCluster.new( id: resp.data.db_cluster.db_cluster_identifier, data: resp.data.db_cluster, client: @client ) end |
#snapshot_create_time ⇒ Time
Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC).
53 54 55 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 53 def snapshot_create_time data.snapshot_create_time end |
#snapshot_id ⇒ String Also known as: db_cluster_snapshot_identifier
38 39 40 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 38 def snapshot_id @snapshot_id end |
#snapshot_type ⇒ String
Provides the type of the DB cluster snapshot.
116 117 118 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 116 def snapshot_type data.snapshot_type end |
#source_db_cluster_snapshot_arn ⇒ String
If the DB cluster snapshot was copied from a source DB cluster snapshot, the Amazon Resource Name (ARN) for the source DB cluster snapshot; otherwise, a null value.
150 151 152 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 150 def source_db_cluster_snapshot_arn data.source_db_cluster_snapshot_arn end |
#status ⇒ String
Specifies the status of this DB cluster snapshot.
71 72 73 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 71 def status data.status end |
#storage_encrypted ⇒ Boolean
Specifies whether the DB cluster snapshot is encrypted.
129 130 131 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 129 def storage_encrypted data.storage_encrypted end |
#vpc_id ⇒ String
Provides the VPC ID associated with the DB cluster snapshot.
84 85 86 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 84 def vpc_id data.vpc_id end |