blib/lib/Paws/Glacier/GetJobOutput.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/GetDataRetrievalPolicy.pm ↑ Summary blib/lib/Paws/Glacier/GetVaultAccessPolicy.pm »
1  
2 package Paws::Glacier::GetJobOutput;
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 JobId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'jobId', required => 1);
6 1 has Range => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'Range');
7 1 has VaultName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'vaultName', required => 1);
8  
9 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetJobOutput');
12 1 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/{accountId}/vaults/{vaultName}/jobs/{jobId}/output');
13 1 class_has _api_method => (isa => 'Str', is => 'ro', default => 'GET');
14 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Glacier::GetJobOutputOutput');
15 1 1;
16  
17 ### main pod documentation begin ###
18  
19 =head1 NAME
20  
21 Paws::Glacier::GetJobOutput - Arguments for method GetJobOutput on L<Paws::Glacier>
22  
23 =head1 DESCRIPTION
24  
25 This class represents the parameters used for calling the method GetJobOutput on the
26 L<Amazon Glacier|Paws::Glacier> service. Use the attributes of this class
27 as arguments to method GetJobOutput.
28  
29 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetJobOutput.
30  
31 =head1 SYNOPSIS
32  
33 my $glacier = Paws->service('Glacier');
34 # To get the output of a previously initiated job
35 # The example downloads the output of a previously initiated inventory retrieval
36 # job that is identified by the job ID.
37 my $GetJobOutputOutput = $glacier->GetJobOutput(
38 'AccountId' => '-',
39 'JobId' =>
40 'zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW',
41 'Range' => '',
42 'VaultName' => 'my-vaul'
43 );
44  
45 # Results:
46 my $acceptRanges = $GetJobOutputOutput->acceptRanges;
47 my $body = $GetJobOutputOutput->body;
48 my $contentType = $GetJobOutputOutput->contentType;
49 my $status = $GetJobOutputOutput->status;
50  
51 # Returns a L<Paws::Glacier::GetJobOutputOutput> object.
52  
53 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.
54 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/glacier/GetJobOutput>
55  
56 =head1 ATTRIBUTES
57  
58  
59 =head2 B<REQUIRED> AccountId => Str
60  
61 The C<AccountId> value is the AWS account ID of the account that owns
62 the vault. You can either specify an AWS account ID or optionally a
63 single 'C<->' (hyphen), in which case Amazon S3 Glacier uses the AWS
64 account ID associated with the credentials used to sign the request. If
65 you use an account ID, do not include any hyphens ('-') in the ID.
66  
67  
68  
69 =head2 B<REQUIRED> JobId => Str
70  
71 The job ID whose data is downloaded.
72  
73  
74  
75 =head2 Range => Str
76  
77 The range of bytes to retrieve from the output. For example, if you
78 want to download the first 1,048,576 bytes, specify the range as
79 C<bytes=0-1048575>. By default, this operation downloads the entire
80 output.
81  
82 If the job output is large, then you can use a range to retrieve a
83 portion of the output. This allows you to download the entire output in
84 smaller chunks of bytes. For example, suppose you have 1 GB of job
85 output you want to download and you decide to download 128 MB chunks of
86 data at a time, which is a total of eight Get Job Output requests. You
87 use the following process to download the job output:
88  
89 =over
90  
91 =item 1.
92  
93 Download a 128 MB chunk of output by specifying the appropriate byte
94 range. Verify that all 128 MB of data was received.
95  
96 =item 2.
97  
98 Along with the data, the response includes a SHA256 tree hash of the
99 payload. You compute the checksum of the payload on the client and
100 compare it with the checksum you received in the response to ensure you
101 received all the expected data.
102  
103 =item 3.
104  
105 Repeat steps 1 and 2 for all the eight 128 MB chunks of output data,
106 each time specifying the appropriate byte range.
107  
108 =item 4.
109  
110 After downloading all the parts of the job output, you have a list of
111 eight checksum values. Compute the tree hash of these values to find
112 the checksum of the entire output. Using the DescribeJob API, obtain
113 job information of the job that provided you the output. The response
114 includes the checksum of the entire archive stored in Amazon S3
115 Glacier. You compare this value with the checksum you computed to
116 ensure you have downloaded the entire archive content with no errors.
117  
118 =back
119  
120  
121  
122  
123 =head2 B<REQUIRED> VaultName => Str
124  
125 The name of the vault.
126  
127  
128  
129  
130 =head1 SEE ALSO
131  
132 This class forms part of L<Paws>, documenting arguments for method GetJobOutput in L<Paws::Glacier>
133  
134 =head1 BUGS and CONTRIBUTIONS
135  
136 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
137  
138 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
139  
140 =cut
141  
« blib/lib/Paws/Glacier/GetDataRetrievalPolicy.pm ↑ Summary blib/lib/Paws/Glacier/GetVaultAccessPolicy.pm »