blib/lib/Paws/EBS/PutSnapshotBlock.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::EBS::PutSnapshotBlock;
3 use Moose;
4 has BlockData => (is => 'ro', isa => 'Str', traits => ['ParamInBody'], required => 1);
5 has BlockIndex => (is => 'ro', isa => 'Int', traits => ['ParamInURI'], uri_name => 'blockIndex', required => 1);
6 has Checksum => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-Checksum', required => 1);
7 has ChecksumAlgorithm => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-Checksum-Algorithm', required => 1);
8 has DataLength => (is => 'ro', isa => 'Int', traits => ['ParamInHeader'], header_name => 'x-amz-Data-Length', required => 1);
9 has Progress => (is => 'ro', isa => 'Int', traits => ['ParamInHeader'], header_name => 'x-amz-Progress');
10 has SnapshotId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'snapshotId', required => 1);
11  
12 use MooseX::ClassAttribute;
13 class_has _stream_param => (is => 'ro', default => 'BlockData');
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutSnapshotBlock');
15 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/snapshots/{snapshotId}/blocks/{blockIndex}');
16 class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT');
17 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EBS::PutSnapshotBlockResponse');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::EBS::PutSnapshotBlock - Arguments for method PutSnapshotBlock on L<Paws::EBS>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method PutSnapshotBlock on the
29 L<Amazon Elastic Block Store|Paws::EBS> service. Use the attributes of this class
30 as arguments to method PutSnapshotBlock.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutSnapshotBlock.
33  
34 =head1 SYNOPSIS
35  
36 my $ebs = Paws->service('EBS');
37 my $PutSnapshotBlockResponse = $ebs->PutSnapshotBlock(
38 BlockData => 'BlobBlockData',
39 BlockIndex => 1,
40 Checksum => 'MyChecksum',
41 ChecksumAlgorithm => 'SHA256',
42 DataLength => 1,
43 SnapshotId => 'MySnapshotId',
44 Progress => 1, # OPTIONAL
45 );
46  
47 # Results:
48 my $Checksum = $PutSnapshotBlockResponse->Checksum;
49 my $ChecksumAlgorithm = $PutSnapshotBlockResponse->ChecksumAlgorithm;
50  
51 # Returns a L<Paws::EBS::PutSnapshotBlockResponse> 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/ebs/PutSnapshotBlock>
55  
56 =head1 ATTRIBUTES
57  
58  
59 =head2 B<REQUIRED> BlockData => Str
60  
61 The data to write to the block.
62  
63 The block data is not signed as part of the Signature Version 4 signing
64 process. As a result, you must generate and provide a Base64-encoded
65 SHA256 checksum for the block data using the B<x-amz-Checksum> header.
66 Also, you must specify the checksum algorithm using the
67 B<x-amz-Checksum-Algorithm> header. The checksum that you provide is
68 part of the Signature Version 4 signing process. It is validated
69 against a checksum generated by Amazon EBS to ensure the validity and
70 authenticity of the data. If the checksums do not correspond, the
71 request fails. For more information, see Using checksums with the EBS
72 direct APIs
73 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums)
74 in the I<Amazon Elastic Compute Cloud User Guide>.
75  
76  
77  
78 =head2 B<REQUIRED> BlockIndex => Int
79  
80 The block index of the block in which to write the data. A block index
81 is a logical index in units of C<512> KiB blocks. To identify the block
82 index, divide the logical offset of the data in the logical volume by
83 the block size (logical offset of data/C<524288>). The logical offset
84 of the data must be C<512> KiB aligned.
85  
86  
87  
88 =head2 B<REQUIRED> Checksum => Str
89  
90 A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are
91 supported.
92  
93  
94  
95 =head2 B<REQUIRED> ChecksumAlgorithm => Str
96  
97 The algorithm used to generate the checksum. Currently, the only
98 supported algorithm is C<SHA256>.
99  
100 Valid values are: C<"SHA256">
101  
102 =head2 B<REQUIRED> DataLength => Int
103  
104 The size of the data to write to the block, in bytes. Currently, the
105 only supported size is C<524288>.
106  
107 Valid values: C<524288>
108  
109  
110  
111 =head2 Progress => Int
112  
113 The progress of the write process, as a percentage.
114  
115  
116  
117 =head2 B<REQUIRED> SnapshotId => Str
118  
119 The ID of the snapshot.
120  
121  
122  
123  
124 =head1 SEE ALSO
125  
126 This class forms part of L<Paws>, documenting arguments for method PutSnapshotBlock in L<Paws::EBS>
127  
128 =head1 BUGS and CONTRIBUTIONS
129  
130 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
131  
132 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
133  
134 =cut
135