aws-sdk-ec2 1.431.0 → 1.522.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +465 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-ec2/classic_address.rb +26 -16
- data/lib/aws-sdk-ec2/client.rb +10867 -4155
- data/lib/aws-sdk-ec2/client_api.rb +2924 -510
- data/lib/aws-sdk-ec2/customizations/instance.rb +18 -1
- data/lib/aws-sdk-ec2/customizations/resource.rb +46 -3
- data/lib/aws-sdk-ec2/customizations/tag.rb +13 -0
- data/lib/aws-sdk-ec2/customizations.rb +0 -22
- data/lib/aws-sdk-ec2/dhcp_options.rb +12 -12
- data/lib/aws-sdk-ec2/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-ec2/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-ec2/endpoints.rb +2 -8608
- data/lib/aws-sdk-ec2/image.rb +166 -95
- data/lib/aws-sdk-ec2/instance.rb +425 -356
- data/lib/aws-sdk-ec2/internet_gateway.rb +7 -7
- data/lib/aws-sdk-ec2/key_pair.rb +14 -14
- data/lib/aws-sdk-ec2/key_pair_info.rb +30 -30
- data/lib/aws-sdk-ec2/nat_gateway.rb +7 -8
- data/lib/aws-sdk-ec2/network_acl.rb +70 -70
- data/lib/aws-sdk-ec2/network_interface.rb +94 -78
- data/lib/aws-sdk-ec2/network_interface_association.rb +3 -3
- data/lib/aws-sdk-ec2/placement_group.rb +37 -19
- data/lib/aws-sdk-ec2/plugins/endpoints.rb +20 -1242
- data/lib/aws-sdk-ec2/resource.rb +944 -811
- data/lib/aws-sdk-ec2/route.rb +34 -34
- data/lib/aws-sdk-ec2/route_table.rb +44 -44
- data/lib/aws-sdk-ec2/route_table_association.rb +3 -3
- data/lib/aws-sdk-ec2/security_group.rb +212 -201
- data/lib/aws-sdk-ec2/snapshot.rb +169 -105
- data/lib/aws-sdk-ec2/subnet.rb +391 -359
- data/lib/aws-sdk-ec2/tag.rb +7 -4
- data/lib/aws-sdk-ec2/types.rb +13807 -4774
- data/lib/aws-sdk-ec2/volume.rb +157 -119
- data/lib/aws-sdk-ec2/vpc.rb +278 -224
- data/lib/aws-sdk-ec2/vpc_address.rb +31 -21
- data/lib/aws-sdk-ec2/vpc_peering_connection.rb +6 -6
- data/lib/aws-sdk-ec2.rb +40 -36
- data/sig/classic_address.rbs +105 -0
- data/sig/client.rbs +14622 -0
- data/sig/dhcp_options.rbs +84 -0
- data/sig/errors.rbs +16 -0
- data/sig/image.rbs +228 -0
- data/sig/instance.rbs +564 -0
- data/sig/internet_gateway.rbs +91 -0
- data/sig/key_pair.rbs +54 -0
- data/sig/key_pair_info.rbs +63 -0
- data/sig/nat_gateway.rbs +107 -0
- data/sig/network_acl.rbs +144 -0
- data/sig/network_interface.rbs +239 -0
- data/sig/network_interface_association.rbs +62 -0
- data/sig/placement_group.rbs +78 -0
- data/sig/resource.rbs +1042 -0
- data/sig/route.rbs +113 -0
- data/sig/route_table.rbs +117 -0
- data/sig/route_table_association.rbs +69 -0
- data/sig/security_group.rbs +311 -0
- data/sig/snapshot.rbs +204 -0
- data/sig/subnet.rbs +436 -0
- data/sig/tag.rbs +63 -0
- data/sig/types.rbs +16812 -0
- data/sig/volume.rbs +210 -0
- data/sig/vpc.rbs +404 -0
- data/sig/vpc_address.rbs +101 -0
- data/sig/vpc_peering_connection.rbs +84 -0
- data/sig/waiters.rbs +664 -0
- metadata +44 -18
@@ -35,22 +35,28 @@ module Aws::EC2
|
|
35
35
|
end
|
36
36
|
alias :group_id :id
|
37
37
|
|
38
|
-
#
|
39
|
-
# @return [
|
40
|
-
def
|
41
|
-
data[:
|
38
|
+
# The outbound rules associated with the security group.
|
39
|
+
# @return [Array<Types::IpPermission>]
|
40
|
+
def ip_permissions_egress
|
41
|
+
data[:ip_permissions_egress]
|
42
42
|
end
|
43
43
|
|
44
|
-
#
|
44
|
+
# Any tags assigned to the security group.
|
45
|
+
# @return [Array<Types::Tag>]
|
46
|
+
def tags
|
47
|
+
data[:tags]
|
48
|
+
end
|
49
|
+
|
50
|
+
# The ID of the VPC for the security group.
|
45
51
|
# @return [String]
|
46
|
-
def
|
47
|
-
data[:
|
52
|
+
def vpc_id
|
53
|
+
data[:vpc_id]
|
48
54
|
end
|
49
55
|
|
50
|
-
# The
|
51
|
-
# @return [
|
52
|
-
def
|
53
|
-
data[:
|
56
|
+
# The ARN of the security group.
|
57
|
+
# @return [String]
|
58
|
+
def security_group_arn
|
59
|
+
data[:security_group_arn]
|
54
60
|
end
|
55
61
|
|
56
62
|
# The Amazon Web Services account ID of the owner of the security group.
|
@@ -59,22 +65,22 @@ module Aws::EC2
|
|
59
65
|
data[:owner_id]
|
60
66
|
end
|
61
67
|
|
62
|
-
# The
|
63
|
-
# @return [
|
64
|
-
def
|
65
|
-
data[:
|
68
|
+
# The name of the security group.
|
69
|
+
# @return [String]
|
70
|
+
def group_name
|
71
|
+
data[:group_name]
|
66
72
|
end
|
67
73
|
|
68
|
-
#
|
69
|
-
# @return [
|
70
|
-
def
|
71
|
-
data[:
|
74
|
+
# A description of the security group.
|
75
|
+
# @return [String]
|
76
|
+
def description
|
77
|
+
data[:description]
|
72
78
|
end
|
73
79
|
|
74
|
-
# The
|
75
|
-
# @return [
|
76
|
-
def
|
77
|
-
data[:
|
80
|
+
# The inbound rules associated with the security group.
|
81
|
+
# @return [Array<Types::IpPermission>]
|
82
|
+
def ip_permissions
|
83
|
+
data[:ip_permissions]
|
78
84
|
end
|
79
85
|
|
80
86
|
# @!endgroup
|
@@ -91,7 +97,7 @@ module Aws::EC2
|
|
91
97
|
#
|
92
98
|
# @return [self]
|
93
99
|
def load
|
94
|
-
resp = Aws::Plugins::UserAgent.
|
100
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
95
101
|
@client.describe_security_groups(group_ids: [@id])
|
96
102
|
end
|
97
103
|
@data = resp.security_groups[0]
|
@@ -208,7 +214,7 @@ module Aws::EC2
|
|
208
214
|
:retry
|
209
215
|
end
|
210
216
|
end
|
211
|
-
Aws::Plugins::UserAgent.
|
217
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
212
218
|
Aws::Waiters::Waiter.new(options).wait({})
|
213
219
|
end
|
214
220
|
end
|
@@ -218,91 +224,87 @@ module Aws::EC2
|
|
218
224
|
# @example Request syntax with placeholder values
|
219
225
|
#
|
220
226
|
# security_group.authorize_egress({
|
227
|
+
# tag_specifications: [
|
228
|
+
# {
|
229
|
+
# resource_type: "capacity-reservation", # accepts capacity-reservation, client-vpn-endpoint, customer-gateway, carrier-gateway, coip-pool, declarative-policies-report, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, instance-event-window, internet-gateway, ipam, ipam-pool, ipam-scope, ipv4pool-ec2, ipv6pool-ec2, key-pair, launch-template, local-gateway, local-gateway-route-table, local-gateway-virtual-interface, local-gateway-virtual-interface-group, local-gateway-route-table-vpc-association, local-gateway-route-table-virtual-interface-group-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, network-insights-access-scope, network-insights-access-scope-analysis, outpost-lag, placement-group, prefix-list, replace-root-volume-task, reserved-instances, route-table, security-group, security-group-rule, service-link-virtual-interface, snapshot, spot-fleet-request, spot-instances-request, subnet, subnet-cidr-reservation, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-policy-table, transit-gateway-route-table, transit-gateway-route-table-announcement, volume, vpc, vpc-endpoint, vpc-endpoint-connection, vpc-endpoint-service, vpc-endpoint-service-permission, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log, capacity-reservation-fleet, traffic-mirror-filter-rule, vpc-endpoint-connection-device-type, verified-access-instance, verified-access-group, verified-access-endpoint, verified-access-policy, verified-access-trust-provider, vpn-connection-device-type, vpc-block-public-access-exclusion, route-server, route-server-endpoint, route-server-peer, ipam-resource-discovery, ipam-resource-discovery-association, instance-connect-endpoint, verified-access-endpoint-target, ipam-external-resource-verification-token
|
230
|
+
# tags: [
|
231
|
+
# {
|
232
|
+
# key: "String",
|
233
|
+
# value: "String",
|
234
|
+
# },
|
235
|
+
# ],
|
236
|
+
# },
|
237
|
+
# ],
|
221
238
|
# dry_run: false,
|
239
|
+
# source_security_group_name: "String",
|
240
|
+
# source_security_group_owner_id: "String",
|
241
|
+
# ip_protocol: "String",
|
242
|
+
# from_port: 1,
|
243
|
+
# to_port: 1,
|
244
|
+
# cidr_ip: "String",
|
222
245
|
# ip_permissions: [
|
223
246
|
# {
|
224
|
-
# from_port: 1,
|
225
247
|
# ip_protocol: "String",
|
226
|
-
#
|
248
|
+
# from_port: 1,
|
249
|
+
# to_port: 1,
|
250
|
+
# user_id_group_pairs: [
|
227
251
|
# {
|
228
|
-
# cidr_ip: "String",
|
229
252
|
# description: "String",
|
253
|
+
# user_id: "String",
|
254
|
+
# group_name: "String",
|
255
|
+
# group_id: "String",
|
256
|
+
# vpc_id: "String",
|
257
|
+
# vpc_peering_connection_id: "String",
|
258
|
+
# peering_status: "String",
|
230
259
|
# },
|
231
260
|
# ],
|
232
|
-
#
|
261
|
+
# ip_ranges: [
|
233
262
|
# {
|
234
|
-
# cidr_ipv_6: "String",
|
235
263
|
# description: "String",
|
264
|
+
# cidr_ip: "String",
|
236
265
|
# },
|
237
266
|
# ],
|
238
|
-
#
|
267
|
+
# ipv_6_ranges: [
|
239
268
|
# {
|
240
269
|
# description: "String",
|
241
|
-
#
|
270
|
+
# cidr_ipv_6: "String",
|
242
271
|
# },
|
243
272
|
# ],
|
244
|
-
#
|
245
|
-
# user_id_group_pairs: [
|
273
|
+
# prefix_list_ids: [
|
246
274
|
# {
|
247
275
|
# description: "String",
|
248
|
-
#
|
249
|
-
# group_name: "String",
|
250
|
-
# peering_status: "String",
|
251
|
-
# user_id: "String",
|
252
|
-
# vpc_id: "String",
|
253
|
-
# vpc_peering_connection_id: "String",
|
254
|
-
# },
|
255
|
-
# ],
|
256
|
-
# },
|
257
|
-
# ],
|
258
|
-
# tag_specifications: [
|
259
|
-
# {
|
260
|
-
# resource_type: "capacity-reservation", # accepts capacity-reservation, client-vpn-endpoint, customer-gateway, carrier-gateway, coip-pool, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, instance-event-window, internet-gateway, ipam, ipam-pool, ipam-scope, ipv4pool-ec2, ipv6pool-ec2, key-pair, launch-template, local-gateway, local-gateway-route-table, local-gateway-virtual-interface, local-gateway-virtual-interface-group, local-gateway-route-table-vpc-association, local-gateway-route-table-virtual-interface-group-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, network-insights-access-scope, network-insights-access-scope-analysis, placement-group, prefix-list, replace-root-volume-task, reserved-instances, route-table, security-group, security-group-rule, snapshot, spot-fleet-request, spot-instances-request, subnet, subnet-cidr-reservation, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-policy-table, transit-gateway-route-table, transit-gateway-route-table-announcement, volume, vpc, vpc-endpoint, vpc-endpoint-connection, vpc-endpoint-service, vpc-endpoint-service-permission, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log, capacity-reservation-fleet, traffic-mirror-filter-rule, vpc-endpoint-connection-device-type, verified-access-instance, verified-access-group, verified-access-endpoint, verified-access-policy, verified-access-trust-provider, vpn-connection-device-type, vpc-block-public-access-exclusion, ipam-resource-discovery, ipam-resource-discovery-association, instance-connect-endpoint
|
261
|
-
# tags: [
|
262
|
-
# {
|
263
|
-
# key: "String",
|
264
|
-
# value: "String",
|
276
|
+
# prefix_list_id: "String",
|
265
277
|
# },
|
266
278
|
# ],
|
267
279
|
# },
|
268
280
|
# ],
|
269
|
-
# cidr_ip: "String",
|
270
|
-
# from_port: 1,
|
271
|
-
# ip_protocol: "String",
|
272
|
-
# to_port: 1,
|
273
|
-
# source_security_group_name: "String",
|
274
|
-
# source_security_group_owner_id: "String",
|
275
281
|
# })
|
276
282
|
# @param [Hash] options ({})
|
283
|
+
# @option options [Array<Types::TagSpecification>] :tag_specifications
|
284
|
+
# The tags applied to the security group rule.
|
277
285
|
# @option options [Boolean] :dry_run
|
278
286
|
# Checks whether you have the required permissions for the action,
|
279
287
|
# without actually making the request, and provides an error response.
|
280
288
|
# If you have the required permissions, the error response is
|
281
289
|
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
282
|
-
# @option options [Array<Types::IpPermission>] :ip_permissions
|
283
|
-
# The sets of IP permissions. You can't specify a destination security
|
284
|
-
# group and a CIDR IP address range in the same set of permissions.
|
285
|
-
# @option options [Array<Types::TagSpecification>] :tag_specifications
|
286
|
-
# The tags applied to the security group rule.
|
287
|
-
# @option options [String] :cidr_ip
|
288
|
-
# Not supported. Use a set of IP permissions to specify the CIDR.
|
289
|
-
# @option options [Integer] :from_port
|
290
|
-
# Not supported. Use a set of IP permissions to specify the port.
|
291
|
-
# @option options [String] :ip_protocol
|
292
|
-
# Not supported. Use a set of IP permissions to specify the protocol
|
293
|
-
# name or number.
|
294
|
-
# @option options [Integer] :to_port
|
295
|
-
# Not supported. Use a set of IP permissions to specify the port.
|
296
290
|
# @option options [String] :source_security_group_name
|
297
|
-
# Not supported. Use
|
298
|
-
# security group.
|
291
|
+
# Not supported. Use IP permissions instead.
|
299
292
|
# @option options [String] :source_security_group_owner_id
|
300
|
-
# Not supported. Use
|
301
|
-
#
|
293
|
+
# Not supported. Use IP permissions instead.
|
294
|
+
# @option options [String] :ip_protocol
|
295
|
+
# Not supported. Use IP permissions instead.
|
296
|
+
# @option options [Integer] :from_port
|
297
|
+
# Not supported. Use IP permissions instead.
|
298
|
+
# @option options [Integer] :to_port
|
299
|
+
# Not supported. Use IP permissions instead.
|
300
|
+
# @option options [String] :cidr_ip
|
301
|
+
# Not supported. Use IP permissions instead.
|
302
|
+
# @option options [Array<Types::IpPermission>] :ip_permissions
|
303
|
+
# The permissions for the security group rules.
|
302
304
|
# @return [Types::AuthorizeSecurityGroupEgressResult]
|
303
305
|
def authorize_egress(options = {})
|
304
306
|
options = options.merge(group_id: @id)
|
305
|
-
resp = Aws::Plugins::UserAgent.
|
307
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
306
308
|
@client.authorize_security_group_egress(options)
|
307
309
|
end
|
308
310
|
resp.data
|
@@ -316,36 +318,36 @@ module Aws::EC2
|
|
316
318
|
# group_name: "SecurityGroupName",
|
317
319
|
# ip_permissions: [
|
318
320
|
# {
|
319
|
-
# from_port: 1,
|
320
321
|
# ip_protocol: "String",
|
321
|
-
#
|
322
|
+
# from_port: 1,
|
323
|
+
# to_port: 1,
|
324
|
+
# user_id_group_pairs: [
|
322
325
|
# {
|
323
|
-
# cidr_ip: "String",
|
324
326
|
# description: "String",
|
327
|
+
# user_id: "String",
|
328
|
+
# group_name: "String",
|
329
|
+
# group_id: "String",
|
330
|
+
# vpc_id: "String",
|
331
|
+
# vpc_peering_connection_id: "String",
|
332
|
+
# peering_status: "String",
|
325
333
|
# },
|
326
334
|
# ],
|
327
|
-
#
|
335
|
+
# ip_ranges: [
|
328
336
|
# {
|
329
|
-
# cidr_ipv_6: "String",
|
330
337
|
# description: "String",
|
338
|
+
# cidr_ip: "String",
|
331
339
|
# },
|
332
340
|
# ],
|
333
|
-
#
|
341
|
+
# ipv_6_ranges: [
|
334
342
|
# {
|
335
343
|
# description: "String",
|
336
|
-
#
|
344
|
+
# cidr_ipv_6: "String",
|
337
345
|
# },
|
338
346
|
# ],
|
339
|
-
#
|
340
|
-
# user_id_group_pairs: [
|
347
|
+
# prefix_list_ids: [
|
341
348
|
# {
|
342
349
|
# description: "String",
|
343
|
-
#
|
344
|
-
# group_name: "String",
|
345
|
-
# peering_status: "String",
|
346
|
-
# user_id: "String",
|
347
|
-
# vpc_id: "String",
|
348
|
-
# vpc_peering_connection_id: "String",
|
350
|
+
# prefix_list_id: "String",
|
349
351
|
# },
|
350
352
|
# ],
|
351
353
|
# },
|
@@ -354,10 +356,9 @@ module Aws::EC2
|
|
354
356
|
# source_security_group_name: "String",
|
355
357
|
# source_security_group_owner_id: "String",
|
356
358
|
# to_port: 1,
|
357
|
-
# dry_run: false,
|
358
359
|
# tag_specifications: [
|
359
360
|
# {
|
360
|
-
# resource_type: "capacity-reservation", # accepts capacity-reservation, client-vpn-endpoint, customer-gateway, carrier-gateway, coip-pool, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, instance-event-window, internet-gateway, ipam, ipam-pool, ipam-scope, ipv4pool-ec2, ipv6pool-ec2, key-pair, launch-template, local-gateway, local-gateway-route-table, local-gateway-virtual-interface, local-gateway-virtual-interface-group, local-gateway-route-table-vpc-association, local-gateway-route-table-virtual-interface-group-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, network-insights-access-scope, network-insights-access-scope-analysis, placement-group, prefix-list, replace-root-volume-task, reserved-instances, route-table, security-group, security-group-rule, snapshot, spot-fleet-request, spot-instances-request, subnet, subnet-cidr-reservation, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-policy-table, transit-gateway-route-table, transit-gateway-route-table-announcement, volume, vpc, vpc-endpoint, vpc-endpoint-connection, vpc-endpoint-service, vpc-endpoint-service-permission, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log, capacity-reservation-fleet, traffic-mirror-filter-rule, vpc-endpoint-connection-device-type, verified-access-instance, verified-access-group, verified-access-endpoint, verified-access-policy, verified-access-trust-provider, vpn-connection-device-type, vpc-block-public-access-exclusion, ipam-resource-discovery, ipam-resource-discovery-association, instance-connect-endpoint
|
361
|
+
# resource_type: "capacity-reservation", # accepts capacity-reservation, client-vpn-endpoint, customer-gateway, carrier-gateway, coip-pool, declarative-policies-report, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, instance-event-window, internet-gateway, ipam, ipam-pool, ipam-scope, ipv4pool-ec2, ipv6pool-ec2, key-pair, launch-template, local-gateway, local-gateway-route-table, local-gateway-virtual-interface, local-gateway-virtual-interface-group, local-gateway-route-table-vpc-association, local-gateway-route-table-virtual-interface-group-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, network-insights-access-scope, network-insights-access-scope-analysis, outpost-lag, placement-group, prefix-list, replace-root-volume-task, reserved-instances, route-table, security-group, security-group-rule, service-link-virtual-interface, snapshot, spot-fleet-request, spot-instances-request, subnet, subnet-cidr-reservation, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-policy-table, transit-gateway-route-table, transit-gateway-route-table-announcement, volume, vpc, vpc-endpoint, vpc-endpoint-connection, vpc-endpoint-service, vpc-endpoint-service-permission, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log, capacity-reservation-fleet, traffic-mirror-filter-rule, vpc-endpoint-connection-device-type, verified-access-instance, verified-access-group, verified-access-endpoint, verified-access-policy, verified-access-trust-provider, vpn-connection-device-type, vpc-block-public-access-exclusion, route-server, route-server-endpoint, route-server-peer, ipam-resource-discovery, ipam-resource-discovery-association, instance-connect-endpoint, verified-access-endpoint-target, ipam-external-resource-verification-token
|
361
362
|
# tags: [
|
362
363
|
# {
|
363
364
|
# key: "String",
|
@@ -366,80 +367,92 @@ module Aws::EC2
|
|
366
367
|
# ],
|
367
368
|
# },
|
368
369
|
# ],
|
370
|
+
# dry_run: false,
|
369
371
|
# })
|
370
372
|
# @param [Hash] options ({})
|
371
373
|
# @option options [String] :cidr_ip
|
372
|
-
# The IPv4 address range, in CIDR format.
|
373
|
-
# parameter when specifying a source security group. To specify an IPv6
|
374
|
-
# address range, use a set of IP permissions.
|
374
|
+
# The IPv4 address range, in CIDR format.
|
375
375
|
#
|
376
|
-
#
|
377
|
-
#
|
376
|
+
# <note markdown="1"> Amazon Web Services [canonicalizes][1] IPv4 and IPv6 CIDRs. For
|
377
|
+
# example, if you specify 100.68.0.18/18 for the CIDR block, Amazon Web
|
378
|
+
# Services canonicalizes the CIDR block to 100.68.0.0/18. Any subsequent
|
379
|
+
# DescribeSecurityGroups and DescribeSecurityGroupRules calls will
|
380
|
+
# return the canonicalized form of the CIDR block. Additionally, if you
|
381
|
+
# attempt to add another rule with the non-canonical form of the CIDR
|
382
|
+
# (such as 100.68.0.18/18) and there is already a rule for the
|
383
|
+
# canonicalized form of the CIDR block (such as 100.68.0.0/18), the API
|
384
|
+
# throws an duplicate rule error.
|
385
|
+
#
|
386
|
+
# </note>
|
387
|
+
#
|
388
|
+
# To specify an IPv6 address range, use IP permissions instead.
|
389
|
+
#
|
390
|
+
# To specify multiple rules and descriptions for the rules, use IP
|
391
|
+
# permissions instead.
|
392
|
+
#
|
393
|
+
#
|
394
|
+
#
|
395
|
+
# [1]: https://en.wikipedia.org/wiki/Canonicalization
|
378
396
|
# @option options [Integer] :from_port
|
379
397
|
# If the protocol is TCP or UDP, this is the start of the port range. If
|
380
|
-
# the protocol is ICMP, this is the type
|
381
|
-
# all ICMP types. If you specify all ICMP types, you must specify all
|
382
|
-
# ICMP codes.
|
398
|
+
# the protocol is ICMP, this is the ICMP type or -1 (all ICMP types).
|
383
399
|
#
|
384
|
-
#
|
385
|
-
#
|
400
|
+
# To specify multiple rules and descriptions for the rules, use IP
|
401
|
+
# permissions instead.
|
386
402
|
# @option options [String] :group_name
|
387
|
-
# \[Default VPC\] The name of the security group.
|
388
|
-
# either the
|
389
|
-
#
|
390
|
-
# security group
|
403
|
+
# \[Default VPC\] The name of the security group. For security groups
|
404
|
+
# for a default VPC you can specify either the ID or the name of the
|
405
|
+
# security group. For security groups for a nondefault VPC, you must
|
406
|
+
# specify the ID of the security group.
|
391
407
|
# @option options [Array<Types::IpPermission>] :ip_permissions
|
392
|
-
# The
|
408
|
+
# The permissions for the security group rules.
|
393
409
|
# @option options [String] :ip_protocol
|
394
410
|
# The IP protocol name (`tcp`, `udp`, `icmp`) or number (see [Protocol
|
395
|
-
# Numbers][1]). To specify
|
411
|
+
# Numbers][1]). To specify all protocols, use `-1`.
|
412
|
+
#
|
413
|
+
# To specify `icmpv6`, use IP permissions instead.
|
396
414
|
#
|
397
|
-
#
|
398
|
-
#
|
399
|
-
#
|
415
|
+
# If you specify a protocol other than one of the supported values,
|
416
|
+
# traffic is allowed on all ports, regardless of any ports that you
|
417
|
+
# specify.
|
400
418
|
#
|
401
|
-
#
|
402
|
-
#
|
419
|
+
# To specify multiple rules and descriptions for the rules, use IP
|
420
|
+
# permissions instead.
|
403
421
|
#
|
404
422
|
#
|
405
423
|
#
|
406
424
|
# [1]: http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
|
407
425
|
# @option options [String] :source_security_group_name
|
408
|
-
# \[Default VPC\] The name of the source security group.
|
409
|
-
#
|
410
|
-
#
|
411
|
-
# protocol
|
412
|
-
# ICMP, UDP, and TCP access. To create a rule with a specific IP
|
413
|
-
# protocol and port range, use a set of IP permissions instead. The
|
414
|
-
# source security group must be in the same VPC.
|
415
|
-
# @option options [String] :source_security_group_owner_id
|
416
|
-
# \[Nondefault VPC\] The Amazon Web Services account ID for the source
|
417
|
-
# security group, if the source security group is in a different
|
418
|
-
# account. You can't specify this parameter in combination with the
|
419
|
-
# following parameters: the CIDR IP address range, the IP protocol, the
|
420
|
-
# start of the port range, and the end of the port range. Creates rules
|
421
|
-
# that grant full ICMP, UDP, and TCP access. To create a rule with a
|
422
|
-
# specific IP protocol and port range, use a set of IP permissions
|
426
|
+
# \[Default VPC\] The name of the source security group.
|
427
|
+
#
|
428
|
+
# The rule grants full ICMP, UDP, and TCP access. To create a rule with
|
429
|
+
# a specific protocol and port range, specify a set of IP permissions
|
423
430
|
# instead.
|
431
|
+
# @option options [String] :source_security_group_owner_id
|
432
|
+
# The Amazon Web Services account ID for the source security group, if
|
433
|
+
# the source security group is in a different account.
|
434
|
+
#
|
435
|
+
# The rule grants full ICMP, UDP, and TCP access. To create a rule with
|
436
|
+
# a specific protocol and port range, use IP permissions instead.
|
424
437
|
# @option options [Integer] :to_port
|
425
438
|
# If the protocol is TCP or UDP, this is the end of the port range. If
|
426
|
-
# the protocol is ICMP, this is the code
|
427
|
-
#
|
428
|
-
# codes.
|
439
|
+
# the protocol is ICMP, this is the ICMP code or -1 (all ICMP codes). If
|
440
|
+
# the start port is -1 (all ICMP types), then the end port must be -1
|
441
|
+
# (all ICMP codes).
|
429
442
|
#
|
430
|
-
#
|
431
|
-
#
|
443
|
+
# To specify multiple rules and descriptions for the rules, use IP
|
444
|
+
# permissions instead.
|
445
|
+
# @option options [Array<Types::TagSpecification>] :tag_specifications
|
446
|
+
# The tags applied to the security group rule.
|
432
447
|
# @option options [Boolean] :dry_run
|
433
448
|
# Checks whether you have the required permissions for the action,
|
434
449
|
# without actually making the request, and provides an error response.
|
435
450
|
# If you have the required permissions, the error response is
|
436
451
|
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
437
|
-
# @option options [Array<Types::TagSpecification>] :tag_specifications
|
438
|
-
# \[VPC Only\] The tags applied to the security group rule.
|
439
452
|
# @return [Types::AuthorizeSecurityGroupIngressResult]
|
440
453
|
def authorize_ingress(options = {})
|
441
454
|
options = options.merge(group_id: @id)
|
442
|
-
resp = Aws::Plugins::UserAgent.
|
455
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
443
456
|
@client.authorize_security_group_ingress(options)
|
444
457
|
end
|
445
458
|
resp.data
|
@@ -470,7 +483,7 @@ module Aws::EC2
|
|
470
483
|
def create_tags(options = {})
|
471
484
|
batch = []
|
472
485
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
473
|
-
resp = Aws::Plugins::UserAgent.
|
486
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
474
487
|
@client.create_tags(options)
|
475
488
|
end
|
476
489
|
options[:tags].each do |t|
|
@@ -517,7 +530,7 @@ module Aws::EC2
|
|
517
530
|
def delete_tags(options = {})
|
518
531
|
batch = []
|
519
532
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
520
|
-
resp = Aws::Plugins::UserAgent.
|
533
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
521
534
|
@client.delete_tags(options)
|
522
535
|
end
|
523
536
|
options[:tags].each do |t|
|
@@ -547,10 +560,10 @@ module Aws::EC2
|
|
547
560
|
# without actually making the request, and provides an error response.
|
548
561
|
# If you have the required permissions, the error response is
|
549
562
|
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
550
|
-
# @return [
|
563
|
+
# @return [Types::DeleteSecurityGroupResult]
|
551
564
|
def delete(options = {})
|
552
565
|
options = options.merge(group_id: @id)
|
553
|
-
resp = Aws::Plugins::UserAgent.
|
566
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
554
567
|
@client.delete_security_group(options)
|
555
568
|
end
|
556
569
|
resp.data
|
@@ -559,81 +572,81 @@ module Aws::EC2
|
|
559
572
|
# @example Request syntax with placeholder values
|
560
573
|
#
|
561
574
|
# security_group.revoke_egress({
|
575
|
+
# security_group_rule_ids: ["String"],
|
562
576
|
# dry_run: false,
|
577
|
+
# source_security_group_name: "String",
|
578
|
+
# source_security_group_owner_id: "String",
|
579
|
+
# ip_protocol: "String",
|
580
|
+
# from_port: 1,
|
581
|
+
# to_port: 1,
|
582
|
+
# cidr_ip: "String",
|
563
583
|
# ip_permissions: [
|
564
584
|
# {
|
565
|
-
# from_port: 1,
|
566
585
|
# ip_protocol: "String",
|
567
|
-
#
|
586
|
+
# from_port: 1,
|
587
|
+
# to_port: 1,
|
588
|
+
# user_id_group_pairs: [
|
568
589
|
# {
|
569
|
-
# cidr_ip: "String",
|
570
590
|
# description: "String",
|
591
|
+
# user_id: "String",
|
592
|
+
# group_name: "String",
|
593
|
+
# group_id: "String",
|
594
|
+
# vpc_id: "String",
|
595
|
+
# vpc_peering_connection_id: "String",
|
596
|
+
# peering_status: "String",
|
571
597
|
# },
|
572
598
|
# ],
|
573
|
-
#
|
599
|
+
# ip_ranges: [
|
574
600
|
# {
|
575
|
-
# cidr_ipv_6: "String",
|
576
601
|
# description: "String",
|
602
|
+
# cidr_ip: "String",
|
577
603
|
# },
|
578
604
|
# ],
|
579
|
-
#
|
605
|
+
# ipv_6_ranges: [
|
580
606
|
# {
|
581
607
|
# description: "String",
|
582
|
-
#
|
608
|
+
# cidr_ipv_6: "String",
|
583
609
|
# },
|
584
610
|
# ],
|
585
|
-
#
|
586
|
-
# user_id_group_pairs: [
|
611
|
+
# prefix_list_ids: [
|
587
612
|
# {
|
588
613
|
# description: "String",
|
589
|
-
#
|
590
|
-
# group_name: "String",
|
591
|
-
# peering_status: "String",
|
592
|
-
# user_id: "String",
|
593
|
-
# vpc_id: "String",
|
594
|
-
# vpc_peering_connection_id: "String",
|
614
|
+
# prefix_list_id: "String",
|
595
615
|
# },
|
596
616
|
# ],
|
597
617
|
# },
|
598
618
|
# ],
|
599
|
-
# security_group_rule_ids: ["String"],
|
600
|
-
# cidr_ip: "String",
|
601
|
-
# from_port: 1,
|
602
|
-
# ip_protocol: "String",
|
603
|
-
# to_port: 1,
|
604
|
-
# source_security_group_name: "String",
|
605
|
-
# source_security_group_owner_id: "String",
|
606
619
|
# })
|
607
620
|
# @param [Hash] options ({})
|
621
|
+
# @option options [Array<String>] :security_group_rule_ids
|
622
|
+
# The IDs of the security group rules.
|
608
623
|
# @option options [Boolean] :dry_run
|
609
624
|
# Checks whether you have the required permissions for the action,
|
610
625
|
# without actually making the request, and provides an error response.
|
611
626
|
# If you have the required permissions, the error response is
|
612
627
|
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
613
|
-
# @option options [Array<Types::IpPermission>] :ip_permissions
|
614
|
-
# The sets of IP permissions. You can't specify a destination security
|
615
|
-
# group and a CIDR IP address range in the same set of permissions.
|
616
|
-
# @option options [Array<String>] :security_group_rule_ids
|
617
|
-
# The IDs of the security group rules.
|
618
|
-
# @option options [String] :cidr_ip
|
619
|
-
# Not supported. Use a set of IP permissions to specify the CIDR.
|
620
|
-
# @option options [Integer] :from_port
|
621
|
-
# Not supported. Use a set of IP permissions to specify the port.
|
622
|
-
# @option options [String] :ip_protocol
|
623
|
-
# Not supported. Use a set of IP permissions to specify the protocol
|
624
|
-
# name or number.
|
625
|
-
# @option options [Integer] :to_port
|
626
|
-
# Not supported. Use a set of IP permissions to specify the port.
|
627
628
|
# @option options [String] :source_security_group_name
|
628
629
|
# Not supported. Use a set of IP permissions to specify a destination
|
629
630
|
# security group.
|
630
631
|
# @option options [String] :source_security_group_owner_id
|
631
632
|
# Not supported. Use a set of IP permissions to specify a destination
|
632
633
|
# security group.
|
634
|
+
# @option options [String] :ip_protocol
|
635
|
+
# Not supported. Use a set of IP permissions to specify the protocol
|
636
|
+
# name or number.
|
637
|
+
# @option options [Integer] :from_port
|
638
|
+
# Not supported. Use a set of IP permissions to specify the port.
|
639
|
+
# @option options [Integer] :to_port
|
640
|
+
# Not supported. Use a set of IP permissions to specify the port.
|
641
|
+
# @option options [String] :cidr_ip
|
642
|
+
# Not supported. Use a set of IP permissions to specify the CIDR.
|
643
|
+
# @option options [Array<Types::IpPermission>] :ip_permissions
|
644
|
+
# The sets of IP permissions. You can't specify a destination security
|
645
|
+
# group and a CIDR IP address range in the same set of permissions.
|
633
646
|
# @return [Types::RevokeSecurityGroupEgressResult]
|
634
647
|
def revoke_egress(options = {})
|
635
648
|
options = options.merge(group_id: @id)
|
636
|
-
resp = Aws::Plugins::UserAgent.
|
649
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
637
650
|
@client.revoke_security_group_egress(options)
|
638
651
|
end
|
639
652
|
resp.data
|
@@ -647,36 +660,36 @@ module Aws::EC2
|
|
647
660
|
# group_name: "SecurityGroupName",
|
648
661
|
# ip_permissions: [
|
649
662
|
# {
|
650
|
-
# from_port: 1,
|
651
663
|
# ip_protocol: "String",
|
652
|
-
#
|
664
|
+
# from_port: 1,
|
665
|
+
# to_port: 1,
|
666
|
+
# user_id_group_pairs: [
|
653
667
|
# {
|
654
|
-
# cidr_ip: "String",
|
655
668
|
# description: "String",
|
669
|
+
# user_id: "String",
|
670
|
+
# group_name: "String",
|
671
|
+
# group_id: "String",
|
672
|
+
# vpc_id: "String",
|
673
|
+
# vpc_peering_connection_id: "String",
|
674
|
+
# peering_status: "String",
|
656
675
|
# },
|
657
676
|
# ],
|
658
|
-
#
|
677
|
+
# ip_ranges: [
|
659
678
|
# {
|
660
|
-
# cidr_ipv_6: "String",
|
661
679
|
# description: "String",
|
680
|
+
# cidr_ip: "String",
|
662
681
|
# },
|
663
682
|
# ],
|
664
|
-
#
|
683
|
+
# ipv_6_ranges: [
|
665
684
|
# {
|
666
685
|
# description: "String",
|
667
|
-
#
|
686
|
+
# cidr_ipv_6: "String",
|
668
687
|
# },
|
669
688
|
# ],
|
670
|
-
#
|
671
|
-
# user_id_group_pairs: [
|
689
|
+
# prefix_list_ids: [
|
672
690
|
# {
|
673
691
|
# description: "String",
|
674
|
-
#
|
675
|
-
# group_name: "String",
|
676
|
-
# peering_status: "String",
|
677
|
-
# user_id: "String",
|
678
|
-
# vpc_id: "String",
|
679
|
-
# vpc_peering_connection_id: "String",
|
692
|
+
# prefix_list_id: "String",
|
680
693
|
# },
|
681
694
|
# ],
|
682
695
|
# },
|
@@ -685,8 +698,8 @@ module Aws::EC2
|
|
685
698
|
# source_security_group_name: "String",
|
686
699
|
# source_security_group_owner_id: "String",
|
687
700
|
# to_port: 1,
|
688
|
-
# dry_run: false,
|
689
701
|
# security_group_rule_ids: ["String"],
|
702
|
+
# dry_run: false,
|
690
703
|
# })
|
691
704
|
# @param [Hash] options ({})
|
692
705
|
# @option options [String] :cidr_ip
|
@@ -694,8 +707,7 @@ module Aws::EC2
|
|
694
707
|
# specifying a source security group.
|
695
708
|
# @option options [Integer] :from_port
|
696
709
|
# If the protocol is TCP or UDP, this is the start of the port range. If
|
697
|
-
# the protocol is ICMP, this is the type
|
698
|
-
# all ICMP types.
|
710
|
+
# the protocol is ICMP, this is the ICMP type or -1 (all ICMP types).
|
699
711
|
# @option options [String] :group_name
|
700
712
|
# \[Default VPC\] The name of the security group. You must specify
|
701
713
|
# either the security group ID or the security group name in the
|
@@ -722,19 +734,18 @@ module Aws::EC2
|
|
722
734
|
# Not supported.
|
723
735
|
# @option options [Integer] :to_port
|
724
736
|
# If the protocol is TCP or UDP, this is the end of the port range. If
|
725
|
-
# the protocol is ICMP, this is the code
|
726
|
-
#
|
737
|
+
# the protocol is ICMP, this is the ICMP code or -1 (all ICMP codes).
|
738
|
+
# @option options [Array<String>] :security_group_rule_ids
|
739
|
+
# The IDs of the security group rules.
|
727
740
|
# @option options [Boolean] :dry_run
|
728
741
|
# Checks whether you have the required permissions for the action,
|
729
742
|
# without actually making the request, and provides an error response.
|
730
743
|
# If you have the required permissions, the error response is
|
731
744
|
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
732
|
-
# @option options [Array<String>] :security_group_rule_ids
|
733
|
-
# The IDs of the security group rules.
|
734
745
|
# @return [Types::RevokeSecurityGroupIngressResult]
|
735
746
|
def revoke_ingress(options = {})
|
736
747
|
options = options.merge(group_id: @id)
|
737
|
-
resp = Aws::Plugins::UserAgent.
|
748
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
738
749
|
@client.revoke_security_group_ingress(options)
|
739
750
|
end
|
740
751
|
resp.data
|