Class: Aws::RDS::DBSnapshot
- Inherits:
-
Object
- Object
- Aws::RDS::DBSnapshot
- Extended by:
- Deprecations
- Defined in:
- sig/db_snapshot.rbs,
lib/aws-sdk-rds/db_snapshot.rb
Overview
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
-
#additional_storage_volumes ⇒ Array<Types::AdditionalStorageVolume>
The additional storage volumes associated with the DB snapshot.
-
#allocated_storage ⇒ Integer
Specifies the allocated storage size in gibibytes (GiB).
-
#availability_zone ⇒ String
Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot.
-
#backup_retention_period ⇒ Integer
The number of days for which automatic DB snapshots are retained.
-
#db_snapshot_arn ⇒ String
The Amazon Resource Name (ARN) for the DB snapshot.
-
#db_system_id ⇒ String
The Oracle system identifier (SID), which is the name of the Oracle database instance that manages your database files.
-
#dbi_resource_id ⇒ String
The identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region.
-
#dedicated_log_volume ⇒ Boolean
Indicates whether the DB instance has a dedicated log volume (DLV) enabled.
-
#encrypted ⇒ Boolean
Indicates whether the DB snapshot is encrypted.
-
#engine ⇒ String
Specifies the name of the database engine.
-
#engine_version ⇒ String
Specifies the version of the database engine.
-
#iam_database_authentication_enabled ⇒ Boolean
Indicates whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled.
-
#instance_create_time ⇒ Time
Specifies the time in Coordinated Universal Time (UTC) when the DB instance, from which the snapshot was taken, was created.
- #instance_id ⇒ String (also: #db_instance_identifier)
-
#iops ⇒ Integer
Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot.
-
#kms_key_id ⇒ String
If
Encryptedis true, the Amazon Web Services KMS key identifier for the encrypted DB snapshot. -
#license_model ⇒ String
License model information for the restored DB instance.
-
#master_username ⇒ String
Provides the master username for the DB snapshot.
-
#multi_tenant ⇒ Boolean
Indicates whether the snapshot is of a DB instance using the multi-tenant configuration (TRUE) or the single-tenant configuration (FALSE).
-
#option_group_name ⇒ String
Provides the option group name for the DB snapshot.
-
#original_snapshot_create_time ⇒ Time
Specifies the time of the CreateDBSnapshot operation in Coordinated Universal Time (UTC).
-
#percent_progress ⇒ Integer
The percentage of the estimated data that has been transferred.
-
#port ⇒ Integer
Specifies the port that the database engine 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. -
#processor_features ⇒ Array<Types::ProcessorFeature>
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance when the DB snapshot was created.
-
#snapshot_availability_zone ⇒ String
Specifies the name of the Availability Zone where RDS stores the DB snapshot.
-
#snapshot_create_time ⇒ Time
Specifies when the snapshot was taken in Coordinated Universal Time (UTC).
-
#snapshot_database_time ⇒ Time
The timestamp of the most recent transaction applied to the database that you're backing up.
- #snapshot_id ⇒ String (also: #db_snapshot_identifier)
-
#snapshot_target ⇒ String
Specifies where manual snapshots are stored: Dedicated Local Zones, Amazon Web Services Outposts or the Amazon Web Services Region.
-
#snapshot_type ⇒ String
Provides the type of the DB snapshot.
-
#source_db_snapshot_identifier ⇒ String
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied from.
-
#source_region ⇒ String
The Amazon Web Services Region that the DB snapshot was created in or copied from.
-
#status ⇒ String
Specifies the status of this DB snapshot.
-
#storage_encryption_type ⇒ String
The type of encryption used to protect data at rest in the DB snapshot.
-
#storage_throughput ⇒ Integer
Specifies the storage throughput for the DB snapshot.
-
#storage_type ⇒ String
Specifies the storage type associated with DB snapshot.
-
#tag_list ⇒ Array<Types::Tag>
A list of tags.
-
#tde_credential_arn ⇒ String
The ARN from the key store with which to associate the instance for TDE encryption.
-
#timezone ⇒ String
The time zone of the DB snapshot.
-
#vpc_id ⇒ String
Provides the VPC ID associated with the DB snapshot.
Actions collapse
- #copy(options = {}) ⇒ DBSnapshot
- #create(options = {}) ⇒ DBSnapshot
- #delete(options = {}) ⇒ DBSnapshot
- #restore(options = {}) ⇒ DBInstance
- #subscribe_to(options = {}) ⇒ EventSubscription
- #unsubscribe_from(options = {}) ⇒ EventSubscription
Associations collapse
- #attributes(options = {}) ⇒ DBSnapshotAttribute::Collection
- #events(options = {}) ⇒ Event::Collection
- #identifiers ⇒ Object deprecated private Deprecated.
- #instance ⇒ DBInstance
- #option_group ⇒ OptionGroup?
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::DBSnapshot
Returns the data for this DBSnapshot.
-
#data_loaded? ⇒ Boolean
Returns
trueif this resource is loaded. -
#initialize(*args) ⇒ DBSnapshot
constructor
A new instance of DBSnapshot.
-
#load ⇒ self
(also: #reload)
Loads, or reloads #data for the current DBSnapshot.
-
#wait_until(options = {}) {|resource| ... } ⇒ Resource
deprecated
Deprecated.
Use [Aws::RDS::Client] #wait_until instead
Constructor Details
#initialize(instance_id, snapshot_id, options = {}) ⇒ DBSnapshot #initialize(options = {}) ⇒ DBSnapshot
Returns a new instance of DBSnapshot.
13 14 15 |
# File 'sig/db_snapshot.rbs', line 13
def initialize: (String instance_id, String snapshot_id, Hash[Symbol, untyped] options) -> void
| (instance_id: String, snapshot_id: String, ?client: Client) -> void
| (Hash[Symbol, untyped] args) -> void
|
Instance Method Details
#additional_storage_volumes ⇒ Array<Types::AdditionalStorageVolume>
The additional storage volumes associated with the DB snapshot. RDS supports additional storage volumes for RDS for Oracle and RDS for SQL Server.
137 |
# File 'sig/db_snapshot.rbs', line 137
def additional_storage_volumes: () -> ::Array[Types::AdditionalStorageVolume]
|
#allocated_storage ⇒ Integer
Specifies the allocated storage size in gibibytes (GiB).
32 |
# File 'sig/db_snapshot.rbs', line 32
def allocated_storage: () -> ::Integer
|
#attributes(options = {}) ⇒ DBSnapshotAttribute::Collection
286 |
# File 'sig/db_snapshot.rbs', line 286
def attributes: (
|
#availability_zone ⇒ String
Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot.
41 |
# File 'sig/db_snapshot.rbs', line 41
def availability_zone: () -> ::String
|
#backup_retention_period ⇒ Integer
The number of days for which automatic DB snapshots are retained.
92 |
# File 'sig/db_snapshot.rbs', line 92
def backup_retention_period: () -> ::Integer
|
#data ⇒ Types::DBSnapshot
Returns the data for this Aws::RDS::DBSnapshot. Calls
Client#describe_db_snapshots if #data_loaded? is false.
149 |
# File 'sig/db_snapshot.rbs', line 149
def data: () -> Types::DBSnapshot
|
#data_loaded? ⇒ Boolean
152 |
# File 'sig/db_snapshot.rbs', line 152
def data_loaded?: () -> bool
|
#db_snapshot_arn ⇒ String
The Amazon Resource Name (ARN) for the DB snapshot.
101 |
# File 'sig/db_snapshot.rbs', line 101
def db_snapshot_arn: () -> ::String
|
#db_system_id ⇒ String
The Oracle system identifier (SID), which is the name of the Oracle database instance that manages your database files. The Oracle SID is also the name of your CDB.
128 |
# File 'sig/db_snapshot.rbs', line 128
def db_system_id: () -> ::String
|
#dbi_resource_id ⇒ String
The identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region.
113 |
# File 'sig/db_snapshot.rbs', line 113
def dbi_resource_id: () -> ::String
|
#dedicated_log_volume ⇒ Boolean
Indicates whether the DB instance has a dedicated log volume (DLV) enabled.
134 |
# File 'sig/db_snapshot.rbs', line 134
def dedicated_log_volume: () -> bool
|
#encrypted ⇒ Boolean
Indicates whether the DB snapshot is encrypted.
86 |
# File 'sig/db_snapshot.rbs', line 86
def encrypted: () -> bool
|
#engine ⇒ String
Specifies the name of the database engine.
29 |
# File 'sig/db_snapshot.rbs', line 29
def engine: () -> ::String
|
#engine_version ⇒ String
Specifies the version of the database engine.
53 |
# File 'sig/db_snapshot.rbs', line 53
def engine_version: () -> ::String
|
#iam_database_authentication_enabled ⇒ Boolean
Indicates whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled.
107 |
# File 'sig/db_snapshot.rbs', line 107
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.
1625 1626 1627 1628 1629 1630 |
# File 'lib/aws-sdk-rds/db_snapshot.rb', line 1625 def identifiers { instance_id: @instance_id, snapshot_id: @snapshot_id } end |
#instance_create_time ⇒ Time
Specifies the time in Coordinated Universal Time (UTC) when the DB instance, from which the snapshot was taken, was created.
47 |
# File 'sig/db_snapshot.rbs', line 47
def instance_create_time: () -> ::Time
|
#instance_id ⇒ String Also known as: db_instance_identifier
18 |
# File 'sig/db_snapshot.rbs', line 18
def instance_id: () -> String
|
#iops ⇒ Integer
Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot.
62 |
# File 'sig/db_snapshot.rbs', line 62
def iops: () -> ::Integer
|
#kms_key_id ⇒ String
If Encrypted is true, the Amazon Web Services KMS key identifier for
the encrypted DB snapshot.
The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
98 |
# File 'sig/db_snapshot.rbs', line 98
def kms_key_id: () -> ::String
|
#license_model ⇒ String
License model information for the restored DB instance.
56 |
# File 'sig/db_snapshot.rbs', line 56
def license_model: () -> ::String
|
#load ⇒ self Also known as: reload
Loads, or reloads #data for the current Aws::RDS::DBSnapshot.
Returns self making it possible to chain methods.
db_snapshot.reload.data
145 |
# File 'sig/db_snapshot.rbs', line 145
def load: () -> self
|
#master_username ⇒ String
Provides the master username for the DB snapshot.
50 |
# File 'sig/db_snapshot.rbs', line 50
def master_username: () -> ::String
|
#multi_tenant ⇒ Boolean
Indicates whether the snapshot is of a DB instance using the multi-tenant configuration (TRUE) or the single-tenant configuration (FALSE).
131 |
# File 'sig/db_snapshot.rbs', line 131
def multi_tenant: () -> bool
|
#option_group ⇒ OptionGroup?
309 |
# File 'sig/db_snapshot.rbs', line 309
def option_group: () -> OptionGroup?
|
#option_group_name ⇒ String
Provides the option group name for the DB snapshot.
68 |
# File 'sig/db_snapshot.rbs', line 68
def option_group_name: () -> ::String
|
#original_snapshot_create_time ⇒ Time
Specifies the time of the CreateDBSnapshot operation in Coordinated Universal Time (UTC). Doesn't change when the snapshot is copied.
122 |
# File 'sig/db_snapshot.rbs', line 122
def original_snapshot_create_time: () -> ::Time
|
#percent_progress ⇒ Integer
The percentage of the estimated data that has been transferred.
71 |
# File 'sig/db_snapshot.rbs', line 71
def percent_progress: () -> ::Integer
|
#port ⇒ Integer
Specifies the port that the database engine was listening on at the time of the snapshot.
38 |
# File 'sig/db_snapshot.rbs', line 38
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.
95 |
# File 'sig/db_snapshot.rbs', line 95
def preferred_backup_window: () -> ::String
|
#processor_features ⇒ Array<Types::ProcessorFeature>
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance when the DB snapshot was created.
110 |
# File 'sig/db_snapshot.rbs', line 110
def processor_features: () -> ::Array[Types::ProcessorFeature]
|
#snapshot_availability_zone ⇒ String
Specifies the name of the Availability Zone where RDS stores the DB snapshot. This value is valid only for snapshots that RDS stores on a Dedicated Local Zone.
140 |
# File 'sig/db_snapshot.rbs', line 140
def snapshot_availability_zone: () -> ::String
|
#snapshot_create_time ⇒ Time
Specifies when the snapshot was taken in Coordinated Universal Time (UTC). Changes for the copy when the snapshot is copied.
26 |
# File 'sig/db_snapshot.rbs', line 26
def snapshot_create_time: () -> ::Time
|
#snapshot_database_time ⇒ Time
The timestamp of the most recent transaction applied to the database that you're backing up. Thus, if you restore a snapshot, SnapshotDatabaseTime is the most recent transaction in the restored DB instance. In contrast, originalSnapshotCreateTime specifies the system time that the snapshot completed.
If you back up a read replica, you can determine the replica lag by comparing SnapshotDatabaseTime with originalSnapshotCreateTime. For example, if originalSnapshotCreateTime is two hours later than SnapshotDatabaseTime, then the replica lag is two hours.
125 |
# File 'sig/db_snapshot.rbs', line 125
def snapshot_database_time: () -> ::Time
|
#snapshot_id ⇒ String Also known as: db_snapshot_identifier
22 |
# File 'sig/db_snapshot.rbs', line 22
def snapshot_id: () -> String
|
#snapshot_target ⇒ String
Specifies where manual snapshots are stored: Dedicated Local Zones, Amazon Web Services Outposts or the Amazon Web Services Region.
119 |
# File 'sig/db_snapshot.rbs', line 119
def snapshot_target: () -> ::String
|
#snapshot_type ⇒ String
Provides the type of the DB snapshot.
59 |
# File 'sig/db_snapshot.rbs', line 59
def snapshot_type: () -> ::String
|
#source_db_snapshot_identifier ⇒ String
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied from. It only has a value in the case of a cross-account or cross-Region copy.
77 |
# File 'sig/db_snapshot.rbs', line 77
def source_db_snapshot_identifier: () -> ::String
|
#source_region ⇒ String
The Amazon Web Services Region that the DB snapshot was created in or copied from.
74 |
# File 'sig/db_snapshot.rbs', line 74
def source_region: () -> ::String
|
#status ⇒ String
Specifies the status of this DB snapshot.
35 |
# File 'sig/db_snapshot.rbs', line 35
def status: () -> ::String
|
#storage_encryption_type ⇒ String
The type of encryption used to protect data at rest in the DB snapshot. Possible values:
-
none- The DB snapshot is not encrypted. -
sse-rds- The DB snapshot is encrypted using an Amazon Web Services owned KMS key. -
sse-kms- The DB snapshot is encrypted using a customer managed KMS key or Amazon Web Services managed KMS key.
89 |
# File 'sig/db_snapshot.rbs', line 89
def storage_encryption_type: () -> ("none" | "sse-kms" | "sse-rds")
|
#storage_throughput ⇒ Integer
Specifies the storage throughput for the DB snapshot.
65 |
# File 'sig/db_snapshot.rbs', line 65
def storage_throughput: () -> ::Integer
|
#storage_type ⇒ String
Specifies the storage type associated with DB snapshot.
80 |
# File 'sig/db_snapshot.rbs', line 80
def storage_type: () -> ::String
|
#subscribe_to(options = {}) ⇒ EventSubscription
274 |
# File 'sig/db_snapshot.rbs', line 274
def subscribe_to: (
|
#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.
116 |
# File 'sig/db_snapshot.rbs', line 116
def tag_list: () -> ::Array[Types::Tag]
|
#tde_credential_arn ⇒ String
The ARN from the key store with which to associate the instance for TDE encryption.
83 |
# File 'sig/db_snapshot.rbs', line 83
def tde_credential_arn: () -> ::String
|
#timezone ⇒ String
The time zone of the DB snapshot. In most cases, the Timezone
element is empty. Timezone content appears only for snapshots taken
from Microsoft SQL Server DB instances that were created with a time
zone specified.
104 |
# File 'sig/db_snapshot.rbs', line 104
def timezone: () -> ::String
|
#unsubscribe_from(options = {}) ⇒ EventSubscription
280 |
# File 'sig/db_snapshot.rbs', line 280
def unsubscribe_from: (
|
#vpc_id ⇒ String
Provides the VPC ID associated with the DB snapshot.
44 |
# File 'sig/db_snapshot.rbs', line 44
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
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/aws-sdk-rds/db_snapshot.rb', line 457 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 |