Class: Aws::RDS::DBParameterGroup
- Inherits:
-
Object
- Object
- Aws::RDS::DBParameterGroup
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-rds/db_parameter_group.rb
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
-
#db_parameter_group_arn ⇒ String
The Amazon Resource Name (ARN) for the DB parameter group.
-
#db_parameter_group_family ⇒ String
Provides the name of the DB parameter group family that this DB parameter group is compatible with.
-
#description ⇒ String
Provides the customer-specified description for this DB parameter group.
- #name ⇒ String (also: #db_parameter_group_name)
Actions collapse
- #copy(options = {}) ⇒ DBParameterGroup
- #create(options = {}) ⇒ DBParameterGroup
- #delete(options = {}) ⇒ EmptyStructure
- #modify(options = {}) ⇒ DBParameterGroup
- #reset(options = {}) ⇒ DBParameterGroup
- #subscribe_to(options = {}) ⇒ EventSubscription
- #unsubscribe_from(options = {}) ⇒ EventSubscription
Associations collapse
- #events(options = {}) ⇒ Event::Collection
- #identifiers ⇒ Object deprecated private Deprecated.
- #parameters(options = {}) ⇒ Parameter::Collection
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::DBParameterGroup
Returns the data for this DBParameterGroup.
-
#data_loaded? ⇒ Boolean
Returns ‘true` if this resource is loaded.
-
#initialize(*args) ⇒ DBParameterGroup
constructor
A new instance of DBParameterGroup.
-
#load ⇒ self
(also: #reload)
Loads, or reloads #data for the current DBParameterGroup.
Constructor Details
#initialize(name, options = {}) ⇒ DBParameterGroup #initialize(options = {}) ⇒ DBParameterGroup
Returns a new instance of DBParameterGroup.
19 20 21 22 23 24 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 19 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @name = extract_name(args, ) @data = .delete(:data) @client = .delete(:client) || Client.new() end |
Instance Method Details
#client ⇒ Client
57 58 59 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 57 def client @client end |
#copy(options = {}) ⇒ DBParameterGroup
156 157 158 159 160 161 162 163 164 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 156 def copy( = {}) = .merge(source_db_parameter_group_identifier: @name) resp = @client.copy_db_parameter_group() DBParameterGroup.new( name: resp.data.db_parameter_group.db_parameter_group_name, data: resp.data.db_parameter_group, client: @client ) end |
#create(options = {}) ⇒ DBParameterGroup
114 115 116 117 118 119 120 121 122 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 114 def create( = {}) = .merge(db_parameter_group_name: @name) resp = @client.create_db_parameter_group() DBParameterGroup.new( name: resp.data.db_parameter_group.db_parameter_group_name, data: resp.data.db_parameter_group, client: @client ) end |
#data ⇒ Types::DBParameterGroup
Returns the data for this Aws::RDS::DBParameterGroup. Calls Client#describe_db_parameter_groups if #data_loaded? is ‘false`.
77 78 79 80 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 77 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
85 86 87 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 85 def data_loaded? !!@data end |
#db_parameter_group_arn ⇒ String
The Amazon Resource Name (ARN) for the DB parameter group.
50 51 52 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 50 def db_parameter_group_arn data.db_parameter_group_arn end |
#db_parameter_group_family ⇒ String
Provides the name of the DB parameter group family that this DB parameter group is compatible with.
37 38 39 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 37 def db_parameter_group_family data.db_parameter_group_family end |
#delete(options = {}) ⇒ EmptyStructure
171 172 173 174 175 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 171 def delete( = {}) = .merge(db_parameter_group_name: @name) resp = @client.delete_db_parameter_group() resp.data end |
#description ⇒ String
Provides the customer-specified description for this DB parameter group.
44 45 46 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 44 def description data.description end |
#events(options = {}) ⇒ Event::Collection
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 369 def events( = {}) batches = Enumerator.new do |y| = .merge( source_type: "db-parameter-group", source_identifier: @name ) 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 |
#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.
434 435 436 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 434 def identifiers { name: @name } end |
#load ⇒ self Also known as: reload
Loads, or reloads #data for the current Aws::RDS::DBParameterGroup. Returns ‘self` making it possible to chain methods.
db_parameter_group.reload.data
67 68 69 70 71 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 67 def load resp = @client.describe_db_parameter_groups(db_parameter_group_name: @name) @data = resp.db_parameter_groups[0] self end |
#modify(options = {}) ⇒ DBParameterGroup
212 213 214 215 216 217 218 219 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 212 def modify( = {}) = .merge(db_parameter_group_name: @name) resp = @client.modify_db_parameter_group() DBParameterGroup.new( name: resp.data.db_parameter_group_name, client: @client ) end |
#name ⇒ String Also known as: db_parameter_group_name
29 30 31 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 29 def name @name end |
#parameters(options = {}) ⇒ Parameter::Collection
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 413 def parameters( = {}) batches = Enumerator.new do |y| = .merge(db_parameter_group_name: @name) resp = @client.describe_db_parameters() resp.each_page do |page| batch = [] page.data.parameters.each do |p| batch << Parameter.new( name: p.parameter_name, data: p, client: @client ) end y.yield(batch) end end Parameter::Collection.new(batches) end |
#reset(options = {}) ⇒ DBParameterGroup
273 274 275 276 277 278 279 280 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 273 def reset( = {}) = .merge(db_parameter_group_name: @name) resp = @client.reset_db_parameter_group() DBParameterGroup.new( name: resp.data.db_parameter_group_name, client: @client ) end |
#subscribe_to(options = {}) ⇒ EventSubscription
292 293 294 295 296 297 298 299 300 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 292 def subscribe_to( = {}) = .merge(source_identifier: @name) resp = @client.add_source_identifier_to_subscription() EventSubscription.new( name: resp.data.event_subscription.cust_subscription_id, data: resp.data.event_subscription, client: @client ) end |
#unsubscribe_from(options = {}) ⇒ EventSubscription
312 313 314 315 316 317 318 319 320 |
# File 'lib/aws-sdk-rds/db_parameter_group.rb', line 312 def unsubscribe_from( = {}) = .merge(source_identifier: @name) resp = @client.remove_source_identifier_from_subscription() EventSubscription.new( name: resp.data.event_subscription.cust_subscription_id, data: resp.data.event_subscription, client: @client ) end |