aws-sdk-ec2 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.
@@ -1,480 +1,478 @@
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 NetworkInterface
11
-
12
- extend Aws::Deprecations
13
-
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
8
+ module Aws::EC2
9
+ class NetworkInterface
10
+
11
+ extend Aws::Deprecations
12
+
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 :network_interface_id :id
28
+ # @return [String]
29
+ def id
30
+ @id
31
+ end
32
+ alias :network_interface_id :id
34
33
 
35
- # The ID of the subnet.
36
- # @return [String]
37
- def subnet_id
38
- data.subnet_id
39
- end
34
+ # The ID of the subnet.
35
+ # @return [String]
36
+ def subnet_id
37
+ data.subnet_id
38
+ end
40
39
 
41
- # The ID of the VPC.
42
- # @return [String]
43
- def vpc_id
44
- data.vpc_id
45
- end
40
+ # The ID of the VPC.
41
+ # @return [String]
42
+ def vpc_id
43
+ data.vpc_id
44
+ end
46
45
 
47
- # The Availability Zone.
48
- # @return [String]
49
- def availability_zone
50
- data.availability_zone
51
- end
46
+ # The Availability Zone.
47
+ # @return [String]
48
+ def availability_zone
49
+ data.availability_zone
50
+ end
52
51
 
53
- # A description.
54
- # @return [String]
55
- def description
56
- data.description
57
- end
52
+ # A description.
53
+ # @return [String]
54
+ def description
55
+ data.description
56
+ end
58
57
 
59
- # The AWS account ID of the owner of the network interface.
60
- # @return [String]
61
- def owner_id
62
- data.owner_id
63
- end
58
+ # The AWS account ID of the owner of the network interface.
59
+ # @return [String]
60
+ def owner_id
61
+ data.owner_id
62
+ end
64
63
 
65
- # The ID of the entity that launched the instance on your behalf (for
66
- # example, AWS Management Console or Auto Scaling).
67
- # @return [String]
68
- def requester_id
69
- data.requester_id
70
- end
64
+ # The ID of the entity that launched the instance on your behalf (for
65
+ # example, AWS Management Console or Auto Scaling).
66
+ # @return [String]
67
+ def requester_id
68
+ data.requester_id
69
+ end
71
70
 
72
- # Indicates whether the network interface is being managed by AWS.
73
- # @return [Boolean]
74
- def requester_managed
75
- data.requester_managed
76
- end
71
+ # Indicates whether the network interface is being managed by AWS.
72
+ # @return [Boolean]
73
+ def requester_managed
74
+ data.requester_managed
75
+ end
77
76
 
78
- # The status of the network interface.
79
- # @return [String]
80
- def status
81
- data.status
82
- end
77
+ # The status of the network interface.
78
+ # @return [String]
79
+ def status
80
+ data.status
81
+ end
83
82
 
84
- # The MAC address.
85
- # @return [String]
86
- def mac_address
87
- data.mac_address
88
- end
83
+ # The MAC address.
84
+ # @return [String]
85
+ def mac_address
86
+ data.mac_address
87
+ end
89
88
 
90
- # The IPv4 address of the network interface within the subnet.
91
- # @return [String]
92
- def private_ip_address
93
- data.private_ip_address
94
- end
89
+ # The IPv4 address of the network interface within the subnet.
90
+ # @return [String]
91
+ def private_ip_address
92
+ data.private_ip_address
93
+ end
95
94
 
96
- # The private DNS name.
97
- # @return [String]
98
- def private_dns_name
99
- data.private_dns_name
100
- end
95
+ # The private DNS name.
96
+ # @return [String]
97
+ def private_dns_name
98
+ data.private_dns_name
99
+ end
101
100
 
102
- # Indicates whether traffic to or from the instance is validated.
103
- # @return [Boolean]
104
- def source_dest_check
105
- data.source_dest_check
106
- end
101
+ # Indicates whether traffic to or from the instance is validated.
102
+ # @return [Boolean]
103
+ def source_dest_check
104
+ data.source_dest_check
105
+ end
107
106
 
108
- # Any security groups for the network interface.
109
- # @return [Array<Types::GroupIdentifier>]
110
- def groups
111
- data.groups
112
- end
107
+ # Any security groups for the network interface.
108
+ # @return [Array<Types::GroupIdentifier>]
109
+ def groups
110
+ data.groups
111
+ end
113
112
 
114
- # The network interface attachment.
115
- # @return [Types::NetworkInterfaceAttachment]
116
- def attachment
117
- data.attachment
118
- end
113
+ # The network interface attachment.
114
+ # @return [Types::NetworkInterfaceAttachment]
115
+ def attachment
116
+ data.attachment
117
+ end
119
118
 
120
- # Any tags assigned to the network interface.
121
- # @return [Array<Types::Tag>]
122
- def tag_set
123
- data.tag_set
124
- end
119
+ # Any tags assigned to the network interface.
120
+ # @return [Array<Types::Tag>]
121
+ def tag_set
122
+ data.tag_set
123
+ end
125
124
 
126
- # The private IPv4 addresses associated with the network interface.
127
- # @return [Array<Types::NetworkInterfacePrivateIpAddress>]
128
- def private_ip_addresses
129
- data.private_ip_addresses
130
- end
125
+ # The private IPv4 addresses associated with the network interface.
126
+ # @return [Array<Types::NetworkInterfacePrivateIpAddress>]
127
+ def private_ip_addresses
128
+ data.private_ip_addresses
129
+ end
131
130
 
132
- # The IPv6 addresses associated with the network interface.
133
- # @return [Array<Types::NetworkInterfaceIpv6Address>]
134
- def ipv_6_addresses
135
- data.ipv_6_addresses
136
- end
131
+ # The IPv6 addresses associated with the network interface.
132
+ # @return [Array<Types::NetworkInterfaceIpv6Address>]
133
+ def ipv_6_addresses
134
+ data.ipv_6_addresses
135
+ end
137
136
 
138
- # The type of interface.
139
- # @return [String]
140
- def interface_type
141
- data.interface_type
142
- end
137
+ # The type of interface.
138
+ # @return [String]
139
+ def interface_type
140
+ data.interface_type
141
+ end
143
142
 
144
- # @!endgroup
143
+ # @!endgroup
145
144
 
146
- # @return [Client]
147
- def client
148
- @client
149
- end
145
+ # @return [Client]
146
+ def client
147
+ @client
148
+ end
150
149
 
151
- # Loads, or reloads {#data} for the current {NetworkInterface}.
152
- # Returns `self` making it possible to chain methods.
153
- #
154
- # network_interface.reload.data
155
- #
156
- # @return [self]
157
- def load
158
- resp = @client.describe_network_interfaces(network_interface_ids: [@id])
159
- @data = resp.networkinterfaces[0]
160
- self
161
- end
162
- alias :reload :load
163
-
164
- # @return [Types::NetworkInterface]
165
- # Returns the data for this {NetworkInterface}. Calls
166
- # {Client#describe_network_interfaces} if {#data_loaded?} is `false`.
167
- def data
168
- load unless @data
169
- @data
170
- end
150
+ # Loads, or reloads {#data} for the current {NetworkInterface}.
151
+ # Returns `self` making it possible to chain methods.
152
+ #
153
+ # network_interface.reload.data
154
+ #
155
+ # @return [self]
156
+ def load
157
+ resp = @client.describe_network_interfaces(network_interface_ids: [@id])
158
+ @data = resp.networkinterfaces[0]
159
+ self
160
+ end
161
+ alias :reload :load
162
+
163
+ # @return [Types::NetworkInterface]
164
+ # Returns the data for this {NetworkInterface}. Calls
165
+ # {Client#describe_network_interfaces} if {#data_loaded?} is `false`.
166
+ def data
167
+ load unless @data
168
+ @data
169
+ end
171
170
 
172
- # @return [Boolean]
173
- # Returns `true` if this resource is loaded. Accessing attributes or
174
- # {#data} on an unloaded resource will trigger a call to {#load}.
175
- def data_loaded?
176
- !!@data
177
- end
171
+ # @return [Boolean]
172
+ # Returns `true` if this resource is loaded. Accessing attributes or
173
+ # {#data} on an unloaded resource will trigger a call to {#load}.
174
+ def data_loaded?
175
+ !!@data
176
+ end
178
177
 
179
- # @!group Actions
180
-
181
- # @example Request syntax with placeholder values
182
- #
183
- # network_interface.assign_private_ip_addresses({
184
- # private_ip_addresses: ["String"],
185
- # secondary_private_ip_address_count: 1,
186
- # allow_reassignment: false,
187
- # })
188
- # @param [Hash] options ({})
189
- # @option options [Array<String>] :private_ip_addresses
190
- # One or more IP addresses to be assigned as a secondary private IP
191
- # address to the network interface. You can't specify this parameter
192
- # when also specifying a number of secondary IP addresses.
193
- #
194
- # If you don't specify an IP address, Amazon EC2 automatically selects
195
- # an IP address within the subnet range.
196
- # @option options [Integer] :secondary_private_ip_address_count
197
- # The number of secondary IP addresses to assign to the network
198
- # interface. You can't specify this parameter when also specifying
199
- # private IP addresses.
200
- # @option options [Boolean] :allow_reassignment
201
- # Indicates whether to allow an IP address that is already assigned to
202
- # another network interface or instance to be reassigned to the
203
- # specified network interface.
204
- # @return [EmptyStructure]
205
- def assign_private_ip_addresses(options = {})
206
- options = options.merge(network_interface_id: @id)
207
- resp = @client.assign_private_ip_addresses(options)
208
- resp.data
209
- end
178
+ # @!group Actions
179
+
180
+ # @example Request syntax with placeholder values
181
+ #
182
+ # network_interface.assign_private_ip_addresses({
183
+ # private_ip_addresses: ["String"],
184
+ # secondary_private_ip_address_count: 1,
185
+ # allow_reassignment: false,
186
+ # })
187
+ # @param [Hash] options ({})
188
+ # @option options [Array<String>] :private_ip_addresses
189
+ # One or more IP addresses to be assigned as a secondary private IP
190
+ # address to the network interface. You can't specify this parameter
191
+ # when also specifying a number of secondary IP addresses.
192
+ #
193
+ # If you don't specify an IP address, Amazon EC2 automatically selects
194
+ # an IP address within the subnet range.
195
+ # @option options [Integer] :secondary_private_ip_address_count
196
+ # The number of secondary IP addresses to assign to the network
197
+ # interface. You can't specify this parameter when also specifying
198
+ # private IP addresses.
199
+ # @option options [Boolean] :allow_reassignment
200
+ # Indicates whether to allow an IP address that is already assigned to
201
+ # another network interface or instance to be reassigned to the
202
+ # specified network interface.
203
+ # @return [EmptyStructure]
204
+ def assign_private_ip_addresses(options = {})
205
+ options = options.merge(network_interface_id: @id)
206
+ resp = @client.assign_private_ip_addresses(options)
207
+ resp.data
208
+ end
210
209
 
211
- # @example Request syntax with placeholder values
212
- #
213
- # network_interface.attach({
214
- # dry_run: false,
215
- # instance_id: "String", # required
216
- # device_index: 1, # required
217
- # })
218
- # @param [Hash] options ({})
219
- # @option options [Boolean] :dry_run
220
- # Checks whether you have the required permissions for the action,
221
- # without actually making the request, and provides an error response.
222
- # If you have the required permissions, the error response is
223
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
224
- # @option options [required, String] :instance_id
225
- # The ID of the instance.
226
- # @option options [required, Integer] :device_index
227
- # The index of the device for the network interface attachment.
228
- # @return [Types::AttachNetworkInterfaceResult]
229
- def attach(options = {})
230
- options = options.merge(network_interface_id: @id)
231
- resp = @client.attach_network_interface(options)
232
- resp.data
233
- end
210
+ # @example Request syntax with placeholder values
211
+ #
212
+ # network_interface.attach({
213
+ # dry_run: false,
214
+ # instance_id: "String", # required
215
+ # device_index: 1, # required
216
+ # })
217
+ # @param [Hash] options ({})
218
+ # @option options [Boolean] :dry_run
219
+ # Checks whether you have the required permissions for the action,
220
+ # without actually making the request, and provides an error response.
221
+ # If you have the required permissions, the error response is
222
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
223
+ # @option options [required, String] :instance_id
224
+ # The ID of the instance.
225
+ # @option options [required, Integer] :device_index
226
+ # The index of the device for the network interface attachment.
227
+ # @return [Types::AttachNetworkInterfaceResult]
228
+ def attach(options = {})
229
+ options = options.merge(network_interface_id: @id)
230
+ resp = @client.attach_network_interface(options)
231
+ resp.data
232
+ end
234
233
 
235
- # @example Request syntax with placeholder values
236
- #
237
- # tag = network_interface.create_tags({
238
- # dry_run: false,
239
- # tags: [ # required
240
- # {
241
- # key: "String",
242
- # value: "String",
243
- # },
244
- # ],
245
- # })
246
- # @param [Hash] options ({})
247
- # @option options [Boolean] :dry_run
248
- # Checks whether you have the required permissions for the action,
249
- # without actually making the request, and provides an error response.
250
- # If you have the required permissions, the error response is
251
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
252
- # @option options [required, Array<Types::Tag>] :tags
253
- # One or more tags. The `value` parameter is required, but if you don't
254
- # want the tag to have a value, specify the parameter with no value, and
255
- # we set the value to an empty string.
256
- # @return [Tag::Collection]
257
- def create_tags(options = {})
258
- batch = []
259
- options = Aws::Util.deep_merge(options, resources: [@id])
260
- resp = @client.create_tags(options)
261
- options[:tags].each do |t|
262
- batch << Tag.new(
263
- resource_id: @id,
264
- key: t[:key],
265
- value: t[:value],
266
- client: @client
267
- )
268
- end
269
- Tag::Collection.new([batch], size: batch.size)
270
- end
234
+ # @example Request syntax with placeholder values
235
+ #
236
+ # tag = network_interface.create_tags({
237
+ # dry_run: false,
238
+ # tags: [ # required
239
+ # {
240
+ # key: "String",
241
+ # value: "String",
242
+ # },
243
+ # ],
244
+ # })
245
+ # @param [Hash] options ({})
246
+ # @option options [Boolean] :dry_run
247
+ # Checks whether you have the required permissions for the action,
248
+ # without actually making the request, and provides an error response.
249
+ # If you have the required permissions, the error response is
250
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
251
+ # @option options [required, Array<Types::Tag>] :tags
252
+ # One or more tags. The `value` parameter is required, but if you don't
253
+ # want the tag to have a value, specify the parameter with no value, and
254
+ # we set the value to an empty string.
255
+ # @return [Tag::Collection]
256
+ def create_tags(options = {})
257
+ batch = []
258
+ options = Aws::Util.deep_merge(options, resources: [@id])
259
+ resp = @client.create_tags(options)
260
+ options[:tags].each do |t|
261
+ batch << Tag.new(
262
+ resource_id: @id,
263
+ key: t[:key],
264
+ value: t[:value],
265
+ client: @client
266
+ )
267
+ end
268
+ Tag::Collection.new([batch], size: batch.size)
269
+ end
271
270
 
272
- # @example Request syntax with placeholder values
273
- #
274
- # network_interface.delete({
275
- # dry_run: false,
276
- # })
277
- # @param [Hash] options ({})
278
- # @option options [Boolean] :dry_run
279
- # Checks whether you have the required permissions for the action,
280
- # without actually making the request, and provides an error response.
281
- # If you have the required permissions, the error response is
282
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
283
- # @return [EmptyStructure]
284
- def delete(options = {})
285
- options = options.merge(network_interface_id: @id)
286
- resp = @client.delete_network_interface(options)
287
- resp.data
288
- end
271
+ # @example Request syntax with placeholder values
272
+ #
273
+ # network_interface.delete({
274
+ # dry_run: false,
275
+ # })
276
+ # @param [Hash] options ({})
277
+ # @option options [Boolean] :dry_run
278
+ # Checks whether you have the required permissions for the action,
279
+ # without actually making the request, and provides an error response.
280
+ # If you have the required permissions, the error response is
281
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
282
+ # @return [EmptyStructure]
283
+ def delete(options = {})
284
+ options = options.merge(network_interface_id: @id)
285
+ resp = @client.delete_network_interface(options)
286
+ resp.data
287
+ end
289
288
 
290
- # @example Request syntax with placeholder values
291
- #
292
- # network_interface.describe_attribute({
293
- # dry_run: false,
294
- # attribute: "description", # accepts description, groupSet, sourceDestCheck, attachment
295
- # })
296
- # @param [Hash] options ({})
297
- # @option options [Boolean] :dry_run
298
- # Checks whether you have the required permissions for the action,
299
- # without actually making the request, and provides an error response.
300
- # If you have the required permissions, the error response is
301
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
302
- # @option options [String] :attribute
303
- # The attribute of the network interface.
304
- # @return [Types::DescribeNetworkInterfaceAttributeResult]
305
- def describe_attribute(options = {})
306
- options = options.merge(network_interface_id: @id)
307
- resp = @client.describe_network_interface_attribute(options)
308
- resp.data
309
- end
289
+ # @example Request syntax with placeholder values
290
+ #
291
+ # network_interface.describe_attribute({
292
+ # dry_run: false,
293
+ # attribute: "description", # accepts description, groupSet, sourceDestCheck, attachment
294
+ # })
295
+ # @param [Hash] options ({})
296
+ # @option options [Boolean] :dry_run
297
+ # Checks whether you have the required permissions for the action,
298
+ # without actually making the request, and provides an error response.
299
+ # If you have the required permissions, the error response is
300
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
301
+ # @option options [String] :attribute
302
+ # The attribute of the network interface.
303
+ # @return [Types::DescribeNetworkInterfaceAttributeResult]
304
+ def describe_attribute(options = {})
305
+ options = options.merge(network_interface_id: @id)
306
+ resp = @client.describe_network_interface_attribute(options)
307
+ resp.data
308
+ end
310
309
 
311
- # @example Request syntax with placeholder values
312
- #
313
- # network_interface.detach({
314
- # dry_run: false,
315
- # force: false,
316
- # })
317
- # @param [Hash] options ({})
318
- # @option options [Boolean] :dry_run
319
- # Checks whether you have the required permissions for the action,
320
- # without actually making the request, and provides an error response.
321
- # If you have the required permissions, the error response is
322
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
323
- # @option options [Boolean] :force
324
- # Specifies whether to force a detachment.
325
- # @return [EmptyStructure]
326
- def detach(options = {})
327
- options = options.merge(attachment_id: data.attachment.attachment_id)
328
- resp = @client.detach_network_interface(options)
329
- resp.data
330
- end
310
+ # @example Request syntax with placeholder values
311
+ #
312
+ # network_interface.detach({
313
+ # dry_run: false,
314
+ # force: false,
315
+ # })
316
+ # @param [Hash] options ({})
317
+ # @option options [Boolean] :dry_run
318
+ # Checks whether you have the required permissions for the action,
319
+ # without actually making the request, and provides an error response.
320
+ # If you have the required permissions, the error response is
321
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
322
+ # @option options [Boolean] :force
323
+ # Specifies whether to force a detachment.
324
+ # @return [EmptyStructure]
325
+ def detach(options = {})
326
+ options = options.merge(attachment_id: data.attachment.attachment_id)
327
+ resp = @client.detach_network_interface(options)
328
+ resp.data
329
+ end
331
330
 
332
- # @example Request syntax with placeholder values
333
- #
334
- # network_interface.modify_attribute({
335
- # dry_run: false,
336
- # description: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
337
- # source_dest_check: {
338
- # value: false,
339
- # },
340
- # groups: ["String"],
341
- # attachment: {
342
- # attachment_id: "String",
343
- # delete_on_termination: false,
344
- # },
345
- # })
346
- # @param [Hash] options ({})
347
- # @option options [Boolean] :dry_run
348
- # Checks whether you have the required permissions for the action,
349
- # without actually making the request, and provides an error response.
350
- # If you have the required permissions, the error response is
351
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
352
- # @option options [Types::AttributeValue] :description
353
- # A description for the network interface.
354
- # @option options [Types::AttributeBooleanValue] :source_dest_check
355
- # Indicates whether source/destination checking is enabled. A value of
356
- # `true` means checking is enabled, and `false` means checking is
357
- # disabled. This value must be `false` for a NAT instance to perform
358
- # NAT. For more information, see [NAT Instances][1] in the *Amazon
359
- # Virtual Private Cloud User Guide*.
360
- #
361
- #
362
- #
363
- # [1]: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html
364
- # @option options [Array<String>] :groups
365
- # Changes the security groups for the network interface. The new set of
366
- # groups you specify replaces the current set. You must specify at least
367
- # one group, even if it's just the default security group in the VPC.
368
- # You must specify the ID of the security group, not the name.
369
- # @option options [Types::NetworkInterfaceAttachmentChanges] :attachment
370
- # Information about the interface attachment. If modifying the 'delete
371
- # on termination' attribute, you must specify the ID of the interface
372
- # attachment.
373
- # @return [EmptyStructure]
374
- def modify_attribute(options = {})
375
- options = options.merge(network_interface_id: @id)
376
- resp = @client.modify_network_interface_attribute(options)
377
- resp.data
378
- end
331
+ # @example Request syntax with placeholder values
332
+ #
333
+ # network_interface.modify_attribute({
334
+ # dry_run: false,
335
+ # description: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
336
+ # source_dest_check: {
337
+ # value: false,
338
+ # },
339
+ # groups: ["String"],
340
+ # attachment: {
341
+ # attachment_id: "String",
342
+ # delete_on_termination: false,
343
+ # },
344
+ # })
345
+ # @param [Hash] options ({})
346
+ # @option options [Boolean] :dry_run
347
+ # Checks whether you have the required permissions for the action,
348
+ # without actually making the request, and provides an error response.
349
+ # If you have the required permissions, the error response is
350
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
351
+ # @option options [Types::AttributeValue] :description
352
+ # A description for the network interface.
353
+ # @option options [Types::AttributeBooleanValue] :source_dest_check
354
+ # Indicates whether source/destination checking is enabled. A value of
355
+ # `true` means checking is enabled, and `false` means checking is
356
+ # disabled. This value must be `false` for a NAT instance to perform
357
+ # NAT. For more information, see [NAT Instances][1] in the *Amazon
358
+ # Virtual Private Cloud User Guide*.
359
+ #
360
+ #
361
+ #
362
+ # [1]: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html
363
+ # @option options [Array<String>] :groups
364
+ # Changes the security groups for the network interface. The new set of
365
+ # groups you specify replaces the current set. You must specify at least
366
+ # one group, even if it's just the default security group in the VPC.
367
+ # You must specify the ID of the security group, not the name.
368
+ # @option options [Types::NetworkInterfaceAttachmentChanges] :attachment
369
+ # Information about the interface attachment. If modifying the 'delete
370
+ # on termination' attribute, you must specify the ID of the interface
371
+ # attachment.
372
+ # @return [EmptyStructure]
373
+ def modify_attribute(options = {})
374
+ options = options.merge(network_interface_id: @id)
375
+ resp = @client.modify_network_interface_attribute(options)
376
+ resp.data
377
+ end
379
378
 
380
- # @example Request syntax with placeholder values
381
- #
382
- # network_interface.reset_attribute({
383
- # dry_run: false,
384
- # source_dest_check: "String",
385
- # })
386
- # @param [Hash] options ({})
387
- # @option options [Boolean] :dry_run
388
- # Checks whether you have the required permissions for the action,
389
- # without actually making the request, and provides an error response.
390
- # If you have the required permissions, the error response is
391
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
392
- # @option options [String] :source_dest_check
393
- # The source/destination checking attribute. Resets the value to `true`.
394
- # @return [EmptyStructure]
395
- def reset_attribute(options = {})
396
- options = options.merge(network_interface_id: @id)
397
- resp = @client.reset_network_interface_attribute(options)
398
- resp.data
399
- end
379
+ # @example Request syntax with placeholder values
380
+ #
381
+ # network_interface.reset_attribute({
382
+ # dry_run: false,
383
+ # source_dest_check: "String",
384
+ # })
385
+ # @param [Hash] options ({})
386
+ # @option options [Boolean] :dry_run
387
+ # Checks whether you have the required permissions for the action,
388
+ # without actually making the request, and provides an error response.
389
+ # If you have the required permissions, the error response is
390
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
391
+ # @option options [String] :source_dest_check
392
+ # The source/destination checking attribute. Resets the value to `true`.
393
+ # @return [EmptyStructure]
394
+ def reset_attribute(options = {})
395
+ options = options.merge(network_interface_id: @id)
396
+ resp = @client.reset_network_interface_attribute(options)
397
+ resp.data
398
+ end
400
399
 
401
- # @example Request syntax with placeholder values
402
- #
403
- # network_interface.unassign_private_ip_addresses({
404
- # private_ip_addresses: ["String"], # required
405
- # })
406
- # @param [Hash] options ({})
407
- # @option options [required, Array<String>] :private_ip_addresses
408
- # The secondary private IP addresses to unassign from the network
409
- # interface. You can specify this option multiple times to unassign more
410
- # than one IP address.
411
- # @return [EmptyStructure]
412
- def unassign_private_ip_addresses(options = {})
413
- options = options.merge(network_interface_id: @id)
414
- resp = @client.unassign_private_ip_addresses(options)
415
- resp.data
416
- end
400
+ # @example Request syntax with placeholder values
401
+ #
402
+ # network_interface.unassign_private_ip_addresses({
403
+ # private_ip_addresses: ["String"], # required
404
+ # })
405
+ # @param [Hash] options ({})
406
+ # @option options [required, Array<String>] :private_ip_addresses
407
+ # The secondary private IP addresses to unassign from the network
408
+ # interface. You can specify this option multiple times to unassign more
409
+ # than one IP address.
410
+ # @return [EmptyStructure]
411
+ def unassign_private_ip_addresses(options = {})
412
+ options = options.merge(network_interface_id: @id)
413
+ resp = @client.unassign_private_ip_addresses(options)
414
+ resp.data
415
+ end
417
416
 
418
- # @!group Associations
419
-
420
- # @return [NetworkInterfaceAssociation, nil]
421
- def association
422
- if data.association.association_id
423
- NetworkInterfaceAssociation.new(
424
- id: data.association.association_id,
425
- data: data.association,
426
- client: @client
427
- )
428
- else
429
- nil
430
- end
431
- end
417
+ # @!group Associations
432
418
 
433
- # @return [Subnet, nil]
434
- def subnet
435
- if data.subnet_id
436
- Subnet.new(
437
- id: data.subnet_id,
438
- client: @client
439
- )
440
- else
441
- nil
442
- end
419
+ # @return [NetworkInterfaceAssociation, nil]
420
+ def association
421
+ if data.association.association_id
422
+ NetworkInterfaceAssociation.new(
423
+ id: data.association.association_id,
424
+ data: data.association,
425
+ client: @client
426
+ )
427
+ else
428
+ nil
443
429
  end
430
+ end
444
431
 
445
- # @return [Vpc, nil]
446
- def vpc
447
- if data.vpc_id
448
- Vpc.new(
449
- id: data.vpc_id,
450
- client: @client
451
- )
452
- else
453
- nil
454
- end
432
+ # @return [Subnet, nil]
433
+ def subnet
434
+ if data.subnet_id
435
+ Subnet.new(
436
+ id: data.subnet_id,
437
+ client: @client
438
+ )
439
+ else
440
+ nil
455
441
  end
442
+ end
456
443
 
457
- # @deprecated
458
- # @api private
459
- def identifiers
460
- { id: @id }
461
- end
462
- deprecated(:identifiers)
463
-
464
- private
465
-
466
- def extract_id(args, options)
467
- value = args[0] || options.delete(:id)
468
- case value
469
- when String then value
470
- when nil then raise ArgumentError, "missing required option :id"
471
- else
472
- msg = "expected :id to be a String, got #{value.class}"
473
- raise ArgumentError, msg
474
- end
444
+ # @return [Vpc, nil]
445
+ def vpc
446
+ if data.vpc_id
447
+ Vpc.new(
448
+ id: data.vpc_id,
449
+ client: @client
450
+ )
451
+ else
452
+ nil
475
453
  end
454
+ end
476
455
 
477
- class Collection < Aws::Resources::Collection; end
456
+ # @deprecated
457
+ # @api private
458
+ def identifiers
459
+ { id: @id }
478
460
  end
461
+ deprecated(:identifiers)
462
+
463
+ private
464
+
465
+ def extract_id(args, options)
466
+ value = args[0] || options.delete(:id)
467
+ case value
468
+ when String then value
469
+ when nil then raise ArgumentError, "missing required option :id"
470
+ else
471
+ msg = "expected :id to be a String, got #{value.class}"
472
+ raise ArgumentError, msg
473
+ end
474
+ end
475
+
476
+ class Collection < Aws::Resources::Collection; end
479
477
  end
480
478
  end