| 1 | |||
| 2 | package Paws::S3::UploadPartCopy; | ||
| 3 | use Moose; | ||
| 4 | has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1); | ||
| 5 | has CopySource => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source', traits => ['ParamInHeader'], required => 1); | ||
| 6 | has CopySourceIfMatch => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source-if-match', traits => ['ParamInHeader']); | ||
| 7 | has CopySourceIfModifiedSince => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source-if-modified-since', traits => ['ParamInHeader']); | ||
| 8 | has CopySourceIfNoneMatch => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source-if-none-match', traits => ['ParamInHeader']); | ||
| 9 | has CopySourceIfUnmodifiedSince => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source-if-unmodified-since', traits => ['ParamInHeader']); | ||
| 10 | has CopySourceRange => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source-range', traits => ['ParamInHeader']); | ||
| 11 | has CopySourceSSECustomerAlgorithm => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source-server-side-encryption-customer-algorithm', traits => ['ParamInHeader']); | ||
| 12 | has CopySourceSSECustomerKey => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source-server-side-encryption-customer-key', traits => ['ParamInHeader']); | ||
| 13 | has CopySourceSSECustomerKeyMD5 => (is => 'ro', isa => 'Str', header_name => 'x-amz-copy-source-server-side-encryption-customer-key-MD5', traits => ['ParamInHeader']); | ||
| 14 | has ExpectedBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-expected-bucket-owner', traits => ['ParamInHeader']); | ||
| 15 | has ExpectedSourceBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-source-expected-bucket-owner', traits => ['ParamInHeader']); | ||
| 16 | has Key => (is => 'ro', isa => 'Str', uri_name => 'Key', traits => ['ParamInURI'], required => 1); | ||
| 17 | has PartNumber => (is => 'ro', isa => 'Int', query_name => 'partNumber', traits => ['ParamInQuery'], required => 1); | ||
| 18 | has RequestPayer => (is => 'ro', isa => 'Str', header_name => 'x-amz-request-payer', traits => ['ParamInHeader']); | ||
| 19 | has SSECustomerAlgorithm => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-algorithm', traits => ['ParamInHeader']); | ||
| 20 | has SSECustomerKey => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-key', traits => ['ParamInHeader']); | ||
| 21 | has SSECustomerKeyMD5 => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-key-MD5', traits => ['ParamInHeader']); | ||
| 22 | has UploadId => (is => 'ro', isa => 'Str', query_name => 'uploadId', traits => ['ParamInQuery'], required => 1); | ||
| 23 | |||
| 24 | |||
| 25 | use MooseX::ClassAttribute; | ||
| 26 | |||
| 27 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'UploadPartCopy'); | ||
| 28 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}/{Key+}'); | ||
| 29 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); | ||
| 30 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::UploadPartCopyOutput'); | ||
| 31 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 32 | |||
| 33 | |||
| 34 | 1; | ||
| 35 | |||
| 36 | ### main pod documentation begin ### | ||
| 37 | |||
| 38 | =head1 NAME | ||
| 39 | |||
| 40 | Paws::S3::UploadPartCopy - Arguments for method UploadPartCopy on L<Paws::S3> | ||
| 41 | |||
| 42 | =head1 DESCRIPTION | ||
| 43 | |||
| 44 | This class represents the parameters used for calling the method UploadPartCopy on the | ||
| 45 | L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class | ||
| 46 | as arguments to method UploadPartCopy. | ||
| 47 | |||
| 48 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to UploadPartCopy. | ||
| 49 | |||
| 50 | =head1 SYNOPSIS | ||
| 51 | |||
| 52 | my $s3 = Paws->service('S3'); | ||
| 53 | # To upload a part by copying data from an existing object as data source | ||
| 54 | # The following example uploads a part of a multipart upload by copying data | ||
| 55 | # from an existing object as data source. | ||
| 56 | my $UploadPartCopyOutput = $s3->UploadPartCopy( | ||
| 57 | 'Bucket' => 'examplebucket', | ||
| 58 | 'CopySource' => '/bucketname/sourceobjectkey', | ||
| 59 | 'Key' => 'examplelargeobject', | ||
| 60 | 'PartNumber' => 1, | ||
| 61 | 'UploadId' => | ||
| 62 | 'exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--' | ||
| 63 | ); | ||
| 64 | |||
| 65 | # Results: | ||
| 66 | my $CopyPartResult = $UploadPartCopyOutput->CopyPartResult; | ||
| 67 | |||
| 68 | # Returns a L<Paws::S3::UploadPartCopyOutput> object. | ||
| 69 | # To upload a part by copying byte range from an existing object as data source | ||
| 70 | # The following example uploads a part of a multipart upload by copying a | ||
| 71 | # specified byte range from an existing object as data source. | ||
| 72 | my $UploadPartCopyOutput = $s3->UploadPartCopy( | ||
| 73 | 'Bucket' => 'examplebucket', | ||
| 74 | 'CopySource' => '/bucketname/sourceobjectkey', | ||
| 75 | 'CopySourceRange' => 'bytes=1-100000', | ||
| 76 | 'Key' => 'examplelargeobject', | ||
| 77 | 'PartNumber' => 2, | ||
| 78 | 'UploadId' => | ||
| 79 | 'exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--' | ||
| 80 | ); | ||
| 81 | |||
| 82 | # Results: | ||
| 83 | my $CopyPartResult = $UploadPartCopyOutput->CopyPartResult; | ||
| 84 | |||
| 85 | # Returns a L<Paws::S3::UploadPartCopyOutput> object. | ||
| 86 | |||
| 87 | 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. | ||
| 88 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/UploadPartCopy> | ||
| 89 | |||
| 90 | =head1 ATTRIBUTES | ||
| 91 | |||
| 92 | |||
| 93 | =head2 B<REQUIRED> Bucket => Str | ||
| 94 | |||
| 95 | The bucket name. | ||
| 96 | |||
| 97 | When using this action with an access point, you must direct requests | ||
| 98 | to the access point hostname. The access point hostname takes the form | ||
| 99 | I<AccessPointName>-I<AccountId>.s3-accesspoint.I<Region>.amazonaws.com. | ||
| 100 | When using this action with an access point through the AWS SDKs, you | ||
| 101 | provide the access point ARN in place of the bucket name. For more | ||
| 102 | information about access point ARNs, see Using access points | ||
| 103 | (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) | ||
| 104 | in the I<Amazon S3 User Guide>. | ||
| 105 | |||
| 106 | When using this action with Amazon S3 on Outposts, you must direct | ||
| 107 | requests to the S3 on Outposts hostname. The S3 on Outposts hostname | ||
| 108 | takes the form | ||
| 109 | I<AccessPointName>-I<AccountId>.I<outpostID>.s3-outposts.I<Region>.amazonaws.com. | ||
| 110 | When using this action using S3 on Outposts through the AWS SDKs, you | ||
| 111 | provide the Outposts bucket ARN in place of the bucket name. For more | ||
| 112 | information about S3 on Outposts ARNs, see Using S3 on Outposts | ||
| 113 | (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) | ||
| 114 | in the I<Amazon S3 User Guide>. | ||
| 115 | |||
| 116 | |||
| 117 | |||
| 118 | =head2 B<REQUIRED> CopySource => Str | ||
| 119 | |||
| 120 | Specifies the source object for the copy operation. You specify the | ||
| 121 | value in one of two formats, depending on whether you want to access | ||
| 122 | the source object through an access point | ||
| 123 | (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html): | ||
| 124 | |||
| 125 | =over | ||
| 126 | |||
| 127 | =item * | ||
| 128 | |||
| 129 | For objects not accessed through an access point, specify the name of | ||
| 130 | the source bucket and key of the source object, separated by a slash | ||
| 131 | (/). For example, to copy the object C<reports/january.pdf> from the | ||
| 132 | bucket C<awsexamplebucket>, use | ||
| 133 | C<awsexamplebucket/reports/january.pdf>. The value must be URL encoded. | ||
| 134 | |||
| 135 | =item * | ||
| 136 | |||
| 137 | For objects accessed through access points, specify the Amazon Resource | ||
| 138 | Name (ARN) of the object as accessed through the access point, in the | ||
| 139 | format | ||
| 140 | C<arn:aws:s3:E<lt>RegionE<gt>:E<lt>account-idE<gt>:accesspoint/E<lt>access-point-nameE<gt>/object/E<lt>keyE<gt>>. | ||
| 141 | For example, to copy the object C<reports/january.pdf> through access | ||
| 142 | point C<my-access-point> owned by account C<123456789012> in Region | ||
| 143 | C<us-west-2>, use the URL encoding of | ||
| 144 | C<arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf>. | ||
| 145 | The value must be URL encoded. | ||
| 146 | |||
| 147 | Amazon S3 supports copy operations using access points only when the | ||
| 148 | source and destination buckets are in the same AWS Region. | ||
| 149 | |||
| 150 | Alternatively, for objects accessed through Amazon S3 on Outposts, | ||
| 151 | specify the ARN of the object as accessed in the format | ||
| 152 | C<arn:aws:s3-outposts:E<lt>RegionE<gt>:E<lt>account-idE<gt>:outpost/E<lt>outpost-idE<gt>/object/E<lt>keyE<gt>>. | ||
| 153 | For example, to copy the object C<reports/january.pdf> through outpost | ||
| 154 | C<my-outpost> owned by account C<123456789012> in Region C<us-west-2>, | ||
| 155 | use the URL encoding of | ||
| 156 | C<arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf>. | ||
| 157 | The value must be URL encoded. | ||
| 158 | |||
| 159 | =back | ||
| 160 | |||
| 161 | To copy a specific version of an object, append | ||
| 162 | C<?versionId=E<lt>version-idE<gt>> to the value (for example, | ||
| 163 | C<awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893>). | ||
| 164 | If you don't specify a version ID, Amazon S3 copies the latest version | ||
| 165 | of the source object. | ||
| 166 | |||
| 167 | |||
| 168 | |||
| 169 | =head2 CopySourceIfMatch => Str | ||
| 170 | |||
| 171 | Copies the object if its entity tag (ETag) matches the specified tag. | ||
| 172 | |||
| 173 | |||
| 174 | |||
| 175 | =head2 CopySourceIfModifiedSince => Str | ||
| 176 | |||
| 177 | Copies the object if it has been modified since the specified time. | ||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | =head2 CopySourceIfNoneMatch => Str | ||
| 182 | |||
| 183 | Copies the object if its entity tag (ETag) is different than the | ||
| 184 | specified ETag. | ||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | =head2 CopySourceIfUnmodifiedSince => Str | ||
| 189 | |||
| 190 | Copies the object if it hasn't been modified since the specified time. | ||
| 191 | |||
| 192 | |||
| 193 | |||
| 194 | =head2 CopySourceRange => Str | ||
| 195 | |||
| 196 | The range of bytes to copy from the source object. The range value must | ||
| 197 | use the form bytes=first-last, where the first and last are the | ||
| 198 | zero-based byte offsets to copy. For example, bytes=0-9 indicates that | ||
| 199 | you want to copy the first 10 bytes of the source. You can copy a range | ||
| 200 | only if the source object is greater than 5 MB. | ||
| 201 | |||
| 202 | |||
| 203 | |||
| 204 | =head2 CopySourceSSECustomerAlgorithm => Str | ||
| 205 | |||
| 206 | Specifies the algorithm to use when decrypting the source object (for | ||
| 207 | example, AES256). | ||
| 208 | |||
| 209 | |||
| 210 | |||
| 211 | =head2 CopySourceSSECustomerKey => Str | ||
| 212 | |||
| 213 | Specifies the customer-provided encryption key for Amazon S3 to use to | ||
| 214 | decrypt the source object. The encryption key provided in this header | ||
| 215 | must be one that was used when the source object was created. | ||
| 216 | |||
| 217 | |||
| 218 | |||
| 219 | =head2 CopySourceSSECustomerKeyMD5 => Str | ||
| 220 | |||
| 221 | Specifies the 128-bit MD5 digest of the encryption key according to RFC | ||
| 222 | 1321. Amazon S3 uses this header for a message integrity check to | ||
| 223 | ensure that the encryption key was transmitted without error. | ||
| 224 | |||
| 225 | |||
| 226 | |||
| 227 | =head2 ExpectedBucketOwner => Str | ||
| 228 | |||
| 229 | The account ID of the expected destination bucket owner. If the | ||
| 230 | destination bucket is owned by a different account, the request will | ||
| 231 | fail with an HTTP C<403 (Access Denied)> error. | ||
| 232 | |||
| 233 | |||
| 234 | |||
| 235 | =head2 ExpectedSourceBucketOwner => Str | ||
| 236 | |||
| 237 | The account ID of the expected source bucket owner. If the source | ||
| 238 | bucket is owned by a different account, the request will fail with an | ||
| 239 | HTTP C<403 (Access Denied)> error. | ||
| 240 | |||
| 241 | |||
| 242 | |||
| 243 | =head2 B<REQUIRED> Key => Str | ||
| 244 | |||
| 245 | Object key for which the multipart upload was initiated. | ||
| 246 | |||
| 247 | |||
| 248 | |||
| 249 | =head2 B<REQUIRED> PartNumber => Int | ||
| 250 | |||
| 251 | Part number of part being copied. This is a positive integer between 1 | ||
| 252 | and 10,000. | ||
| 253 | |||
| 254 | |||
| 255 | |||
| 256 | =head2 RequestPayer => Str | ||
| 257 | |||
| 258 | |||
| 259 | |||
| 260 | Valid values are: C<"requester"> | ||
| 261 | |||
| 262 | =head2 SSECustomerAlgorithm => Str | ||
| 263 | |||
| 264 | Specifies the algorithm to use to when encrypting the object (for | ||
| 265 | example, AES256). | ||
| 266 | |||
| 267 | |||
| 268 | |||
| 269 | =head2 SSECustomerKey => Str | ||
| 270 | |||
| 271 | Specifies the customer-provided encryption key for Amazon S3 to use in | ||
| 272 | encrypting data. This value is used to store the object and then it is | ||
| 273 | discarded; Amazon S3 does not store the encryption key. The key must be | ||
| 274 | appropriate for use with the algorithm specified in the | ||
| 275 | C<x-amz-server-side-encryption-customer-algorithm> header. This must be | ||
| 276 | the same encryption key specified in the initiate multipart upload | ||
| 277 | request. | ||
| 278 | |||
| 279 | |||
| 280 | |||
| 281 | =head2 SSECustomerKeyMD5 => Str | ||
| 282 | |||
| 283 | Specifies the 128-bit MD5 digest of the encryption key according to RFC | ||
| 284 | 1321. Amazon S3 uses this header for a message integrity check to | ||
| 285 | ensure that the encryption key was transmitted without error. | ||
| 286 | |||
| 287 | |||
| 288 | |||
| 289 | =head2 B<REQUIRED> UploadId => Str | ||
| 290 | |||
| 291 | Upload ID identifying the multipart upload whose part is being copied. | ||
| 292 | |||
| 293 | |||
| 294 | |||
| 295 | |||
| 296 | =head1 SEE ALSO | ||
| 297 | |||
| 298 | This class forms part of L<Paws>, documenting arguments for method UploadPartCopy in L<Paws::S3> | ||
| 299 | |||
| 300 | =head1 BUGS and CONTRIBUTIONS | ||
| 301 | |||
| 302 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 303 | |||
| 304 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 305 | |||
| 306 | =cut | ||
| 307 |