blib/lib/Paws/S3/PutBucketCors.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/S3/PutBucketAcl.pm ↑ Summary blib/lib/Paws/S3/PutBucketEncryption.pm »
1  
2 package Paws::S3::PutBucketCors;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1);
5 1 has ContentLength => (is => 'ro', isa => 'Int', header_name => 'Content-Length', traits => ['ParamInHeader']);
6 1 has ContentMD5 => (is => 'ro', isa => 'Str', header_name => 'Content-MD5', auto => 'MD5', traits => ['AutoInHeader']);
7 1 has CORSConfiguration => (is => 'ro', isa => 'Paws::S3::CORSConfiguration', traits => ['ParamInBody'], required => 1);
8 1 has ExpectedBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-expected-bucket-owner', traits => ['ParamInHeader']);
9  
10  
11 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutBucketCors');
14 1 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}?cors');
15 1 class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT');
16 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response');
17 1 class_has _result_key => (isa => 'Str', is => 'ro');
18
19
20 1 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::S3::PutBucketCors - Arguments for method PutBucketCors on L<Paws::S3>
27  
28 =head1 DESCRIPTION
29  
30 This class represents the parameters used for calling the method PutBucketCors on the
31 L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class
32 as arguments to method PutBucketCors.
33  
34 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutBucketCors.
35  
36 =head1 SYNOPSIS
37  
38 my $s3 = Paws->service('S3');
39 # To set cors configuration on a bucket.
40 # The following example enables PUT, POST, and DELETE requests from
41 # www.example.com, and enables GET requests from any domain.
42 $s3->PutBucketCors(
43 'Bucket' => '',
44 'CORSConfiguration' => {
45 'CORSRules' => [
46  
47 {
48 'AllowedHeaders' => ['*'],
49 'AllowedMethods' => [ 'PUT', 'POST', 'DELETE' ],
50 'AllowedOrigins' => ['http://www.example.com'],
51 'ExposeHeaders' => ['x-amz-server-side-encryption'],
52 'MaxAgeSeconds' => 3000
53 },
54  
55 {
56 'AllowedHeaders' => ['Authorization'],
57 'AllowedMethods' => ['GET'],
58 'AllowedOrigins' => ['*'],
59 'MaxAgeSeconds' => 3000
60 }
61 ]
62 },
63 'ContentMD5' => ''
64 );
65  
66  
67 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.
68 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/PutBucketCors>
69  
70 =head1 ATTRIBUTES
71  
72  
73 =head2 B<REQUIRED> Bucket => Str
74  
75 Specifies the bucket impacted by the C<cors>configuration.
76  
77  
78  
79 =head2 ContentLength => Int
80  
81 Size of the body in bytes.
82  
83  
84  
85 =head2 ContentMD5 => Str
86  
87 The base64-encoded 128-bit MD5 digest of the data. This header must be
88 used as a message integrity check to verify that the request body was
89 not corrupted in transit. For more information, go to RFC 1864.
90 (http://www.ietf.org/rfc/rfc1864.txt)
91  
92 For requests made using the AWS Command Line Interface (CLI) or AWS
93 SDKs, this field is calculated automatically.
94  
95  
96  
97 =head2 B<REQUIRED> CORSConfiguration => L<Paws::S3::CORSConfiguration>
98  
99 Describes the cross-origin access configuration for objects in an
100 Amazon S3 bucket. For more information, see Enabling Cross-Origin
101 Resource Sharing
102 (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the
103 I<Amazon S3 User Guide>.
104  
105  
106  
107 =head2 ExpectedBucketOwner => Str
108  
109 The account ID of the expected bucket owner. If the bucket is owned by
110 a different account, the request will fail with an HTTP C<403 (Access
111 Denied)> error.
112  
113  
114  
115  
116 =head1 SEE ALSO
117  
118 This class forms part of L<Paws>, documenting arguments for method PutBucketCors in L<Paws::S3>
119  
120 =head1 BUGS and CONTRIBUTIONS
121  
122 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
123  
124 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
125  
126 =cut
127  
« blib/lib/Paws/S3/PutBucketAcl.pm ↑ Summary blib/lib/Paws/S3/PutBucketEncryption.pm »