blib/lib/Paws/S3/HeadObject.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::HeadObject;
3 use Moose;
4 has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1);
5 has ExpectedBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-expected-bucket-owner', traits => ['ParamInHeader']);
6 has IfMatch => (is => 'ro', isa => 'Str', header_name => 'If-Match', traits => ['ParamInHeader']);
7 has IfModifiedSince => (is => 'ro', isa => 'Str', header_name => 'If-Modified-Since', traits => ['ParamInHeader']);
8 has IfNoneMatch => (is => 'ro', isa => 'Str', header_name => 'If-None-Match', traits => ['ParamInHeader']);
9 has IfUnmodifiedSince => (is => 'ro', isa => 'Str', header_name => 'If-Unmodified-Since', traits => ['ParamInHeader']);
10 has Key => (is => 'ro', isa => 'Str', uri_name => 'Key', traits => ['ParamInURI'], required => 1);
11 has PartNumber => (is => 'ro', isa => 'Int', query_name => 'partNumber', traits => ['ParamInQuery']);
12 has Range => (is => 'ro', isa => 'Str', header_name => 'Range', traits => ['ParamInHeader']);
13 has RequestPayer => (is => 'ro', isa => 'Str', header_name => 'x-amz-request-payer', traits => ['ParamInHeader']);
14 has SSECustomerAlgorithm => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-algorithm', traits => ['ParamInHeader']);
15 has SSECustomerKey => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-key', traits => ['ParamInHeader']);
16 has SSECustomerKeyMD5 => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-key-MD5', 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 => 'HeadObject');
23 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}/{Key+}');
24 class_has _api_method => (isa => 'Str', is => 'ro', default => 'HEAD');
25 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::HeadObjectOutput');
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::HeadObject - Arguments for method HeadObject on L<Paws::S3>
36  
37 =head1 DESCRIPTION
38  
39 This class represents the parameters used for calling the method HeadObject on the
40 L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class
41 as arguments to method HeadObject.
42  
43 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to HeadObject.
44  
45 =head1 SYNOPSIS
46  
47 my $s3 = Paws->service('S3');
48 # To retrieve metadata of an object without returning the object itself
49 # The following example retrieves an object metadata.
50 my $HeadObjectOutput = $s3->HeadObject(
51 'Bucket' => 'examplebucket',
52 'Key' => 'HappyFace.jpg'
53 );
54  
55 # Results:
56 my $AcceptRanges = $HeadObjectOutput->AcceptRanges;
57 my $ContentLength = $HeadObjectOutput->ContentLength;
58 my $ContentType = $HeadObjectOutput->ContentType;
59 my $ETag = $HeadObjectOutput->ETag;
60 my $LastModified = $HeadObjectOutput->LastModified;
61 my $Metadata = $HeadObjectOutput->Metadata;
62 my $VersionId = $HeadObjectOutput->VersionId;
63  
64 # Returns a L<Paws::S3::HeadObjectOutput> object.
65  
66 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.
67 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/HeadObject>
68  
69 =head1 ATTRIBUTES
70  
71  
72 =head2 B<REQUIRED> Bucket => Str
73  
74 The name of the bucket containing the object.
75  
76 When using this action with an access point, you must direct requests
77 to the access point hostname. The access point hostname takes the form
78 I<AccessPointName>-I<AccountId>.s3-accesspoint.I<Region>.amazonaws.com.
79 When using this action with an access point through the AWS SDKs, you
80 provide the access point ARN in place of the bucket name. For more
81 information about access point ARNs, see Using access points
82 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
83 in the I<Amazon S3 User Guide>.
84  
85 When using this action with Amazon S3 on Outposts, you must direct
86 requests to the S3 on Outposts hostname. The S3 on Outposts hostname
87 takes the form
88 I<AccessPointName>-I<AccountId>.I<outpostID>.s3-outposts.I<Region>.amazonaws.com.
89 When using this action using S3 on Outposts through the AWS SDKs, you
90 provide the Outposts bucket ARN in place of the bucket name. For more
91 information about S3 on Outposts ARNs, see Using S3 on Outposts
92 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
93 in the I<Amazon S3 User Guide>.
94  
95  
96  
97 =head2 ExpectedBucketOwner => Str
98  
99 The account ID of the expected bucket owner. If the bucket is owned by
100 a different account, the request will fail with an HTTP C<403 (Access
101 Denied)> error.
102  
103  
104  
105 =head2 IfMatch => Str
106  
107 Return the object only if its entity tag (ETag) is the same as the one
108 specified, otherwise return a 412 (precondition failed).
109  
110  
111  
112 =head2 IfModifiedSince => Str
113  
114 Return the object only if it has been modified since the specified
115 time, otherwise return a 304 (not modified).
116  
117  
118  
119 =head2 IfNoneMatch => Str
120  
121 Return the object only if its entity tag (ETag) is different from the
122 one specified, otherwise return a 304 (not modified).
123  
124  
125  
126 =head2 IfUnmodifiedSince => Str
127  
128 Return the object only if it has not been modified since the specified
129 time, otherwise return a 412 (precondition failed).
130  
131  
132  
133 =head2 B<REQUIRED> Key => Str
134  
135 The object key.
136  
137  
138  
139 =head2 PartNumber => Int
140  
141 Part number of the object being read. This is a positive integer
142 between 1 and 10,000. Effectively performs a 'ranged' HEAD request for
143 the part specified. Useful querying about the size of the part and the
144 number of parts in this object.
145  
146  
147  
148 =head2 Range => Str
149  
150 Downloads the specified range bytes of an object. For more information
151 about the HTTP Range header, see
152 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
153 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35).
154  
155 Amazon S3 doesn't support retrieving multiple ranges of data per C<GET>
156 request.
157  
158  
159  
160 =head2 RequestPayer => Str
161  
162  
163  
164 Valid values are: C<"requester">
165  
166 =head2 SSECustomerAlgorithm => Str
167  
168 Specifies the algorithm to use to when encrypting the object (for
169 example, AES256).
170  
171  
172  
173 =head2 SSECustomerKey => Str
174  
175 Specifies the customer-provided encryption key for Amazon S3 to use in
176 encrypting data. This value is used to store the object and then it is
177 discarded; Amazon S3 does not store the encryption key. The key must be
178 appropriate for use with the algorithm specified in the
179 C<x-amz-server-side-encryption-customer-algorithm> header.
180  
181  
182  
183 =head2 SSECustomerKeyMD5 => Str
184  
185 Specifies the 128-bit MD5 digest of the encryption key according to RFC
186 1321. Amazon S3 uses this header for a message integrity check to
187 ensure that the encryption key was transmitted without error.
188  
189  
190  
191 =head2 VersionId => Str
192  
193 VersionId used to reference a specific version of the object.
194  
195  
196  
197  
198 =head1 SEE ALSO
199  
200 This class forms part of L<Paws>, documenting arguments for method HeadObject in L<Paws::S3>
201  
202 =head1 BUGS and CONTRIBUTIONS
203  
204 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
205  
206 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
207  
208 =cut
209