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

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