aws-sdk-rds 1.0.0.rc2 → 1.0.0.rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aws-sdk-rds.rb +2 -2
  3. data/lib/aws-sdk-rds/account_quota.rb +79 -81
  4. data/lib/aws-sdk-rds/certificate.rb +99 -101
  5. data/lib/aws-sdk-rds/client.rb +10575 -9119
  6. data/lib/aws-sdk-rds/client_api.rb +3049 -3023
  7. data/lib/aws-sdk-rds/db_cluster.rb +1005 -1007
  8. data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +204 -206
  9. data/lib/aws-sdk-rds/db_cluster_snapshot.rb +430 -432
  10. data/lib/aws-sdk-rds/db_engine.rb +208 -210
  11. data/lib/aws-sdk-rds/db_engine_version.rb +218 -219
  12. data/lib/aws-sdk-rds/db_instance.rb +2747 -2567
  13. data/lib/aws-sdk-rds/db_log_file.rb +145 -147
  14. data/lib/aws-sdk-rds/db_parameter_group.rb +411 -413
  15. data/lib/aws-sdk-rds/db_parameter_group_family.rb +135 -137
  16. data/lib/aws-sdk-rds/db_security_group.rb +316 -318
  17. data/lib/aws-sdk-rds/db_snapshot.rb +705 -650
  18. data/lib/aws-sdk-rds/db_snapshot_attribute.rb +137 -139
  19. data/lib/aws-sdk-rds/db_subnet_group.rb +161 -163
  20. data/lib/aws-sdk-rds/errors.rb +4 -13
  21. data/lib/aws-sdk-rds/event.rb +108 -110
  22. data/lib/aws-sdk-rds/event_category_map.rb +73 -75
  23. data/lib/aws-sdk-rds/event_subscription.rb +313 -315
  24. data/lib/aws-sdk-rds/option_group.rb +247 -249
  25. data/lib/aws-sdk-rds/option_group_option.rb +135 -137
  26. data/lib/aws-sdk-rds/parameter.rb +116 -118
  27. data/lib/aws-sdk-rds/pending_maintenance_action.rb +182 -184
  28. data/lib/aws-sdk-rds/plugins/cross_region_copying.rb +64 -0
  29. data/lib/aws-sdk-rds/reserved_db_instance.rb +156 -158
  30. data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +154 -156
  31. data/lib/aws-sdk-rds/resource.rb +2395 -2288
  32. data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +89 -91
  33. data/lib/aws-sdk-rds/types.rb +12091 -10977
  34. data/lib/aws-sdk-rds/waiters.rb +127 -128
  35. metadata +3 -2
@@ -1,170 +1,168 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module RDS
10
- class DBLogFile
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(instance_id, name, options = {})
15
- # @param [String] instance_id
16
- # @param [String] name
17
- # @option options [Client] :client
18
- # @overload def initialize(options = {})
19
- # @option options [required, String] :instance_id
20
- # @option options [required, String] :name
21
- # @option options [Client] :client
22
- def initialize(*args)
23
- options = Hash === args.last ? args.pop.dup : {}
24
- @instance_id = extract_instance_id(args, options)
25
- @name = extract_name(args, options)
26
- @data = options.delete(:data)
27
- @client = options.delete(:client) || Client.new(options)
28
- end
8
+ module Aws::RDS
9
+ class DBLogFile
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(instance_id, name, options = {})
14
+ # @param [String] instance_id
15
+ # @param [String] name
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :instance_id
19
+ # @option options [required, String] :name
20
+ # @option options [Client] :client
21
+ def initialize(*args)
22
+ options = Hash === args.last ? args.pop.dup : {}
23
+ @instance_id = extract_instance_id(args, options)
24
+ @name = extract_name(args, options)
25
+ @data = options.delete(:data)
26
+ @client = options.delete(:client) || Client.new(options)
27
+ end
29
28
 
30
- # @!group Read-Only Attributes
29
+ # @!group Read-Only Attributes
31
30
 
32
- # @return [String]
33
- def instance_id
34
- @instance_id
35
- end
31
+ # @return [String]
32
+ def instance_id
33
+ @instance_id
34
+ end
36
35
 
37
- # @return [String]
38
- def name
39
- @name
40
- end
41
- alias :log_file_name :name
36
+ # @return [String]
37
+ def name
38
+ @name
39
+ end
40
+ alias :log_file_name :name
42
41
 
43
- # A POSIX timestamp when the last log entry was written.
44
- # @return [Integer]
45
- def last_written
46
- data.last_written
47
- end
42
+ # A POSIX timestamp when the last log entry was written.
43
+ # @return [Integer]
44
+ def last_written
45
+ data.last_written
46
+ end
48
47
 
49
- # The size, in bytes, of the log file for the specified DB instance.
50
- # @return [Integer]
51
- def size
52
- data.size
53
- end
48
+ # The size, in bytes, of the log file for the specified DB instance.
49
+ # @return [Integer]
50
+ def size
51
+ data.size
52
+ end
54
53
 
55
- # @!endgroup
54
+ # @!endgroup
56
55
 
57
- # @return [Client]
58
- def client
59
- @client
60
- end
56
+ # @return [Client]
57
+ def client
58
+ @client
59
+ end
61
60
 
62
- # @raise [Errors::ResourceNotLoadable]
63
- # @api private
64
- def load
65
- msg = "#load is not implemented, data only available via enumeration"
66
- raise Errors::ResourceNotLoadable, msg
67
- end
68
- alias :reload :load
69
-
70
- # @raise [Errors::ResourceNotLoadableError] Raises when {#data_loaded?} is `false`.
71
- # @return [Types::DescribeDBLogFilesDetails]
72
- # Returns the data for this {DBLogFile}.
73
- def data
74
- load unless @data
75
- @data
76
- end
61
+ # @raise [NotImplementedError]
62
+ # @api private
63
+ def load
64
+ msg = "#load is not implemented, data only available via enumeration"
65
+ raise NotImplementedError, msg
66
+ end
67
+ alias :reload :load
68
+
69
+ # @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
70
+ # @return [Types::DescribeDBLogFilesDetails]
71
+ # Returns the data for this {DBLogFile}.
72
+ def data
73
+ load unless @data
74
+ @data
75
+ end
77
76
 
78
- # @return [Boolean]
79
- # Returns `true` if this resource is loaded. Accessing attributes or
80
- # {#data} on an unloaded resource will trigger a call to {#load}.
81
- def data_loaded?
82
- !!@data
83
- end
77
+ # @return [Boolean]
78
+ # Returns `true` if this resource is loaded. Accessing attributes or
79
+ # {#data} on an unloaded resource will trigger a call to {#load}.
80
+ def data_loaded?
81
+ !!@data
82
+ end
84
83
 
85
- # @!group Actions
86
-
87
- # @example Request syntax with placeholder values
88
- #
89
- # db_log_file.download({
90
- # marker: "String",
91
- # number_of_lines: 1,
92
- # })
93
- # @param [Hash] options ({})
94
- # @option options [String] :marker
95
- # The pagination token provided in the previous request or "0". If the
96
- # Marker parameter is specified the response includes only records
97
- # beyond the marker until the end of the file or up to NumberOfLines.
98
- # @option options [Integer] :number_of_lines
99
- # The number of lines to download. If the number of lines specified
100
- # results in a file over 1 MB in size, the file will be truncated at 1
101
- # MB in size.
102
- #
103
- # If the NumberOfLines parameter is specified, then the block of lines
104
- # returned can be from the beginning or the end of the log file,
105
- # depending on the value of the Marker parameter.
106
- #
107
- # * If neither Marker or NumberOfLines are specified, the entire log
108
- # file is returned up to a maximum of 10000 lines, starting with the
109
- # most recent log entries first.
110
- #
111
- # * If NumberOfLines is specified and Marker is not specified, then the
112
- # most recent lines from the end of the log file are returned.
113
- #
114
- # * If Marker is specified as "0", then the specified number of lines
115
- # from the beginning of the log file are returned.
116
- #
117
- # * You can download the log file in blocks of lines by specifying the
118
- # size of the block using the NumberOfLines parameter, and by
119
- # specifying a value of "0" for the Marker parameter in your first
120
- # request. Include the Marker value returned in the response as the
121
- # Marker value for the next request, continuing until the
122
- # AdditionalDataPending response element returns false.
123
- # @return [Types::DownloadDBLogFilePortionDetails]
124
- def download(options = {})
125
- options = options.merge(
126
- db_instance_identifier: @instance_id,
127
- log_file_name: @name
128
- )
129
- resp = @client.download_db_log_file_portion(options)
130
- resp.data
131
- end
84
+ # @!group Actions
85
+
86
+ # @example Request syntax with placeholder values
87
+ #
88
+ # db_log_file.download({
89
+ # marker: "String",
90
+ # number_of_lines: 1,
91
+ # })
92
+ # @param [Hash] options ({})
93
+ # @option options [String] :marker
94
+ # The pagination token provided in the previous request or "0". If the
95
+ # Marker parameter is specified the response includes only records
96
+ # beyond the marker until the end of the file or up to NumberOfLines.
97
+ # @option options [Integer] :number_of_lines
98
+ # The number of lines to download. If the number of lines specified
99
+ # results in a file over 1 MB in size, the file will be truncated at 1
100
+ # MB in size.
101
+ #
102
+ # If the NumberOfLines parameter is specified, then the block of lines
103
+ # returned can be from the beginning or the end of the log file,
104
+ # depending on the value of the Marker parameter.
105
+ #
106
+ # * If neither Marker or NumberOfLines are specified, the entire log
107
+ # file is returned up to a maximum of 10000 lines, starting with the
108
+ # most recent log entries first.
109
+ #
110
+ # * If NumberOfLines is specified and Marker is not specified, then the
111
+ # most recent lines from the end of the log file are returned.
112
+ #
113
+ # * If Marker is specified as "0", then the specified number of lines
114
+ # from the beginning of the log file are returned.
115
+ #
116
+ # * You can download the log file in blocks of lines by specifying the
117
+ # size of the block using the NumberOfLines parameter, and by
118
+ # specifying a value of "0" for the Marker parameter in your first
119
+ # request. Include the Marker value returned in the response as the
120
+ # Marker value for the next request, continuing until the
121
+ # AdditionalDataPending response element returns false.
122
+ # @return [Types::DownloadDBLogFilePortionDetails]
123
+ def download(options = {})
124
+ options = options.merge(
125
+ db_instance_identifier: @instance_id,
126
+ log_file_name: @name
127
+ )
128
+ resp = @client.download_db_log_file_portion(options)
129
+ resp.data
130
+ end
132
131
 
133
- # @deprecated
134
- # @api private
135
- def identifiers
136
- {
137
- instance_id: @instance_id,
138
- name: @name
139
- }
140
- end
141
- deprecated(:identifiers)
142
-
143
- private
144
-
145
- def extract_instance_id(args, options)
146
- value = args[0] || options.delete(:instance_id)
147
- case value
148
- when String then value
149
- when nil then raise ArgumentError, "missing required option :instance_id"
150
- else
151
- msg = "expected :instance_id to be a String, got #{value.class}"
152
- raise ArgumentError, msg
153
- end
132
+ # @deprecated
133
+ # @api private
134
+ def identifiers
135
+ {
136
+ instance_id: @instance_id,
137
+ name: @name
138
+ }
139
+ end
140
+ deprecated(:identifiers)
141
+
142
+ private
143
+
144
+ def extract_instance_id(args, options)
145
+ value = args[0] || options.delete(:instance_id)
146
+ case value
147
+ when String then value
148
+ when nil then raise ArgumentError, "missing required option :instance_id"
149
+ else
150
+ msg = "expected :instance_id to be a String, got #{value.class}"
151
+ raise ArgumentError, msg
154
152
  end
153
+ end
155
154
 
156
- def extract_name(args, options)
157
- value = args[1] || options.delete(:name)
158
- case value
159
- when String then value
160
- when nil then raise ArgumentError, "missing required option :name"
161
- else
162
- msg = "expected :name to be a String, got #{value.class}"
163
- raise ArgumentError, msg
164
- end
155
+ def extract_name(args, options)
156
+ value = args[1] || options.delete(:name)
157
+ case value
158
+ when String then value
159
+ when nil then raise ArgumentError, "missing required option :name"
160
+ else
161
+ msg = "expected :name to be a String, got #{value.class}"
162
+ raise ArgumentError, msg
165
163
  end
166
-
167
- class Collection < Aws::Resources::Collection; end
168
164
  end
165
+
166
+ class Collection < Aws::Resources::Collection; end
169
167
  end
170
168
  end
@@ -1,455 +1,453 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module RDS
10
- class DBParameterGroup
8
+ module Aws::RDS
9
+ class DBParameterGroup
11
10
 
12
- extend Aws::Deprecations
11
+ extend Aws::Deprecations
13
12
 
14
- # @overload def initialize(name, options = {})
15
- # @param [String] name
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :name
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @name = extract_name(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
13
+ # @overload def initialize(name, options = {})
14
+ # @param [String] name
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :name
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @name = extract_name(args, options)
22
+ @data = options.delete(:data)
23
+ @client = options.delete(:client) || Client.new(options)
24
+ end
26
25
 
27
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def name
31
- @name
32
- end
33
- alias :db_parameter_group_name :name
28
+ # @return [String]
29
+ def name
30
+ @name
31
+ end
32
+ alias :db_parameter_group_name :name
34
33
 
35
- # Provides the name of the DB parameter group family that this DB
36
- # parameter group is compatible with.
37
- # @return [String]
38
- def db_parameter_group_family
39
- data.db_parameter_group_family
40
- end
34
+ # Provides the name of the DB parameter group family that this DB
35
+ # parameter group is compatible with.
36
+ # @return [String]
37
+ def db_parameter_group_family
38
+ data.db_parameter_group_family
39
+ end
41
40
 
42
- # Provides the customer-specified description for this DB parameter
43
- # group.
44
- # @return [String]
45
- def description
46
- data.description
47
- end
41
+ # Provides the customer-specified description for this DB parameter
42
+ # group.
43
+ # @return [String]
44
+ def description
45
+ data.description
46
+ end
48
47
 
49
- # The Amazon Resource Name (ARN) for the DB parameter group.
50
- # @return [String]
51
- def db_parameter_group_arn
52
- data.db_parameter_group_arn
53
- end
48
+ # The Amazon Resource Name (ARN) for the DB parameter group.
49
+ # @return [String]
50
+ def db_parameter_group_arn
51
+ data.db_parameter_group_arn
52
+ end
54
53
 
55
- # @!endgroup
54
+ # @!endgroup
56
55
 
57
- # @return [Client]
58
- def client
59
- @client
60
- end
56
+ # @return [Client]
57
+ def client
58
+ @client
59
+ end
61
60
 
62
- # Loads, or reloads {#data} for the current {DBParameterGroup}.
63
- # Returns `self` making it possible to chain methods.
64
- #
65
- # db_parameter_group.reload.data
66
- #
67
- # @return [self]
68
- def load
69
- resp = @client.describe_db_parameter_groups(db_parameter_group_name: @name)
70
- @data = resp.dbparametergroups[0]
71
- self
72
- end
73
- alias :reload :load
61
+ # Loads, or reloads {#data} for the current {DBParameterGroup}.
62
+ # Returns `self` making it possible to chain methods.
63
+ #
64
+ # db_parameter_group.reload.data
65
+ #
66
+ # @return [self]
67
+ def load
68
+ resp = @client.describe_db_parameter_groups(db_parameter_group_name: @name)
69
+ @data = resp.dbparametergroups[0]
70
+ self
71
+ end
72
+ alias :reload :load
74
73
 
75
- # @return [Types::DBParameterGroup]
76
- # Returns the data for this {DBParameterGroup}. Calls
77
- # {Client#describe_db_parameter_groups} if {#data_loaded?} is `false`.
78
- def data
79
- load unless @data
80
- @data
81
- end
74
+ # @return [Types::DBParameterGroup]
75
+ # Returns the data for this {DBParameterGroup}. Calls
76
+ # {Client#describe_db_parameter_groups} if {#data_loaded?} is `false`.
77
+ def data
78
+ load unless @data
79
+ @data
80
+ end
82
81
 
83
- # @return [Boolean]
84
- # Returns `true` if this resource is loaded. Accessing attributes or
85
- # {#data} on an unloaded resource will trigger a call to {#load}.
86
- def data_loaded?
87
- !!@data
88
- end
82
+ # @return [Boolean]
83
+ # Returns `true` if this resource is loaded. Accessing attributes or
84
+ # {#data} on an unloaded resource will trigger a call to {#load}.
85
+ def data_loaded?
86
+ !!@data
87
+ end
89
88
 
90
- # @!group Actions
89
+ # @!group Actions
91
90
 
92
- # @example Request syntax with placeholder values
93
- #
94
- # dbparametergroup = db_parameter_group.create({
95
- # db_parameter_group_family: "String", # required
96
- # description: "String", # required
97
- # tags: [
98
- # {
99
- # key: "String",
100
- # value: "String",
101
- # },
102
- # ],
103
- # })
104
- # @param [Hash] options ({})
105
- # @option options [required, String] :db_parameter_group_family
106
- # The DB parameter group family name. A DB parameter group can be
107
- # associated with one and only one DB parameter group family, and can be
108
- # applied only to a DB instance running a database engine and engine
109
- # version compatible with that DB parameter group family.
110
- # @option options [required, String] :description
111
- # The description for the DB parameter group.
112
- # @option options [Array<Types::Tag>] :tags
113
- # A list of tags.
114
- # @return [DBParameterGroup]
115
- def create(options = {})
116
- options = options.merge(db_parameter_group_name: @name)
117
- resp = @client.create_db_parameter_group(options)
118
- DBParameterGroup.new(
119
- name: resp.data.db_parameter_group.db_parameter_group_name,
120
- data: resp.data.db_parameter_group,
121
- client: @client
122
- )
123
- end
91
+ # @example Request syntax with placeholder values
92
+ #
93
+ # dbparametergroup = db_parameter_group.create({
94
+ # db_parameter_group_family: "String", # required
95
+ # description: "String", # required
96
+ # tags: [
97
+ # {
98
+ # key: "String",
99
+ # value: "String",
100
+ # },
101
+ # ],
102
+ # })
103
+ # @param [Hash] options ({})
104
+ # @option options [required, String] :db_parameter_group_family
105
+ # The DB parameter group family name. A DB parameter group can be
106
+ # associated with one and only one DB parameter group family, and can be
107
+ # applied only to a DB instance running a database engine and engine
108
+ # version compatible with that DB parameter group family.
109
+ # @option options [required, String] :description
110
+ # The description for the DB parameter group.
111
+ # @option options [Array<Types::Tag>] :tags
112
+ # A list of tags.
113
+ # @return [DBParameterGroup]
114
+ def create(options = {})
115
+ options = options.merge(db_parameter_group_name: @name)
116
+ resp = @client.create_db_parameter_group(options)
117
+ DBParameterGroup.new(
118
+ name: resp.data.db_parameter_group.db_parameter_group_name,
119
+ data: resp.data.db_parameter_group,
120
+ client: @client
121
+ )
122
+ end
124
123
 
125
- # @example Request syntax with placeholder values
126
- #
127
- # dbparametergroup = db_parameter_group.copy({
128
- # target_db_parameter_group_identifier: "String", # required
129
- # target_db_parameter_group_description: "String", # required
130
- # tags: [
131
- # {
132
- # key: "String",
133
- # value: "String",
134
- # },
135
- # ],
136
- # })
137
- # @param [Hash] options ({})
138
- # @option options [required, String] :target_db_parameter_group_identifier
139
- # The identifier for the copied DB parameter group.
140
- #
141
- # Constraints:
142
- #
143
- # * Cannot be null, empty, or blank
144
- #
145
- # * Must contain from 1 to 255 alphanumeric characters or hyphens
146
- #
147
- # * First character must be a letter
148
- #
149
- # * Cannot end with a hyphen or contain two consecutive hyphens
150
- #
151
- # Example: `my-db-parameter-group`
152
- # @option options [required, String] :target_db_parameter_group_description
153
- # A description for the copied DB parameter group.
154
- # @option options [Array<Types::Tag>] :tags
155
- # A list of tags.
156
- # @return [DBParameterGroup]
157
- def copy(options = {})
158
- options = options.merge(source_db_parameter_group_identifier: @name)
159
- resp = @client.copy_db_parameter_group(options)
160
- DBParameterGroup.new(
161
- name: resp.data.db_parameter_group.db_parameter_group_name,
162
- data: resp.data.db_parameter_group,
163
- client: @client
164
- )
165
- end
124
+ # @example Request syntax with placeholder values
125
+ #
126
+ # dbparametergroup = db_parameter_group.copy({
127
+ # target_db_parameter_group_identifier: "String", # required
128
+ # target_db_parameter_group_description: "String", # required
129
+ # tags: [
130
+ # {
131
+ # key: "String",
132
+ # value: "String",
133
+ # },
134
+ # ],
135
+ # })
136
+ # @param [Hash] options ({})
137
+ # @option options [required, String] :target_db_parameter_group_identifier
138
+ # The identifier for the copied DB parameter group.
139
+ #
140
+ # Constraints:
141
+ #
142
+ # * Cannot be null, empty, or blank
143
+ #
144
+ # * Must contain from 1 to 255 alphanumeric characters or hyphens
145
+ #
146
+ # * First character must be a letter
147
+ #
148
+ # * Cannot end with a hyphen or contain two consecutive hyphens
149
+ #
150
+ # Example: `my-db-parameter-group`
151
+ # @option options [required, String] :target_db_parameter_group_description
152
+ # A description for the copied DB parameter group.
153
+ # @option options [Array<Types::Tag>] :tags
154
+ # A list of tags.
155
+ # @return [DBParameterGroup]
156
+ def copy(options = {})
157
+ options = options.merge(source_db_parameter_group_identifier: @name)
158
+ resp = @client.copy_db_parameter_group(options)
159
+ DBParameterGroup.new(
160
+ name: resp.data.db_parameter_group.db_parameter_group_name,
161
+ data: resp.data.db_parameter_group,
162
+ client: @client
163
+ )
164
+ end
166
165
 
167
- # @example Request syntax with placeholder values
168
- #
169
- # db_parameter_group.delete()
170
- # @param [Hash] options ({})
171
- # @return [EmptyStructure]
172
- def delete(options = {})
173
- options = options.merge(db_parameter_group_name: @name)
174
- resp = @client.delete_db_parameter_group(options)
175
- resp.data
176
- end
166
+ # @example Request syntax with placeholder values
167
+ #
168
+ # db_parameter_group.delete()
169
+ # @param [Hash] options ({})
170
+ # @return [EmptyStructure]
171
+ def delete(options = {})
172
+ options = options.merge(db_parameter_group_name: @name)
173
+ resp = @client.delete_db_parameter_group(options)
174
+ resp.data
175
+ end
177
176
 
178
- # @example Request syntax with placeholder values
179
- #
180
- # dbparametergroup = db_parameter_group.modify({
181
- # parameters: [ # required
182
- # {
183
- # parameter_name: "String",
184
- # parameter_value: "String",
185
- # description: "String",
186
- # source: "String",
187
- # apply_type: "String",
188
- # data_type: "String",
189
- # allowed_values: "String",
190
- # is_modifiable: false,
191
- # minimum_engine_version: "String",
192
- # apply_method: "immediate", # accepts immediate, pending-reboot
193
- # },
194
- # ],
195
- # })
196
- # @param [Hash] options ({})
197
- # @option options [required, Array<Types::Parameter>] :parameters
198
- # An array of parameter names, values, and the apply method for the
199
- # parameter update. At least one parameter name, value, and apply method
200
- # must be supplied; subsequent arguments are optional. A maximum of 20
201
- # parameters can be modified in a single request.
202
- #
203
- # Valid Values (for the application method): `immediate |
204
- # pending-reboot`
205
- #
206
- # <note markdown="1"> You can use the immediate value with dynamic parameters only. You can
207
- # use the pending-reboot value for both dynamic and static parameters,
208
- # and changes are applied when you reboot the DB instance without
209
- # failover.
210
- #
211
- # </note>
212
- # @return [DBParameterGroup]
213
- def modify(options = {})
214
- options = options.merge(db_parameter_group_name: @name)
215
- resp = @client.modify_db_parameter_group(options)
216
- DBParameterGroup.new(
217
- name: resp.data.db_parameter_group_name,
218
- client: @client
219
- )
220
- end
177
+ # @example Request syntax with placeholder values
178
+ #
179
+ # dbparametergroup = db_parameter_group.modify({
180
+ # parameters: [ # required
181
+ # {
182
+ # parameter_name: "String",
183
+ # parameter_value: "String",
184
+ # description: "String",
185
+ # source: "String",
186
+ # apply_type: "String",
187
+ # data_type: "String",
188
+ # allowed_values: "String",
189
+ # is_modifiable: false,
190
+ # minimum_engine_version: "String",
191
+ # apply_method: "immediate", # accepts immediate, pending-reboot
192
+ # },
193
+ # ],
194
+ # })
195
+ # @param [Hash] options ({})
196
+ # @option options [required, Array<Types::Parameter>] :parameters
197
+ # An array of parameter names, values, and the apply method for the
198
+ # parameter update. At least one parameter name, value, and apply method
199
+ # must be supplied; subsequent arguments are optional. A maximum of 20
200
+ # parameters can be modified in a single request.
201
+ #
202
+ # Valid Values (for the application method): `immediate |
203
+ # pending-reboot`
204
+ #
205
+ # <note markdown="1"> You can use the immediate value with dynamic parameters only. You can
206
+ # use the pending-reboot value for both dynamic and static parameters,
207
+ # and changes are applied when you reboot the DB instance without
208
+ # failover.
209
+ #
210
+ # </note>
211
+ # @return [DBParameterGroup]
212
+ def modify(options = {})
213
+ options = options.merge(db_parameter_group_name: @name)
214
+ resp = @client.modify_db_parameter_group(options)
215
+ DBParameterGroup.new(
216
+ name: resp.data.db_parameter_group_name,
217
+ client: @client
218
+ )
219
+ end
221
220
 
222
- # @example Request syntax with placeholder values
223
- #
224
- # dbparametergroup = db_parameter_group.reset({
225
- # reset_all_parameters: false,
226
- # parameters: [
227
- # {
228
- # parameter_name: "String",
229
- # parameter_value: "String",
230
- # description: "String",
231
- # source: "String",
232
- # apply_type: "String",
233
- # data_type: "String",
234
- # allowed_values: "String",
235
- # is_modifiable: false,
236
- # minimum_engine_version: "String",
237
- # apply_method: "immediate", # accepts immediate, pending-reboot
238
- # },
239
- # ],
240
- # })
241
- # @param [Hash] options ({})
242
- # @option options [Boolean] :reset_all_parameters
243
- # Specifies whether (`true`) or not (`false`) to reset all parameters in
244
- # the DB parameter group to default values.
245
- #
246
- # Default: `true`
247
- # @option options [Array<Types::Parameter>] :parameters
248
- # An array of parameter names, values, and the apply method for the
249
- # parameter update. At least one parameter name, value, and apply method
250
- # must be supplied; subsequent arguments are optional. A maximum of 20
251
- # parameters can be modified in a single request.
252
- #
253
- # **MySQL**
254
- #
255
- # Valid Values (for Apply method): `immediate` \| `pending-reboot`
256
- #
257
- # You can use the immediate value with dynamic parameters only. You can
258
- # use the `pending-reboot` value for both dynamic and static parameters,
259
- # and changes are applied when DB instance reboots.
260
- #
261
- # **MariaDB**
262
- #
263
- # Valid Values (for Apply method): `immediate` \| `pending-reboot`
264
- #
265
- # You can use the immediate value with dynamic parameters only. You can
266
- # use the `pending-reboot` value for both dynamic and static parameters,
267
- # and changes are applied when DB instance reboots.
268
- #
269
- # **Oracle**
270
- #
271
- # Valid Values (for Apply method): `pending-reboot`
272
- # @return [DBParameterGroup]
273
- def reset(options = {})
274
- options = options.merge(db_parameter_group_name: @name)
275
- resp = @client.reset_db_parameter_group(options)
276
- DBParameterGroup.new(
277
- name: resp.data.db_parameter_group_name,
278
- client: @client
279
- )
280
- end
221
+ # @example Request syntax with placeholder values
222
+ #
223
+ # dbparametergroup = db_parameter_group.reset({
224
+ # reset_all_parameters: false,
225
+ # parameters: [
226
+ # {
227
+ # parameter_name: "String",
228
+ # parameter_value: "String",
229
+ # description: "String",
230
+ # source: "String",
231
+ # apply_type: "String",
232
+ # data_type: "String",
233
+ # allowed_values: "String",
234
+ # is_modifiable: false,
235
+ # minimum_engine_version: "String",
236
+ # apply_method: "immediate", # accepts immediate, pending-reboot
237
+ # },
238
+ # ],
239
+ # })
240
+ # @param [Hash] options ({})
241
+ # @option options [Boolean] :reset_all_parameters
242
+ # Specifies whether (`true`) or not (`false`) to reset all parameters in
243
+ # the DB parameter group to default values.
244
+ #
245
+ # Default: `true`
246
+ # @option options [Array<Types::Parameter>] :parameters
247
+ # An array of parameter names, values, and the apply method for the
248
+ # parameter update. At least one parameter name, value, and apply method
249
+ # must be supplied; subsequent arguments are optional. A maximum of 20
250
+ # parameters can be modified in a single request.
251
+ #
252
+ # **MySQL**
253
+ #
254
+ # Valid Values (for Apply method): `immediate` \| `pending-reboot`
255
+ #
256
+ # You can use the immediate value with dynamic parameters only. You can
257
+ # use the `pending-reboot` value for both dynamic and static parameters,
258
+ # and changes are applied when DB instance reboots.
259
+ #
260
+ # **MariaDB**
261
+ #
262
+ # Valid Values (for Apply method): `immediate` \| `pending-reboot`
263
+ #
264
+ # You can use the immediate value with dynamic parameters only. You can
265
+ # use the `pending-reboot` value for both dynamic and static parameters,
266
+ # and changes are applied when DB instance reboots.
267
+ #
268
+ # **Oracle**
269
+ #
270
+ # Valid Values (for Apply method): `pending-reboot`
271
+ # @return [DBParameterGroup]
272
+ def reset(options = {})
273
+ options = options.merge(db_parameter_group_name: @name)
274
+ resp = @client.reset_db_parameter_group(options)
275
+ DBParameterGroup.new(
276
+ name: resp.data.db_parameter_group_name,
277
+ client: @client
278
+ )
279
+ end
281
280
 
282
- # @example Request syntax with placeholder values
283
- #
284
- # eventsubscription = db_parameter_group.subscribe_to({
285
- # subscription_name: "String", # required
286
- # })
287
- # @param [Hash] options ({})
288
- # @option options [required, String] :subscription_name
289
- # The name of the RDS event notification subscription you want to add a
290
- # source identifier to.
291
- # @return [EventSubscription]
292
- def subscribe_to(options = {})
293
- options = options.merge(source_identifier: @name)
294
- resp = @client.add_source_identifier_to_subscription(options)
295
- EventSubscription.new(
296
- name: resp.data.event_subscription.cust_subscription_id,
297
- data: resp.data.event_subscription,
298
- client: @client
299
- )
300
- end
281
+ # @example Request syntax with placeholder values
282
+ #
283
+ # eventsubscription = db_parameter_group.subscribe_to({
284
+ # subscription_name: "String", # required
285
+ # })
286
+ # @param [Hash] options ({})
287
+ # @option options [required, String] :subscription_name
288
+ # The name of the RDS event notification subscription you want to add a
289
+ # source identifier to.
290
+ # @return [EventSubscription]
291
+ def subscribe_to(options = {})
292
+ options = options.merge(source_identifier: @name)
293
+ resp = @client.add_source_identifier_to_subscription(options)
294
+ EventSubscription.new(
295
+ name: resp.data.event_subscription.cust_subscription_id,
296
+ data: resp.data.event_subscription,
297
+ client: @client
298
+ )
299
+ end
301
300
 
302
- # @example Request syntax with placeholder values
303
- #
304
- # eventsubscription = db_parameter_group.unsubscribe_from({
305
- # subscription_name: "String", # required
306
- # })
307
- # @param [Hash] options ({})
308
- # @option options [required, String] :subscription_name
309
- # The name of the RDS event notification subscription you want to remove
310
- # a source identifier from.
311
- # @return [EventSubscription]
312
- def unsubscribe_from(options = {})
313
- options = options.merge(source_identifier: @name)
314
- resp = @client.remove_source_identifier_from_subscription(options)
315
- EventSubscription.new(
316
- name: resp.data.event_subscription.cust_subscription_id,
317
- data: resp.data.event_subscription,
318
- client: @client
319
- )
320
- end
301
+ # @example Request syntax with placeholder values
302
+ #
303
+ # eventsubscription = db_parameter_group.unsubscribe_from({
304
+ # subscription_name: "String", # required
305
+ # })
306
+ # @param [Hash] options ({})
307
+ # @option options [required, String] :subscription_name
308
+ # The name of the RDS event notification subscription you want to remove
309
+ # a source identifier from.
310
+ # @return [EventSubscription]
311
+ def unsubscribe_from(options = {})
312
+ options = options.merge(source_identifier: @name)
313
+ resp = @client.remove_source_identifier_from_subscription(options)
314
+ EventSubscription.new(
315
+ name: resp.data.event_subscription.cust_subscription_id,
316
+ data: resp.data.event_subscription,
317
+ client: @client
318
+ )
319
+ end
321
320
 
322
- # @!group Associations
321
+ # @!group Associations
323
322
 
324
- # @example Request syntax with placeholder values
325
- #
326
- # events = db_parameter_group.events({
327
- # start_time: Time.now,
328
- # end_time: Time.now,
329
- # duration: 1,
330
- # event_categories: ["String"],
331
- # filters: [
332
- # {
333
- # name: "String", # required
334
- # values: ["String"], # required
335
- # },
336
- # ],
337
- # })
338
- # @param [Hash] options ({})
339
- # @option options [Time,DateTime,Date,Integer,String] :start_time
340
- # The beginning of the time interval to retrieve events for, specified
341
- # in ISO 8601 format. For more information about ISO 8601, go to the
342
- # [ISO8601 Wikipedia page.][1]
343
- #
344
- # Example: 2009-07-08T18:00Z
345
- #
346
- #
347
- #
348
- # [1]: http://en.wikipedia.org/wiki/ISO_8601
349
- # @option options [Time,DateTime,Date,Integer,String] :end_time
350
- # The end of the time interval for which to retrieve events, specified
351
- # in ISO 8601 format. For more information about ISO 8601, go to the
352
- # [ISO8601 Wikipedia page.][1]
353
- #
354
- # Example: 2009-07-08T18:00Z
355
- #
356
- #
357
- #
358
- # [1]: http://en.wikipedia.org/wiki/ISO_8601
359
- # @option options [Integer] :duration
360
- # The number of minutes to retrieve events for.
361
- #
362
- # Default: 60
363
- # @option options [Array<String>] :event_categories
364
- # A list of event categories that trigger notifications for a event
365
- # notification subscription.
366
- # @option options [Array<Types::Filter>] :filters
367
- # This parameter is not currently supported.
368
- # @return [Event::Collection]
369
- def events(options = {})
370
- batches = Enumerator.new do |y|
371
- options = options.merge(
372
- source_type: "db-parameter-group",
373
- source_identifier: @name
374
- )
375
- resp = @client.describe_events(options)
376
- resp.each_page do |page|
377
- batch = []
378
- page.data.events.each do |e|
379
- batch << Event.new(
380
- source_id: e.source_identifier,
381
- date: e.date,
382
- data: e,
383
- client: @client
384
- )
385
- end
386
- y.yield(batch)
323
+ # @example Request syntax with placeholder values
324
+ #
325
+ # events = db_parameter_group.events({
326
+ # start_time: Time.now,
327
+ # end_time: Time.now,
328
+ # duration: 1,
329
+ # event_categories: ["String"],
330
+ # filters: [
331
+ # {
332
+ # name: "String", # required
333
+ # values: ["String"], # required
334
+ # },
335
+ # ],
336
+ # })
337
+ # @param [Hash] options ({})
338
+ # @option options [Time,DateTime,Date,Integer,String] :start_time
339
+ # The beginning of the time interval to retrieve events for, specified
340
+ # in ISO 8601 format. For more information about ISO 8601, go to the
341
+ # [ISO8601 Wikipedia page.][1]
342
+ #
343
+ # Example: 2009-07-08T18:00Z
344
+ #
345
+ #
346
+ #
347
+ # [1]: http://en.wikipedia.org/wiki/ISO_8601
348
+ # @option options [Time,DateTime,Date,Integer,String] :end_time
349
+ # The end of the time interval for which to retrieve events, specified
350
+ # in ISO 8601 format. For more information about ISO 8601, go to the
351
+ # [ISO8601 Wikipedia page.][1]
352
+ #
353
+ # Example: 2009-07-08T18:00Z
354
+ #
355
+ #
356
+ #
357
+ # [1]: http://en.wikipedia.org/wiki/ISO_8601
358
+ # @option options [Integer] :duration
359
+ # The number of minutes to retrieve events for.
360
+ #
361
+ # Default: 60
362
+ # @option options [Array<String>] :event_categories
363
+ # A list of event categories that trigger notifications for a event
364
+ # notification subscription.
365
+ # @option options [Array<Types::Filter>] :filters
366
+ # This parameter is not currently supported.
367
+ # @return [Event::Collection]
368
+ def events(options = {})
369
+ batches = Enumerator.new do |y|
370
+ options = options.merge(
371
+ source_type: "db-parameter-group",
372
+ source_identifier: @name
373
+ )
374
+ resp = @client.describe_events(options)
375
+ resp.each_page do |page|
376
+ batch = []
377
+ page.data.events.each do |e|
378
+ batch << Event.new(
379
+ source_id: e.source_identifier,
380
+ date: e.date,
381
+ data: e,
382
+ client: @client
383
+ )
387
384
  end
385
+ y.yield(batch)
388
386
  end
389
- Event::Collection.new(batches)
390
387
  end
388
+ Event::Collection.new(batches)
389
+ end
391
390
 
392
- # @example Request syntax with placeholder values
393
- #
394
- # parameters = db_parameter_group.parameters({
395
- # source: "String",
396
- # filters: [
397
- # {
398
- # name: "String", # required
399
- # values: ["String"], # required
400
- # },
401
- # ],
402
- # })
403
- # @param [Hash] options ({})
404
- # @option options [String] :source
405
- # The parameter types to return.
406
- #
407
- # Default: All parameter types returned
408
- #
409
- # Valid Values: `user | system | engine-default`
410
- # @option options [Array<Types::Filter>] :filters
411
- # This parameter is not currently supported.
412
- # @return [Parameter::Collection]
413
- def parameters(options = {})
414
- batches = Enumerator.new do |y|
415
- options = options.merge(db_parameter_group_name: @name)
416
- resp = @client.describe_db_parameters(options)
417
- resp.each_page do |page|
418
- batch = []
419
- page.data.parameters.each do |p|
420
- batch << Parameter.new(
421
- name: p.parameter_name,
422
- data: p,
423
- client: @client
424
- )
425
- end
426
- y.yield(batch)
391
+ # @example Request syntax with placeholder values
392
+ #
393
+ # parameters = db_parameter_group.parameters({
394
+ # source: "String",
395
+ # filters: [
396
+ # {
397
+ # name: "String", # required
398
+ # values: ["String"], # required
399
+ # },
400
+ # ],
401
+ # })
402
+ # @param [Hash] options ({})
403
+ # @option options [String] :source
404
+ # The parameter types to return.
405
+ #
406
+ # Default: All parameter types returned
407
+ #
408
+ # Valid Values: `user | system | engine-default`
409
+ # @option options [Array<Types::Filter>] :filters
410
+ # This parameter is not currently supported.
411
+ # @return [Parameter::Collection]
412
+ def parameters(options = {})
413
+ batches = Enumerator.new do |y|
414
+ options = options.merge(db_parameter_group_name: @name)
415
+ resp = @client.describe_db_parameters(options)
416
+ resp.each_page do |page|
417
+ batch = []
418
+ page.data.parameters.each do |p|
419
+ batch << Parameter.new(
420
+ name: p.parameter_name,
421
+ data: p,
422
+ client: @client
423
+ )
427
424
  end
425
+ y.yield(batch)
428
426
  end
429
- Parameter::Collection.new(batches)
430
427
  end
428
+ Parameter::Collection.new(batches)
429
+ end
431
430
 
432
- # @deprecated
433
- # @api private
434
- def identifiers
435
- { name: @name }
436
- end
437
- deprecated(:identifiers)
431
+ # @deprecated
432
+ # @api private
433
+ def identifiers
434
+ { name: @name }
435
+ end
436
+ deprecated(:identifiers)
438
437
 
439
- private
438
+ private
440
439
 
441
- def extract_name(args, options)
442
- value = args[0] || options.delete(:name)
443
- case value
444
- when String then value
445
- when nil then raise ArgumentError, "missing required option :name"
446
- else
447
- msg = "expected :name to be a String, got #{value.class}"
448
- raise ArgumentError, msg
449
- end
440
+ def extract_name(args, options)
441
+ value = args[0] || options.delete(:name)
442
+ case value
443
+ when String then value
444
+ when nil then raise ArgumentError, "missing required option :name"
445
+ else
446
+ msg = "expected :name to be a String, got #{value.class}"
447
+ raise ArgumentError, msg
450
448
  end
451
-
452
- class Collection < Aws::Resources::Collection; end
453
449
  end
450
+
451
+ class Collection < Aws::Resources::Collection; end
454
452
  end
455
453
  end