Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a new Amazon EBS snapshot. The new snapshot enters the pending
state after the request completes.
After creating the snapshot, use PutSnapshotBlock to write blocks of data to the snapshot.
Synopsis
- data StartSnapshot = StartSnapshot' {}
- newStartSnapshot :: Natural -> StartSnapshot
- startSnapshot_kmsKeyArn :: Lens' StartSnapshot (Maybe Text)
- startSnapshot_clientToken :: Lens' StartSnapshot (Maybe Text)
- startSnapshot_encrypted :: Lens' StartSnapshot (Maybe Bool)
- startSnapshot_parentSnapshotId :: Lens' StartSnapshot (Maybe Text)
- startSnapshot_timeout :: Lens' StartSnapshot (Maybe Natural)
- startSnapshot_description :: Lens' StartSnapshot (Maybe Text)
- startSnapshot_tags :: Lens' StartSnapshot (Maybe [Tag])
- startSnapshot_volumeSize :: Lens' StartSnapshot Natural
- data StartSnapshotResponse = StartSnapshotResponse' {}
- newStartSnapshotResponse :: Int -> StartSnapshotResponse
- startSnapshotResponse_blockSize :: Lens' StartSnapshotResponse (Maybe Int)
- startSnapshotResponse_status :: Lens' StartSnapshotResponse (Maybe Status)
- startSnapshotResponse_kmsKeyArn :: Lens' StartSnapshotResponse (Maybe Text)
- startSnapshotResponse_startTime :: Lens' StartSnapshotResponse (Maybe UTCTime)
- startSnapshotResponse_volumeSize :: Lens' StartSnapshotResponse (Maybe Natural)
- startSnapshotResponse_ownerId :: Lens' StartSnapshotResponse (Maybe Text)
- startSnapshotResponse_parentSnapshotId :: Lens' StartSnapshotResponse (Maybe Text)
- startSnapshotResponse_description :: Lens' StartSnapshotResponse (Maybe Text)
- startSnapshotResponse_tags :: Lens' StartSnapshotResponse (Maybe [Tag])
- startSnapshotResponse_snapshotId :: Lens' StartSnapshotResponse (Maybe Text)
- startSnapshotResponse_httpStatus :: Lens' StartSnapshotResponse Int
Creating a Request
data StartSnapshot Source #
See: newStartSnapshot
smart constructor.
StartSnapshot' | |
|
Instances
Create a value of StartSnapshot
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:kmsKeyArn:StartSnapshot'
, startSnapshot_kmsKeyArn
- The Amazon Resource Name (ARN) of the Key Management Service (KMS) key
to be used to encrypt the snapshot. If you do not specify a KMS key, the
default Amazon Web Services managed KMS key is used.
If you specify a ParentSnapshotId, omit this parameter; the snapshot will be encrypted using the same KMS key that was used to encrypt the parent snapshot.
If Encrypted is set to true
, you must specify a KMS key ARN.
$sel:clientToken:StartSnapshot'
, startSnapshot_clientToken
- A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. Idempotency ensures that an API request
completes only once. With an idempotent request, if the original request
completes successfully. The subsequent retries with the same client
token return the result from the original successful request and they
have no additional effect.
If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.
For more information, see Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide.
$sel:encrypted:StartSnapshot'
, startSnapshot_encrypted
- Indicates whether to encrypt the snapshot. To create an encrypted
snapshot, specify true
. To create an unencrypted snapshot, omit this
parameter.
If you specify a value for ParentSnapshotId, omit this parameter.
If you specify true
, the snapshot is encrypted using the KMS key
specified using the KmsKeyArn parameter. If no value is specified
for KmsKeyArn, the default KMS key for your account is used. If no
default KMS key has been specified for your account, the Amazon Web
Services managed KMS key is used. To set a default KMS key for your
account, use
ModifyEbsDefaultKmsKeyId.
If your account is enabled for encryption by default, you cannot set
this parameter to false
. In this case, you can omit this parameter.
For more information, see Using encryption in the Amazon Elastic Compute Cloud User Guide.
$sel:parentSnapshotId:StartSnapshot'
, startSnapshot_parentSnapshotId
- The ID of the parent snapshot. If there is no parent snapshot, or if you
are creating the first snapshot for an on-premises volume, omit this
parameter.
If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using CopySnapshot.
$sel:timeout:StartSnapshot'
, startSnapshot_timeout
- The amount of time (in minutes) after which the snapshot is
automatically cancelled if:
- No blocks are written to the snapshot.
- The snapshot is not completed after writing the last block of data.
If no value is specified, the timeout defaults to 60
minutes.
$sel:description:StartSnapshot'
, startSnapshot_description
- A description for the snapshot.
$sel:tags:StartSnapshot'
, startSnapshot_tags
- The tags to apply to the snapshot.
$sel:volumeSize:StartSnapshot'
, startSnapshot_volumeSize
- The size of the volume, in GiB. The maximum size is 65536
GiB (64
TiB).
Request Lenses
startSnapshot_kmsKeyArn :: Lens' StartSnapshot (Maybe Text) Source #
The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the snapshot. If you do not specify a KMS key, the default Amazon Web Services managed KMS key is used.
If you specify a ParentSnapshotId, omit this parameter; the snapshot will be encrypted using the same KMS key that was used to encrypt the parent snapshot.
If Encrypted is set to true
, you must specify a KMS key ARN.
startSnapshot_clientToken :: Lens' StartSnapshot (Maybe Text) Source #
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.
If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.
For more information, see Idempotency for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide.
startSnapshot_encrypted :: Lens' StartSnapshot (Maybe Bool) Source #
Indicates whether to encrypt the snapshot. To create an encrypted
snapshot, specify true
. To create an unencrypted snapshot, omit this
parameter.
If you specify a value for ParentSnapshotId, omit this parameter.
If you specify true
, the snapshot is encrypted using the KMS key
specified using the KmsKeyArn parameter. If no value is specified
for KmsKeyArn, the default KMS key for your account is used. If no
default KMS key has been specified for your account, the Amazon Web
Services managed KMS key is used. To set a default KMS key for your
account, use
ModifyEbsDefaultKmsKeyId.
If your account is enabled for encryption by default, you cannot set
this parameter to false
. In this case, you can omit this parameter.
For more information, see Using encryption in the Amazon Elastic Compute Cloud User Guide.
startSnapshot_parentSnapshotId :: Lens' StartSnapshot (Maybe Text) Source #
The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.
If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using CopySnapshot.
startSnapshot_timeout :: Lens' StartSnapshot (Maybe Natural) Source #
The amount of time (in minutes) after which the snapshot is automatically cancelled if:
- No blocks are written to the snapshot.
- The snapshot is not completed after writing the last block of data.
If no value is specified, the timeout defaults to 60
minutes.
startSnapshot_description :: Lens' StartSnapshot (Maybe Text) Source #
A description for the snapshot.
startSnapshot_tags :: Lens' StartSnapshot (Maybe [Tag]) Source #
The tags to apply to the snapshot.
startSnapshot_volumeSize :: Lens' StartSnapshot Natural Source #
The size of the volume, in GiB. The maximum size is 65536
GiB (64
TiB).
Destructuring the Response
data StartSnapshotResponse Source #
See: newStartSnapshotResponse
smart constructor.
StartSnapshotResponse' | |
|
Instances
newStartSnapshotResponse Source #
Create a value of StartSnapshotResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:blockSize:StartSnapshotResponse'
, startSnapshotResponse_blockSize
- The size of the blocks in the snapshot, in bytes.
$sel:status:StartSnapshotResponse'
, startSnapshotResponse_status
- The status of the snapshot.
$sel:kmsKeyArn:StartSnapshot'
, startSnapshotResponse_kmsKeyArn
- The Amazon Resource Name (ARN) of the Key Management Service (KMS) key
used to encrypt the snapshot.
$sel:startTime:StartSnapshotResponse'
, startSnapshotResponse_startTime
- The timestamp when the snapshot was created.
$sel:volumeSize:StartSnapshot'
, startSnapshotResponse_volumeSize
- The size of the volume, in GiB.
$sel:ownerId:StartSnapshotResponse'
, startSnapshotResponse_ownerId
- The Amazon Web Services account ID of the snapshot owner.
$sel:parentSnapshotId:StartSnapshot'
, startSnapshotResponse_parentSnapshotId
- The ID of the parent snapshot.
$sel:description:StartSnapshot'
, startSnapshotResponse_description
- The description of the snapshot.
$sel:tags:StartSnapshot'
, startSnapshotResponse_tags
- The tags applied to the snapshot. You can specify up to 50 tags per
snapshot. For more information, see
Tagging your Amazon EC2 resources
in the Amazon Elastic Compute Cloud User Guide.
$sel:snapshotId:StartSnapshotResponse'
, startSnapshotResponse_snapshotId
- The ID of the snapshot.
$sel:httpStatus:StartSnapshotResponse'
, startSnapshotResponse_httpStatus
- The response's http status code.
Response Lenses
startSnapshotResponse_blockSize :: Lens' StartSnapshotResponse (Maybe Int) Source #
The size of the blocks in the snapshot, in bytes.
startSnapshotResponse_status :: Lens' StartSnapshotResponse (Maybe Status) Source #
The status of the snapshot.
startSnapshotResponse_kmsKeyArn :: Lens' StartSnapshotResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the Key Management Service (KMS) key used to encrypt the snapshot.
startSnapshotResponse_startTime :: Lens' StartSnapshotResponse (Maybe UTCTime) Source #
The timestamp when the snapshot was created.
startSnapshotResponse_volumeSize :: Lens' StartSnapshotResponse (Maybe Natural) Source #
The size of the volume, in GiB.
startSnapshotResponse_ownerId :: Lens' StartSnapshotResponse (Maybe Text) Source #
The Amazon Web Services account ID of the snapshot owner.
startSnapshotResponse_parentSnapshotId :: Lens' StartSnapshotResponse (Maybe Text) Source #
The ID of the parent snapshot.
startSnapshotResponse_description :: Lens' StartSnapshotResponse (Maybe Text) Source #
The description of the snapshot.
startSnapshotResponse_tags :: Lens' StartSnapshotResponse (Maybe [Tag]) Source #
The tags applied to the snapshot. You can specify up to 50 tags per snapshot. For more information, see Tagging your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.
startSnapshotResponse_snapshotId :: Lens' StartSnapshotResponse (Maybe Text) Source #
The ID of the snapshot.
startSnapshotResponse_httpStatus :: Lens' StartSnapshotResponse Int Source #
The response's http status code.