blib/lib/Paws/CloudFront/CreateDistribution.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 15 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::CloudFront::CreateDistribution;
3 use Moose;
4 has DistributionConfig => (is => 'ro', isa => 'Paws::CloudFront::DistributionConfig', traits => ['ParamInBody'], required => 1);
5  
6  
7 use MooseX::ClassAttribute;
8  
9 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateDistribution');
10 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/2020-05-31/distribution');
11 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
12 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CloudFront::CreateDistributionResult');
13 class_has _result_key => (isa => 'Str', is => 'ro');
14
15
16 1;
17  
18 ### main pod documentation begin ###
19  
20 =head1 NAME
21  
22 Paws::CloudFront::CreateDistribution - Arguments for method CreateDistribution on L<Paws::CloudFront>
23  
24 =head1 DESCRIPTION
25  
26 This class represents the parameters used for calling the method CreateDistribution2020_05_31 on the
27 L<Amazon CloudFront|Paws::CloudFront> service. Use the attributes of this class
28 as arguments to method CreateDistribution2020_05_31.
29  
30 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateDistribution2020_05_31.
31  
32 =head1 SYNOPSIS
33  
34 my $cloudfront = Paws->service('CloudFront');
35 my $CreateDistributionResult = $cloudfront->CreateDistribution(
36 DistributionConfig => {
37 CallerReference => 'Mystring',
38 Comment => 'MyCommentType',
39 DefaultCacheBehavior => {
40 TargetOriginId => 'Mystring',
41 ViewerProtocolPolicy =>
42 'allow-all', # values: allow-all, https-only, redirect-to-https
43 AllowedMethods => {
44 Items => [
45 'GET', ... # values: GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
46 ],
47 Quantity => 1,
48 CachedMethods => {
49 Items => [
50 'GET',
51 ... # values: GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
52 ],
53 Quantity => 1,
54  
55 }, # OPTIONAL
56 }, # OPTIONAL
57 CachePolicyId => 'Mystring',
58 Compress => 1, # OPTIONAL
59 DefaultTTL => 1, # OPTIONAL
60 FieldLevelEncryptionId => 'Mystring',
61 ForwardedValues => {
62 Cookies => {
63 Forward => 'none', # values: none, whitelist, all
64 WhitelistedNames => {
65 Quantity => 1,
66 Items => [ 'Mystring', ... ], # OPTIONAL
67 }, # OPTIONAL
68 },
69 QueryString => 1, # OPTIONAL
70 Headers => {
71 Quantity => 1,
72 Items => [ 'Mystring', ... ], # OPTIONAL
73 }, # OPTIONAL
74 QueryStringCacheKeys => {
75 Quantity => 1,
76 Items => [ 'Mystring', ... ], # OPTIONAL
77 }, # OPTIONAL
78 }, # OPTIONAL
79 FunctionAssociations => {
80 Quantity => 1,
81 Items => [
82 {
83 EventType => 'viewer-request'
84 , # values: viewer-request, viewer-response, origin-request, origin-response
85 FunctionARN => 'MyFunctionARN', # max: 108
86  
87 },
88 ...
89 ], # OPTIONAL
90 }, # OPTIONAL
91 LambdaFunctionAssociations => {
92 Quantity => 1,
93 Items => [
94 {
95 EventType => 'viewer-request'
96 , # values: viewer-request, viewer-response, origin-request, origin-response
97 LambdaFunctionARN => 'MyLambdaFunctionARN',
98 IncludeBody => 1, # OPTIONAL
99 },
100 ...
101 ], # OPTIONAL
102 }, # OPTIONAL
103 MaxTTL => 1, # OPTIONAL
104 MinTTL => 1, # OPTIONAL
105 OriginRequestPolicyId => 'Mystring',
106 RealtimeLogConfigArn => 'Mystring',
107 SmoothStreaming => 1, # OPTIONAL
108 TrustedKeyGroups => {
109 Enabled => 1, # OPTIONAL
110 Quantity => 1,
111 Items => [ 'Mystring', ... ], # OPTIONAL
112 }, # OPTIONAL
113 TrustedSigners => {
114 Enabled => 1, # OPTIONAL
115 Quantity => 1,
116 Items => [ 'Mystring', ... ], # OPTIONAL
117 }, # OPTIONAL
118 },
119 Enabled => 1, # OPTIONAL
120 Origins => {
121 Items => [
122 {
123 DomainName => 'Mystring',
124 Id => 'Mystring',
125 ConnectionAttempts => 1,
126 ConnectionTimeout => 1,
127 CustomHeaders => {
128 Quantity => 1,
129 Items => [
130 {
131 HeaderName => 'Mystring',
132 HeaderValue => 'Mystring',
133  
134 },
135 ...
136 ], # OPTIONAL
137 }, # OPTIONAL
138 CustomOriginConfig => {
139 HTTPPort => 1,
140 HTTPSPort => 1,
141 OriginProtocolPolicy =>
142 'http-only', # values: http-only, match-viewer, https-only
143 OriginKeepaliveTimeout => 1,
144 OriginReadTimeout => 1,
145 OriginSslProtocols => {
146 Items => [
147 'SSLv3', ... # values: SSLv3, TLSv1, TLSv1.1, TLSv1.2
148 ],
149 Quantity => 1,
150  
151 }, # OPTIONAL
152 }, # OPTIONAL
153 OriginPath => 'Mystring',
154 OriginShield => {
155 Enabled => 1, # OPTIONAL
156 OriginShieldRegion =>
157 'MyOriginShieldRegion', # min: 1, max: 32; OPTIONAL
158 }, # OPTIONAL
159 S3OriginConfig => {
160 OriginAccessIdentity => 'Mystring',
161  
162 }, # OPTIONAL
163 },
164 ...
165 ], # min: 1
166 Quantity => 1,
167  
168 },
169 Aliases => {
170 Quantity => 1,
171 Items => [ 'Mystring', ... ], # OPTIONAL
172 }, # OPTIONAL
173 CacheBehaviors => {
174 Quantity => 1,
175 Items => [
176 {
177 PathPattern => 'Mystring',
178 TargetOriginId => 'Mystring',
179 ViewerProtocolPolicy =>
180 'allow-all', # values: allow-all, https-only, redirect-to-https
181 AllowedMethods => {
182 Items => [
183 'GET',
184 ... # values: GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
185 ],
186 Quantity => 1,
187 CachedMethods => {
188 Items => [
189 'GET',
190 ... # values: GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
191 ],
192 Quantity => 1,
193  
194 }, # OPTIONAL
195 }, # OPTIONAL
196 CachePolicyId => 'Mystring',
197 Compress => 1, # OPTIONAL
198 DefaultTTL => 1, # OPTIONAL
199 FieldLevelEncryptionId => 'Mystring',
200 ForwardedValues => {
201 Cookies => {
202 Forward => 'none', # values: none, whitelist, all
203 WhitelistedNames => {
204 Quantity => 1,
205 Items => [ 'Mystring', ... ], # OPTIONAL
206 }, # OPTIONAL
207 },
208 QueryString => 1, # OPTIONAL
209 Headers => {
210 Quantity => 1,
211 Items => [ 'Mystring', ... ], # OPTIONAL
212 }, # OPTIONAL
213 QueryStringCacheKeys => {
214 Quantity => 1,
215 Items => [ 'Mystring', ... ], # OPTIONAL
216 }, # OPTIONAL
217 }, # OPTIONAL
218 FunctionAssociations => {
219 Quantity => 1,
220 Items => [
221 {
222 EventType => 'viewer-request'
223 , # values: viewer-request, viewer-response, origin-request, origin-response
224 FunctionARN => 'MyFunctionARN', # max: 108
225  
226 },
227 ...
228 ], # OPTIONAL
229 }, # OPTIONAL
230 LambdaFunctionAssociations => {
231 Quantity => 1,
232 Items => [
233 {
234 EventType => 'viewer-request'
235 , # values: viewer-request, viewer-response, origin-request, origin-response
236 LambdaFunctionARN => 'MyLambdaFunctionARN',
237 IncludeBody => 1, # OPTIONAL
238 },
239 ...
240 ], # OPTIONAL
241 }, # OPTIONAL
242 MaxTTL => 1, # OPTIONAL
243 MinTTL => 1, # OPTIONAL
244 OriginRequestPolicyId => 'Mystring',
245 RealtimeLogConfigArn => 'Mystring',
246 SmoothStreaming => 1, # OPTIONAL
247 TrustedKeyGroups => {
248 Enabled => 1, # OPTIONAL
249 Quantity => 1,
250 Items => [ 'Mystring', ... ], # OPTIONAL
251 }, # OPTIONAL
252 TrustedSigners => {
253 Enabled => 1, # OPTIONAL
254 Quantity => 1,
255 Items => [ 'Mystring', ... ], # OPTIONAL
256 }, # OPTIONAL
257 },
258 ...
259 ], # OPTIONAL
260 }, # OPTIONAL
261 CustomErrorResponses => {
262 Quantity => 1,
263 Items => [
264 {
265 ErrorCode => 1,
266 ErrorCachingMinTTL => 1, # OPTIONAL
267 ResponseCode => 'Mystring',
268 ResponsePagePath => 'Mystring',
269 },
270 ...
271 ], # OPTIONAL
272 }, # OPTIONAL
273 DefaultRootObject => 'Mystring',
274 HttpVersion => 'http1.1', # values: http1.1, http2; OPTIONAL
275 IsIPV6Enabled => 1, # OPTIONAL
276 Logging => {
277 Bucket => 'Mystring',
278 Enabled => 1, # OPTIONAL
279 IncludeCookies => 1, # OPTIONAL
280 Prefix => 'Mystring',
281  
282 }, # OPTIONAL
283 OriginGroups => {
284 Quantity => 1,
285 Items => [
286 {
287 FailoverCriteria => {
288 StatusCodes => {
289 Items => [ 1, ... ], # min: 1
290 Quantity => 1,
291  
292 },
293  
294 },
295 Id => 'Mystring',
296 Members => {
297 Items => [
298 {
299 OriginId => 'Mystring',
300  
301 },
302 ...
303 ], # min: 2, max: 2
304 Quantity => 1,
305  
306 },
307  
308 },
309 ...
310 ], # OPTIONAL
311 }, # OPTIONAL
312 PriceClass => 'PriceClass_100'
313 , # values: PriceClass_100, PriceClass_200, PriceClass_All; OPTIONAL
314 Restrictions => {
315 GeoRestriction => {
316 Quantity => 1,
317 RestrictionType => 'blacklist', # values: blacklist, whitelist, none
318 Items => [ 'Mystring', ... ], # OPTIONAL
319 },
320  
321 }, # OPTIONAL
322 ViewerCertificate => {
323 ACMCertificateArn => 'Mystring',
324 Certificate => 'Mystring',
325 CertificateSource =>
326 'cloudfront', # values: cloudfront, iam, acm; OPTIONAL
327 CloudFrontDefaultCertificate => 1, # OPTIONAL
328 IAMCertificateId => 'Mystring',
329 MinimumProtocolVersion => 'SSLv3'
330 , # values: SSLv3, TLSv1, TLSv1_2016, TLSv1.1_2016, TLSv1.2_2018, TLSv1.2_2019, TLSv1.2_2021; OPTIONAL
331 SSLSupportMethod =>
332 'sni-only', # values: sni-only, vip, static-ip; OPTIONAL
333 }, # OPTIONAL
334 WebACLId => 'Mystring',
335 },
336  
337 );
338  
339 # Results:
340 my $Distribution = $CreateDistributionResult->Distribution;
341 my $ETag = $CreateDistributionResult->ETag;
342 my $Location = $CreateDistributionResult->Location;
343  
344 # Returns a L<Paws::CloudFront::CreateDistributionResult> object.
345  
346 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.
347 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/cloudfront/CreateDistribution>
348  
349 =head1 ATTRIBUTES
350  
351  
352 =head2 B<REQUIRED> DistributionConfig => L<Paws::CloudFront::DistributionConfig>
353  
354 The distribution's configuration information.
355  
356  
357  
358  
359 =head1 SEE ALSO
360  
361 This class forms part of L<Paws>, documenting arguments for method CreateDistribution2020_05_31 in L<Paws::CloudFront>
362  
363 =head1 BUGS and CONTRIBUTIONS
364  
365 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
366  
367 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
368  
369 =cut
370