/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the ebs-2019-11-02.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.EBS.Model { /// /// Container for the parameters to the StartSnapshot operation. /// 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. /// /// /// /// You should always retry requests that receive server (5xx) error responses, /// and ThrottlingException and RequestThrottledException client /// error responses. For more information see Error /// retries in the Amazon Elastic Compute Cloud User Guide. /// /// /// public partial class StartSnapshotRequest : AmazonEBSRequest { private string _clientToken; private string _description; private bool? _encrypted; private string _kmsKeyArn; private string _parentSnapshotId; private List _tags = new List(); private int? _timeout; private long? _volumeSize; /// /// Gets and sets the property 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. /// /// [AWSProperty(Max=255)] public string ClientToken { get { return this._clientToken; } set { this._clientToken = value; } } // Check to see if ClientToken property is set internal bool IsSetClientToken() { return this._clientToken != null; } /// /// Gets and sets the property Description. /// /// A description for the snapshot. /// /// [AWSProperty(Max=255)] public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// /// Gets and sets the property Encrypted. /// /// Indicates whether to encrypt the snapshot. /// /// /// /// You can't specify Encrypted and ParentSnapshotId in the same request. /// If you specify both parameters, the request fails with ValidationException. /// /// /// /// The encryption status of the snapshot depends on the values that you specify for Encrypted, /// KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services /// account is enabled for /// encryption by default. For more information, see /// Using encryption in the Amazon Elastic Compute Cloud User Guide. /// /// /// /// To create an encrypted snapshot, you must have permission to use the KMS key. For /// more information, see /// Permissions to use Key Management Service keys in the Amazon Elastic Compute /// Cloud User Guide. /// /// /// public bool Encrypted { get { return this._encrypted.GetValueOrDefault(); } set { this._encrypted = value; } } // Check to see if Encrypted property is set internal bool IsSetEncrypted() { return this._encrypted.HasValue; } /// /// Gets and sets the property KmsKeyArn. /// /// The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used /// to encrypt the snapshot. /// /// /// /// The encryption status of the snapshot depends on the values that you specify for Encrypted, /// KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services /// account is enabled for /// encryption by default. For more information, see /// Using encryption in the Amazon Elastic Compute Cloud User Guide. /// /// /// /// To create an encrypted snapshot, you must have permission to use the KMS key. For /// more information, see /// Permissions to use Key Management Service keys in the Amazon Elastic Compute /// Cloud User Guide. /// /// /// [AWSProperty(Sensitive=true, Min=1, Max=2048)] public string KmsKeyArn { get { return this._kmsKeyArn; } set { this._kmsKeyArn = value; } } // Check to see if KmsKeyArn property is set internal bool IsSetKmsKeyArn() { return this._kmsKeyArn != null; } /// /// Gets and sets the property 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. /// /// /// /// You can't specify ParentSnapshotId and Encrypted in the same request. /// If you specify both parameters, the request fails with ValidationException. /// /// /// /// The encryption status of the snapshot depends on the values that you specify for Encrypted, /// KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services /// account is enabled for /// encryption by default. For more information, see /// Using encryption in the Amazon Elastic Compute Cloud User Guide. /// /// /// /// If you specify an encrypted parent snapshot, you must have permission to use the KMS /// key that was used to encrypt the parent snapshot. For more information, see /// Permissions to use Key Management Service keys in the Amazon Elastic Compute /// Cloud User Guide. /// /// /// [AWSProperty(Min=1, Max=64)] public string ParentSnapshotId { get { return this._parentSnapshotId; } set { this._parentSnapshotId = value; } } // Check to see if ParentSnapshotId property is set internal bool IsSetParentSnapshotId() { return this._parentSnapshotId != null; } /// /// Gets and sets the property Tags. /// /// The tags to apply to the snapshot. /// /// public List Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// /// Gets and sets the property 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. /// ///
[AWSProperty(Min=10, Max=4320)] public int Timeout { get { return this._timeout.GetValueOrDefault(); } set { this._timeout = value; } } // Check to see if Timeout property is set internal bool IsSetTimeout() { return this._timeout.HasValue; } /// /// Gets and sets the property VolumeSize. /// /// The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). /// /// [AWSProperty(Required=true, Min=1)] public long VolumeSize { get { return this._volumeSize.GetValueOrDefault(); } set { this._volumeSize = value; } } // Check to see if VolumeSize property is set internal bool IsSetVolumeSize() { return this._volumeSize.HasValue; } } }