aws-sdk-rds 1.0.0.rc2 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- 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,102 +1,133 @@
|
|
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
|
-
end
|
8
|
+
module Aws::RDS
|
9
|
+
class DBParameterGroupFamily
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
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 = Aws::EmptyStructure.new
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
# @return [String]
|
29
|
+
def name
|
30
|
+
@name
|
31
|
+
end
|
33
32
|
|
34
|
-
|
33
|
+
# @!endgroup
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
# @return [Client]
|
36
|
+
def client
|
37
|
+
@client
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
40
|
+
# @raise [NotImplementedError]
|
41
|
+
# @api private
|
42
|
+
def load
|
43
|
+
msg = "#load is not implemented, data only available via enumeration"
|
44
|
+
raise NotImplementedError, msg
|
45
|
+
end
|
46
|
+
alias :reload :load
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
48
|
+
# @api private
|
49
|
+
# @return [EmptyStructure]
|
50
|
+
def data
|
51
|
+
@data
|
52
|
+
end
|
53
|
+
|
54
|
+
# @return [Boolean]
|
55
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
56
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
57
|
+
def data_loaded?
|
58
|
+
!!@data
|
59
|
+
end
|
54
60
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
61
|
+
# @!group Associations
|
62
|
+
|
63
|
+
# @example Request syntax with placeholder values
|
64
|
+
#
|
65
|
+
# engine_default_cluster_parameters = db_parameter_group_family.engine_default_cluster_parameters({
|
66
|
+
# filters: [
|
67
|
+
# {
|
68
|
+
# name: "String", # required
|
69
|
+
# values: ["String"], # required
|
70
|
+
# },
|
71
|
+
# ],
|
72
|
+
# max_records: 1,
|
73
|
+
# marker: "String",
|
74
|
+
# })
|
75
|
+
# @param [Hash] options ({})
|
76
|
+
# @option options [Array<Types::Filter>] :filters
|
77
|
+
# This parameter is not currently supported.
|
78
|
+
# @option options [Integer] :max_records
|
79
|
+
# The maximum number of records to include in the response. If more
|
80
|
+
# records exist than the specified `MaxRecords` value, a pagination
|
81
|
+
# token called a marker is included in the response so that the
|
82
|
+
# remaining results can be retrieved.
|
83
|
+
#
|
84
|
+
# Default: 100
|
85
|
+
#
|
86
|
+
# Constraints: Minimum 20, maximum 100.
|
87
|
+
# @option options [String] :marker
|
88
|
+
# An optional pagination token provided by a previous
|
89
|
+
# `DescribeEngineDefaultClusterParameters` request. If this parameter is
|
90
|
+
# specified, the response includes only records beyond the marker, up to
|
91
|
+
# the value specified by `MaxRecords`.
|
92
|
+
# @return [Parameter::Collection]
|
93
|
+
def engine_default_cluster_parameters(options = {})
|
94
|
+
batches = Enumerator.new do |y|
|
95
|
+
batch = []
|
96
|
+
options = options.merge(db_parameter_group_family: @name)
|
97
|
+
resp = @client.describe_engine_default_cluster_parameters(options)
|
98
|
+
resp.data.engine_defaults.parameters.each do |p|
|
99
|
+
batch << Parameter.new(
|
100
|
+
name: p.parameter_name,
|
101
|
+
data: p,
|
102
|
+
client: @client
|
103
|
+
)
|
104
|
+
end
|
105
|
+
y.yield(batch)
|
60
106
|
end
|
107
|
+
Parameter::Collection.new(batches)
|
108
|
+
end
|
61
109
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
# records exist than the specified `MaxRecords` value, a pagination
|
82
|
-
# token called a marker is included in the response so that the
|
83
|
-
# remaining results can be retrieved.
|
84
|
-
#
|
85
|
-
# Default: 100
|
86
|
-
#
|
87
|
-
# Constraints: Minimum 20, maximum 100.
|
88
|
-
# @option options [String] :marker
|
89
|
-
# An optional pagination token provided by a previous
|
90
|
-
# `DescribeEngineDefaultClusterParameters` request. If this parameter is
|
91
|
-
# specified, the response includes only records beyond the marker, up to
|
92
|
-
# the value specified by `MaxRecords`.
|
93
|
-
# @return [Parameter::Collection]
|
94
|
-
def engine_default_cluster_parameters(options = {})
|
95
|
-
batches = Enumerator.new do |y|
|
110
|
+
# @example Request syntax with placeholder values
|
111
|
+
#
|
112
|
+
# engine_default_parameters = db_parameter_group_family.engine_default_parameters({
|
113
|
+
# filters: [
|
114
|
+
# {
|
115
|
+
# name: "String", # required
|
116
|
+
# values: ["String"], # required
|
117
|
+
# },
|
118
|
+
# ],
|
119
|
+
# })
|
120
|
+
# @param [Hash] options ({})
|
121
|
+
# @option options [Array<Types::Filter>] :filters
|
122
|
+
# Not currently supported.
|
123
|
+
# @return [Parameter::Collection]
|
124
|
+
def engine_default_parameters(options = {})
|
125
|
+
batches = Enumerator.new do |y|
|
126
|
+
options = options.merge(db_parameter_group_family: @name)
|
127
|
+
resp = @client.describe_engine_default_parameters(options)
|
128
|
+
resp.each_page do |page|
|
96
129
|
batch = []
|
97
|
-
|
98
|
-
resp = @client.describe_engine_default_cluster_parameters(options)
|
99
|
-
resp.data.engine_defaults.parameters.each do |p|
|
130
|
+
page.data.engine_defaults.parameters.each do |p|
|
100
131
|
batch << Parameter.new(
|
101
132
|
name: p.parameter_name,
|
102
133
|
data: p,
|
@@ -105,63 +136,30 @@ module Aws
|
|
105
136
|
end
|
106
137
|
y.yield(batch)
|
107
138
|
end
|
108
|
-
Parameter::Collection.new(batches)
|
109
|
-
end
|
110
|
-
|
111
|
-
# @example Request syntax with placeholder values
|
112
|
-
#
|
113
|
-
# enginedefaultparameters = db_parameter_group_family.engine_default_parameters({
|
114
|
-
# filters: [
|
115
|
-
# {
|
116
|
-
# name: "String", # required
|
117
|
-
# values: ["String"], # required
|
118
|
-
# },
|
119
|
-
# ],
|
120
|
-
# })
|
121
|
-
# @param [Hash] options ({})
|
122
|
-
# @option options [Array<Types::Filter>] :filters
|
123
|
-
# Not currently supported.
|
124
|
-
# @return [Parameter::Collection]
|
125
|
-
def engine_default_parameters(options = {})
|
126
|
-
batches = Enumerator.new do |y|
|
127
|
-
options = options.merge(db_parameter_group_family: @name)
|
128
|
-
resp = @client.describe_engine_default_parameters(options)
|
129
|
-
resp.each_page do |page|
|
130
|
-
batch = []
|
131
|
-
page.data.engine_defaults.parameters.each do |p|
|
132
|
-
batch << Parameter.new(
|
133
|
-
name: p.parameter_name,
|
134
|
-
data: p,
|
135
|
-
client: @client
|
136
|
-
)
|
137
|
-
end
|
138
|
-
y.yield(batch)
|
139
|
-
end
|
140
|
-
end
|
141
|
-
Parameter::Collection.new(batches)
|
142
139
|
end
|
140
|
+
Parameter::Collection.new(batches)
|
141
|
+
end
|
143
142
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
end
|
143
|
+
# @deprecated
|
144
|
+
# @api private
|
145
|
+
def identifiers
|
146
|
+
{ name: @name }
|
147
|
+
end
|
148
|
+
deprecated(:identifiers)
|
149
|
+
|
150
|
+
private
|
151
|
+
|
152
|
+
def extract_name(args, options)
|
153
|
+
value = args[0] || options.delete(:name)
|
154
|
+
case value
|
155
|
+
when String then value
|
156
|
+
when nil then raise ArgumentError, "missing required option :name"
|
157
|
+
else
|
158
|
+
msg = "expected :name to be a String, got #{value.class}"
|
159
|
+
raise ArgumentError, msg
|
162
160
|
end
|
163
|
-
|
164
|
-
class Collection < Aws::Resources::Collection; end
|
165
161
|
end
|
162
|
+
|
163
|
+
class Collection < Aws::Resources::Collection; end
|
166
164
|
end
|
167
165
|
end
|
@@ -1,358 +1,356 @@
|
|
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 DBSecurityGroup
|
8
|
+
module Aws::RDS
|
9
|
+
class DBSecurityGroup
|
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_security_group_name :name
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
# Provides the AWS ID of the owner of a specific DB security group.
|
35
|
+
# @return [String]
|
36
|
+
def owner_id
|
37
|
+
data.owner_id
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
# Provides the description of the DB security group.
|
41
|
+
# @return [String]
|
42
|
+
def db_security_group_description
|
43
|
+
data.db_security_group_description
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
# Provides the VpcId of the DB security group.
|
47
|
+
# @return [String]
|
48
|
+
def vpc_id
|
49
|
+
data.vpc_id
|
50
|
+
end
|
52
51
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
52
|
+
# Contains a list of EC2SecurityGroup elements.
|
53
|
+
# @return [Array<Types::EC2SecurityGroup>]
|
54
|
+
def ec2_security_groups
|
55
|
+
data.ec2_security_groups
|
56
|
+
end
|
58
57
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
# Contains a list of IPRange elements.
|
59
|
+
# @return [Array<Types::IPRange>]
|
60
|
+
def ip_ranges
|
61
|
+
data.ip_ranges
|
62
|
+
end
|
64
63
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
64
|
+
# The Amazon Resource Name (ARN) for the DB security group.
|
65
|
+
# @return [String]
|
66
|
+
def db_security_group_arn
|
67
|
+
data.db_security_group_arn
|
68
|
+
end
|
70
69
|
|
71
|
-
|
70
|
+
# @!endgroup
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
72
|
+
# @return [Client]
|
73
|
+
def client
|
74
|
+
@client
|
75
|
+
end
|
77
76
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
77
|
+
# Loads, or reloads {#data} for the current {DBSecurityGroup}.
|
78
|
+
# Returns `self` making it possible to chain methods.
|
79
|
+
#
|
80
|
+
# db_security_group.reload.data
|
81
|
+
#
|
82
|
+
# @return [self]
|
83
|
+
def load
|
84
|
+
resp = @client.describe_db_security_groups(db_security_group_name: @name)
|
85
|
+
@data = resp.dbsecuritygroups[0]
|
86
|
+
self
|
87
|
+
end
|
88
|
+
alias :reload :load
|
90
89
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
90
|
+
# @return [Types::DBSecurityGroup]
|
91
|
+
# Returns the data for this {DBSecurityGroup}. Calls
|
92
|
+
# {Client#describe_db_security_groups} if {#data_loaded?} is `false`.
|
93
|
+
def data
|
94
|
+
load unless @data
|
95
|
+
@data
|
96
|
+
end
|
98
97
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
98
|
+
# @return [Boolean]
|
99
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
100
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
101
|
+
def data_loaded?
|
102
|
+
!!@data
|
103
|
+
end
|
105
104
|
|
106
|
-
|
105
|
+
# @!group Actions
|
107
106
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
107
|
+
# @example Request syntax with placeholder values
|
108
|
+
#
|
109
|
+
# dbsecuritygroup = db_security_group.authorize_ingress({
|
110
|
+
# cidrip: "String",
|
111
|
+
# ec2_security_group_name: "String",
|
112
|
+
# ec2_security_group_id: "String",
|
113
|
+
# ec2_security_group_owner_id: "String",
|
114
|
+
# })
|
115
|
+
# @param [Hash] options ({})
|
116
|
+
# @option options [String] :cidrip
|
117
|
+
# The IP range to authorize.
|
118
|
+
# @option options [String] :ec2_security_group_name
|
119
|
+
# Name of the EC2 security group to authorize. For VPC DB security
|
120
|
+
# groups, `EC2SecurityGroupId` must be provided. Otherwise,
|
121
|
+
# `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or
|
122
|
+
# `EC2SecurityGroupId` must be provided.
|
123
|
+
# @option options [String] :ec2_security_group_id
|
124
|
+
# Id of the EC2 security group to authorize. For VPC DB security groups,
|
125
|
+
# `EC2SecurityGroupId` must be provided. Otherwise,
|
126
|
+
# `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or
|
127
|
+
# `EC2SecurityGroupId` must be provided.
|
128
|
+
# @option options [String] :ec2_security_group_owner_id
|
129
|
+
# AWS account number of the owner of the EC2 security group specified in
|
130
|
+
# the `EC2SecurityGroupName` parameter. The AWS Access Key ID is not an
|
131
|
+
# acceptable value. For VPC DB security groups, `EC2SecurityGroupId`
|
132
|
+
# must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either
|
133
|
+
# `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.
|
134
|
+
# @return [DBSecurityGroup]
|
135
|
+
def authorize_ingress(options = {})
|
136
|
+
options = options.merge(db_security_group_name: @name)
|
137
|
+
resp = @client.authorize_db_security_group_ingress(options)
|
138
|
+
DBSecurityGroup.new(
|
139
|
+
name: resp.data.db_security_group.db_security_group_name,
|
140
|
+
data: resp.data.db_security_group,
|
141
|
+
client: @client
|
142
|
+
)
|
143
|
+
end
|
145
144
|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
145
|
+
# @example Request syntax with placeholder values
|
146
|
+
#
|
147
|
+
# dbsecuritygroup = db_security_group.create({
|
148
|
+
# db_security_group_description: "String", # required
|
149
|
+
# tags: [
|
150
|
+
# {
|
151
|
+
# key: "String",
|
152
|
+
# value: "String",
|
153
|
+
# },
|
154
|
+
# ],
|
155
|
+
# })
|
156
|
+
# @param [Hash] options ({})
|
157
|
+
# @option options [required, String] :db_security_group_description
|
158
|
+
# The description for the DB security group.
|
159
|
+
# @option options [Array<Types::Tag>] :tags
|
160
|
+
# A list of tags.
|
161
|
+
# @return [DBSecurityGroup]
|
162
|
+
def create(options = {})
|
163
|
+
options = options.merge(db_security_group_name: @name)
|
164
|
+
resp = @client.create_db_security_group(options)
|
165
|
+
DBSecurityGroup.new(
|
166
|
+
name: resp.data.db_security_group.db_security_group_name,
|
167
|
+
data: resp.data.db_security_group,
|
168
|
+
client: @client
|
169
|
+
)
|
170
|
+
end
|
172
171
|
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
172
|
+
# @example Request syntax with placeholder values
|
173
|
+
#
|
174
|
+
# db_security_group.delete()
|
175
|
+
# @param [Hash] options ({})
|
176
|
+
# @return [EmptyStructure]
|
177
|
+
def delete(options = {})
|
178
|
+
options = options.merge(db_security_group_name: @name)
|
179
|
+
resp = @client.delete_db_security_group(options)
|
180
|
+
resp.data
|
181
|
+
end
|
183
182
|
|
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
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
183
|
+
# @example Request syntax with placeholder values
|
184
|
+
#
|
185
|
+
# dbsecuritygroup = db_security_group.revoke_ingress({
|
186
|
+
# cidrip: "String",
|
187
|
+
# ec2_security_group_name: "String",
|
188
|
+
# ec2_security_group_id: "String",
|
189
|
+
# ec2_security_group_owner_id: "String",
|
190
|
+
# })
|
191
|
+
# @param [Hash] options ({})
|
192
|
+
# @option options [String] :cidrip
|
193
|
+
# The IP range to revoke access from. Must be a valid CIDR range. If
|
194
|
+
# `CIDRIP` is specified, `EC2SecurityGroupName`, `EC2SecurityGroupId`
|
195
|
+
# and `EC2SecurityGroupOwnerId` cannot be provided.
|
196
|
+
# @option options [String] :ec2_security_group_name
|
197
|
+
# The name of the EC2 security group to revoke access from. For VPC DB
|
198
|
+
# security groups, `EC2SecurityGroupId` must be provided. Otherwise,
|
199
|
+
# EC2SecurityGroupOwnerId and either `EC2SecurityGroupName` or
|
200
|
+
# `EC2SecurityGroupId` must be provided.
|
201
|
+
# @option options [String] :ec2_security_group_id
|
202
|
+
# The id of the EC2 security group to revoke access from. For VPC DB
|
203
|
+
# security groups, `EC2SecurityGroupId` must be provided. Otherwise,
|
204
|
+
# EC2SecurityGroupOwnerId and either `EC2SecurityGroupName` or
|
205
|
+
# `EC2SecurityGroupId` must be provided.
|
206
|
+
# @option options [String] :ec2_security_group_owner_id
|
207
|
+
# The AWS Account Number of the owner of the EC2 security group
|
208
|
+
# specified in the `EC2SecurityGroupName` parameter. The AWS Access Key
|
209
|
+
# ID is not an acceptable value. For VPC DB security groups,
|
210
|
+
# `EC2SecurityGroupId` must be provided. Otherwise,
|
211
|
+
# EC2SecurityGroupOwnerId and either `EC2SecurityGroupName` or
|
212
|
+
# `EC2SecurityGroupId` must be provided.
|
213
|
+
# @return [DBSecurityGroup]
|
214
|
+
def revoke_ingress(options = {})
|
215
|
+
options = options.merge(db_security_group_name: @name)
|
216
|
+
resp = @client.revoke_db_security_group_ingress(options)
|
217
|
+
DBSecurityGroup.new(
|
218
|
+
name: resp.data.db_security_group.db_security_group_name,
|
219
|
+
data: resp.data.db_security_group,
|
220
|
+
client: @client
|
221
|
+
)
|
222
|
+
end
|
224
223
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
224
|
+
# @example Request syntax with placeholder values
|
225
|
+
#
|
226
|
+
# eventsubscription = db_security_group.subscribe_to({
|
227
|
+
# subscription_name: "String", # required
|
228
|
+
# })
|
229
|
+
# @param [Hash] options ({})
|
230
|
+
# @option options [required, String] :subscription_name
|
231
|
+
# The name of the RDS event notification subscription you want to add a
|
232
|
+
# source identifier to.
|
233
|
+
# @return [EventSubscription]
|
234
|
+
def subscribe_to(options = {})
|
235
|
+
options = options.merge(source_identifier: @name)
|
236
|
+
resp = @client.add_source_identifier_to_subscription(options)
|
237
|
+
EventSubscription.new(
|
238
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
239
|
+
data: resp.data.event_subscription,
|
240
|
+
client: @client
|
241
|
+
)
|
242
|
+
end
|
244
243
|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
244
|
+
# @example Request syntax with placeholder values
|
245
|
+
#
|
246
|
+
# eventsubscription = db_security_group.unsubscribe_from({
|
247
|
+
# subscription_name: "String", # required
|
248
|
+
# })
|
249
|
+
# @param [Hash] options ({})
|
250
|
+
# @option options [required, String] :subscription_name
|
251
|
+
# The name of the RDS event notification subscription you want to remove
|
252
|
+
# a source identifier from.
|
253
|
+
# @return [EventSubscription]
|
254
|
+
def unsubscribe_from(options = {})
|
255
|
+
options = options.merge(source_identifier: @name)
|
256
|
+
resp = @client.remove_source_identifier_from_subscription(options)
|
257
|
+
EventSubscription.new(
|
258
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
259
|
+
data: resp.data.event_subscription,
|
260
|
+
client: @client
|
261
|
+
)
|
262
|
+
end
|
264
263
|
|
265
|
-
|
264
|
+
# @!group Associations
|
266
265
|
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
end
|
329
|
-
y.yield(batch)
|
266
|
+
# @example Request syntax with placeholder values
|
267
|
+
#
|
268
|
+
# events = db_security_group.events({
|
269
|
+
# start_time: Time.now,
|
270
|
+
# end_time: Time.now,
|
271
|
+
# duration: 1,
|
272
|
+
# event_categories: ["String"],
|
273
|
+
# filters: [
|
274
|
+
# {
|
275
|
+
# name: "String", # required
|
276
|
+
# values: ["String"], # required
|
277
|
+
# },
|
278
|
+
# ],
|
279
|
+
# })
|
280
|
+
# @param [Hash] options ({})
|
281
|
+
# @option options [Time,DateTime,Date,Integer,String] :start_time
|
282
|
+
# The beginning of the time interval to retrieve events for, specified
|
283
|
+
# in ISO 8601 format. For more information about ISO 8601, go to the
|
284
|
+
# [ISO8601 Wikipedia page.][1]
|
285
|
+
#
|
286
|
+
# Example: 2009-07-08T18:00Z
|
287
|
+
#
|
288
|
+
#
|
289
|
+
#
|
290
|
+
# [1]: http://en.wikipedia.org/wiki/ISO_8601
|
291
|
+
# @option options [Time,DateTime,Date,Integer,String] :end_time
|
292
|
+
# The end of the time interval for which to retrieve events, specified
|
293
|
+
# in ISO 8601 format. For more information about ISO 8601, go to the
|
294
|
+
# [ISO8601 Wikipedia page.][1]
|
295
|
+
#
|
296
|
+
# Example: 2009-07-08T18:00Z
|
297
|
+
#
|
298
|
+
#
|
299
|
+
#
|
300
|
+
# [1]: http://en.wikipedia.org/wiki/ISO_8601
|
301
|
+
# @option options [Integer] :duration
|
302
|
+
# The number of minutes to retrieve events for.
|
303
|
+
#
|
304
|
+
# Default: 60
|
305
|
+
# @option options [Array<String>] :event_categories
|
306
|
+
# A list of event categories that trigger notifications for a event
|
307
|
+
# notification subscription.
|
308
|
+
# @option options [Array<Types::Filter>] :filters
|
309
|
+
# This parameter is not currently supported.
|
310
|
+
# @return [Event::Collection]
|
311
|
+
def events(options = {})
|
312
|
+
batches = Enumerator.new do |y|
|
313
|
+
options = options.merge(
|
314
|
+
source_type: "db-security-group",
|
315
|
+
source_identifier: @name
|
316
|
+
)
|
317
|
+
resp = @client.describe_events(options)
|
318
|
+
resp.each_page do |page|
|
319
|
+
batch = []
|
320
|
+
page.data.events.each do |e|
|
321
|
+
batch << Event.new(
|
322
|
+
source_id: e.source_identifier,
|
323
|
+
date: e.date,
|
324
|
+
data: e,
|
325
|
+
client: @client
|
326
|
+
)
|
330
327
|
end
|
328
|
+
y.yield(batch)
|
331
329
|
end
|
332
|
-
Event::Collection.new(batches)
|
333
330
|
end
|
331
|
+
Event::Collection.new(batches)
|
332
|
+
end
|
334
333
|
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
334
|
+
# @deprecated
|
335
|
+
# @api private
|
336
|
+
def identifiers
|
337
|
+
{ name: @name }
|
338
|
+
end
|
339
|
+
deprecated(:identifiers)
|
341
340
|
|
342
|
-
|
341
|
+
private
|
343
342
|
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
end
|
343
|
+
def extract_name(args, options)
|
344
|
+
value = args[0] || options.delete(:name)
|
345
|
+
case value
|
346
|
+
when String then value
|
347
|
+
when nil then raise ArgumentError, "missing required option :name"
|
348
|
+
else
|
349
|
+
msg = "expected :name to be a String, got #{value.class}"
|
350
|
+
raise ArgumentError, msg
|
353
351
|
end
|
354
|
-
|
355
|
-
class Collection < Aws::Resources::Collection; end
|
356
352
|
end
|
353
|
+
|
354
|
+
class Collection < Aws::Resources::Collection; end
|
357
355
|
end
|
358
356
|
end
|