blib/lib/Paws/EC2/CreateFlowLogs.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::EC2::CreateFlowLogs;
3 use Moose;
4 has ClientToken => (is => 'ro', isa => 'Str');
5 has DeliverLogsPermissionArn => (is => 'ro', isa => 'Str');
6 has DryRun => (is => 'ro', isa => 'Bool');
7 has LogDestination => (is => 'ro', isa => 'Str');
8 has LogDestinationType => (is => 'ro', isa => 'Str');
9 has LogFormat => (is => 'ro', isa => 'Str');
10 has LogGroupName => (is => 'ro', isa => 'Str');
11 has MaxAggregationInterval => (is => 'ro', isa => 'Int');
12 has ResourceIds => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'ResourceId' , required => 1);
13 has ResourceType => (is => 'ro', isa => 'Str', required => 1);
14 has TagSpecifications => (is => 'ro', isa => 'ArrayRef[Paws::EC2::TagSpecification]', traits => ['NameInRequest'], request_name => 'TagSpecification' );
15 has TrafficType => (is => 'ro', isa => 'Str', required => 1);
16  
17 use MooseX::ClassAttribute;
18  
19 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateFlowLogs');
20 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::CreateFlowLogsResult');
21 class_has _result_key => (isa => 'Str', is => 'ro');
22 1;
23  
24 ### main pod documentation begin ###
25  
26 =head1 NAME
27  
28 Paws::EC2::CreateFlowLogs - Arguments for method CreateFlowLogs on L<Paws::EC2>
29  
30 =head1 DESCRIPTION
31  
32 This class represents the parameters used for calling the method CreateFlowLogs on the
33 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
34 as arguments to method CreateFlowLogs.
35  
36 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateFlowLogs.
37  
38 =head1 SYNOPSIS
39  
40 my $ec2 = Paws->service('EC2');
41 my $CreateFlowLogsResult = $ec2->CreateFlowLogs(
42 ResourceIds => [ 'MyFlowLogResourceId', ... ],
43 ResourceType => 'VPC',
44 TrafficType => 'ACCEPT',
45 ClientToken => 'MyString', # OPTIONAL
46 DeliverLogsPermissionArn => 'MyString', # OPTIONAL
47 DryRun => 1, # OPTIONAL
48 LogDestination => 'MyString', # OPTIONAL
49 LogDestinationType => 'cloud-watch-logs', # OPTIONAL
50 LogFormat => 'MyString', # OPTIONAL
51 LogGroupName => 'MyString', # OPTIONAL
52 MaxAggregationInterval => 1, # OPTIONAL
53 TagSpecifications => [
54 {
55 ResourceType => 'client-vpn-endpoint'
56 , # values: client-vpn-endpoint, customer-gateway, 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, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log; OPTIONAL
57 Tags => [
58 {
59 Key => 'MyString',
60 Value => 'MyString',
61 },
62 ...
63 ], # OPTIONAL
64 },
65 ...
66 ], # OPTIONAL
67 );
68  
69 # Results:
70 my $ClientToken = $CreateFlowLogsResult->ClientToken;
71 my $FlowLogIds = $CreateFlowLogsResult->FlowLogIds;
72 my $Unsuccessful = $CreateFlowLogsResult->Unsuccessful;
73  
74 # Returns a L<Paws::EC2::CreateFlowLogsResult> object.
75  
76 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.
77 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/CreateFlowLogs>
78  
79 =head1 ATTRIBUTES
80  
81  
82 =head2 ClientToken => Str
83  
84 Unique, case-sensitive identifier that you provide to ensure the
85 idempotency of the request. For more information, see How to Ensure
86 Idempotency
87 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
88  
89  
90  
91 =head2 DeliverLogsPermissionArn => Str
92  
93 The ARN for the IAM role that permits Amazon EC2 to publish flow logs
94 to a CloudWatch Logs log group in your account.
95  
96 If you specify C<LogDestinationType> as C<s3>, do not specify
97 C<DeliverLogsPermissionArn> or C<LogGroupName>.
98  
99  
100  
101 =head2 DryRun => Bool
102  
103 Checks whether you have the required permissions for the action,
104 without actually making the request, and provides an error response. If
105 you have the required permissions, the error response is
106 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
107  
108  
109  
110 =head2 LogDestination => Str
111  
112 Specifies the destination to which the flow log data is to be
113 published. Flow log data can be published to a CloudWatch Logs log
114 group or an Amazon S3 bucket. The value specified for this parameter
115 depends on the value specified for C<LogDestinationType>.
116  
117 If C<LogDestinationType> is not specified or C<cloud-watch-logs>,
118 specify the Amazon Resource Name (ARN) of the CloudWatch Logs log
119 group. For example, to publish to a log group called C<my-logs>,
120 specify C<arn:aws:logs:us-east-1:123456789012:log-group:my-logs>.
121 Alternatively, use C<LogGroupName> instead.
122  
123 If LogDestinationType is C<s3>, specify the ARN of the Amazon S3
124 bucket. You can also specify a subfolder in the bucket. To specify a
125 subfolder in the bucket, use the following ARN format:
126 C<bucket_ARN/subfolder_name/>. For example, to specify a subfolder
127 named C<my-logs> in a bucket named C<my-bucket>, use the following ARN:
128 C<arn:aws:s3:::my-bucket/my-logs/>. You cannot use C<AWSLogs> as a
129 subfolder name. This is a reserved term.
130  
131  
132  
133 =head2 LogDestinationType => Str
134  
135 Specifies the type of destination to which the flow log data is to be
136 published. Flow log data can be published to CloudWatch Logs or Amazon
137 S3. To publish flow log data to CloudWatch Logs, specify
138 C<cloud-watch-logs>. To publish flow log data to Amazon S3, specify
139 C<s3>.
140  
141 If you specify C<LogDestinationType> as C<s3>, do not specify
142 C<DeliverLogsPermissionArn> or C<LogGroupName>.
143  
144 Default: C<cloud-watch-logs>
145  
146 Valid values are: C<"cloud-watch-logs">, C<"s3">
147  
148 =head2 LogFormat => Str
149  
150 The fields to include in the flow log record, in the order in which
151 they should appear. For a list of available fields, see Flow Log
152 Records
153 (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records).
154 If you omit this parameter, the flow log is created using the default
155 format. If you specify this parameter, you must specify at least one
156 field.
157  
158 Specify the fields using the C<${field-id}> format, separated by
159 spaces. For the AWS CLI, use single quotation marks (' ') to surround
160 the parameter value.
161  
162  
163  
164 =head2 LogGroupName => Str
165  
166 The name of a new or existing CloudWatch Logs log group where Amazon
167 EC2 publishes your flow logs.
168  
169 If you specify C<LogDestinationType> as C<s3>, do not specify
170 C<DeliverLogsPermissionArn> or C<LogGroupName>.
171  
172  
173  
174 =head2 MaxAggregationInterval => Int
175  
176 The maximum interval of time during which a flow of packets is captured
177 and aggregated into a flow log record. You can specify 60 seconds (1
178 minute) or 600 seconds (10 minutes).
179  
180 When a network interface is attached to a Nitro-based instance
181 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances),
182 the aggregation interval is always 60 seconds or less, regardless of
183 the value that you specify.
184  
185 Default: 600
186  
187  
188  
189 =head2 B<REQUIRED> ResourceIds => ArrayRef[Str|Undef]
190  
191 The ID of the subnet, network interface, or VPC for which you want to
192 create a flow log.
193  
194 Constraints: Maximum of 1000 resources
195  
196  
197  
198 =head2 B<REQUIRED> ResourceType => Str
199  
200 The type of resource for which to create the flow log. For example, if
201 you specified a VPC ID for the C<ResourceId> property, specify C<VPC>
202 for this property.
203  
204 Valid values are: C<"VPC">, C<"Subnet">, C<"NetworkInterface">
205  
206 =head2 TagSpecifications => ArrayRef[L<Paws::EC2::TagSpecification>]
207  
208 The tags to apply to the flow logs.
209  
210  
211  
212 =head2 B<REQUIRED> TrafficType => Str
213  
214 The type of traffic to log. You can log traffic that the resource
215 accepts or rejects, or all traffic.
216  
217 Valid values are: C<"ACCEPT">, C<"REJECT">, C<"ALL">
218  
219  
220 =head1 SEE ALSO
221  
222 This class forms part of L<Paws>, documenting arguments for method CreateFlowLogs in L<Paws::EC2>
223  
224 =head1 BUGS and CONTRIBUTIONS
225  
226 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
227  
228 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
229  
230 =cut
231