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.
- checksums.yaml +4 -4
- data/lib/aws-sdk-rds.rb +2 -2
- data/lib/aws-sdk-rds/account_quota.rb +79 -81
- data/lib/aws-sdk-rds/certificate.rb +99 -101
- data/lib/aws-sdk-rds/client.rb +10575 -9119
- data/lib/aws-sdk-rds/client_api.rb +3049 -3023
- data/lib/aws-sdk-rds/db_cluster.rb +1005 -1007
- data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +204 -206
- data/lib/aws-sdk-rds/db_cluster_snapshot.rb +430 -432
- data/lib/aws-sdk-rds/db_engine.rb +208 -210
- data/lib/aws-sdk-rds/db_engine_version.rb +218 -219
- data/lib/aws-sdk-rds/db_instance.rb +2747 -2567
- data/lib/aws-sdk-rds/db_log_file.rb +145 -147
- data/lib/aws-sdk-rds/db_parameter_group.rb +411 -413
- data/lib/aws-sdk-rds/db_parameter_group_family.rb +135 -137
- data/lib/aws-sdk-rds/db_security_group.rb +316 -318
- data/lib/aws-sdk-rds/db_snapshot.rb +705 -650
- data/lib/aws-sdk-rds/db_snapshot_attribute.rb +137 -139
- data/lib/aws-sdk-rds/db_subnet_group.rb +161 -163
- data/lib/aws-sdk-rds/errors.rb +4 -13
- data/lib/aws-sdk-rds/event.rb +108 -110
- data/lib/aws-sdk-rds/event_category_map.rb +73 -75
- data/lib/aws-sdk-rds/event_subscription.rb +313 -315
- data/lib/aws-sdk-rds/option_group.rb +247 -249
- data/lib/aws-sdk-rds/option_group_option.rb +135 -137
- data/lib/aws-sdk-rds/parameter.rb +116 -118
- data/lib/aws-sdk-rds/pending_maintenance_action.rb +182 -184
- data/lib/aws-sdk-rds/plugins/cross_region_copying.rb +64 -0
- data/lib/aws-sdk-rds/reserved_db_instance.rb +156 -158
- data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +154 -156
- data/lib/aws-sdk-rds/resource.rb +2395 -2288
- data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +89 -91
- data/lib/aws-sdk-rds/types.rb +12091 -10977
- data/lib/aws-sdk-rds/waiters.rb +127 -128
- metadata +3 -2
@@ -1,170 +1,168 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# @return [String]
|
32
|
+
def instance_id
|
33
|
+
@instance_id
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
# @return [String]
|
37
|
+
def name
|
38
|
+
@name
|
39
|
+
end
|
40
|
+
alias :log_file_name :name
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
|
-
|
54
|
+
# @!endgroup
|
56
55
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
56
|
+
# @return [Client]
|
57
|
+
def client
|
58
|
+
@client
|
59
|
+
end
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
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
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
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
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
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
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
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
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
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
|
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
|
-
|
10
|
-
class DBParameterGroup
|
8
|
+
module Aws::RDS
|
9
|
+
class DBParameterGroup
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Deprecations
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
# @return [String]
|
29
|
+
def name
|
30
|
+
@name
|
31
|
+
end
|
32
|
+
alias :db_parameter_group_name :name
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
|
-
|
54
|
+
# @!endgroup
|
56
55
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
56
|
+
# @return [Client]
|
57
|
+
def client
|
58
|
+
@client
|
59
|
+
end
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
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
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
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
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|
-
|
89
|
+
# @!group Actions
|
91
90
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
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
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
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
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
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
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
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
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
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
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
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
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
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
|
-
|
321
|
+
# @!group Associations
|
323
322
|
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
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
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
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
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
431
|
+
# @deprecated
|
432
|
+
# @api private
|
433
|
+
def identifiers
|
434
|
+
{ name: @name }
|
435
|
+
end
|
436
|
+
deprecated(:identifiers)
|
438
437
|
|
439
|
-
|
438
|
+
private
|
440
439
|
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
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
|