/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace StorageGateway { namespace Model { /** *

A JSON object containing one or more of the following fields:

See * Also:

AWS * API Reference

*/ class CreateStorediSCSIVolumeRequest : public StorageGatewayRequest { public: AWS_STORAGEGATEWAY_API CreateStorediSCSIVolumeRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateStorediSCSIVolume"; } AWS_STORAGEGATEWAY_API Aws::String SerializePayload() const override; AWS_STORAGEGATEWAY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; inline const Aws::String& GetGatewayARN() const{ return m_gatewayARN; } inline bool GatewayARNHasBeenSet() const { return m_gatewayARNHasBeenSet; } inline void SetGatewayARN(const Aws::String& value) { m_gatewayARNHasBeenSet = true; m_gatewayARN = value; } inline void SetGatewayARN(Aws::String&& value) { m_gatewayARNHasBeenSet = true; m_gatewayARN = std::move(value); } inline void SetGatewayARN(const char* value) { m_gatewayARNHasBeenSet = true; m_gatewayARN.assign(value); } inline CreateStorediSCSIVolumeRequest& WithGatewayARN(const Aws::String& value) { SetGatewayARN(value); return *this;} inline CreateStorediSCSIVolumeRequest& WithGatewayARN(Aws::String&& value) { SetGatewayARN(std::move(value)); return *this;} inline CreateStorediSCSIVolumeRequest& WithGatewayARN(const char* value) { SetGatewayARN(value); return *this;} /** *

The unique identifier for the gateway local disk that is configured as a * stored volume. Use ListLocalDisks * to list disk IDs for a gateway.

*/ inline const Aws::String& GetDiskId() const{ return m_diskId; } /** *

The unique identifier for the gateway local disk that is configured as a * stored volume. Use ListLocalDisks * to list disk IDs for a gateway.

*/ inline bool DiskIdHasBeenSet() const { return m_diskIdHasBeenSet; } /** *

The unique identifier for the gateway local disk that is configured as a * stored volume. Use ListLocalDisks * to list disk IDs for a gateway.

*/ inline void SetDiskId(const Aws::String& value) { m_diskIdHasBeenSet = true; m_diskId = value; } /** *

The unique identifier for the gateway local disk that is configured as a * stored volume. Use ListLocalDisks * to list disk IDs for a gateway.

*/ inline void SetDiskId(Aws::String&& value) { m_diskIdHasBeenSet = true; m_diskId = std::move(value); } /** *

The unique identifier for the gateway local disk that is configured as a * stored volume. Use ListLocalDisks * to list disk IDs for a gateway.

*/ inline void SetDiskId(const char* value) { m_diskIdHasBeenSet = true; m_diskId.assign(value); } /** *

The unique identifier for the gateway local disk that is configured as a * stored volume. Use ListLocalDisks * to list disk IDs for a gateway.

*/ inline CreateStorediSCSIVolumeRequest& WithDiskId(const Aws::String& value) { SetDiskId(value); return *this;} /** *

The unique identifier for the gateway local disk that is configured as a * stored volume. Use ListLocalDisks * to list disk IDs for a gateway.

*/ inline CreateStorediSCSIVolumeRequest& WithDiskId(Aws::String&& value) { SetDiskId(std::move(value)); return *this;} /** *

The unique identifier for the gateway local disk that is configured as a * stored volume. Use ListLocalDisks * to list disk IDs for a gateway.

*/ inline CreateStorediSCSIVolumeRequest& WithDiskId(const char* value) { SetDiskId(value); return *this;} /** *

The snapshot ID (e.g., "snap-1122aabb") of the snapshot to restore as the new * stored volume. Specify this field if you want to create the iSCSI storage volume * from a snapshot; otherwise, do not include this field. To list snapshots for * your account use DescribeSnapshots * in the Amazon Elastic Compute Cloud API Reference.

*/ inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; } /** *

The snapshot ID (e.g., "snap-1122aabb") of the snapshot to restore as the new * stored volume. Specify this field if you want to create the iSCSI storage volume * from a snapshot; otherwise, do not include this field. To list snapshots for * your account use DescribeSnapshots * in the Amazon Elastic Compute Cloud API Reference.

*/ inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; } /** *

The snapshot ID (e.g., "snap-1122aabb") of the snapshot to restore as the new * stored volume. Specify this field if you want to create the iSCSI storage volume * from a snapshot; otherwise, do not include this field. To list snapshots for * your account use DescribeSnapshots * in the Amazon Elastic Compute Cloud API Reference.

*/ inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; } /** *

The snapshot ID (e.g., "snap-1122aabb") of the snapshot to restore as the new * stored volume. Specify this field if you want to create the iSCSI storage volume * from a snapshot; otherwise, do not include this field. To list snapshots for * your account use DescribeSnapshots * in the Amazon Elastic Compute Cloud API Reference.

*/ inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); } /** *

The snapshot ID (e.g., "snap-1122aabb") of the snapshot to restore as the new * stored volume. Specify this field if you want to create the iSCSI storage volume * from a snapshot; otherwise, do not include this field. To list snapshots for * your account use DescribeSnapshots * in the Amazon Elastic Compute Cloud API Reference.

*/ inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); } /** *

The snapshot ID (e.g., "snap-1122aabb") of the snapshot to restore as the new * stored volume. Specify this field if you want to create the iSCSI storage volume * from a snapshot; otherwise, do not include this field. To list snapshots for * your account use DescribeSnapshots * in the Amazon Elastic Compute Cloud API Reference.

*/ inline CreateStorediSCSIVolumeRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;} /** *

The snapshot ID (e.g., "snap-1122aabb") of the snapshot to restore as the new * stored volume. Specify this field if you want to create the iSCSI storage volume * from a snapshot; otherwise, do not include this field. To list snapshots for * your account use DescribeSnapshots * in the Amazon Elastic Compute Cloud API Reference.

*/ inline CreateStorediSCSIVolumeRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;} /** *

The snapshot ID (e.g., "snap-1122aabb") of the snapshot to restore as the new * stored volume. Specify this field if you want to create the iSCSI storage volume * from a snapshot; otherwise, do not include this field. To list snapshots for * your account use DescribeSnapshots * in the Amazon Elastic Compute Cloud API Reference.

*/ inline CreateStorediSCSIVolumeRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;} /** *

Set to true if you want to preserve the data on the local disk. * Otherwise, set to false to create an empty volume.

Valid * Values: true | false

*/ inline bool GetPreserveExistingData() const{ return m_preserveExistingData; } /** *

Set to true if you want to preserve the data on the local disk. * Otherwise, set to false to create an empty volume.

Valid * Values: true | false

*/ inline bool PreserveExistingDataHasBeenSet() const { return m_preserveExistingDataHasBeenSet; } /** *

Set to true if you want to preserve the data on the local disk. * Otherwise, set to false to create an empty volume.

Valid * Values: true | false

*/ inline void SetPreserveExistingData(bool value) { m_preserveExistingDataHasBeenSet = true; m_preserveExistingData = value; } /** *

Set to true if you want to preserve the data on the local disk. * Otherwise, set to false to create an empty volume.

Valid * Values: true | false

*/ inline CreateStorediSCSIVolumeRequest& WithPreserveExistingData(bool value) { SetPreserveExistingData(value); return *this;} /** *

The name of the iSCSI target used by an initiator to connect to a volume and * used as a suffix for the target ARN. For example, specifying * TargetName as myvolume results in the target ARN of * arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. * The target name must be unique across all volumes on a gateway.

If you * don't specify a value, Storage Gateway uses the value that was previously used * for this volume as the new target name.

*/ inline const Aws::String& GetTargetName() const{ return m_targetName; } /** *

The name of the iSCSI target used by an initiator to connect to a volume and * used as a suffix for the target ARN. For example, specifying * TargetName as myvolume results in the target ARN of * arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. * The target name must be unique across all volumes on a gateway.

If you * don't specify a value, Storage Gateway uses the value that was previously used * for this volume as the new target name.

*/ inline bool TargetNameHasBeenSet() const { return m_targetNameHasBeenSet; } /** *

The name of the iSCSI target used by an initiator to connect to a volume and * used as a suffix for the target ARN. For example, specifying * TargetName as myvolume results in the target ARN of * arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. * The target name must be unique across all volumes on a gateway.

If you * don't specify a value, Storage Gateway uses the value that was previously used * for this volume as the new target name.

*/ inline void SetTargetName(const Aws::String& value) { m_targetNameHasBeenSet = true; m_targetName = value; } /** *

The name of the iSCSI target used by an initiator to connect to a volume and * used as a suffix for the target ARN. For example, specifying * TargetName as myvolume results in the target ARN of * arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. * The target name must be unique across all volumes on a gateway.

If you * don't specify a value, Storage Gateway uses the value that was previously used * for this volume as the new target name.

*/ inline void SetTargetName(Aws::String&& value) { m_targetNameHasBeenSet = true; m_targetName = std::move(value); } /** *

The name of the iSCSI target used by an initiator to connect to a volume and * used as a suffix for the target ARN. For example, specifying * TargetName as myvolume results in the target ARN of * arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. * The target name must be unique across all volumes on a gateway.

If you * don't specify a value, Storage Gateway uses the value that was previously used * for this volume as the new target name.

*/ inline void SetTargetName(const char* value) { m_targetNameHasBeenSet = true; m_targetName.assign(value); } /** *

The name of the iSCSI target used by an initiator to connect to a volume and * used as a suffix for the target ARN. For example, specifying * TargetName as myvolume results in the target ARN of * arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. * The target name must be unique across all volumes on a gateway.

If you * don't specify a value, Storage Gateway uses the value that was previously used * for this volume as the new target name.

*/ inline CreateStorediSCSIVolumeRequest& WithTargetName(const Aws::String& value) { SetTargetName(value); return *this;} /** *

The name of the iSCSI target used by an initiator to connect to a volume and * used as a suffix for the target ARN. For example, specifying * TargetName as myvolume results in the target ARN of * arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. * The target name must be unique across all volumes on a gateway.

If you * don't specify a value, Storage Gateway uses the value that was previously used * for this volume as the new target name.

*/ inline CreateStorediSCSIVolumeRequest& WithTargetName(Aws::String&& value) { SetTargetName(std::move(value)); return *this;} /** *

The name of the iSCSI target used by an initiator to connect to a volume and * used as a suffix for the target ARN. For example, specifying * TargetName as myvolume results in the target ARN of * arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. * The target name must be unique across all volumes on a gateway.

If you * don't specify a value, Storage Gateway uses the value that was previously used * for this volume as the new target name.

*/ inline CreateStorediSCSIVolumeRequest& WithTargetName(const char* value) { SetTargetName(value); return *this;} /** *

The network interface of the gateway on which to expose the iSCSI target. * Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a * list of the network interfaces available on a gateway.

Valid Values: A * valid IP address.

*/ inline const Aws::String& GetNetworkInterfaceId() const{ return m_networkInterfaceId; } /** *

The network interface of the gateway on which to expose the iSCSI target. * Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a * list of the network interfaces available on a gateway.

Valid Values: A * valid IP address.

*/ inline bool NetworkInterfaceIdHasBeenSet() const { return m_networkInterfaceIdHasBeenSet; } /** *

The network interface of the gateway on which to expose the iSCSI target. * Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a * list of the network interfaces available on a gateway.

Valid Values: A * valid IP address.

*/ inline void SetNetworkInterfaceId(const Aws::String& value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId = value; } /** *

The network interface of the gateway on which to expose the iSCSI target. * Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a * list of the network interfaces available on a gateway.

Valid Values: A * valid IP address.

*/ inline void SetNetworkInterfaceId(Aws::String&& value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId = std::move(value); } /** *

The network interface of the gateway on which to expose the iSCSI target. * Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a * list of the network interfaces available on a gateway.

Valid Values: A * valid IP address.

*/ inline void SetNetworkInterfaceId(const char* value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId.assign(value); } /** *

The network interface of the gateway on which to expose the iSCSI target. * Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a * list of the network interfaces available on a gateway.

Valid Values: A * valid IP address.

*/ inline CreateStorediSCSIVolumeRequest& WithNetworkInterfaceId(const Aws::String& value) { SetNetworkInterfaceId(value); return *this;} /** *

The network interface of the gateway on which to expose the iSCSI target. * Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a * list of the network interfaces available on a gateway.

Valid Values: A * valid IP address.

*/ inline CreateStorediSCSIVolumeRequest& WithNetworkInterfaceId(Aws::String&& value) { SetNetworkInterfaceId(std::move(value)); return *this;} /** *

The network interface of the gateway on which to expose the iSCSI target. * Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a * list of the network interfaces available on a gateway.

Valid Values: A * valid IP address.

*/ inline CreateStorediSCSIVolumeRequest& WithNetworkInterfaceId(const char* value) { SetNetworkInterfaceId(value); return *this;} /** *

Set to true to use Amazon S3 server-side encryption with your * own KMS key, or false to use a key managed by Amazon S3. * Optional.

Valid Values: true | false

*/ inline bool GetKMSEncrypted() const{ return m_kMSEncrypted; } /** *

Set to true to use Amazon S3 server-side encryption with your * own KMS key, or false to use a key managed by Amazon S3. * Optional.

Valid Values: true | false

*/ inline bool KMSEncryptedHasBeenSet() const { return m_kMSEncryptedHasBeenSet; } /** *

Set to true to use Amazon S3 server-side encryption with your * own KMS key, or false to use a key managed by Amazon S3. * Optional.

Valid Values: true | false

*/ inline void SetKMSEncrypted(bool value) { m_kMSEncryptedHasBeenSet = true; m_kMSEncrypted = value; } /** *

Set to true to use Amazon S3 server-side encryption with your * own KMS key, or false to use a key managed by Amazon S3. * Optional.

Valid Values: true | false

*/ inline CreateStorediSCSIVolumeRequest& WithKMSEncrypted(bool value) { SetKMSEncrypted(value); return *this;} /** *

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used * for Amazon S3 server-side encryption. Storage Gateway does not support * asymmetric CMKs. This value can only be set when KMSEncrypted is * true. Optional.

*/ inline const Aws::String& GetKMSKey() const{ return m_kMSKey; } /** *

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used * for Amazon S3 server-side encryption. Storage Gateway does not support * asymmetric CMKs. This value can only be set when KMSEncrypted is * true. Optional.

*/ inline bool KMSKeyHasBeenSet() const { return m_kMSKeyHasBeenSet; } /** *

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used * for Amazon S3 server-side encryption. Storage Gateway does not support * asymmetric CMKs. This value can only be set when KMSEncrypted is * true. Optional.

*/ inline void SetKMSKey(const Aws::String& value) { m_kMSKeyHasBeenSet = true; m_kMSKey = value; } /** *

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used * for Amazon S3 server-side encryption. Storage Gateway does not support * asymmetric CMKs. This value can only be set when KMSEncrypted is * true. Optional.

*/ inline void SetKMSKey(Aws::String&& value) { m_kMSKeyHasBeenSet = true; m_kMSKey = std::move(value); } /** *

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used * for Amazon S3 server-side encryption. Storage Gateway does not support * asymmetric CMKs. This value can only be set when KMSEncrypted is * true. Optional.

*/ inline void SetKMSKey(const char* value) { m_kMSKeyHasBeenSet = true; m_kMSKey.assign(value); } /** *

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used * for Amazon S3 server-side encryption. Storage Gateway does not support * asymmetric CMKs. This value can only be set when KMSEncrypted is * true. Optional.

*/ inline CreateStorediSCSIVolumeRequest& WithKMSKey(const Aws::String& value) { SetKMSKey(value); return *this;} /** *

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used * for Amazon S3 server-side encryption. Storage Gateway does not support * asymmetric CMKs. This value can only be set when KMSEncrypted is * true. Optional.

*/ inline CreateStorediSCSIVolumeRequest& WithKMSKey(Aws::String&& value) { SetKMSKey(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used * for Amazon S3 server-side encryption. Storage Gateway does not support * asymmetric CMKs. This value can only be set when KMSEncrypted is * true. Optional.

*/ inline CreateStorediSCSIVolumeRequest& WithKMSKey(const char* value) { SetKMSKey(value); return *this;} /** *

A list of up to 50 tags that can be assigned to a stored volume. Each tag is * a key-value pair.

Valid characters for key and value are letters, * spaces, and numbers representable in UTF-8 format, and the following special * characters: + - = . _ : / @. The maximum length of a tag's key is 128 * characters, and the maximum length for a tag's value is 256.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

A list of up to 50 tags that can be assigned to a stored volume. Each tag is * a key-value pair.

Valid characters for key and value are letters, * spaces, and numbers representable in UTF-8 format, and the following special * characters: + - = . _ : / @. The maximum length of a tag's key is 128 * characters, and the maximum length for a tag's value is 256.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

A list of up to 50 tags that can be assigned to a stored volume. Each tag is * a key-value pair.

Valid characters for key and value are letters, * spaces, and numbers representable in UTF-8 format, and the following special * characters: + - = . _ : / @. The maximum length of a tag's key is 128 * characters, and the maximum length for a tag's value is 256.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

A list of up to 50 tags that can be assigned to a stored volume. Each tag is * a key-value pair.

Valid characters for key and value are letters, * spaces, and numbers representable in UTF-8 format, and the following special * characters: + - = . _ : / @. The maximum length of a tag's key is 128 * characters, and the maximum length for a tag's value is 256.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

A list of up to 50 tags that can be assigned to a stored volume. Each tag is * a key-value pair.

Valid characters for key and value are letters, * spaces, and numbers representable in UTF-8 format, and the following special * characters: + - = . _ : / @. The maximum length of a tag's key is 128 * characters, and the maximum length for a tag's value is 256.

*/ inline CreateStorediSCSIVolumeRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

A list of up to 50 tags that can be assigned to a stored volume. Each tag is * a key-value pair.

Valid characters for key and value are letters, * spaces, and numbers representable in UTF-8 format, and the following special * characters: + - = . _ : / @. The maximum length of a tag's key is 128 * characters, and the maximum length for a tag's value is 256.

*/ inline CreateStorediSCSIVolumeRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

A list of up to 50 tags that can be assigned to a stored volume. Each tag is * a key-value pair.

Valid characters for key and value are letters, * spaces, and numbers representable in UTF-8 format, and the following special * characters: + - = . _ : / @. The maximum length of a tag's key is 128 * characters, and the maximum length for a tag's value is 256.

*/ inline CreateStorediSCSIVolumeRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

A list of up to 50 tags that can be assigned to a stored volume. Each tag is * a key-value pair.

Valid characters for key and value are letters, * spaces, and numbers representable in UTF-8 format, and the following special * characters: + - = . _ : / @. The maximum length of a tag's key is 128 * characters, and the maximum length for a tag's value is 256.

*/ inline CreateStorediSCSIVolumeRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_gatewayARN; bool m_gatewayARNHasBeenSet = false; Aws::String m_diskId; bool m_diskIdHasBeenSet = false; Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; bool m_preserveExistingData; bool m_preserveExistingDataHasBeenSet = false; Aws::String m_targetName; bool m_targetNameHasBeenSet = false; Aws::String m_networkInterfaceId; bool m_networkInterfaceIdHasBeenSet = false; bool m_kMSEncrypted; bool m_kMSEncryptedHasBeenSet = false; Aws::String m_kMSKey; bool m_kMSKeyHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace StorageGateway } // namespace Aws