blib/lib/Paws/S3/GetObject.pm

filter: Statementstmt 100% 32 / 32 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 34 / 34 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/S3/GetBucketPolicyOutput.pm ↑ Summary blib/lib/Paws/S3/GetObjectOutput.pm »
1  
2 package Paws::S3::GetObject;
3 2 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1);
5 2 has ExpectedBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-expected-bucket-owner', traits => ['ParamInHeader']);
6 2 has IfMatch => (is => 'ro', isa => 'Str', header_name => 'If-Match', traits => ['ParamInHeader']);
7 2 has IfModifiedSince => (is => 'ro', isa => 'Str', header_name => 'If-Modified-Since', traits => ['ParamInHeader']);
8 2 has IfNoneMatch => (is => 'ro', isa => 'Str', header_name => 'If-None-Match', traits => ['ParamInHeader']);
9 2 has IfUnmodifiedSince => (is => 'ro', isa => 'Str', header_name => 'If-Unmodified-Since', traits => ['ParamInHeader']);
10 2 has Key => (is => 'ro', isa => 'Str', uri_name => 'Key', traits => ['ParamInURI'], required => 1);
11 2 has PartNumber => (is => 'ro', isa => 'Int', query_name => 'partNumber', traits => ['ParamInQuery']);
12 2 has Range => (is => 'ro', isa => 'Str', header_name => 'Range', traits => ['ParamInHeader']);
13 2 has RequestPayer => (is => 'ro', isa => 'Str', header_name => 'x-amz-request-payer', traits => ['ParamInHeader']);
14 2 has ResponseCacheControl => (is => 'ro', isa => 'Str', query_name => 'response-cache-control', traits => ['ParamInQuery']);
15 2 has ResponseContentDisposition => (is => 'ro', isa => 'Str', query_name => 'response-content-disposition', traits => ['ParamInQuery']);
16 2 has ResponseContentEncoding => (is => 'ro', isa => 'Str', query_name => 'response-content-encoding', traits => ['ParamInQuery']);
17 2 has ResponseContentLanguage => (is => 'ro', isa => 'Str', query_name => 'response-content-language', traits => ['ParamInQuery']);
18 2 has ResponseContentType => (is => 'ro', isa => 'Str', query_name => 'response-content-type', traits => ['ParamInQuery']);
19 2 has ResponseExpires => (is => 'ro', isa => 'Str', query_name => 'response-expires', traits => ['ParamInQuery']);
20 2 has SSECustomerAlgorithm => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-algorithm', traits => ['ParamInHeader']);
21 2 has SSECustomerKey => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-key', traits => ['ParamInHeader']);
22 2 has SSECustomerKeyMD5 => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-key-MD5', traits => ['ParamInHeader']);
23 2 has VersionId => (is => 'ro', isa => 'Str', query_name => 'versionId', traits => ['ParamInQuery']);
24  
25  
26 2 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 2 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetObject');
29 2 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}/{Key+}');
30 2 class_has _api_method => (isa => 'Str', is => 'ro', default => 'GET');
31 2 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::GetObjectOutput');
32 2 class_has _result_key => (isa => 'Str', is => 'ro');
33
34
35 2 1;
36  
37 ### main pod documentation begin ###
38  
39 =head1 NAME
40  
41 Paws::S3::GetObject - Arguments for method GetObject on L<Paws::S3>
42  
43 =head1 DESCRIPTION
44  
45 This class represents the parameters used for calling the method GetObject on the
46 L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class
47 as arguments to method GetObject.
48  
49 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetObject.
50  
51 =head1 SYNOPSIS
52  
53 my $s3 = Paws->service('S3');
54 # To retrieve an object
55 # The following example retrieves an object for an S3 bucket.
56 my $GetObjectOutput = $s3->GetObject(
57 'Bucket' => 'examplebucket',
58 'Key' => 'HappyFace.jpg'
59 );
60  
61 # Results:
62 my $AcceptRanges = $GetObjectOutput->AcceptRanges;
63 my $ContentLength = $GetObjectOutput->ContentLength;
64 my $ContentType = $GetObjectOutput->ContentType;
65 my $ETag = $GetObjectOutput->ETag;
66 my $LastModified = $GetObjectOutput->LastModified;
67 my $Metadata = $GetObjectOutput->Metadata;
68 my $TagCount = $GetObjectOutput->TagCount;
69 my $VersionId = $GetObjectOutput->VersionId;
70  
71 # Returns a L<Paws::S3::GetObjectOutput> object.
72 # To retrieve a byte range of an object
73 # The following example retrieves an object for an S3 bucket. The request
74 # specifies the range header to retrieve a specific byte range.
75 my $GetObjectOutput = $s3->GetObject(
76 'Bucket' => 'examplebucket',
77 'Key' => 'SampleFile.txt',
78 'Range' => 'bytes=0-9'
79 );
80  
81 # Results:
82 my $AcceptRanges = $GetObjectOutput->AcceptRanges;
83 my $ContentLength = $GetObjectOutput->ContentLength;
84 my $ContentRange = $GetObjectOutput->ContentRange;
85 my $ContentType = $GetObjectOutput->ContentType;
86 my $ETag = $GetObjectOutput->ETag;
87 my $LastModified = $GetObjectOutput->LastModified;
88 my $Metadata = $GetObjectOutput->Metadata;
89 my $VersionId = $GetObjectOutput->VersionId;
90  
91 # Returns a L<Paws::S3::GetObjectOutput> object.
92  
93 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.
94 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/GetObject>
95  
96 =head1 ATTRIBUTES
97  
98  
99 =head2 B<REQUIRED> Bucket => Str
100  
101 The bucket name containing the object.
102  
103 When using this action with an access point, you must direct requests
104 to the access point hostname. The access point hostname takes the form
105 I<AccessPointName>-I<AccountId>.s3-accesspoint.I<Region>.amazonaws.com.
106 When using this action with an access point through the AWS SDKs, you
107 provide the access point ARN in place of the bucket name. For more
108 information about access point ARNs, see Using access points
109 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
110 in the I<Amazon S3 User Guide>.
111  
112 When using this action with Amazon S3 on Outposts, you must direct
113 requests to the S3 on Outposts hostname. The S3 on Outposts hostname
114 takes the form
115 I<AccessPointName>-I<AccountId>.I<outpostID>.s3-outposts.I<Region>.amazonaws.com.
116 When using this action using S3 on Outposts through the AWS SDKs, you
117 provide the Outposts bucket ARN in place of the bucket name. For more
118 information about S3 on Outposts ARNs, see Using S3 on Outposts
119 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
120 in the I<Amazon S3 User Guide>.
121  
122  
123  
124 =head2 ExpectedBucketOwner => Str
125  
126 The account ID of the expected bucket owner. If the bucket is owned by
127 a different account, the request will fail with an HTTP C<403 (Access
128 Denied)> error.
129  
130  
131  
132 =head2 IfMatch => Str
133  
134 Return the object only if its entity tag (ETag) is the same as the one
135 specified, otherwise return a 412 (precondition failed).
136  
137  
138  
139 =head2 IfModifiedSince => Str
140  
141 Return the object only if it has been modified since the specified
142 time, otherwise return a 304 (not modified).
143  
144  
145  
146 =head2 IfNoneMatch => Str
147  
148 Return the object only if its entity tag (ETag) is different from the
149 one specified, otherwise return a 304 (not modified).
150  
151  
152  
153 =head2 IfUnmodifiedSince => Str
154  
155 Return the object only if it has not been modified since the specified
156 time, otherwise return a 412 (precondition failed).
157  
158  
159  
160 =head2 B<REQUIRED> Key => Str
161  
162 Key of the object to get.
163  
164  
165  
166 =head2 PartNumber => Int
167  
168 Part number of the object being read. This is a positive integer
169 between 1 and 10,000. Effectively performs a 'ranged' GET request for
170 the part specified. Useful for downloading just a part of an object.
171  
172  
173  
174 =head2 Range => Str
175  
176 Downloads the specified range bytes of an object. For more information
177 about the HTTP Range header, see
178 https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
179 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35).
180  
181 Amazon S3 doesn't support retrieving multiple ranges of data per C<GET>
182 request.
183  
184  
185  
186 =head2 RequestPayer => Str
187  
188  
189  
190 Valid values are: C<"requester">
191  
192 =head2 ResponseCacheControl => Str
193  
194 Sets the C<Cache-Control> header of the response.
195  
196  
197  
198 =head2 ResponseContentDisposition => Str
199  
200 Sets the C<Content-Disposition> header of the response
201  
202  
203  
204 =head2 ResponseContentEncoding => Str
205  
206 Sets the C<Content-Encoding> header of the response.
207  
208  
209  
210 =head2 ResponseContentLanguage => Str
211  
212 Sets the C<Content-Language> header of the response.
213  
214  
215  
216 =head2 ResponseContentType => Str
217  
218 Sets the C<Content-Type> header of the response.
219  
220  
221  
222 =head2 ResponseExpires => Str
223  
224 Sets the C<Expires> header of the response.
225  
226  
227  
228 =head2 SSECustomerAlgorithm => Str
229  
230 Specifies the algorithm to use to when decrypting the object (for
231 example, AES256).
232  
233  
234  
235 =head2 SSECustomerKey => Str
236  
237 Specifies the customer-provided encryption key for Amazon S3 used to
238 encrypt the data. This value is used to decrypt the object when
239 recovering it and must match the one used when storing the data. The
240 key must be appropriate for use with the algorithm specified in the
241 C<x-amz-server-side-encryption-customer-algorithm> header.
242  
243  
244  
245 =head2 SSECustomerKeyMD5 => Str
246  
247 Specifies the 128-bit MD5 digest of the encryption key according to RFC
248 1321. Amazon S3 uses this header for a message integrity check to
249 ensure that the encryption key was transmitted without error.
250  
251  
252  
253 =head2 VersionId => Str
254  
255 VersionId used to reference a specific version of the object.
256  
257  
258  
259  
260 =head1 SEE ALSO
261  
262 This class forms part of L<Paws>, documenting arguments for method GetObject in L<Paws::S3>
263  
264 =head1 BUGS and CONTRIBUTIONS
265  
266 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
267  
268 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
269  
270 =cut
271  
« blib/lib/Paws/S3/GetBucketPolicyOutput.pm ↑ Summary blib/lib/Paws/S3/GetObjectOutput.pm »