blib/lib/Paws/NetworkFirewall/CreateRuleGroup.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::NetworkFirewall::CreateRuleGroup;
3 use Moose;
4 has Capacity => (is => 'ro', isa => 'Int', required => 1);
5 has Description => (is => 'ro', isa => 'Str');
6 has DryRun => (is => 'ro', isa => 'Bool');
7 has RuleGroup => (is => 'ro', isa => 'Paws::NetworkFirewall::RuleGroup');
8 has RuleGroupName => (is => 'ro', isa => 'Str', required => 1);
9 has Rules => (is => 'ro', isa => 'Str');
10 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::NetworkFirewall::Tag]');
11 has Type => (is => 'ro', isa => 'Str', required => 1);
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateRuleGroup');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::NetworkFirewall::CreateRuleGroupResponse');
17 class_has _result_key => (isa => 'Str', is => 'ro');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::NetworkFirewall::CreateRuleGroup - Arguments for method CreateRuleGroup on L<Paws::NetworkFirewall>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method CreateRuleGroup on the
29 L<AWS Network Firewall|Paws::NetworkFirewall> service. Use the attributes of this class
30 as arguments to method CreateRuleGroup.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateRuleGroup.
33  
34 =head1 SYNOPSIS
35  
36 my $network-firewall = Paws->service('NetworkFirewall');
37 my $CreateRuleGroupResponse = $network -firewall->CreateRuleGroup(
38 Capacity => 1,
39 RuleGroupName => 'MyResourceName',
40 Type => 'STATELESS',
41 Description => 'MyDescription', # OPTIONAL
42 DryRun => 1, # OPTIONAL
43 RuleGroup => {
44 RulesSource => {
45 RulesSourceList => {
46 GeneratedRulesType => 'ALLOWLIST', # values: ALLOWLIST, DENYLIST
47 TargetTypes => [
48 'TLS_SNI', ... # values: TLS_SNI, HTTP_HOST
49 ],
50 Targets => [ 'MyCollectionMember_String', ... ],
51  
52 }, # OPTIONAL
53 RulesString => 'MyRulesString', # max: 1000000; OPTIONAL
54 StatefulRules => [
55 {
56 Action => 'PASS', # values: PASS, DROP, ALERT
57 Header => {
58 Destination => 'MyDestination', # min: 1, max: 1024
59 DestinationPort => 'MyPort', # min: 1, max: 1024
60 Direction => 'FORWARD', # values: FORWARD, ANY
61 Protocol => 'IP'
62 , # values: IP, TCP, UDP, ICMP, HTTP, FTP, TLS, SMB, DNS, DCERPC, SSH, SMTP, IMAP, MSN, KRB5, IKEV2, TFTP, NTP, DHCP
63 Source => 'MySource', # min: 1, max: 1024
64 SourcePort => 'MyPort', # min: 1, max: 1024
65  
66 },
67 RuleOptions => [
68 {
69 Keyword => 'MyKeyword', # min: 1, max: 128
70 Settings => [
71 'MySetting', ... # min: 1, max: 8192
72 ], # OPTIONAL
73 },
74 ...
75 ],
76  
77 },
78 ...
79 ], # OPTIONAL
80 StatelessRulesAndCustomActions => {
81 StatelessRules => [
82 {
83 Priority => 1, # min: 1, max: 65535
84 RuleDefinition => {
85 Actions => [ 'MyCollectionMember_String', ... ],
86 MatchAttributes => {
87 DestinationPorts => [
88 {
89 FromPort => 1, # max: 65535
90 ToPort => 1, # max: 65535
91  
92 },
93 ...
94 ], # OPTIONAL
95 Destinations => [
96 {
97 AddressDefinition =>
98 'MyAddressDefinition', # min: 1, max: 255
99  
100 },
101 ...
102 ], # OPTIONAL
103 Protocols => [
104 1, ... # max: 255
105 ], # OPTIONAL
106 SourcePorts => [
107 {
108 FromPort => 1, # max: 65535
109 ToPort => 1, # max: 65535
110  
111 },
112 ...
113 ], # OPTIONAL
114 Sources => [
115 {
116 AddressDefinition =>
117 'MyAddressDefinition', # min: 1, max: 255
118  
119 },
120 ...
121 ], # OPTIONAL
122 TCPFlags => [
123 {
124 Flags => [
125 'FIN',
126 ... # values: FIN, SYN, RST, PSH, ACK, URG, ECE, CWR
127 ],
128 Masks => [
129 'FIN',
130 ... # values: FIN, SYN, RST, PSH, ACK, URG, ECE, CWR
131 ],
132 },
133 ...
134 ], # OPTIONAL
135 },
136  
137 },
138  
139 },
140 ...
141 ],
142 CustomActions => [
143 {
144 ActionDefinition => {
145 PublishMetricAction => {
146 Dimensions => [
147 {
148 Value => 'MyDimensionValue', # min: 1, max: 128
149  
150 },
151 ...
152 ], # min: 1, max: 1
153  
154 }, # OPTIONAL
155 },
156 ActionName => 'MyActionName', # min: 1, max: 128
157  
158 },
159 ...
160 ], # OPTIONAL
161 }, # OPTIONAL
162 },
163 RuleVariables => {
164 IPSets => {
165 'MyRuleVariableName' => {
166 Definition => [
167 'MyVariableDefinition', ... # min: 1
168 ],
169  
170 }, # key: min: 1, max: 32
171 }, # OPTIONAL
172 PortSets => {
173 'MyRuleVariableName' => {
174 Definition => [
175 'MyVariableDefinition', ... # min: 1
176 ],
177 }, # key: min: 1, max: 32
178 }, # OPTIONAL
179 }, # OPTIONAL
180 }, # OPTIONAL
181 Rules => 'MyRulesString', # OPTIONAL
182 Tags => [
183 {
184 Key => 'MyTagKey', # min: 1, max: 128
185 Value => 'MyTagValue', # max: 256
186  
187 },
188 ...
189 ], # OPTIONAL
190 );
191  
192 # Results:
193 my $RuleGroupResponse = $CreateRuleGroupResponse->RuleGroupResponse;
194 my $UpdateToken = $CreateRuleGroupResponse->UpdateToken;
195  
196 # Returns a L<Paws::NetworkFirewall::CreateRuleGroupResponse> object.
197  
198 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
199 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/network-firewall/CreateRuleGroup>
200  
201 =head1 ATTRIBUTES
202  
203  
204 =head2 B<REQUIRED> Capacity => Int
205  
206 The maximum operating resources that this rule group can use. Rule
207 group capacity is fixed at creation. When you update a rule group, you
208 are limited to this capacity. When you reference a rule group from a
209 firewall policy, Network Firewall reserves this capacity for the rule
210 group.
211  
212 You can retrieve the capacity that would be required for a rule group
213 before you create the rule group by calling CreateRuleGroup with
214 C<DryRun> set to C<TRUE>.
215  
216 You can't change or exceed this capacity when you update the rule
217 group, so leave room for your rule group to grow.
218  
219 B<Capacity for a stateless rule group>
220  
221 For a stateless rule group, the capacity required is the sum of the
222 capacity requirements of the individual rules that you expect to have
223 in the rule group.
224  
225 To calculate the capacity requirement of a single rule, multiply the
226 capacity requirement values of each of the rule's match settings:
227  
228 =over
229  
230 =item *
231  
232 A match setting with no criteria specified has a value of 1.
233  
234 =item *
235  
236 A match setting with C<Any> specified has a value of 1.
237  
238 =item *
239  
240 All other match settings have a value equal to the number of elements
241 provided in the setting. For example, a protocol setting ["UDP"] and a
242 source setting ["10.0.0.0/24"] each have a value of 1. A protocol
243 setting ["UDP","TCP"] has a value of 2. A source setting
244 ["10.0.0.0/24","10.0.0.1/24","10.0.0.2/24"] has a value of 3.
245  
246 =back
247  
248 A rule with no criteria specified in any of its match settings has a
249 capacity requirement of 1. A rule with protocol setting ["UDP","TCP"],
250 source setting ["10.0.0.0/24","10.0.0.1/24","10.0.0.2/24"], and a
251 single specification or no specification for each of the other match
252 settings has a capacity requirement of 6.
253  
254 B<Capacity for a stateful rule group>
255  
256 For a stateful rule group, the minimum capacity required is the number
257 of individual rules that you expect to have in the rule group.
258  
259  
260  
261 =head2 Description => Str
262  
263 A description of the rule group.
264  
265  
266  
267 =head2 DryRun => Bool
268  
269 Indicates whether you want Network Firewall to just check the validity
270 of the request, rather than run the request.
271  
272 If set to C<TRUE>, Network Firewall checks whether the request can run
273 successfully, but doesn't actually make the requested changes. The call
274 returns the value that the request would return if you ran it with dry
275 run set to C<FALSE>, but doesn't make additions or changes to your
276 resources. This option allows you to make sure that you have the
277 required permissions to run the request and that your request
278 parameters are valid.
279  
280 If set to C<FALSE>, Network Firewall makes the requested changes to
281 your resources.
282  
283  
284  
285 =head2 RuleGroup => L<Paws::NetworkFirewall::RuleGroup>
286  
287 An object that defines the rule group rules.
288  
289 You must provide either this rule group setting or a C<Rules> setting,
290 but not both.
291  
292  
293  
294 =head2 B<REQUIRED> RuleGroupName => Str
295  
296 The descriptive name of the rule group. You can't change the name of a
297 rule group after you create it.
298  
299  
300  
301 =head2 Rules => Str
302  
303 A string containing stateful rule group rules specifications in
304 Suricata flat format, with one rule per line. Use this to import your
305 existing Suricata compatible rule groups.
306  
307 You must provide either this rules setting or a populated C<RuleGroup>
308 setting, but not both.
309  
310 You can provide your rule group specification in Suricata flat format
311 through this setting when you create or update your rule group. The
312 call response returns a RuleGroup object that Network Firewall has
313 populated from your string.
314  
315  
316  
317 =head2 Tags => ArrayRef[L<Paws::NetworkFirewall::Tag>]
318  
319 The key:value pairs to associate with the resource.
320  
321  
322  
323 =head2 B<REQUIRED> Type => Str
324  
325 Indicates whether the rule group is stateless or stateful. If the rule
326 group is stateless, it contains stateless rules. If it is stateful, it
327 contains stateful rules.
328  
329 Valid values are: C<"STATELESS">, C<"STATEFUL">
330  
331  
332 =head1 SEE ALSO
333  
334 This class forms part of L<Paws>, documenting arguments for method CreateRuleGroup in L<Paws::NetworkFirewall>
335  
336 =head1 BUGS and CONTRIBUTIONS
337  
338 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
339  
340 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
341  
342 =cut
343