| 1 | |||
| 2 | package Paws::S3::UploadPart; | ||
| 3 | 3 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | has Body => (is => 'ro', isa => 'Str', traits => ['ParamInBody']); | |
| 5 | 3 | has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1); | |
| 6 | 3 | has ContentLength => (is => 'ro', isa => 'Int', header_name => 'Content-Length', traits => ['ParamInHeader']); | |
| 7 | 3 | has ContentMD5 => (is => 'ro', isa => 'Str', header_name => 'Content-MD5', auto => 'MD5', traits => ['AutoInHeader']); | |
| 8 | 3 | has ExpectedBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-expected-bucket-owner', traits => ['ParamInHeader']); | |
| 9 | 3 | has Key => (is => 'ro', isa => 'Str', uri_name => 'Key', traits => ['ParamInURI'], required => 1); | |
| 10 | 3 | has PartNumber => (is => 'ro', isa => 'Int', query_name => 'partNumber', traits => ['ParamInQuery'], required => 1); | |
| 11 | 3 | has RequestPayer => (is => 'ro', isa => 'Str', header_name => 'x-amz-request-payer', traits => ['ParamInHeader']); | |
| 12 | 3 | has SSECustomerAlgorithm => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-algorithm', traits => ['ParamInHeader']); | |
| 13 | 3 | has SSECustomerKey => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-key', traits => ['ParamInHeader']); | |
| 14 | 3 | has SSECustomerKeyMD5 => (is => 'ro', isa => 'Str', header_name => 'x-amz-server-side-encryption-customer-key-MD5', traits => ['ParamInHeader']); | |
| 15 | 3 | has UploadId => (is => 'ro', isa => 'Str', query_name => 'uploadId', traits => ['ParamInQuery'], required => 1); | |
| 16 | |||
| 17 | |||
| 18 | 3 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 3 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'UploadPart'); | |
| 21 | 3 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}/{Key+}'); | |
| 22 | 3 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); | |
| 23 | 3 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::UploadPartOutput'); | |
| 24 | 3 | class_has _result_key => (isa => 'Str', is => 'ro'); | |
| 25 | 3 | class_has _stream_param => (is => 'ro', default => 'Body'); | |
| 26 | |||
| 27 | 3 | 1; | |
| 28 | |||
| 29 | ### main pod documentation begin ### | ||
| 30 | |||
| 31 | =head1 NAME | ||
| 32 | |||
| 33 | Paws::S3::UploadPart - Arguments for method UploadPart on L<Paws::S3> | ||
| 34 | |||
| 35 | =head1 DESCRIPTION | ||
| 36 | |||
| 37 | This class represents the parameters used for calling the method UploadPart on the | ||
| 38 | L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class | ||
| 39 | as arguments to method UploadPart. | ||
| 40 | |||
| 41 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to UploadPart. | ||
| 42 | |||
| 43 | =head1 SYNOPSIS | ||
| 44 | |||
| 45 | my $s3 = Paws->service('S3'); | ||
| 46 | # To upload a part | ||
| 47 | # The following example uploads part 1 of a multipart upload. The example | ||
| 48 | # specifies a file name for the part data. The Upload ID is same that is | ||
| 49 | # returned by the initiate multipart upload. | ||
| 50 | my $UploadPartOutput = $s3->UploadPart( | ||
| 51 | 'Body' => 'fileToUpload', | ||
| 52 | 'Bucket' => 'examplebucket', | ||
| 53 | 'Key' => 'examplelargeobject', | ||
| 54 | 'PartNumber' => 1, | ||
| 55 | 'UploadId' => | ||
| 56 | 'xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--' | ||
| 57 | ); | ||
| 58 | |||
| 59 | # Results: | ||
| 60 | my $ETag = $UploadPartOutput->ETag; | ||
| 61 | |||
| 62 | # Returns a L<Paws::S3::UploadPartOutput> object. | ||
| 63 | |||
| 64 | 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. | ||
| 65 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/UploadPart> | ||
| 66 | |||
| 67 | =head1 ATTRIBUTES | ||
| 68 | |||
| 69 | |||
| 70 | =head2 Body => Str | ||
| 71 | |||
| 72 | Object data. | ||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | =head2 B<REQUIRED> Bucket => Str | ||
| 77 | |||
| 78 | The name of the bucket to which the multipart upload was initiated. | ||
| 79 | |||
| 80 | When using this action with an access point, you must direct requests | ||
| 81 | to the access point hostname. The access point hostname takes the form | ||
| 82 | I<AccessPointName>-I<AccountId>.s3-accesspoint.I<Region>.amazonaws.com. | ||
| 83 | When using this action with an access point through the AWS SDKs, you | ||
| 84 | provide the access point ARN in place of the bucket name. For more | ||
| 85 | information about access point ARNs, see Using access points | ||
| 86 | (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) | ||
| 87 | in the I<Amazon S3 User Guide>. | ||
| 88 | |||
| 89 | When using this action with Amazon S3 on Outposts, you must direct | ||
| 90 | requests to the S3 on Outposts hostname. The S3 on Outposts hostname | ||
| 91 | takes the form | ||
| 92 | I<AccessPointName>-I<AccountId>.I<outpostID>.s3-outposts.I<Region>.amazonaws.com. | ||
| 93 | When using this action using S3 on Outposts through the AWS SDKs, you | ||
| 94 | provide the Outposts bucket ARN in place of the bucket name. For more | ||
| 95 | information about S3 on Outposts ARNs, see Using S3 on Outposts | ||
| 96 | (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) | ||
| 97 | in the I<Amazon S3 User Guide>. | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | =head2 ContentLength => Int | ||
| 102 | |||
| 103 | Size of the body in bytes. This parameter is useful when the size of | ||
| 104 | the body cannot be determined automatically. | ||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | =head2 ContentMD5 => Str | ||
| 109 | |||
| 110 | The base64-encoded 128-bit MD5 digest of the part data. This parameter | ||
| 111 | is auto-populated when using the command from the CLI. This parameter | ||
| 112 | is required if object lock parameters are specified. | ||
| 113 | |||
| 114 | |||
| 115 | |||
| 116 | =head2 ExpectedBucketOwner => Str | ||
| 117 | |||
| 118 | The account ID of the expected bucket owner. If the bucket is owned by | ||
| 119 | a different account, the request will fail with an HTTP C<403 (Access | ||
| 120 | Denied)> error. | ||
| 121 | |||
| 122 | |||
| 123 | |||
| 124 | =head2 B<REQUIRED> Key => Str | ||
| 125 | |||
| 126 | Object key for which the multipart upload was initiated. | ||
| 127 | |||
| 128 | |||
| 129 | |||
| 130 | =head2 B<REQUIRED> PartNumber => Int | ||
| 131 | |||
| 132 | Part number of part being uploaded. This is a positive integer between | ||
| 133 | 1 and 10,000. | ||
| 134 | |||
| 135 | |||
| 136 | |||
| 137 | =head2 RequestPayer => Str | ||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | Valid values are: C<"requester"> | ||
| 142 | |||
| 143 | =head2 SSECustomerAlgorithm => Str | ||
| 144 | |||
| 145 | Specifies the algorithm to use to when encrypting the object (for | ||
| 146 | example, AES256). | ||
| 147 | |||
| 148 | |||
| 149 | |||
| 150 | =head2 SSECustomerKey => Str | ||
| 151 | |||
| 152 | Specifies the customer-provided encryption key for Amazon S3 to use in | ||
| 153 | encrypting data. This value is used to store the object and then it is | ||
| 154 | discarded; Amazon S3 does not store the encryption key. The key must be | ||
| 155 | appropriate for use with the algorithm specified in the | ||
| 156 | C<x-amz-server-side-encryption-customer-algorithm header>. This must be | ||
| 157 | the same encryption key specified in the initiate multipart upload | ||
| 158 | request. | ||
| 159 | |||
| 160 | |||
| 161 | |||
| 162 | =head2 SSECustomerKeyMD5 => Str | ||
| 163 | |||
| 164 | Specifies the 128-bit MD5 digest of the encryption key according to RFC | ||
| 165 | 1321. Amazon S3 uses this header for a message integrity check to | ||
| 166 | ensure that the encryption key was transmitted without error. | ||
| 167 | |||
| 168 | |||
| 169 | |||
| 170 | =head2 B<REQUIRED> UploadId => Str | ||
| 171 | |||
| 172 | Upload ID identifying the multipart upload whose part is being | ||
| 173 | uploaded. | ||
| 174 | |||
| 175 | |||
| 176 | |||
| 177 | |||
| 178 | =head1 SEE ALSO | ||
| 179 | |||
| 180 | This class forms part of L<Paws>, documenting arguments for method UploadPart in L<Paws::S3> | ||
| 181 | |||
| 182 | =head1 BUGS and CONTRIBUTIONS | ||
| 183 | |||
| 184 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 185 | |||
| 186 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 187 | |||
| 188 | =cut | ||
| 189 | |||