Class: Aws::RDS::DBClusterSnapshot
- Inherits:
-
Object
- Object
- Aws::RDS::DBClusterSnapshot
- Extended by:
- Deprecations
- Defined in:
- sig/db_cluster_snapshot.rbs,
lib/aws-sdk-rds/db_cluster_snapshot.rb
Overview
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
-
#allocated_storage ⇒ Integer
The allocated storage size of the DB cluster snapshot in gibibytes (GiB).
-
#availability_zones ⇒ Array<String>
The list of Availability Zones (AZs) where instances in the DB cluster snapshot can be restored.
-
#backup_retention_period ⇒ Integer
The number of days for which automatic DB snapshots are retained.
-
#cluster_create_time ⇒ Time
The time when the DB cluster was created, in Universal Coordinated Time (UTC).
- #cluster_id ⇒ String (also: #db_cluster_identifier)
-
#db_cluster_resource_id ⇒ String
The resource ID of the DB cluster that this DB cluster snapshot was created from.
-
#db_cluster_snapshot_arn ⇒ String
The Amazon Resource Name (ARN) for the DB cluster snapshot.
-
#db_system_id ⇒ String
Reserved for future use.
-
#engine ⇒ String
The name of the database engine for this DB cluster snapshot.
-
#engine_mode ⇒ String
The engine mode of the database engine for this DB cluster snapshot.
-
#engine_version ⇒ String
The version of the database engine for this DB cluster snapshot.
-
#iam_database_authentication_enabled ⇒ Boolean
Indicates whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled.
-
#kms_key_id ⇒ String
If
StorageEncryptedis true, the Amazon Web Services KMS key identifier for the encrypted DB cluster snapshot. -
#license_model ⇒ String
The license model information for this DB cluster snapshot.
-
#master_username ⇒ String
The master username for this DB cluster snapshot.
-
#percent_progress ⇒ Integer
The percentage of the estimated data that has been transferred.
-
#port ⇒ Integer
The port that the DB cluster was listening on at the time of the snapshot.
-
#preferred_backup_window ⇒ String
The daily time range during which automated backups are created if automated backups are enabled, as determined by the
BackupRetentionPeriod. -
#snapshot_create_time ⇒ Time
The time when the snapshot was taken, in Universal Coordinated Time (UTC).
- #snapshot_id ⇒ String (also: #db_cluster_snapshot_identifier)
-
#snapshot_type ⇒ String
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
The status of this DB cluster snapshot.
-
#storage_encrypted ⇒ Boolean
Indicates whether the DB cluster snapshot is encrypted.
-
#storage_encryption_type ⇒ String
The type of encryption used to protect data at rest in the DB cluster snapshot.
-
#storage_throughput ⇒ Integer
The storage throughput for the DB cluster snapshot.
-
#storage_type ⇒ String
The storage type associated with the DB cluster snapshot.
-
#tag_list ⇒ Array<Types::Tag>
A list of tags.
-
#vpc_id ⇒ String
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
trueif 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.
-
#wait_until(options = {}) {|resource| ... } ⇒ Resource
deprecated
Deprecated.
Use [Aws::RDS::Client] #wait_until instead
Constructor Details
#initialize(cluster_id, snapshot_id, options = {}) ⇒ DBClusterSnapshot #initialize(options = {}) ⇒ DBClusterSnapshot
Returns a new instance of DBClusterSnapshot.
13 14 15 |
# File 'sig/db_cluster_snapshot.rbs', line 13
def initialize: (String cluster_id, String snapshot_id, Hash[Symbol, untyped] options) -> void
| (cluster_id: String, snapshot_id: String, ?client: Client) -> void
| (Hash[Symbol, untyped] args) -> void
|
Instance Method Details
#allocated_storage ⇒ Integer
The allocated storage size of the DB cluster snapshot in gibibytes (GiB).
38 |
# File 'sig/db_cluster_snapshot.rbs', line 38
def allocated_storage: () -> ::Integer
|
#availability_zones ⇒ Array<String>
The list of Availability Zones (AZs) where instances in the DB cluster snapshot can be restored.
26 |
# File 'sig/db_cluster_snapshot.rbs', line 26
def availability_zones: () -> ::Array[::String]
|
#backup_retention_period ⇒ Integer
The number of days for which automatic DB snapshots are retained.
74 |
# File 'sig/db_cluster_snapshot.rbs', line 74
def backup_retention_period: () -> ::Integer
|
#client ⇒ Client
258 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 258
def client: () -> Client
|
#cluster ⇒ DBCluster
226 |
# File 'sig/db_cluster_snapshot.rbs', line 226
def cluster: () -> DBCluster
|
#cluster_create_time ⇒ Time
The time when the DB cluster was created, in Universal Coordinated Time (UTC).
50 |
# File 'sig/db_cluster_snapshot.rbs', line 50
def cluster_create_time: () -> ::Time
|
#cluster_id ⇒ String Also known as: db_cluster_identifier
18 |
# File 'sig/db_cluster_snapshot.rbs', line 18
def cluster_id: () -> String
|
#copy(options = {}) ⇒ DBClusterSnapshot
131 |
# File 'sig/db_cluster_snapshot.rbs', line 131
def copy: (
|
#create(options = {}) ⇒ DBClusterSnapshot
120 |
# File 'sig/db_cluster_snapshot.rbs', line 120
def create: (
|
#data ⇒ Types::DBClusterSnapshot
Returns the data for this Aws::RDS::DBClusterSnapshot. Calls
Client#describe_db_cluster_snapshots if #data_loaded? is false.
113 |
# File 'sig/db_cluster_snapshot.rbs', line 113
def data: () -> Types::DBClusterSnapshot
|
#data_loaded? ⇒ Boolean
116 |
# File 'sig/db_cluster_snapshot.rbs', line 116
def data_loaded?: () -> bool
|
#db_cluster_resource_id ⇒ String
The resource ID of the DB cluster that this DB cluster snapshot was created from.
101 |
# File 'sig/db_cluster_snapshot.rbs', line 101
def db_cluster_resource_id: () -> ::String
|
#db_cluster_snapshot_arn ⇒ String
The Amazon Resource Name (ARN) for the DB cluster snapshot.
83 |
# File 'sig/db_cluster_snapshot.rbs', line 83
def db_cluster_snapshot_arn: () -> ::String
|
#db_system_id ⇒ String
Reserved for future use.
104 |
# File 'sig/db_cluster_snapshot.rbs', line 104
def db_system_id: () -> ::String
|
#delete(options = {}) ⇒ DBClusterSnapshot
147 |
# File 'sig/db_cluster_snapshot.rbs', line 147
def delete: (
|
#engine ⇒ String
The name of the database engine for this DB cluster snapshot.
32 |
# File 'sig/db_cluster_snapshot.rbs', line 32
def engine: () -> ::String
|
#engine_mode ⇒ String
The engine mode of the database engine for this DB cluster snapshot.
35 |
# File 'sig/db_cluster_snapshot.rbs', line 35
def engine_mode: () -> ::String
|
#engine_version ⇒ String
The version of the database engine for this DB cluster snapshot.
56 |
# File 'sig/db_cluster_snapshot.rbs', line 56
def engine_version: () -> ::String
|
#events(options = {}) ⇒ Event::Collection
229 |
# File 'sig/db_cluster_snapshot.rbs', line 229
def events: (
|
#iam_database_authentication_enabled ⇒ Boolean
Indicates whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled.
89 |
# File 'sig/db_cluster_snapshot.rbs', line 89
def iam_database_authentication_enabled: () -> bool
|
#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.
1284 1285 1286 1287 1288 1289 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 1284 def identifiers { cluster_id: @cluster_id, snapshot_id: @snapshot_id } end |
#kms_key_id ⇒ String
If StorageEncrypted is true, the Amazon Web Services KMS key
identifier for the encrypted DB cluster snapshot.
The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
80 |
# File 'sig/db_cluster_snapshot.rbs', line 80
def kms_key_id: () -> ::String
|
#license_model ⇒ String
The license model information for this DB cluster snapshot.
59 |
# File 'sig/db_cluster_snapshot.rbs', line 59
def license_model: () -> ::String
|
#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
109 |
# File 'sig/db_cluster_snapshot.rbs', line 109
def load: () -> self
|
#master_username ⇒ String
The master username for this DB cluster snapshot.
53 |
# File 'sig/db_cluster_snapshot.rbs', line 53
def master_username: () -> ::String
|
#percent_progress ⇒ Integer
The percentage of the estimated data that has been transferred.
65 |
# File 'sig/db_cluster_snapshot.rbs', line 65
def percent_progress: () -> ::Integer
|
#port ⇒ Integer
The port that the DB cluster was listening on at the time of the snapshot.
44 |
# File 'sig/db_cluster_snapshot.rbs', line 44
def port: () -> ::Integer
|
#preferred_backup_window ⇒ String
The daily time range during which automated backups are created if
automated backups are enabled, as determined by the
BackupRetentionPeriod.
77 |
# File 'sig/db_cluster_snapshot.rbs', line 77
def preferred_backup_window: () -> ::String
|
#restore(options = {}) ⇒ DBCluster
152 |
# File 'sig/db_cluster_snapshot.rbs', line 152
def restore: (
|
#snapshot_create_time ⇒ Time
The time when the snapshot was taken, in Universal Coordinated Time (UTC).
29 |
# File 'sig/db_cluster_snapshot.rbs', line 29
def snapshot_create_time: () -> ::Time
|
#snapshot_id ⇒ String Also known as: db_cluster_snapshot_identifier
22 |
# File 'sig/db_cluster_snapshot.rbs', line 22
def snapshot_id: () -> String
|
#snapshot_type ⇒ String
The type of the DB cluster snapshot.
62 |
# File 'sig/db_cluster_snapshot.rbs', line 62
def snapshot_type: () -> ::String
|
#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.
86 |
# File 'sig/db_cluster_snapshot.rbs', line 86
def source_db_cluster_snapshot_arn: () -> ::String
|
#status ⇒ String
The status of this DB cluster snapshot. Valid statuses are the following:
-
available -
copying -
creating
41 |
# File 'sig/db_cluster_snapshot.rbs', line 41
def status: () -> ::String
|
#storage_encrypted ⇒ Boolean
Indicates whether the DB cluster snapshot is encrypted.
68 |
# File 'sig/db_cluster_snapshot.rbs', line 68
def storage_encrypted: () -> bool
|
#storage_encryption_type ⇒ String
The type of encryption used to protect data at rest in the DB cluster snapshot. Possible values:
-
none- The DB cluster snapshot is not encrypted. -
sse-rds- The DB cluster snapshot is encrypted using an Amazon Web Services owned KMS key. -
sse-kms- The DB cluster snapshot is encrypted using a customer managed KMS key or Amazon Web Services managed KMS key.
71 |
# File 'sig/db_cluster_snapshot.rbs', line 71
def storage_encryption_type: () -> ("none" | "sse-kms" | "sse-rds")
|
#storage_throughput ⇒ Integer
The storage throughput for the DB cluster snapshot. The throughput is automatically set based on the IOPS that you provision, and is not configurable.
This setting is only for non-Aurora Multi-AZ DB clusters.
98 |
# File 'sig/db_cluster_snapshot.rbs', line 98
def storage_throughput: () -> ::Integer
|
#storage_type ⇒ String
The storage type associated with the DB cluster snapshot.
This setting is only for Aurora DB clusters.
95 |
# File 'sig/db_cluster_snapshot.rbs', line 95
def storage_type: () -> ::String
|
#tag_list ⇒ Array<Types::Tag>
A list of tags.
For more information, see Tagging Amazon RDS resources in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.
92 |
# File 'sig/db_cluster_snapshot.rbs', line 92
def tag_list: () -> ::Array[Types::Tag]
|
#vpc_id ⇒ String
The VPC ID associated with the DB cluster snapshot.
47 |
# File 'sig/db_cluster_snapshot.rbs', line 47
def vpc_id: () -> ::String
|
#wait_until(options = {}) {|resource| ... } ⇒ Resource
Use [Aws::RDS::Client] #wait_until instead
The waiting operation is performed on a copy. The original resource remains unchanged.
Waiter polls an API operation until a resource enters a desired state.
Basic Usage
Waiter will polls until it is successful, it fails by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop until condition is true
resource.wait_until() {|resource| condition}
Example
instance.wait_until(max_attempts:10, delay:5) do |instance|
instance.state.name == 'running'
end
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. The waiting condition is set by passing a block to #wait_until:
# poll for ~25 seconds
resource.wait_until(max_attempts:5,delay:5) {|resource|...}
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
# poll for 1 hour, instead of a number of attempts
proc = Proc.new do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
# disable max attempts
instance.wait_until(before_wait:proc, max_attempts:nil) {...}
Handling Errors
When a waiter is successful, it returns the Resource. When a waiter fails, it raises an error.
begin
resource.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
attempts attempt in seconds invoked before each attempt invoked before each wait
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'lib/aws-sdk-rds/db_cluster_snapshot.rb', line 372 def wait_until( = {}, &block) self_copy = self.dup attempts = 0 [:max_attempts] = 10 unless .key?(:max_attempts) [:delay] ||= 10 [:poller] = Proc.new do attempts += 1 if block.call(self_copy) [:success, self_copy] else self_copy.reload unless attempts == [:max_attempts] :retry end end Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do Aws::Waiters::Waiter.new().wait({}) end end |