| 1 | |||
| 2 | package Paws::S3::DeleteObjects; | ||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1); | |
| 5 | 1 | has BypassGovernanceRetention => (is => 'ro', isa => 'Bool', header_name => 'x-amz-bypass-governance-retention', traits => ['ParamInHeader']); | |
| 6 | 1 | has ContentLength => (is => 'ro', isa => 'Int', header_name => 'Content-Length', traits => ['ParamInHeader']); | |
| 7 | 1 | has ContentMD5 => (is => 'ro', isa => 'Str', header_name => 'Content-MD5', auto => 'MD5', traits => ['AutoInHeader']); | |
| 8 | 1 | has Delete => (is => 'ro', isa => 'Paws::S3::Delete', traits => ['ParamInBody'], required => 1); | |
| 9 | 1 | has ExpectedBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-expected-bucket-owner', traits => ['ParamInHeader']); | |
| 10 | 1 | has MFA => (is => 'ro', isa => 'Str', header_name => 'x-amz-mfa', traits => ['ParamInHeader']); | |
| 11 | 1 | has RequestPayer => (is => 'ro', isa => 'Str', header_name => 'x-amz-request-payer', traits => ['ParamInHeader']); | |
| 12 | |||
| 13 | |||
| 14 | 1 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 1 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'DeleteObjects'); | |
| 17 | 1 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}?delete'); | |
| 18 | 1 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | |
| 19 | 1 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::DeleteObjectsOutput'); | |
| 20 | 1 | class_has _result_key => (isa => 'Str', is => 'ro'); | |
| 21 | |||
| 22 | |||
| 23 | 1 | 1; | |
| 24 | |||
| 25 | ### main pod documentation begin ### | ||
| 26 | |||
| 27 | =head1 NAME | ||
| 28 | |||
| 29 | Paws::S3::DeleteObjects - Arguments for method DeleteObjects on L<Paws::S3> | ||
| 30 | |||
| 31 | =head1 DESCRIPTION | ||
| 32 | |||
| 33 | This class represents the parameters used for calling the method DeleteObjects on the | ||
| 34 | L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class | ||
| 35 | as arguments to method DeleteObjects. | ||
| 36 | |||
| 37 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DeleteObjects. | ||
| 38 | |||
| 39 | =head1 SYNOPSIS | ||
| 40 | |||
| 41 | my $s3 = Paws->service('S3'); | ||
| 42 | # To delete multiple object versions from a versioned bucket | ||
| 43 | # The following example deletes objects from a bucket. The request specifies | ||
| 44 | # object versions. S3 deletes specific object versions and returns the key and | ||
| 45 | # versions of deleted objects in the response. | ||
| 46 | my $DeleteObjectsOutput = $s3->DeleteObjects( | ||
| 47 | 'Bucket' => 'examplebucket', | ||
| 48 | 'Delete' => { | ||
| 49 | 'Objects' => [ | ||
| 50 | |||
| 51 | { | ||
| 52 | 'Key' => 'HappyFace.jpg', | ||
| 53 | 'VersionId' => '2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b' | ||
| 54 | }, | ||
| 55 | |||
| 56 | { | ||
| 57 | 'Key' => 'HappyFace.jpg', | ||
| 58 | 'VersionId' => 'yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd' | ||
| 59 | } | ||
| 60 | ], | ||
| 61 | 'Quiet' => 0 | ||
| 62 | } | ||
| 63 | ); | ||
| 64 | |||
| 65 | # Results: | ||
| 66 | my $Deleted = $DeleteObjectsOutput->Deleted; | ||
| 67 | |||
| 68 | # Returns a L<Paws::S3::DeleteObjectsOutput> object. | ||
| 69 | # To delete multiple objects from a versioned bucket | ||
| 70 | # The following example deletes objects from a bucket. The bucket is versioned, | ||
| 71 | # and the request does not specify the object version to delete. In this case, | ||
| 72 | # all versions remain in the bucket and S3 adds a delete marker. | ||
| 73 | my $DeleteObjectsOutput = $s3->DeleteObjects( | ||
| 74 | 'Bucket' => 'examplebucket', | ||
| 75 | 'Delete' => { | ||
| 76 | 'Objects' => [ | ||
| 77 | |||
| 78 | { | ||
| 79 | 'Key' => 'objectkey1' | ||
| 80 | }, | ||
| 81 | |||
| 82 | { | ||
| 83 | 'Key' => 'objectkey2' | ||
| 84 | } | ||
| 85 | ], | ||
| 86 | 'Quiet' => 0 | ||
| 87 | } | ||
| 88 | ); | ||
| 89 | |||
| 90 | # Results: | ||
| 91 | my $Deleted = $DeleteObjectsOutput->Deleted; | ||
| 92 | |||
| 93 | # Returns a L<Paws::S3::DeleteObjectsOutput> object. | ||
| 94 | |||
| 95 | 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. | ||
| 96 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/DeleteObjects> | ||
| 97 | |||
| 98 | =head1 ATTRIBUTES | ||
| 99 | |||
| 100 | |||
| 101 | =head2 B<REQUIRED> Bucket => Str | ||
| 102 | |||
| 103 | The bucket name containing the objects to delete. | ||
| 104 | |||
| 105 | When using this action with an access point, you must direct requests | ||
| 106 | to the access point hostname. The access point hostname takes the form | ||
| 107 | I<AccessPointName>-I<AccountId>.s3-accesspoint.I<Region>.amazonaws.com. | ||
| 108 | When using this action with an access point through the AWS SDKs, you | ||
| 109 | provide the access point ARN in place of the bucket name. For more | ||
| 110 | information about access point ARNs, see Using access points | ||
| 111 | (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) | ||
| 112 | in the I<Amazon S3 User Guide>. | ||
| 113 | |||
| 114 | When using this action with Amazon S3 on Outposts, you must direct | ||
| 115 | requests to the S3 on Outposts hostname. The S3 on Outposts hostname | ||
| 116 | takes the form | ||
| 117 | I<AccessPointName>-I<AccountId>.I<outpostID>.s3-outposts.I<Region>.amazonaws.com. | ||
| 118 | When using this action using S3 on Outposts through the AWS SDKs, you | ||
| 119 | provide the Outposts bucket ARN in place of the bucket name. For more | ||
| 120 | information about S3 on Outposts ARNs, see Using S3 on Outposts | ||
| 121 | (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) | ||
| 122 | in the I<Amazon S3 User Guide>. | ||
| 123 | |||
| 124 | |||
| 125 | |||
| 126 | =head2 BypassGovernanceRetention => Bool | ||
| 127 | |||
| 128 | Specifies whether you want to delete this object even if it has a | ||
| 129 | Governance-type Object Lock in place. You must have sufficient | ||
| 130 | permissions to perform this operation. | ||
| 131 | |||
| 132 | |||
| 133 | |||
| 134 | =head2 ContentLength => Int | ||
| 135 | |||
| 136 | Size of the body in bytes. | ||
| 137 | |||
| 138 | |||
| 139 | |||
| 140 | =head2 ContentMD5 => Str | ||
| 141 | |||
| 142 | |||
| 143 | |||
| 144 | |||
| 145 | |||
| 146 | =head2 B<REQUIRED> Delete => L<Paws::S3::Delete> | ||
| 147 | |||
| 148 | Container for the request. | ||
| 149 | |||
| 150 | |||
| 151 | |||
| 152 | =head2 ExpectedBucketOwner => Str | ||
| 153 | |||
| 154 | The account ID of the expected bucket owner. If the bucket is owned by | ||
| 155 | a different account, the request will fail with an HTTP C<403 (Access | ||
| 156 | Denied)> error. | ||
| 157 | |||
| 158 | |||
| 159 | |||
| 160 | =head2 MFA => Str | ||
| 161 | |||
| 162 | The concatenation of the authentication device's serial number, a | ||
| 163 | space, and the value that is displayed on your authentication device. | ||
| 164 | Required to permanently delete a versioned object if versioning is | ||
| 165 | configured with MFA delete enabled. | ||
| 166 | |||
| 167 | |||
| 168 | |||
| 169 | =head2 RequestPayer => Str | ||
| 170 | |||
| 171 | |||
| 172 | |||
| 173 | Valid values are: C<"requester"> | ||
| 174 | |||
| 175 | |||
| 176 | =head1 SEE ALSO | ||
| 177 | |||
| 178 | This class forms part of L<Paws>, documenting arguments for method DeleteObjects in L<Paws::S3> | ||
| 179 | |||
| 180 | =head1 BUGS and CONTRIBUTIONS | ||
| 181 | |||
| 182 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 183 | |||
| 184 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 185 | |||
| 186 | =cut | ||
| 187 | |||