aws-sdk-ec2 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.
@@ -1,219 +1,217 @@
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 EC2
10
- class VpcAddress
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(allocation_id, options = {})
15
- # @param [String] allocation_id
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :allocation_id
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @allocation_id = extract_allocation_id(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
8
+ module Aws::EC2
9
+ class VpcAddress
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(allocation_id, options = {})
14
+ # @param [String] allocation_id
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :allocation_id
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @allocation_id = extract_allocation_id(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 allocation_id
31
- @allocation_id
32
- end
28
+ # @return [String]
29
+ def allocation_id
30
+ @allocation_id
31
+ end
33
32
 
34
- # The ID of the instance that the address is associated with (if any).
35
- # @return [String]
36
- def instance_id
37
- data.instance_id
38
- end
33
+ # The ID of the instance that the address is associated with (if any).
34
+ # @return [String]
35
+ def instance_id
36
+ data.instance_id
37
+ end
39
38
 
40
- # The Elastic IP address.
41
- # @return [String]
42
- def public_ip
43
- data.public_ip
44
- end
39
+ # The Elastic IP address.
40
+ # @return [String]
41
+ def public_ip
42
+ data.public_ip
43
+ end
45
44
 
46
- # The ID representing the association of the address with an instance in
47
- # a VPC.
48
- # @return [String]
49
- def association_id
50
- data.association_id
51
- end
45
+ # The ID representing the association of the address with an instance in
46
+ # a VPC.
47
+ # @return [String]
48
+ def association_id
49
+ data.association_id
50
+ end
52
51
 
53
- # Indicates whether this Elastic IP address is for use with instances in
54
- # EC2-Classic (`standard`) or instances in a VPC (`vpc`).
55
- # @return [String]
56
- def domain
57
- data.domain
58
- end
52
+ # Indicates whether this Elastic IP address is for use with instances in
53
+ # EC2-Classic (`standard`) or instances in a VPC (`vpc`).
54
+ # @return [String]
55
+ def domain
56
+ data.domain
57
+ end
59
58
 
60
- # The ID of the network interface.
61
- # @return [String]
62
- def network_interface_id
63
- data.network_interface_id
64
- end
59
+ # The ID of the network interface.
60
+ # @return [String]
61
+ def network_interface_id
62
+ data.network_interface_id
63
+ end
65
64
 
66
- # The ID of the AWS account that owns the network interface.
67
- # @return [String]
68
- def network_interface_owner_id
69
- data.network_interface_owner_id
70
- end
65
+ # The ID of the AWS account that owns the network interface.
66
+ # @return [String]
67
+ def network_interface_owner_id
68
+ data.network_interface_owner_id
69
+ end
71
70
 
72
- # The private IP address associated with the Elastic IP address.
73
- # @return [String]
74
- def private_ip_address
75
- data.private_ip_address
76
- end
71
+ # The private IP address associated with the Elastic IP address.
72
+ # @return [String]
73
+ def private_ip_address
74
+ data.private_ip_address
75
+ end
77
76
 
78
- # @!endgroup
77
+ # @!endgroup
79
78
 
80
- # @return [Client]
81
- def client
82
- @client
83
- end
79
+ # @return [Client]
80
+ def client
81
+ @client
82
+ end
84
83
 
85
- # Loads, or reloads {#data} for the current {VpcAddress}.
86
- # Returns `self` making it possible to chain methods.
87
- #
88
- # vpc_address.reload.data
89
- #
90
- # @return [self]
91
- def load
92
- resp = @client.describe_addresses(allocation_ids: [@allocation_id])
93
- @data = resp.addresses[0]
94
- self
95
- end
96
- alias :reload :load
97
-
98
- # @return [Types::Address]
99
- # Returns the data for this {VpcAddress}. Calls
100
- # {Client#describe_addresses} if {#data_loaded?} is `false`.
101
- def data
102
- load unless @data
103
- @data
104
- end
84
+ # Loads, or reloads {#data} for the current {VpcAddress}.
85
+ # Returns `self` making it possible to chain methods.
86
+ #
87
+ # vpc_address.reload.data
88
+ #
89
+ # @return [self]
90
+ def load
91
+ resp = @client.describe_addresses(allocation_ids: [@allocation_id])
92
+ @data = resp.addresses[0]
93
+ self
94
+ end
95
+ alias :reload :load
96
+
97
+ # @return [Types::Address]
98
+ # Returns the data for this {VpcAddress}. Calls
99
+ # {Client#describe_addresses} if {#data_loaded?} is `false`.
100
+ def data
101
+ load unless @data
102
+ @data
103
+ end
105
104
 
106
- # @return [Boolean]
107
- # Returns `true` if this resource is loaded. Accessing attributes or
108
- # {#data} on an unloaded resource will trigger a call to {#load}.
109
- def data_loaded?
110
- !!@data
111
- end
105
+ # @return [Boolean]
106
+ # Returns `true` if this resource is loaded. Accessing attributes or
107
+ # {#data} on an unloaded resource will trigger a call to {#load}.
108
+ def data_loaded?
109
+ !!@data
110
+ end
112
111
 
113
- # @!group Actions
114
-
115
- # @example Request syntax with placeholder values
116
- #
117
- # vpc_address.associate({
118
- # dry_run: false,
119
- # instance_id: "String",
120
- # public_ip: "String",
121
- # network_interface_id: "String",
122
- # private_ip_address: "String",
123
- # allow_reassociation: false,
124
- # })
125
- # @param [Hash] options ({})
126
- # @option options [Boolean] :dry_run
127
- # Checks whether you have the required permissions for the action,
128
- # without actually making the request, and provides an error response.
129
- # If you have the required permissions, the error response is
130
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
131
- # @option options [String] :instance_id
132
- # The ID of the instance. This is required for EC2-Classic. For EC2-VPC,
133
- # you can specify either the instance ID or the network interface ID,
134
- # but not both. The operation fails if you specify an instance ID unless
135
- # exactly one network interface is attached.
136
- # @option options [String] :public_ip
137
- # The Elastic IP address. This is required for EC2-Classic.
138
- # @option options [String] :network_interface_id
139
- # \[EC2-VPC\] The ID of the network interface. If the instance has more
140
- # than one network interface, you must specify a network interface ID.
141
- # @option options [String] :private_ip_address
142
- # \[EC2-VPC\] The primary or secondary private IP address to associate
143
- # with the Elastic IP address. If no private IP address is specified,
144
- # the Elastic IP address is associated with the primary private IP
145
- # address.
146
- # @option options [Boolean] :allow_reassociation
147
- # \[EC2-VPC\] For a VPC in an EC2-Classic account, specify true to allow
148
- # an Elastic IP address that is already associated with an instance or
149
- # network interface to be reassociated with the specified instance or
150
- # network interface. Otherwise, the operation fails. In a VPC in an
151
- # EC2-VPC-only account, reassociation is automatic, therefore you can
152
- # specify false to ensure the operation fails if the Elastic IP address
153
- # is already associated with another resource.
154
- # @return [Types::AssociateAddressResult]
155
- def associate(options = {})
156
- options = options.merge(allocation_id: @allocation_id)
157
- resp = @client.associate_address(options)
158
- resp.data
159
- end
112
+ # @!group Actions
113
+
114
+ # @example Request syntax with placeholder values
115
+ #
116
+ # vpc_address.associate({
117
+ # dry_run: false,
118
+ # instance_id: "String",
119
+ # public_ip: "String",
120
+ # network_interface_id: "String",
121
+ # private_ip_address: "String",
122
+ # allow_reassociation: false,
123
+ # })
124
+ # @param [Hash] options ({})
125
+ # @option options [Boolean] :dry_run
126
+ # Checks whether you have the required permissions for the action,
127
+ # without actually making the request, and provides an error response.
128
+ # If you have the required permissions, the error response is
129
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
130
+ # @option options [String] :instance_id
131
+ # The ID of the instance. This is required for EC2-Classic. For EC2-VPC,
132
+ # you can specify either the instance ID or the network interface ID,
133
+ # but not both. The operation fails if you specify an instance ID unless
134
+ # exactly one network interface is attached.
135
+ # @option options [String] :public_ip
136
+ # The Elastic IP address. This is required for EC2-Classic.
137
+ # @option options [String] :network_interface_id
138
+ # \[EC2-VPC\] The ID of the network interface. If the instance has more
139
+ # than one network interface, you must specify a network interface ID.
140
+ # @option options [String] :private_ip_address
141
+ # \[EC2-VPC\] The primary or secondary private IP address to associate
142
+ # with the Elastic IP address. If no private IP address is specified,
143
+ # the Elastic IP address is associated with the primary private IP
144
+ # address.
145
+ # @option options [Boolean] :allow_reassociation
146
+ # \[EC2-VPC\] For a VPC in an EC2-Classic account, specify true to allow
147
+ # an Elastic IP address that is already associated with an instance or
148
+ # network interface to be reassociated with the specified instance or
149
+ # network interface. Otherwise, the operation fails. In a VPC in an
150
+ # EC2-VPC-only account, reassociation is automatic, therefore you can
151
+ # specify false to ensure the operation fails if the Elastic IP address
152
+ # is already associated with another resource.
153
+ # @return [Types::AssociateAddressResult]
154
+ def associate(options = {})
155
+ options = options.merge(allocation_id: @allocation_id)
156
+ resp = @client.associate_address(options)
157
+ resp.data
158
+ end
160
159
 
161
- # @example Request syntax with placeholder values
162
- #
163
- # vpc_address.release({
164
- # dry_run: false,
165
- # public_ip: "String",
166
- # })
167
- # @param [Hash] options ({})
168
- # @option options [Boolean] :dry_run
169
- # Checks whether you have the required permissions for the action,
170
- # without actually making the request, and provides an error response.
171
- # If you have the required permissions, the error response is
172
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
173
- # @option options [String] :public_ip
174
- # \[EC2-Classic\] The Elastic IP address. Required for EC2-Classic.
175
- # @return [EmptyStructure]
176
- def release(options = {})
177
- options = options.merge(allocation_id: data.allocation_id)
178
- resp = @client.release_address(options)
179
- resp.data
180
- end
160
+ # @example Request syntax with placeholder values
161
+ #
162
+ # vpc_address.release({
163
+ # dry_run: false,
164
+ # public_ip: "String",
165
+ # })
166
+ # @param [Hash] options ({})
167
+ # @option options [Boolean] :dry_run
168
+ # Checks whether you have the required permissions for the action,
169
+ # without actually making the request, and provides an error response.
170
+ # If you have the required permissions, the error response is
171
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
172
+ # @option options [String] :public_ip
173
+ # \[EC2-Classic\] The Elastic IP address. Required for EC2-Classic.
174
+ # @return [EmptyStructure]
175
+ def release(options = {})
176
+ options = options.merge(allocation_id: data.allocation_id)
177
+ resp = @client.release_address(options)
178
+ resp.data
179
+ end
181
180
 
182
- # @!group Associations
183
-
184
- # @return [NetworkInterfaceAssociation, nil]
185
- def association
186
- if data.association_id
187
- NetworkInterfaceAssociation.new(
188
- id: data.association_id,
189
- client: @client
190
- )
191
- else
192
- nil
193
- end
194
- end
181
+ # @!group Associations
195
182
 
196
- # @deprecated
197
- # @api private
198
- def identifiers
199
- { allocation_id: @allocation_id }
200
- end
201
- deprecated(:identifiers)
202
-
203
- private
204
-
205
- def extract_allocation_id(args, options)
206
- value = args[0] || options.delete(:allocation_id)
207
- case value
208
- when String then value
209
- when nil then raise ArgumentError, "missing required option :allocation_id"
210
- else
211
- msg = "expected :allocation_id to be a String, got #{value.class}"
212
- raise ArgumentError, msg
213
- end
183
+ # @return [NetworkInterfaceAssociation, nil]
184
+ def association
185
+ if data.association_id
186
+ NetworkInterfaceAssociation.new(
187
+ id: data.association_id,
188
+ client: @client
189
+ )
190
+ else
191
+ nil
214
192
  end
193
+ end
215
194
 
216
- class Collection < Aws::Resources::Collection; end
195
+ # @deprecated
196
+ # @api private
197
+ def identifiers
198
+ { allocation_id: @allocation_id }
217
199
  end
200
+ deprecated(:identifiers)
201
+
202
+ private
203
+
204
+ def extract_allocation_id(args, options)
205
+ value = args[0] || options.delete(:allocation_id)
206
+ case value
207
+ when String then value
208
+ when nil then raise ArgumentError, "missing required option :allocation_id"
209
+ else
210
+ msg = "expected :allocation_id to be a String, got #{value.class}"
211
+ raise ArgumentError, msg
212
+ end
213
+ end
214
+
215
+ class Collection < Aws::Resources::Collection; end
218
216
  end
219
217
  end
@@ -1,265 +1,263 @@
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 EC2
10
- class VpcPeeringConnection
8
+ module Aws::EC2
9
+ class VpcPeeringConnection
11
10
 
12
- extend Aws::Deprecations
11
+ extend Aws::Deprecations
13
12
 
14
- # @overload def initialize(id, options = {})
15
- # @param [String] id
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :id
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @id = extract_id(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
13
+ # @overload def initialize(id, options = {})
14
+ # @param [String] id
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :id
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @id = extract_id(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 id
31
- @id
32
- end
33
- alias :vpc_peering_connection_id :id
28
+ # @return [String]
29
+ def id
30
+ @id
31
+ end
32
+ alias :vpc_peering_connection_id :id
34
33
 
35
- # Information about the accepter VPC. CIDR block information is not
36
- # returned when creating a VPC peering connection, or when describing a
37
- # VPC peering connection that's in the `initiating-request` or
38
- # `pending-acceptance` state.
39
- # @return [Types::VpcPeeringConnectionVpcInfo]
40
- def accepter_vpc_info
41
- data.accepter_vpc_info
42
- end
34
+ # Information about the accepter VPC. CIDR block information is not
35
+ # returned when creating a VPC peering connection, or when describing a
36
+ # VPC peering connection that's in the `initiating-request` or
37
+ # `pending-acceptance` state.
38
+ # @return [Types::VpcPeeringConnectionVpcInfo]
39
+ def accepter_vpc_info
40
+ data.accepter_vpc_info
41
+ end
43
42
 
44
- # The time that an unaccepted VPC peering connection will expire.
45
- # @return [Time]
46
- def expiration_time
47
- data.expiration_time
48
- end
43
+ # The time that an unaccepted VPC peering connection will expire.
44
+ # @return [Time]
45
+ def expiration_time
46
+ data.expiration_time
47
+ end
49
48
 
50
- # Information about the requester VPC.
51
- # @return [Types::VpcPeeringConnectionVpcInfo]
52
- def requester_vpc_info
53
- data.requester_vpc_info
54
- end
49
+ # Information about the requester VPC.
50
+ # @return [Types::VpcPeeringConnectionVpcInfo]
51
+ def requester_vpc_info
52
+ data.requester_vpc_info
53
+ end
55
54
 
56
- # The status of the VPC peering connection.
57
- # @return [Types::VpcPeeringConnectionStateReason]
58
- def status
59
- data.status
60
- end
55
+ # The status of the VPC peering connection.
56
+ # @return [Types::VpcPeeringConnectionStateReason]
57
+ def status
58
+ data.status
59
+ end
61
60
 
62
- # Any tags assigned to the resource.
63
- # @return [Array<Types::Tag>]
64
- def tags
65
- data.tags
66
- end
61
+ # Any tags assigned to the resource.
62
+ # @return [Array<Types::Tag>]
63
+ def tags
64
+ data.tags
65
+ end
67
66
 
68
- # @!endgroup
67
+ # @!endgroup
69
68
 
70
- # @return [Client]
71
- def client
72
- @client
73
- end
69
+ # @return [Client]
70
+ def client
71
+ @client
72
+ end
74
73
 
75
- # Loads, or reloads {#data} for the current {VpcPeeringConnection}.
76
- # Returns `self` making it possible to chain methods.
77
- #
78
- # vpc_peering_connection.reload.data
79
- #
80
- # @return [self]
81
- def load
82
- resp = @client.describe_vpc_peering_connections(vpc_peering_connection_ids: [@id])
83
- @data = resp.vpcpeeringconnections[0]
84
- self
85
- end
86
- alias :reload :load
74
+ # Loads, or reloads {#data} for the current {VpcPeeringConnection}.
75
+ # Returns `self` making it possible to chain methods.
76
+ #
77
+ # vpc_peering_connection.reload.data
78
+ #
79
+ # @return [self]
80
+ def load
81
+ resp = @client.describe_vpc_peering_connections(vpc_peering_connection_ids: [@id])
82
+ @data = resp.vpcpeeringconnections[0]
83
+ self
84
+ end
85
+ alias :reload :load
87
86
 
88
- # @return [Types::VpcPeeringConnection]
89
- # Returns the data for this {VpcPeeringConnection}. Calls
90
- # {Client#describe_vpc_peering_connections} if {#data_loaded?} is `false`.
91
- def data
92
- load unless @data
93
- @data
94
- end
87
+ # @return [Types::VpcPeeringConnection]
88
+ # Returns the data for this {VpcPeeringConnection}. Calls
89
+ # {Client#describe_vpc_peering_connections} if {#data_loaded?} is `false`.
90
+ def data
91
+ load unless @data
92
+ @data
93
+ end
95
94
 
96
- # @return [Boolean]
97
- # Returns `true` if this resource is loaded. Accessing attributes or
98
- # {#data} on an unloaded resource will trigger a call to {#load}.
99
- def data_loaded?
100
- !!@data
101
- end
95
+ # @return [Boolean]
96
+ # Returns `true` if this resource is loaded. Accessing attributes or
97
+ # {#data} on an unloaded resource will trigger a call to {#load}.
98
+ def data_loaded?
99
+ !!@data
100
+ end
102
101
 
103
- # @param [Hash] options ({})
104
- # @return [Boolean]
105
- # Returns `true` if the VpcPeeringConnection exists.
106
- def exists?(options = {})
107
- begin
108
- wait_until_exists(options.merge(max_attempts: 1))
109
- true
110
- rescue Aws::Waiters::Errors::UnexpectedError => e
111
- raise e.error
112
- rescue Aws::Waiters::Errors::WaiterFailed
113
- false
114
- end
102
+ # @param [Hash] options ({})
103
+ # @return [Boolean]
104
+ # Returns `true` if the VpcPeeringConnection exists.
105
+ def exists?(options = {})
106
+ begin
107
+ wait_until_exists(options.merge(max_attempts: 1))
108
+ true
109
+ rescue Aws::Waiters::Errors::UnexpectedError => e
110
+ raise e.error
111
+ rescue Aws::Waiters::Errors::WaiterFailed
112
+ false
115
113
  end
114
+ end
116
115
 
117
- # @param [Hash] options ({})
118
- # @option options [Integer] :max_attempts (40)
119
- # @option options [Float] :delay (15)
120
- # @option options [Proc] :before_attempt
121
- # @option options [Proc] :before_wait
122
- # @return [VpcPeeringConnection]
123
- def wait_until_exists(options = {})
124
- options, params = separate_params_and_options(options)
125
- waiter = Waiters::VpcPeeringConnectionExists.new(options)
126
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
127
- resp = waiter.wait(params.merge(vpc_peering_connection_ids: [@id]))
128
- VpcPeeringConnection.new({
129
- id: @id,
130
- data: resp.data.vpc_peering_connections[0],
131
- client: @client
132
- })
133
- end
116
+ # @param [Hash] options ({})
117
+ # @option options [Integer] :max_attempts (40)
118
+ # @option options [Float] :delay (15)
119
+ # @option options [Proc] :before_attempt
120
+ # @option options [Proc] :before_wait
121
+ # @return [VpcPeeringConnection]
122
+ def wait_until_exists(options = {})
123
+ options, params = separate_params_and_options(options)
124
+ waiter = Waiters::VpcPeeringConnectionExists.new(options)
125
+ yield_waiter_and_warn(waiter, &Proc.new) if block_given?
126
+ resp = waiter.wait(params.merge(vpc_peering_connection_ids: [@id]))
127
+ VpcPeeringConnection.new({
128
+ id: @id,
129
+ data: resp.data.vpc_peering_connections[0],
130
+ client: @client
131
+ })
132
+ end
134
133
 
135
- # @!group Actions
134
+ # @!group Actions
136
135
 
137
- # @example Request syntax with placeholder values
138
- #
139
- # vpc_peering_connection.accept({
140
- # dry_run: false,
141
- # })
142
- # @param [Hash] options ({})
143
- # @option options [Boolean] :dry_run
144
- # Checks whether you have the required permissions for the action,
145
- # without actually making the request, and provides an error response.
146
- # If you have the required permissions, the error response is
147
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
148
- # @return [Types::AcceptVpcPeeringConnectionResult]
149
- def accept(options = {})
150
- options = options.merge(vpc_peering_connection_id: @id)
151
- resp = @client.accept_vpc_peering_connection(options)
152
- resp.data
153
- end
136
+ # @example Request syntax with placeholder values
137
+ #
138
+ # vpc_peering_connection.accept({
139
+ # dry_run: false,
140
+ # })
141
+ # @param [Hash] options ({})
142
+ # @option options [Boolean] :dry_run
143
+ # Checks whether you have the required permissions for the action,
144
+ # without actually making the request, and provides an error response.
145
+ # If you have the required permissions, the error response is
146
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
147
+ # @return [Types::AcceptVpcPeeringConnectionResult]
148
+ def accept(options = {})
149
+ options = options.merge(vpc_peering_connection_id: @id)
150
+ resp = @client.accept_vpc_peering_connection(options)
151
+ resp.data
152
+ end
154
153
 
155
- # @example Request syntax with placeholder values
156
- #
157
- # vpc_peering_connection.delete({
158
- # dry_run: false,
159
- # })
160
- # @param [Hash] options ({})
161
- # @option options [Boolean] :dry_run
162
- # Checks whether you have the required permissions for the action,
163
- # without actually making the request, and provides an error response.
164
- # If you have the required permissions, the error response is
165
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
166
- # @return [Types::DeleteVpcPeeringConnectionResult]
167
- def delete(options = {})
168
- options = options.merge(vpc_peering_connection_id: @id)
169
- resp = @client.delete_vpc_peering_connection(options)
170
- resp.data
171
- end
154
+ # @example Request syntax with placeholder values
155
+ #
156
+ # vpc_peering_connection.delete({
157
+ # dry_run: false,
158
+ # })
159
+ # @param [Hash] options ({})
160
+ # @option options [Boolean] :dry_run
161
+ # Checks whether you have the required permissions for the action,
162
+ # without actually making the request, and provides an error response.
163
+ # If you have the required permissions, the error response is
164
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
165
+ # @return [Types::DeleteVpcPeeringConnectionResult]
166
+ def delete(options = {})
167
+ options = options.merge(vpc_peering_connection_id: @id)
168
+ resp = @client.delete_vpc_peering_connection(options)
169
+ resp.data
170
+ end
172
171
 
173
- # @example Request syntax with placeholder values
174
- #
175
- # vpc_peering_connection.reject({
176
- # dry_run: false,
177
- # })
178
- # @param [Hash] options ({})
179
- # @option options [Boolean] :dry_run
180
- # Checks whether you have the required permissions for the action,
181
- # without actually making the request, and provides an error response.
182
- # If you have the required permissions, the error response is
183
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
184
- # @return [Types::RejectVpcPeeringConnectionResult]
185
- def reject(options = {})
186
- options = options.merge(vpc_peering_connection_id: @id)
187
- resp = @client.reject_vpc_peering_connection(options)
188
- resp.data
189
- end
172
+ # @example Request syntax with placeholder values
173
+ #
174
+ # vpc_peering_connection.reject({
175
+ # dry_run: false,
176
+ # })
177
+ # @param [Hash] options ({})
178
+ # @option options [Boolean] :dry_run
179
+ # Checks whether you have the required permissions for the action,
180
+ # without actually making the request, and provides an error response.
181
+ # If you have the required permissions, the error response is
182
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
183
+ # @return [Types::RejectVpcPeeringConnectionResult]
184
+ def reject(options = {})
185
+ options = options.merge(vpc_peering_connection_id: @id)
186
+ resp = @client.reject_vpc_peering_connection(options)
187
+ resp.data
188
+ end
190
189
 
191
- # @!group Associations
190
+ # @!group Associations
192
191
 
193
- # @return [Vpc, nil]
194
- def accepter_vpc
195
- if data.accepter_vpc_info.vpc_id
196
- Vpc.new(
197
- id: data.accepter_vpc_info.vpc_id,
198
- client: @client
199
- )
200
- else
201
- nil
202
- end
192
+ # @return [Vpc, nil]
193
+ def accepter_vpc
194
+ if data.accepter_vpc_info.vpc_id
195
+ Vpc.new(
196
+ id: data.accepter_vpc_info.vpc_id,
197
+ client: @client
198
+ )
199
+ else
200
+ nil
203
201
  end
202
+ end
204
203
 
205
- # @return [Vpc, nil]
206
- def requester_vpc
207
- if data.requester_vpc_info.vpc_id
208
- Vpc.new(
209
- id: data.requester_vpc_info.vpc_id,
210
- client: @client
211
- )
212
- else
213
- nil
214
- end
204
+ # @return [Vpc, nil]
205
+ def requester_vpc
206
+ if data.requester_vpc_info.vpc_id
207
+ Vpc.new(
208
+ id: data.requester_vpc_info.vpc_id,
209
+ client: @client
210
+ )
211
+ else
212
+ nil
215
213
  end
214
+ end
216
215
 
217
- # @deprecated
218
- # @api private
219
- def identifiers
220
- { id: @id }
221
- end
222
- deprecated(:identifiers)
216
+ # @deprecated
217
+ # @api private
218
+ def identifiers
219
+ { id: @id }
220
+ end
221
+ deprecated(:identifiers)
223
222
 
224
- private
223
+ private
225
224
 
226
- def extract_id(args, options)
227
- value = args[0] || options.delete(:id)
228
- case value
229
- when String then value
230
- when nil then raise ArgumentError, "missing required option :id"
231
- else
232
- msg = "expected :id to be a String, got #{value.class}"
233
- raise ArgumentError, msg
234
- end
225
+ def extract_id(args, options)
226
+ value = args[0] || options.delete(:id)
227
+ case value
228
+ when String then value
229
+ when nil then raise ArgumentError, "missing required option :id"
230
+ else
231
+ msg = "expected :id to be a String, got #{value.class}"
232
+ raise ArgumentError, msg
235
233
  end
234
+ end
236
235
 
237
- def yield_waiter_and_warn(waiter, &block)
238
- if !@waiter_block_warned
239
- msg = "pass options to configure the waiter; "
240
- msg << "yielding the waiter is deprecated"
241
- warn(msg)
242
- @waiter_block_warned = true
243
- end
244
- yield(waiter.waiter)
236
+ def yield_waiter_and_warn(waiter, &block)
237
+ if !@waiter_block_warned
238
+ msg = "pass options to configure the waiter; "
239
+ msg << "yielding the waiter is deprecated"
240
+ warn(msg)
241
+ @waiter_block_warned = true
245
242
  end
243
+ yield(waiter.waiter)
244
+ end
246
245
 
247
- def separate_params_and_options(options)
248
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
249
- waiter_opts = {}
250
- waiter_params = {}
251
- options.each_pair do |key, value|
252
- if opts.include?(key)
253
- waiter_opts[key] = value
254
- else
255
- waiter_params[key] = value
256
- end
246
+ def separate_params_and_options(options)
247
+ opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
248
+ waiter_opts = {}
249
+ waiter_params = {}
250
+ options.each_pair do |key, value|
251
+ if opts.include?(key)
252
+ waiter_opts[key] = value
253
+ else
254
+ waiter_params[key] = value
257
255
  end
258
- waiter_opts[:client] ||= @client
259
- [waiter_opts, waiter_params]
260
256
  end
261
-
262
- class Collection < Aws::Resources::Collection; end
257
+ waiter_opts[:client] ||= @client
258
+ [waiter_opts, waiter_params]
263
259
  end
260
+
261
+ class Collection < Aws::Resources::Collection; end
264
262
  end
265
263
  end