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

AttachVolumeInput

See Also:

AWS * API Reference

*/ class AttachVolumeRequest : public StorageGatewayRequest { public: AWS_STORAGEGATEWAY_API AttachVolumeRequest(); // 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 "AttachVolume"; } AWS_STORAGEGATEWAY_API Aws::String SerializePayload() const override; AWS_STORAGEGATEWAY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The Amazon Resource Name (ARN) of the gateway that you want to attach the * volume to.

*/ inline const Aws::String& GetGatewayARN() const{ return m_gatewayARN; } /** *

The Amazon Resource Name (ARN) of the gateway that you want to attach the * volume to.

*/ inline bool GatewayARNHasBeenSet() const { return m_gatewayARNHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the gateway that you want to attach the * volume to.

*/ inline void SetGatewayARN(const Aws::String& value) { m_gatewayARNHasBeenSet = true; m_gatewayARN = value; } /** *

The Amazon Resource Name (ARN) of the gateway that you want to attach the * volume to.

*/ inline void SetGatewayARN(Aws::String&& value) { m_gatewayARNHasBeenSet = true; m_gatewayARN = std::move(value); } /** *

The Amazon Resource Name (ARN) of the gateway that you want to attach the * volume to.

*/ inline void SetGatewayARN(const char* value) { m_gatewayARNHasBeenSet = true; m_gatewayARN.assign(value); } /** *

The Amazon Resource Name (ARN) of the gateway that you want to attach the * volume to.

*/ inline AttachVolumeRequest& WithGatewayARN(const Aws::String& value) { SetGatewayARN(value); return *this;} /** *

The Amazon Resource Name (ARN) of the gateway that you want to attach the * volume to.

*/ inline AttachVolumeRequest& WithGatewayARN(Aws::String&& value) { SetGatewayARN(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the gateway that you want to attach the * volume to.

*/ inline AttachVolumeRequest& WithGatewayARN(const char* value) { SetGatewayARN(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 AttachVolumeRequest& 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 AttachVolumeRequest& 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 AttachVolumeRequest& WithTargetName(const char* value) { SetTargetName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the volume to attach to the specified * gateway.

*/ inline const Aws::String& GetVolumeARN() const{ return m_volumeARN; } /** *

The Amazon Resource Name (ARN) of the volume to attach to the specified * gateway.

*/ inline bool VolumeARNHasBeenSet() const { return m_volumeARNHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the volume to attach to the specified * gateway.

*/ inline void SetVolumeARN(const Aws::String& value) { m_volumeARNHasBeenSet = true; m_volumeARN = value; } /** *

The Amazon Resource Name (ARN) of the volume to attach to the specified * gateway.

*/ inline void SetVolumeARN(Aws::String&& value) { m_volumeARNHasBeenSet = true; m_volumeARN = std::move(value); } /** *

The Amazon Resource Name (ARN) of the volume to attach to the specified * gateway.

*/ inline void SetVolumeARN(const char* value) { m_volumeARNHasBeenSet = true; m_volumeARN.assign(value); } /** *

The Amazon Resource Name (ARN) of the volume to attach to the specified * gateway.

*/ inline AttachVolumeRequest& WithVolumeARN(const Aws::String& value) { SetVolumeARN(value); return *this;} /** *

The Amazon Resource Name (ARN) of the volume to attach to the specified * gateway.

*/ inline AttachVolumeRequest& WithVolumeARN(Aws::String&& value) { SetVolumeARN(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the volume to attach to the specified * gateway.

*/ inline AttachVolumeRequest& WithVolumeARN(const char* value) { SetVolumeARN(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 AttachVolumeRequest& 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 AttachVolumeRequest& 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 AttachVolumeRequest& WithNetworkInterfaceId(const char* value) { SetNetworkInterfaceId(value); return *this;} /** *

The unique device ID or other distinguishing data that identifies the local * disk used to create the volume. This value is only required when you are * attaching a stored volume.

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

The unique device ID or other distinguishing data that identifies the local * disk used to create the volume. This value is only required when you are * attaching a stored volume.

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

The unique device ID or other distinguishing data that identifies the local * disk used to create the volume. This value is only required when you are * attaching a stored volume.

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

The unique device ID or other distinguishing data that identifies the local * disk used to create the volume. This value is only required when you are * attaching a stored volume.

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

The unique device ID or other distinguishing data that identifies the local * disk used to create the volume. This value is only required when you are * attaching a stored volume.

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

The unique device ID or other distinguishing data that identifies the local * disk used to create the volume. This value is only required when you are * attaching a stored volume.

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

The unique device ID or other distinguishing data that identifies the local * disk used to create the volume. This value is only required when you are * attaching a stored volume.

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

The unique device ID or other distinguishing data that identifies the local * disk used to create the volume. This value is only required when you are * attaching a stored volume.

*/ inline AttachVolumeRequest& WithDiskId(const char* value) { SetDiskId(value); return *this;} private: Aws::String m_gatewayARN; bool m_gatewayARNHasBeenSet = false; Aws::String m_targetName; bool m_targetNameHasBeenSet = false; Aws::String m_volumeARN; bool m_volumeARNHasBeenSet = false; Aws::String m_networkInterfaceId; bool m_networkInterfaceIdHasBeenSet = false; Aws::String m_diskId; bool m_diskIdHasBeenSet = false; }; } // namespace Model } // namespace StorageGateway } // namespace Aws