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

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Lightsail::CreateDistribution;
3 use Moose;
4 has BundleId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'bundleId' , required => 1);
5 has CacheBehaviors => (is => 'ro', isa => 'ArrayRef[Paws::Lightsail::CacheBehaviorPerPath]', traits => ['NameInRequest'], request_name => 'cacheBehaviors' );
6 has CacheBehaviorSettings => (is => 'ro', isa => 'Paws::Lightsail::CacheSettings', traits => ['NameInRequest'], request_name => 'cacheBehaviorSettings' );
7 has DefaultCacheBehavior => (is => 'ro', isa => 'Paws::Lightsail::CacheBehavior', traits => ['NameInRequest'], request_name => 'defaultCacheBehavior' , required => 1);
8 has DistributionName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'distributionName' , required => 1);
9 has IpAddressType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'ipAddressType' );
10 has Origin => (is => 'ro', isa => 'Paws::Lightsail::InputOrigin', traits => ['NameInRequest'], request_name => 'origin' , required => 1);
11 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::Lightsail::Tag]', traits => ['NameInRequest'], request_name => 'tags' );
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateDistribution');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lightsail::CreateDistributionResult');
17 class_has _result_key => (isa => 'Str', is => 'ro');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::Lightsail::CreateDistribution - Arguments for method CreateDistribution on L<Paws::Lightsail>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method CreateDistribution on the
29 L<Amazon Lightsail|Paws::Lightsail> service. Use the attributes of this class
30 as arguments to method CreateDistribution.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateDistribution.
33  
34 =head1 SYNOPSIS
35  
36 my $lightsail = Paws->service('Lightsail');
37 my $CreateDistributionResult = $lightsail->CreateDistribution(
38 BundleId => 'Mystring',
39 DefaultCacheBehavior => {
40 Behavior => 'dont-cache', # values: dont-cache, cache; OPTIONAL
41 },
42 DistributionName => 'MyResourceName',
43 Origin => {
44 Name => 'MyResourceName',
45 ProtocolPolicy => 'http-only', # values: http-only, https-only; OPTIONAL
46 RegionName => 'us-east-1'
47 , # values: us-east-1, us-east-2, us-west-1, us-west-2, eu-west-1, eu-west-2, eu-west-3, eu-central-1, ca-central-1, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, ap-northeast-2; OPTIONAL
48 },
49 CacheBehaviorSettings => {
50 AllowedHTTPMethods => 'MyNonEmptyString', # OPTIONAL
51 CachedHTTPMethods => 'MyNonEmptyString', # OPTIONAL
52 DefaultTTL => 1, # OPTIONAL
53 ForwardedCookies => {
54 CookiesAllowList => [ 'Mystring', ... ], # OPTIONAL
55 Option => 'none', # values: none, allow-list, all; OPTIONAL
56 }, # OPTIONAL
57 ForwardedHeaders => {
58 HeadersAllowList => [
59 'Accept',
60 ... # values: Accept, Accept-Charset, Accept-Datetime, Accept-Encoding, Accept-Language, Authorization, CloudFront-Forwarded-Proto, CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer, CloudFront-Is-SmartTV-Viewer, CloudFront-Is-Tablet-Viewer, CloudFront-Viewer-Country, Host, Origin, Referer
61 ], # OPTIONAL
62 Option => 'none', # values: none, allow-list, all; OPTIONAL
63 }, # OPTIONAL
64 ForwardedQueryStrings => {
65 Option => 1, # OPTIONAL
66 QueryStringsAllowList => [ 'Mystring', ... ], # OPTIONAL
67 }, # OPTIONAL
68 MaximumTTL => 1, # OPTIONAL
69 MinimumTTL => 1, # OPTIONAL
70 }, # OPTIONAL
71 CacheBehaviors => [
72 {
73 Behavior => 'dont-cache', # values: dont-cache, cache; OPTIONAL
74 Path => 'Mystring',
75 },
76 ...
77 ], # OPTIONAL
78 IpAddressType => 'dualstack', # OPTIONAL
79 Tags => [
80 {
81 Key => 'MyTagKey', # OPTIONAL
82 Value => 'MyTagValue', # OPTIONAL
83 },
84 ...
85 ], # OPTIONAL
86 );
87  
88 # Results:
89 my $Distribution = $CreateDistributionResult->Distribution;
90 my $Operation = $CreateDistributionResult->Operation;
91  
92 # Returns a L<Paws::Lightsail::CreateDistributionResult> object.
93  
94 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.
95 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/lightsail/CreateDistribution>
96  
97 =head1 ATTRIBUTES
98  
99  
100 =head2 B<REQUIRED> BundleId => Str
101  
102 The bundle ID to use for the distribution.
103  
104 A distribution bundle describes the specifications of your
105 distribution, such as the monthly cost and monthly network transfer
106 quota.
107  
108 Use the C<GetDistributionBundles> action to get a list of distribution
109 bundle IDs that you can specify.
110  
111  
112  
113 =head2 CacheBehaviors => ArrayRef[L<Paws::Lightsail::CacheBehaviorPerPath>]
114  
115 An array of objects that describe the per-path cache behavior for the
116 distribution.
117  
118  
119  
120 =head2 CacheBehaviorSettings => L<Paws::Lightsail::CacheSettings>
121  
122 An object that describes the cache behavior settings for the
123 distribution.
124  
125  
126  
127 =head2 B<REQUIRED> DefaultCacheBehavior => L<Paws::Lightsail::CacheBehavior>
128  
129 An object that describes the default cache behavior for the
130 distribution.
131  
132  
133  
134 =head2 B<REQUIRED> DistributionName => Str
135  
136 The name for the distribution.
137  
138  
139  
140 =head2 IpAddressType => Str
141  
142 The IP address type for the distribution.
143  
144 The possible values are C<ipv4> for IPv4 only, and C<dualstack> for
145 IPv4 and IPv6.
146  
147 The default value is C<dualstack>.
148  
149 Valid values are: C<"dualstack">, C<"ipv4">
150  
151 =head2 B<REQUIRED> Origin => L<Paws::Lightsail::InputOrigin>
152  
153 An object that describes the origin resource for the distribution, such
154 as a Lightsail instance or load balancer.
155  
156 The distribution pulls, caches, and serves content from the origin.
157  
158  
159  
160 =head2 Tags => ArrayRef[L<Paws::Lightsail::Tag>]
161  
162 The tag keys and optional values to add to the distribution during
163 create.
164  
165 Use the C<TagResource> action to tag a resource after it's created.
166  
167  
168  
169  
170 =head1 SEE ALSO
171  
172 This class forms part of L<Paws>, documenting arguments for method CreateDistribution in L<Paws::Lightsail>
173  
174 =head1 BUGS and CONTRIBUTIONS
175  
176 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
177  
178 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
179  
180 =cut
181