aws-sdk-ec2 1.0.0.rc2 → 1.0.0.rc3

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