blib/lib/Paws/Glacier/InitiateVaultLock.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/Glacier/InitiateMultipartUploadOutput.pm ↑ Summary blib/lib/Paws/Glacier/JobParameters.pm »
1  
2 package Paws::Glacier::InitiateVaultLock;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has AccountId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'accountId', required => 1);
5 1 has Policy => (is => 'ro', isa => 'Paws::Glacier::VaultLockPolicy', traits => ['NameInRequest'], request_name => 'policy');
6 1 has VaultName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'vaultName', required => 1);
7  
8 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 class_has _stream_param => (is => 'ro', default => 'Policy');
10 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'InitiateVaultLock');
11 1 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{accountId}/vaults/{vaultName}/lock-policy');
12 1 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
13 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Glacier::InitiateVaultLockOutput');
14 1 1;
15  
16 ### main pod documentation begin ###
17  
18 =head1 NAME
19  
20 Paws::Glacier::InitiateVaultLock - Arguments for method InitiateVaultLock on L<Paws::Glacier>
21  
22 =head1 DESCRIPTION
23  
24 This class represents the parameters used for calling the method InitiateVaultLock on the
25 L<Amazon Glacier|Paws::Glacier> service. Use the attributes of this class
26 as arguments to method InitiateVaultLock.
27  
28 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to InitiateVaultLock.
29  
30 =head1 SYNOPSIS
31  
32 my $glacier = Paws->service('Glacier');
33 # To initiate the vault locking process
34 # The example initiates the vault locking process for the vault named my-vault.
35 my $InitiateVaultLockOutput = $glacier->InitiateVaultLock(
36 'AccountId' => '-',
37 'Policy' => {
38 'Policy' =>
39 '{"Version":"2012-10-17","Statement":[{"Sid":"Define-vault-lock","Effect":"Deny","Principal":{"AWS":"arn:aws:iam::999999999999:root"},"Action":"glacier:DeleteArchive","Resource":"arn:aws:glacier:us-west-2:999999999999:vaults/examplevault","Condition":{"NumericLessThanEquals":{"glacier:ArchiveAgeinDays":"365"}}}]}'
40 },
41 'VaultName' => 'my-vault'
42 );
43  
44 # Results:
45 my $lockId = $InitiateVaultLockOutput->lockId;
46  
47 # Returns a L<Paws::Glacier::InitiateVaultLockOutput> object.
48  
49 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.
50 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/glacier/InitiateVaultLock>
51  
52 =head1 ATTRIBUTES
53  
54  
55 =head2 B<REQUIRED> AccountId => Str
56  
57 The C<AccountId> value is the AWS account ID. This value must match the
58 AWS account ID associated with the credentials used to sign the
59 request. You can either specify an AWS account ID or optionally a
60 single 'C<->' (hyphen), in which case Amazon Glacier uses the AWS
61 account ID associated with the credentials used to sign the request. If
62 you specify your account ID, do not include any hyphens ('-') in the
63 ID.
64  
65  
66  
67 =head2 Policy => L<Paws::Glacier::VaultLockPolicy>
68  
69 The vault lock policy as a JSON string, which uses "\" as an escape
70 character.
71  
72  
73  
74 =head2 B<REQUIRED> VaultName => Str
75  
76 The name of the vault.
77  
78  
79  
80  
81 =head1 SEE ALSO
82  
83 This class forms part of L<Paws>, documenting arguments for method InitiateVaultLock in L<Paws::Glacier>
84  
85 =head1 BUGS and CONTRIBUTIONS
86  
87 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
88  
89 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
90  
91 =cut
92  
« blib/lib/Paws/Glacier/InitiateMultipartUploadOutput.pm ↑ Summary blib/lib/Paws/Glacier/JobParameters.pm »