Class: Aws::RDS::DBSnapshotAttribute
- Inherits:
-
Object
- Object
- Aws::RDS::DBSnapshotAttribute
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-rds/db_snapshot_attribute.rb
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
-
#attribute_values ⇒ Array<String>
The value or values for the manual DB snapshot attribute.
- #name ⇒ String (also: #attribute_name)
- #snapshot_id ⇒ String
Actions collapse
- #identifiers ⇒ Object deprecated private Deprecated.
- #modify(options = {}) ⇒ Types::ModifyDBSnapshotAttributeResult
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::DBSnapshotAttribute
Returns the data for this DBSnapshotAttribute.
-
#data_loaded? ⇒ Boolean
Returns ‘true` if this resource is loaded.
-
#initialize(*args) ⇒ DBSnapshotAttribute
constructor
A new instance of DBSnapshotAttribute.
- #load ⇒ Object (also: #reload) private
Constructor Details
#initialize(snapshot_id, name, options = {}) ⇒ DBSnapshotAttribute #initialize(options = {}) ⇒ DBSnapshotAttribute
Returns a new instance of DBSnapshotAttribute.
21 22 23 24 25 26 27 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 21 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @snapshot_id = extract_snapshot_id(args, ) @name = extract_name(args, ) @data = .delete(:data) @client = .delete(:client) || Client.new() end |
Instance Method Details
#attribute_values ⇒ Array<String>
The value or values for the manual DB snapshot attribute.
If the ‘AttributeName` field is set to `restore`, then this element returns a list of IDs of the AWS accounts that are authorized to copy or restore the manual DB snapshot. If a value of `all` is in the list, then the manual DB snapshot is public and available for any AWS account to copy or restore.
50 51 52 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 50 def attribute_values data.attribute_values end |
#client ⇒ Client
57 58 59 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 57 def client @client end |
#data ⇒ Types::DBSnapshotAttribute
Returns the data for this Aws::RDS::DBSnapshotAttribute.
72 73 74 75 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 72 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
80 81 82 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 80 def data_loaded? !!@data 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.
124 125 126 127 128 129 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 124 def identifiers { snapshot_id: @snapshot_id, name: @name } end |
#load ⇒ Object Also known as: reload
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.
63 64 65 66 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 63 def load msg = "#load is not implemented, data only available via enumeration" raise NotImplementedError, msg end |
#modify(options = {}) ⇒ Types::ModifyDBSnapshotAttributeResult
113 114 115 116 117 118 119 120 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 113 def modify( = {}) = .merge( attribute_name: @name, db_snapshot_identifier: @snapshot_id ) resp = @client.modify_db_snapshot_attribute() resp.data end |
#name ⇒ String Also known as: attribute_name
37 38 39 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 37 def name @name end |
#snapshot_id ⇒ String
32 33 34 |
# File 'lib/aws-sdk-rds/db_snapshot_attribute.rb', line 32 def snapshot_id @snapshot_id end |