blib/lib/Paws/S3/PutObjectLegalHold.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::S3::PutObjectLegalHold;
3 use Moose;
4 has Bucket => (is => 'ro', isa => 'Str', uri_name => 'Bucket', traits => ['ParamInURI'], required => 1);
5 has ContentMD5 => (is => 'ro', isa => 'Str', header_name => 'Content-MD5', auto => 'MD5', traits => ['AutoInHeader']);
6 has ExpectedBucketOwner => (is => 'ro', isa => 'Str', header_name => 'x-amz-expected-bucket-owner', traits => ['ParamInHeader']);
7 has Key => (is => 'ro', isa => 'Str', uri_name => 'Key', traits => ['ParamInURI'], required => 1);
8 has LegalHold => (is => 'ro', isa => 'Paws::S3::ObjectLockLegalHold', traits => ['ParamInBody']);
9 has RequestPayer => (is => 'ro', isa => 'Str', header_name => 'x-amz-request-payer', traits => ['ParamInHeader']);
10 has VersionId => (is => 'ro', isa => 'Str', query_name => 'versionId', traits => ['ParamInQuery']);
11  
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutObjectLegalHold');
16 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{Bucket}/{Key+}?legal-hold');
17 class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::S3::PutObjectLegalHoldOutput');
19 class_has _result_key => (isa => 'Str', is => 'ro');
20
21
22 1;
23  
24 ### main pod documentation begin ###
25  
26 =head1 NAME
27  
28 Paws::S3::PutObjectLegalHold - Arguments for method PutObjectLegalHold on L<Paws::S3>
29  
30 =head1 DESCRIPTION
31  
32 This class represents the parameters used for calling the method PutObjectLegalHold on the
33 L<Amazon Simple Storage Service|Paws::S3> service. Use the attributes of this class
34 as arguments to method PutObjectLegalHold.
35  
36 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutObjectLegalHold.
37  
38 =head1 SYNOPSIS
39  
40 my $s3 = Paws->service('S3');
41 my $PutObjectLegalHoldOutput = $s3->PutObjectLegalHold(
42 Bucket => 'MyBucketName',
43 Key => 'MyObjectKey',
44 ContentMD5 => 'MyContentMD5', # OPTIONAL
45 ExpectedBucketOwner => 'MyAccountId', # OPTIONAL
46 LegalHold => {
47 Status => 'ON', # values: ON, OFF; OPTIONAL
48 }, # OPTIONAL
49 RequestPayer => 'requester', # OPTIONAL
50 VersionId => 'MyObjectVersionId', # OPTIONAL
51 );
52  
53 # Results:
54 my $RequestCharged = $PutObjectLegalHoldOutput->RequestCharged;
55  
56 # Returns a L<Paws::S3::PutObjectLegalHoldOutput> object.
57  
58 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.
59 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/s3/PutObjectLegalHold>
60  
61 =head1 ATTRIBUTES
62  
63  
64 =head2 B<REQUIRED> Bucket => Str
65  
66 The bucket name containing the object that you want to place a Legal
67 Hold on.
68  
69 When using this action with an access point, you must direct requests
70 to the access point hostname. The access point hostname takes the form
71 I<AccessPointName>-I<AccountId>.s3-accesspoint.I<Region>.amazonaws.com.
72 When using this action with an access point through the AWS SDKs, you
73 provide the access point ARN in place of the bucket name. For more
74 information about access point ARNs, see Using access points
75 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
76 in the I<Amazon S3 User Guide>.
77  
78  
79  
80 =head2 ContentMD5 => Str
81  
82 The MD5 hash for the request body.
83  
84 For requests made using the AWS Command Line Interface (CLI) or AWS
85 SDKs, this field is calculated automatically.
86  
87  
88  
89 =head2 ExpectedBucketOwner => Str
90  
91 The account ID of the expected bucket owner. If the bucket is owned by
92 a different account, the request will fail with an HTTP C<403 (Access
93 Denied)> error.
94  
95  
96  
97 =head2 B<REQUIRED> Key => Str
98  
99 The key name for the object that you want to place a Legal Hold on.
100  
101  
102  
103 =head2 LegalHold => L<Paws::S3::ObjectLockLegalHold>
104  
105 Container element for the Legal Hold configuration you want to apply to
106 the specified object.
107  
108  
109  
110 =head2 RequestPayer => Str
111  
112  
113  
114 Valid values are: C<"requester">
115  
116 =head2 VersionId => Str
117  
118 The version ID of the object that you want to place a Legal Hold on.
119  
120  
121  
122  
123 =head1 SEE ALSO
124  
125 This class forms part of L<Paws>, documenting arguments for method PutObjectLegalHold in L<Paws::S3>
126  
127 =head1 BUGS and CONTRIBUTIONS
128  
129 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
130  
131 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
132  
133 =cut
134