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.
- checksums.yaml +4 -4
- data/lib/aws-sdk-ec2.rb +2 -2
- data/lib/aws-sdk-ec2/classic_address.rb +198 -200
- data/lib/aws-sdk-ec2/client.rb +17169 -14563
- data/lib/aws-sdk-ec2/client_api.rb +6458 -6301
- data/lib/aws-sdk-ec2/dhcp_options.rb +158 -160
- data/lib/aws-sdk-ec2/errors.rb +4 -13
- data/lib/aws-sdk-ec2/image.rb +404 -406
- data/lib/aws-sdk-ec2/instance.rb +1423 -1422
- data/lib/aws-sdk-ec2/internet_gateway.rb +178 -180
- data/lib/aws-sdk-ec2/key_pair.rb +98 -100
- data/lib/aws-sdk-ec2/key_pair_info.rb +102 -104
- data/lib/aws-sdk-ec2/network_acl.rb +326 -328
- data/lib/aws-sdk-ec2/network_interface.rb +428 -430
- data/lib/aws-sdk-ec2/network_interface_association.rb +126 -128
- data/lib/aws-sdk-ec2/placement_group.rb +400 -399
- data/lib/aws-sdk-ec2/resource.rb +2696 -2659
- data/lib/aws-sdk-ec2/route.rb +229 -231
- data/lib/aws-sdk-ec2/route_table.rb +243 -245
- data/lib/aws-sdk-ec2/route_table_association.rb +148 -150
- data/lib/aws-sdk-ec2/security_group.rb +515 -517
- data/lib/aws-sdk-ec2/snapshot.rb +431 -433
- data/lib/aws-sdk-ec2/subnet.rb +981 -977
- data/lib/aws-sdk-ec2/tag.rb +185 -187
- data/lib/aws-sdk-ec2/types.rb +24081 -20965
- data/lib/aws-sdk-ec2/volume.rb +513 -512
- data/lib/aws-sdk-ec2/vpc.rb +1671 -1649
- data/lib/aws-sdk-ec2/vpc_address.rb +189 -191
- data/lib/aws-sdk-ec2/vpc_peering_connection.rb +219 -221
- data/lib/aws-sdk-ec2/waiters.rb +1252 -1210
- metadata +2 -2
@@ -1,122 +1,120 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
8
|
+
module Aws::EC2
|
9
|
+
class KeyPairInfo
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(name, options = {})
|
14
|
+
# @param [String] name
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :name
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@name = extract_name(args, options)
|
22
|
+
@data = options.delete(:data)
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
28
|
+
# @return [String]
|
29
|
+
def name
|
30
|
+
@name
|
31
|
+
end
|
32
|
+
alias :key_name :name
|
33
|
+
|
34
|
+
# If you used CreateKeyPair to create the key pair, this is the SHA-1
|
35
|
+
# digest of the DER encoded private key. If you used ImportKeyPair to
|
36
|
+
# provide AWS the public key, this is the MD5 public key fingerprint as
|
37
|
+
# specified in section 4 of RFC4716.
|
38
|
+
# @return [String]
|
39
|
+
def key_fingerprint
|
40
|
+
data.key_fingerprint
|
41
|
+
end
|
43
42
|
|
44
|
-
|
43
|
+
# @!endgroup
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
# @return [Client]
|
46
|
+
def client
|
47
|
+
@client
|
48
|
+
end
|
50
49
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
50
|
+
# Loads, or reloads {#data} for the current {KeyPairInfo}.
|
51
|
+
# Returns `self` making it possible to chain methods.
|
52
|
+
#
|
53
|
+
# key_pair_info.reload.data
|
54
|
+
#
|
55
|
+
# @return [self]
|
56
|
+
def load
|
57
|
+
resp = @client.describe_key_pairs(key_names: [@name])
|
58
|
+
@data = resp.keypairs[0]
|
59
|
+
self
|
60
|
+
end
|
61
|
+
alias :reload :load
|
62
|
+
|
63
|
+
# @return [Types::KeyPairInfo]
|
64
|
+
# Returns the data for this {KeyPairInfo}. Calls
|
65
|
+
# {Client#describe_key_pairs} if {#data_loaded?} is `false`.
|
66
|
+
def data
|
67
|
+
load unless @data
|
68
|
+
@data
|
69
|
+
end
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
71
|
+
# @return [Boolean]
|
72
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
73
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
74
|
+
def data_loaded?
|
75
|
+
!!@data
|
76
|
+
end
|
78
77
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
78
|
+
# @!group Actions
|
79
|
+
|
80
|
+
# @example Request syntax with placeholder values
|
81
|
+
#
|
82
|
+
# key_pair_info.delete({
|
83
|
+
# dry_run: false,
|
84
|
+
# })
|
85
|
+
# @param [Hash] options ({})
|
86
|
+
# @option options [Boolean] :dry_run
|
87
|
+
# Checks whether you have the required permissions for the action,
|
88
|
+
# without actually making the request, and provides an error response.
|
89
|
+
# If you have the required permissions, the error response is
|
90
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
91
|
+
# @return [EmptyStructure]
|
92
|
+
def delete(options = {})
|
93
|
+
options = options.merge(key_name: @name)
|
94
|
+
resp = @client.delete_key_pair(options)
|
95
|
+
resp.data
|
96
|
+
end
|
98
97
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
end
|
98
|
+
# @deprecated
|
99
|
+
# @api private
|
100
|
+
def identifiers
|
101
|
+
{ name: @name }
|
102
|
+
end
|
103
|
+
deprecated(:identifiers)
|
104
|
+
|
105
|
+
private
|
106
|
+
|
107
|
+
def extract_name(args, options)
|
108
|
+
value = args[0] || options.delete(:name)
|
109
|
+
case value
|
110
|
+
when String then value
|
111
|
+
when nil then raise ArgumentError, "missing required option :name"
|
112
|
+
else
|
113
|
+
msg = "expected :name to be a String, got #{value.class}"
|
114
|
+
raise ArgumentError, msg
|
117
115
|
end
|
118
|
-
|
119
|
-
class Collection < Aws::Resources::Collection; end
|
120
116
|
end
|
117
|
+
|
118
|
+
class Collection < Aws::Resources::Collection; end
|
121
119
|
end
|
122
120
|
end
|
@@ -1,366 +1,364 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
class NetworkAcl
|
8
|
+
module Aws::EC2
|
9
|
+
class NetworkAcl
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Deprecations
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
# @overload def initialize(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
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
# @return [String]
|
29
|
+
def id
|
30
|
+
@id
|
31
|
+
end
|
32
|
+
alias :network_acl_id :id
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
# The ID of the VPC for the network ACL.
|
35
|
+
# @return [String]
|
36
|
+
def vpc_id
|
37
|
+
data.vpc_id
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
# Indicates whether this is the default network ACL for the VPC.
|
41
|
+
# @return [Boolean]
|
42
|
+
def is_default
|
43
|
+
data.is_default
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
# One or more entries (rules) in the network ACL.
|
47
|
+
# @return [Array<Types::NetworkAclEntry>]
|
48
|
+
def entries
|
49
|
+
data.entries
|
50
|
+
end
|
52
51
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
52
|
+
# Any associations between the network ACL and one or more subnets
|
53
|
+
# @return [Array<Types::NetworkAclAssociation>]
|
54
|
+
def associations
|
55
|
+
data.associations
|
56
|
+
end
|
58
57
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
# Any tags assigned to the network ACL.
|
59
|
+
# @return [Array<Types::Tag>]
|
60
|
+
def tags
|
61
|
+
data.tags
|
62
|
+
end
|
64
63
|
|
65
|
-
|
64
|
+
# @!endgroup
|
66
65
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
# @return [Client]
|
67
|
+
def client
|
68
|
+
@client
|
69
|
+
end
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
71
|
+
# Loads, or reloads {#data} for the current {NetworkAcl}.
|
72
|
+
# Returns `self` making it possible to chain methods.
|
73
|
+
#
|
74
|
+
# network_acl.reload.data
|
75
|
+
#
|
76
|
+
# @return [self]
|
77
|
+
def load
|
78
|
+
resp = @client.describe_network_acls(network_acl_ids: [@id])
|
79
|
+
@data = resp.networkacls[0]
|
80
|
+
self
|
81
|
+
end
|
82
|
+
alias :reload :load
|
84
83
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
84
|
+
# @return [Types::NetworkAcl]
|
85
|
+
# Returns the data for this {NetworkAcl}. Calls
|
86
|
+
# {Client#describe_network_acls} if {#data_loaded?} is `false`.
|
87
|
+
def data
|
88
|
+
load unless @data
|
89
|
+
@data
|
90
|
+
end
|
92
91
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
92
|
+
# @return [Boolean]
|
93
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
94
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
95
|
+
def data_loaded?
|
96
|
+
!!@data
|
97
|
+
end
|
99
98
|
|
100
|
-
|
99
|
+
# @!group Actions
|
101
100
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
101
|
+
# @example Request syntax with placeholder values
|
102
|
+
#
|
103
|
+
# network_acl.create_entry({
|
104
|
+
# dry_run: false,
|
105
|
+
# rule_number: 1, # required
|
106
|
+
# protocol: "String", # required
|
107
|
+
# rule_action: "allow", # required, accepts allow, deny
|
108
|
+
# egress: false, # required
|
109
|
+
# cidr_block: "String",
|
110
|
+
# ipv_6_cidr_block: "String",
|
111
|
+
# icmp_type_code: {
|
112
|
+
# type: 1,
|
113
|
+
# code: 1,
|
114
|
+
# },
|
115
|
+
# port_range: {
|
116
|
+
# from: 1,
|
117
|
+
# to: 1,
|
118
|
+
# },
|
119
|
+
# })
|
120
|
+
# @param [Hash] options ({})
|
121
|
+
# @option options [Boolean] :dry_run
|
122
|
+
# Checks whether you have the required permissions for the action,
|
123
|
+
# without actually making the request, and provides an error response.
|
124
|
+
# If you have the required permissions, the error response is
|
125
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
126
|
+
# @option options [required, Integer] :rule_number
|
127
|
+
# The rule number for the entry (for example, 100). ACL entries are
|
128
|
+
# processed in ascending order by rule number.
|
129
|
+
#
|
130
|
+
# Constraints: Positive integer from 1 to 32766. The range 32767 to
|
131
|
+
# 65535 is reserved for internal use.
|
132
|
+
# @option options [required, String] :protocol
|
133
|
+
# The protocol. A value of `-1` or `all` means all protocols. If you
|
134
|
+
# specify `all`, `-1`, or a protocol number other than `tcp`, `udp`, or
|
135
|
+
# `icmp`, traffic on all ports is allowed, regardless of any ports or
|
136
|
+
# ICMP types or codes you specify. If you specify protocol `58` (ICMPv6)
|
137
|
+
# and specify an IPv4 CIDR block, traffic for all ICMP types and codes
|
138
|
+
# allowed, regardless of any that you specify. If you specify protocol
|
139
|
+
# `58` (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP
|
140
|
+
# type and code.
|
141
|
+
# @option options [required, String] :rule_action
|
142
|
+
# Indicates whether to allow or deny the traffic that matches the rule.
|
143
|
+
# @option options [required, Boolean] :egress
|
144
|
+
# Indicates whether this is an egress rule (rule is applied to traffic
|
145
|
+
# leaving the subnet).
|
146
|
+
# @option options [String] :cidr_block
|
147
|
+
# The IPv4 network range to allow or deny, in CIDR notation (for example
|
148
|
+
# `172.16.0.0/24`).
|
149
|
+
# @option options [String] :ipv_6_cidr_block
|
150
|
+
# The IPv6 network range to allow or deny, in CIDR notation (for example
|
151
|
+
# `2001:db8:1234:1a00::/64`).
|
152
|
+
# @option options [Types::IcmpTypeCode] :icmp_type_code
|
153
|
+
# ICMP protocol: The ICMP or ICMPv6 type and code. Required if
|
154
|
+
# specifying the ICMP protocol, or protocol 58 (ICMPv6) with an IPv6
|
155
|
+
# CIDR block.
|
156
|
+
# @option options [Types::PortRange] :port_range
|
157
|
+
# TCP or UDP protocols: The range of ports the rule applies to.
|
158
|
+
# @return [EmptyStructure]
|
159
|
+
def create_entry(options = {})
|
160
|
+
options = options.merge(network_acl_id: @id)
|
161
|
+
resp = @client.create_network_acl_entry(options)
|
162
|
+
resp.data
|
163
|
+
end
|
165
164
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
end
|
200
|
-
Tag::Collection.new([batch], size: batch.size)
|
165
|
+
# @example Request syntax with placeholder values
|
166
|
+
#
|
167
|
+
# tag = network_acl.create_tags({
|
168
|
+
# dry_run: false,
|
169
|
+
# tags: [ # required
|
170
|
+
# {
|
171
|
+
# key: "String",
|
172
|
+
# value: "String",
|
173
|
+
# },
|
174
|
+
# ],
|
175
|
+
# })
|
176
|
+
# @param [Hash] options ({})
|
177
|
+
# @option options [Boolean] :dry_run
|
178
|
+
# Checks whether you have the required permissions for the action,
|
179
|
+
# without actually making the request, and provides an error response.
|
180
|
+
# If you have the required permissions, the error response is
|
181
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
182
|
+
# @option options [required, Array<Types::Tag>] :tags
|
183
|
+
# One or more tags. The `value` parameter is required, but if you don't
|
184
|
+
# want the tag to have a value, specify the parameter with no value, and
|
185
|
+
# we set the value to an empty string.
|
186
|
+
# @return [Tag::Collection]
|
187
|
+
def create_tags(options = {})
|
188
|
+
batch = []
|
189
|
+
options = Aws::Util.deep_merge(options, resources: [@id])
|
190
|
+
resp = @client.create_tags(options)
|
191
|
+
options[:tags].each do |t|
|
192
|
+
batch << Tag.new(
|
193
|
+
resource_id: @id,
|
194
|
+
key: t[:key],
|
195
|
+
value: t[:value],
|
196
|
+
client: @client
|
197
|
+
)
|
201
198
|
end
|
199
|
+
Tag::Collection.new([batch], size: batch.size)
|
200
|
+
end
|
202
201
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
202
|
+
# @example Request syntax with placeholder values
|
203
|
+
#
|
204
|
+
# network_acl.delete({
|
205
|
+
# dry_run: false,
|
206
|
+
# })
|
207
|
+
# @param [Hash] options ({})
|
208
|
+
# @option options [Boolean] :dry_run
|
209
|
+
# Checks whether you have the required permissions for the action,
|
210
|
+
# without actually making the request, and provides an error response.
|
211
|
+
# If you have the required permissions, the error response is
|
212
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
213
|
+
# @return [EmptyStructure]
|
214
|
+
def delete(options = {})
|
215
|
+
options = options.merge(network_acl_id: @id)
|
216
|
+
resp = @client.delete_network_acl(options)
|
217
|
+
resp.data
|
218
|
+
end
|
220
219
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
220
|
+
# @example Request syntax with placeholder values
|
221
|
+
#
|
222
|
+
# network_acl.delete_entry({
|
223
|
+
# dry_run: false,
|
224
|
+
# rule_number: 1, # required
|
225
|
+
# egress: false, # required
|
226
|
+
# })
|
227
|
+
# @param [Hash] options ({})
|
228
|
+
# @option options [Boolean] :dry_run
|
229
|
+
# Checks whether you have the required permissions for the action,
|
230
|
+
# without actually making the request, and provides an error response.
|
231
|
+
# If you have the required permissions, the error response is
|
232
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
233
|
+
# @option options [required, Integer] :rule_number
|
234
|
+
# The rule number of the entry to delete.
|
235
|
+
# @option options [required, Boolean] :egress
|
236
|
+
# Indicates whether the rule is an egress rule.
|
237
|
+
# @return [EmptyStructure]
|
238
|
+
def delete_entry(options = {})
|
239
|
+
options = options.merge(network_acl_id: @id)
|
240
|
+
resp = @client.delete_network_acl_entry(options)
|
241
|
+
resp.data
|
242
|
+
end
|
244
243
|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
244
|
+
# @example Request syntax with placeholder values
|
245
|
+
#
|
246
|
+
# network_acl.replace_association({
|
247
|
+
# dry_run: false,
|
248
|
+
# association_id: "String", # required
|
249
|
+
# })
|
250
|
+
# @param [Hash] options ({})
|
251
|
+
# @option options [Boolean] :dry_run
|
252
|
+
# Checks whether you have the required permissions for the action,
|
253
|
+
# without actually making the request, and provides an error response.
|
254
|
+
# If you have the required permissions, the error response is
|
255
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
256
|
+
# @option options [required, String] :association_id
|
257
|
+
# The ID of the current association between the original network ACL and
|
258
|
+
# the subnet.
|
259
|
+
# @return [Types::ReplaceNetworkAclAssociationResult]
|
260
|
+
def replace_association(options = {})
|
261
|
+
options = options.merge(network_acl_id: @id)
|
262
|
+
resp = @client.replace_network_acl_association(options)
|
263
|
+
resp.data
|
264
|
+
end
|
266
265
|
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
266
|
+
# @example Request syntax with placeholder values
|
267
|
+
#
|
268
|
+
# network_acl.replace_entry({
|
269
|
+
# dry_run: false,
|
270
|
+
# rule_number: 1, # required
|
271
|
+
# protocol: "String", # required
|
272
|
+
# rule_action: "allow", # required, accepts allow, deny
|
273
|
+
# egress: false, # required
|
274
|
+
# cidr_block: "String",
|
275
|
+
# ipv_6_cidr_block: "String",
|
276
|
+
# icmp_type_code: {
|
277
|
+
# type: 1,
|
278
|
+
# code: 1,
|
279
|
+
# },
|
280
|
+
# port_range: {
|
281
|
+
# from: 1,
|
282
|
+
# to: 1,
|
283
|
+
# },
|
284
|
+
# })
|
285
|
+
# @param [Hash] options ({})
|
286
|
+
# @option options [Boolean] :dry_run
|
287
|
+
# Checks whether you have the required permissions for the action,
|
288
|
+
# without actually making the request, and provides an error response.
|
289
|
+
# If you have the required permissions, the error response is
|
290
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
291
|
+
# @option options [required, Integer] :rule_number
|
292
|
+
# The rule number of the entry to replace.
|
293
|
+
# @option options [required, String] :protocol
|
294
|
+
# The IP protocol. You can specify `all` or `-1` to mean all protocols.
|
295
|
+
# If you specify `all`, `-1`, or a protocol number other than `tcp`,
|
296
|
+
# `udp`, or `icmp`, traffic on all ports is allowed, regardless of any
|
297
|
+
# ports or ICMP types or codes you specify. If you specify protocol `58`
|
298
|
+
# (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types
|
299
|
+
# and codes allowed, regardless of any that you specify. If you specify
|
300
|
+
# protocol `58` (ICMPv6) and specify an IPv6 CIDR block, you must
|
301
|
+
# specify an ICMP type and code.
|
302
|
+
# @option options [required, String] :rule_action
|
303
|
+
# Indicates whether to allow or deny the traffic that matches the rule.
|
304
|
+
# @option options [required, Boolean] :egress
|
305
|
+
# Indicates whether to replace the egress rule.
|
306
|
+
#
|
307
|
+
# Default: If no value is specified, we replace the ingress rule.
|
308
|
+
# @option options [String] :cidr_block
|
309
|
+
# The IPv4 network range to allow or deny, in CIDR notation (for example
|
310
|
+
# `172.16.0.0/24`).
|
311
|
+
# @option options [String] :ipv_6_cidr_block
|
312
|
+
# The IPv6 network range to allow or deny, in CIDR notation (for example
|
313
|
+
# `2001:bd8:1234:1a00::/64`).
|
314
|
+
# @option options [Types::IcmpTypeCode] :icmp_type_code
|
315
|
+
# ICMP protocol: The ICMP or ICMPv6 type and code. Required if
|
316
|
+
# specifying the ICMP (1) protocol, or protocol 58 (ICMPv6) with an IPv6
|
317
|
+
# CIDR block.
|
318
|
+
# @option options [Types::PortRange] :port_range
|
319
|
+
# TCP or UDP protocols: The range of ports the rule applies to. Required
|
320
|
+
# if specifying TCP (6) or UDP (17) for the protocol.
|
321
|
+
# @return [EmptyStructure]
|
322
|
+
def replace_entry(options = {})
|
323
|
+
options = options.merge(network_acl_id: @id)
|
324
|
+
resp = @client.replace_network_acl_entry(options)
|
325
|
+
resp.data
|
326
|
+
end
|
328
327
|
|
329
|
-
|
328
|
+
# @!group Associations
|
330
329
|
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
end
|
330
|
+
# @return [Vpc, nil]
|
331
|
+
def vpc
|
332
|
+
if data.vpc_id
|
333
|
+
Vpc.new(
|
334
|
+
id: data.vpc_id,
|
335
|
+
client: @client
|
336
|
+
)
|
337
|
+
else
|
338
|
+
nil
|
341
339
|
end
|
340
|
+
end
|
342
341
|
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
342
|
+
# @deprecated
|
343
|
+
# @api private
|
344
|
+
def identifiers
|
345
|
+
{ id: @id }
|
346
|
+
end
|
347
|
+
deprecated(:identifiers)
|
349
348
|
|
350
|
-
|
349
|
+
private
|
351
350
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
end
|
351
|
+
def extract_id(args, options)
|
352
|
+
value = args[0] || options.delete(:id)
|
353
|
+
case value
|
354
|
+
when String then value
|
355
|
+
when nil then raise ArgumentError, "missing required option :id"
|
356
|
+
else
|
357
|
+
msg = "expected :id to be a String, got #{value.class}"
|
358
|
+
raise ArgumentError, msg
|
361
359
|
end
|
362
|
-
|
363
|
-
class Collection < Aws::Resources::Collection; end
|
364
360
|
end
|
361
|
+
|
362
|
+
class Collection < Aws::Resources::Collection; end
|
365
363
|
end
|
366
364
|
end
|