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