« blib/lib/Paws/EBS/PutSnapshotBlockResponse.pm
↑ Summary
blib/lib/Paws/EBS/StartSnapshotResponse.pm »
| 1 | |||
| 2 | package Paws::EBS::StartSnapshot; | ||
| 3 | use Moose; | ||
| 4 | has ClientToken => (is => 'ro', isa => 'Str'); | ||
| 5 | has Description => (is => 'ro', isa => 'Str'); | ||
| 6 | has Encrypted => (is => 'ro', isa => 'Bool'); | ||
| 7 | has KmsKeyArn => (is => 'ro', isa => 'Str'); | ||
| 8 | has ParentSnapshotId => (is => 'ro', isa => 'Str'); | ||
| 9 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::EBS::Tag]'); | ||
| 10 | has Timeout => (is => 'ro', isa => 'Int'); | ||
| 11 | has VolumeSize => (is => 'ro', isa => 'Int', required => 1); | ||
| 12 | |||
| 13 | use MooseX::ClassAttribute; | ||
| 14 | |||
| 15 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'StartSnapshot'); | ||
| 16 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/snapshots'); | ||
| 17 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 18 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EBS::StartSnapshotResponse'); | ||
| 19 | 1; | ||
| 20 | |||
| 21 | ### main pod documentation begin ### | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | Paws::EBS::StartSnapshot - Arguments for method StartSnapshot on L<Paws::EBS> | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | This class represents the parameters used for calling the method StartSnapshot on the | ||
| 30 | L<Amazon Elastic Block Store|Paws::EBS> service. Use the attributes of this class | ||
| 31 | as arguments to method StartSnapshot. | ||
| 32 | |||
| 33 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to StartSnapshot. | ||
| 34 | |||
| 35 | =head1 SYNOPSIS | ||
| 36 | |||
| 37 | my $ebs = Paws->service('EBS'); | ||
| 38 | my $StartSnapshotResponse = $ebs->StartSnapshot( | ||
| 39 | VolumeSize => 1, | ||
| 40 | ClientToken => 'MyIdempotencyToken', # OPTIONAL | ||
| 41 | Description => 'MyDescription', # OPTIONAL | ||
| 42 | Encrypted => 1, # OPTIONAL | ||
| 43 | KmsKeyArn => 'MyKmsKeyArn', # OPTIONAL | ||
| 44 | ParentSnapshotId => 'MySnapshotId', # OPTIONAL | ||
| 45 | Tags => [ | ||
| 46 | { | ||
| 47 | Key => 'MyTagKey', # max: 127; OPTIONAL | ||
| 48 | Value => 'MyTagValue', # max: 255; OPTIONAL | ||
| 49 | }, | ||
| 50 | ... | ||
| 51 | ], # OPTIONAL | ||
| 52 | Timeout => 1, # OPTIONAL | ||
| 53 | ); | ||
| 54 | |||
| 55 | # Results: | ||
| 56 | my $BlockSize = $StartSnapshotResponse->BlockSize; | ||
| 57 | my $Description = $StartSnapshotResponse->Description; | ||
| 58 | my $KmsKeyArn = $StartSnapshotResponse->KmsKeyArn; | ||
| 59 | my $OwnerId = $StartSnapshotResponse->OwnerId; | ||
| 60 | my $ParentSnapshotId = $StartSnapshotResponse->ParentSnapshotId; | ||
| 61 | my $SnapshotId = $StartSnapshotResponse->SnapshotId; | ||
| 62 | my $StartTime = $StartSnapshotResponse->StartTime; | ||
| 63 | my $Status = $StartSnapshotResponse->Status; | ||
| 64 | my $Tags = $StartSnapshotResponse->Tags; | ||
| 65 | my $VolumeSize = $StartSnapshotResponse->VolumeSize; | ||
| 66 | |||
| 67 | # Returns a L<Paws::EBS::StartSnapshotResponse> object. | ||
| 68 | |||
| 69 | 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. | ||
| 70 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ebs/StartSnapshot> | ||
| 71 | |||
| 72 | =head1 ATTRIBUTES | ||
| 73 | |||
| 74 | |||
| 75 | =head2 ClientToken => Str | ||
| 76 | |||
| 77 | A unique, case-sensitive identifier that you provide to ensure the | ||
| 78 | idempotency of the request. Idempotency ensures that an API request | ||
| 79 | completes only once. With an idempotent request, if the original | ||
| 80 | request completes successfully. The subsequent retries with the same | ||
| 81 | client token return the result from the original successful request and | ||
| 82 | they have no additional effect. | ||
| 83 | |||
| 84 | If you do not specify a client token, one is automatically generated by | ||
| 85 | the AWS SDK. | ||
| 86 | |||
| 87 | For more information, see Idempotency for StartSnapshot API | ||
| 88 | (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html) | ||
| 89 | in the I<Amazon Elastic Compute Cloud User Guide>. | ||
| 90 | |||
| 91 | |||
| 92 | |||
| 93 | =head2 Description => Str | ||
| 94 | |||
| 95 | A description for the snapshot. | ||
| 96 | |||
| 97 | |||
| 98 | |||
| 99 | =head2 Encrypted => Bool | ||
| 100 | |||
| 101 | Indicates whether to encrypt the snapshot. To create an encrypted | ||
| 102 | snapshot, specify C<true>. To create an unencrypted snapshot, omit this | ||
| 103 | parameter. | ||
| 104 | |||
| 105 | If you specify a value for B<ParentSnapshotId>, omit this parameter. | ||
| 106 | |||
| 107 | If you specify C<true>, the snapshot is encrypted using the CMK | ||
| 108 | specified using the B<KmsKeyArn> parameter. If no value is specified | ||
| 109 | for B<KmsKeyArn>, the default CMK for your account is used. If no | ||
| 110 | default CMK has been specified for your account, the AWS managed CMK is | ||
| 111 | used. To set a default CMK for your account, use | ||
| 112 | ModifyEbsDefaultKmsKeyId | ||
| 113 | (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyEbsDefaultKmsKeyId.html). | ||
| 114 | |||
| 115 | If your account is enabled for encryption by default, you cannot set | ||
| 116 | this parameter to C<false>. In this case, you can omit this parameter. | ||
| 117 | |||
| 118 | For more information, see Using encryption | ||
| 119 | (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-encryption) | ||
| 120 | in the I<Amazon Elastic Compute Cloud User Guide>. | ||
| 121 | |||
| 122 | |||
| 123 | |||
| 124 | =head2 KmsKeyArn => Str | ||
| 125 | |||
| 126 | The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS | ||
| 127 | KMS) customer master key (CMK) to be used to encrypt the snapshot. If | ||
| 128 | you do not specify a CMK, the default AWS managed CMK is used. | ||
| 129 | |||
| 130 | If you specify a B<ParentSnapshotId>, omit this parameter; the snapshot | ||
| 131 | will be encrypted using the same CMK that was used to encrypt the | ||
| 132 | parent snapshot. | ||
| 133 | |||
| 134 | If B<Encrypted> is set to C<true>, you must specify a CMK ARN. | ||
| 135 | |||
| 136 | |||
| 137 | |||
| 138 | =head2 ParentSnapshotId => Str | ||
| 139 | |||
| 140 | The ID of the parent snapshot. If there is no parent snapshot, or if | ||
| 141 | you are creating the first snapshot for an on-premises volume, omit | ||
| 142 | this parameter. | ||
| 143 | |||
| 144 | If your account is enabled for encryption by default, you cannot use an | ||
| 145 | unencrypted snapshot as a parent snapshot. You must first create an | ||
| 146 | encrypted copy of the parent snapshot using CopySnapshot | ||
| 147 | (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html). | ||
| 148 | |||
| 149 | |||
| 150 | |||
| 151 | =head2 Tags => ArrayRef[L<Paws::EBS::Tag>] | ||
| 152 | |||
| 153 | The tags to apply to the snapshot. | ||
| 154 | |||
| 155 | |||
| 156 | |||
| 157 | =head2 Timeout => Int | ||
| 158 | |||
| 159 | The amount of time (in minutes) after which the snapshot is | ||
| 160 | automatically cancelled if: | ||
| 161 | |||
| 162 | =over | ||
| 163 | |||
| 164 | =item * | ||
| 165 | |||
| 166 | No blocks are written to the snapshot. | ||
| 167 | |||
| 168 | =item * | ||
| 169 | |||
| 170 | The snapshot is not completed after writing the last block of data. | ||
| 171 | |||
| 172 | =back | ||
| 173 | |||
| 174 | If no value is specified, the timeout defaults to C<60> minutes. | ||
| 175 | |||
| 176 | |||
| 177 | |||
| 178 | =head2 B<REQUIRED> VolumeSize => Int | ||
| 179 | |||
| 180 | The size of the volume, in GiB. The maximum size is C<16384> GiB (16 | ||
| 181 | TiB). | ||
| 182 | |||
| 183 | |||
| 184 | |||
| 185 | |||
| 186 | =head1 SEE ALSO | ||
| 187 | |||
| 188 | This class forms part of L<Paws>, documenting arguments for method StartSnapshot in L<Paws::EBS> | ||
| 189 | |||
| 190 | =head1 BUGS and CONTRIBUTIONS | ||
| 191 | |||
| 192 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 193 | |||
| 194 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 195 | |||
| 196 | =cut | ||
| 197 |