blib/lib/Paws/S3/PutObjectAcl.pm untested

filter: Statementstmt 0.0% 0 / 39 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 41 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::S3::PutObjectAcl;
3 use Moose;
4 has AccessControlPolicy => (is => 'ro', isa => 'Paws::S3::AccessControlPolicy', traits => ['ParamInBody']);
5 has ACL => (is => 'ro', isa => 'Str', header_name => 'x-amz-acl', traits => ['ParamInHeader']);
6 has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1);
7 has ContentLength => (is => 'ro', isa => 'Int', header_name => 'Content-Length', traits => ['ParamInHeader']);
8 has ContentMD5 => (is => 'ro', isa => 'Str', header_name => 'Content-MD5', auto => 'MD5', traits => ['AutoInHeader']);
9 has ExpectedBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-expected-bucket-owner', traits => ['ParamInHeader']);
10 has GrantFullControl => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-full-control', traits => ['ParamInHeader']);
11 has GrantRead => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-read', traits => ['ParamInHeader']);
12 has GrantReadACP => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-read-acp', traits => ['ParamInHeader']);
13 has GrantWrite => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-write', traits => ['ParamInHeader']);
14 has GrantWriteACP => (is => 'ro', isa => 'Str', header_name => 'x-amz-grant-write-acp', traits => ['ParamInHeader']);
15 has Key => (is => 'ro', isa => 'Str', uri_name => 'Key', traits => ['ParamInURI'], required => 1);
16 has RequestPayer => (is => 'ro', isa => 'Str', header_name => 'x-amz-request-payer', traits => ['ParamInHeader']);
17 has VersionId => (is => 'ro', isa => 'Str', query_name => 'versionId', traits => ['ParamInQuery']);
18  
19  
20 use MooseX::ClassAttribute;
21  
22 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutObjectAcl');
23 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}/{Key+}?acl');
24 class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT');
25 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::PutObjectAclOutput');
26 class_has _result_key => (isa => 'Str', is => 'ro');
27
28
29 1;
30  
31 ### main pod documentation begin ###
32  
33 =head1 NAME
34  
35 Paws::S3::PutObjectAcl - Arguments for method PutObjectAcl on L<Paws::S3>
36  
37 =head1 DESCRIPTION
38  
39 This class represents the parameters used for calling the method PutObjectAcl on the
40 L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class
41 as arguments to method PutObjectAcl.
42  
43 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutObjectAcl.
44  
45 =head1 SYNOPSIS
46  
47 my $s3 = Paws->service('S3');
48 # To grant permissions using object ACL
49 # The following example adds grants to an object ACL. The first permission
50 # grants user1 and user2 FULL_CONTROL and the AllUsers group READ permission.
51 my $PutObjectAclOutput = $s3->PutObjectAcl(
52 'AccessControlPolicy' => {
53  
54 },
55 'Bucket' => 'examplebucket',
56 'GrantFullControl' =>
57 'emailaddress=user1@example.com,emailaddress=user2@example.com',
58 'GrantRead' => 'uri=http://acs.amazonaws.com/groups/global/AllUsers',
59 'Key' => 'HappyFace.jpg'
60 );
61  
62  
63 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.
64 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/PutObjectAcl>
65  
66 =head1 ATTRIBUTES
67  
68  
69 =head2 AccessControlPolicy => L<Paws::S3::AccessControlPolicy>
70  
71 Contains the elements that set the ACL permissions for an object per
72 grantee.
73  
74  
75  
76 =head2 ACL => Str
77  
78 The canned ACL to apply to the object. For more information, see Canned
79 ACL
80 (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
81  
82 Valid values are: C<"private">, C<"public-read">, C<"public-read-write">, C<"authenticated-read">, C<"aws-exec-read">, C<"bucket-owner-read">, C<"bucket-owner-full-control">
83  
84 =head2 B<REQUIRED> Bucket => Str
85  
86 The bucket name that contains the object to which you want to attach
87 the ACL.
88  
89 When using this action with an access point, you must direct requests
90 to the access point hostname. The access point hostname takes the form
91 I<AccessPointName>-I<AccountId>.s3-accesspoint.I<Region>.amazonaws.com.
92 When using this action with an access point through the AWS SDKs, you
93 provide the access point ARN in place of the bucket name. For more
94 information about access point ARNs, see Using access points
95 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
96 in the I<Amazon S3 User Guide>.
97  
98  
99  
100 =head2 ContentLength => Int
101  
102 Size of the body in bytes.
103  
104  
105  
106 =head2 ContentMD5 => Str
107  
108 The base64-encoded 128-bit MD5 digest of the data. This header must be
109 used as a message integrity check to verify that the request body was
110 not corrupted in transit. For more information, go to RFC 1864.E<gt>
111 (http://www.ietf.org/rfc/rfc1864.txt)
112  
113 For requests made using the AWS Command Line Interface (CLI) or AWS
114 SDKs, this field is calculated automatically.
115  
116  
117  
118 =head2 ExpectedBucketOwner => Str
119  
120 The account ID of the expected bucket owner. If the bucket is owned by
121 a different account, the request will fail with an HTTP C<403 (Access
122 Denied)> error.
123  
124  
125  
126 =head2 GrantFullControl => Str
127  
128 Allows grantee the read, write, read ACP, and write ACP permissions on
129 the bucket.
130  
131 This action is not supported by Amazon S3 on Outposts.
132  
133  
134  
135 =head2 GrantRead => Str
136  
137 Allows grantee to list the objects in the bucket.
138  
139 This action is not supported by Amazon S3 on Outposts.
140  
141  
142  
143 =head2 GrantReadACP => Str
144  
145 Allows grantee to read the bucket ACL.
146  
147 This action is not supported by Amazon S3 on Outposts.
148  
149  
150  
151 =head2 GrantWrite => Str
152  
153 Allows grantee to create new objects in the bucket.
154  
155 For the bucket and object owners of existing objects, also allows
156 deletions and overwrites of those objects.
157  
158  
159  
160 =head2 GrantWriteACP => Str
161  
162 Allows grantee to write the ACL for the applicable bucket.
163  
164 This action is not supported by Amazon S3 on Outposts.
165  
166  
167  
168 =head2 B<REQUIRED> Key => Str
169  
170 Key for which the PUT action was initiated.
171  
172 When using this action with an access point, you must direct requests
173 to the access point hostname. The access point hostname takes the form
174 I<AccessPointName>-I<AccountId>.s3-accesspoint.I<Region>.amazonaws.com.
175 When using this action with an access point through the AWS SDKs, you
176 provide the access point ARN in place of the bucket name. For more
177 information about access point ARNs, see Using access points
178 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
179 in the I<Amazon S3 User Guide>.
180  
181 When using this action with Amazon S3 on Outposts, you must direct
182 requests to the S3 on Outposts hostname. The S3 on Outposts hostname
183 takes the form
184 I<AccessPointName>-I<AccountId>.I<outpostID>.s3-outposts.I<Region>.amazonaws.com.
185 When using this action using S3 on Outposts through the AWS SDKs, you
186 provide the Outposts bucket ARN in place of the bucket name. For more
187 information about S3 on Outposts ARNs, see Using S3 on Outposts
188 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
189 in the I<Amazon S3 User Guide>.
190  
191  
192  
193 =head2 RequestPayer => Str
194  
195  
196  
197 Valid values are: C<"requester">
198  
199 =head2 VersionId => Str
200  
201 VersionId used to reference a specific version of the object.
202  
203  
204  
205  
206 =head1 SEE ALSO
207  
208 This class forms part of L<Paws>, documenting arguments for method PutObjectAcl in L<Paws::S3>
209  
210 =head1 BUGS and CONTRIBUTIONS
211  
212 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
213  
214 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
215  
216 =cut
217