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

Contains the parameters for AttachNetworkInterface.

See Also:

* AWS * API Reference

*/ class AttachNetworkInterfaceRequest : public EC2Request { public: AWS_EC2_API AttachNetworkInterfaceRequest(); // 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 "AttachNetworkInterface"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The index of the device for the network interface attachment.

*/ inline int GetDeviceIndex() const{ return m_deviceIndex; } /** *

The index of the device for the network interface attachment.

*/ inline bool DeviceIndexHasBeenSet() const { return m_deviceIndexHasBeenSet; } /** *

The index of the device for the network interface attachment.

*/ inline void SetDeviceIndex(int value) { m_deviceIndexHasBeenSet = true; m_deviceIndex = value; } /** *

The index of the device for the network interface attachment.

*/ inline AttachNetworkInterfaceRequest& WithDeviceIndex(int value) { SetDeviceIndex(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline AttachNetworkInterfaceRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The ID of the instance.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance.

*/ inline AttachNetworkInterfaceRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance.

*/ inline AttachNetworkInterfaceRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance.

*/ inline AttachNetworkInterfaceRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The ID of the network interface.

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

The ID of the network interface.

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

The ID of the network interface.

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

The ID of the network interface.

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

The ID of the network interface.

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

The ID of the network interface.

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

The ID of the network interface.

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

The ID of the network interface.

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

The index of the network card. Some instance types support multiple network * cards. The primary network interface must be assigned to network card index 0. * The default is network card index 0.

*/ inline int GetNetworkCardIndex() const{ return m_networkCardIndex; } /** *

The index of the network card. Some instance types support multiple network * cards. The primary network interface must be assigned to network card index 0. * The default is network card index 0.

*/ inline bool NetworkCardIndexHasBeenSet() const { return m_networkCardIndexHasBeenSet; } /** *

The index of the network card. Some instance types support multiple network * cards. The primary network interface must be assigned to network card index 0. * The default is network card index 0.

*/ inline void SetNetworkCardIndex(int value) { m_networkCardIndexHasBeenSet = true; m_networkCardIndex = value; } /** *

The index of the network card. Some instance types support multiple network * cards. The primary network interface must be assigned to network card index 0. * The default is network card index 0.

*/ inline AttachNetworkInterfaceRequest& WithNetworkCardIndex(int value) { SetNetworkCardIndex(value); return *this;} /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline const EnaSrdSpecification& GetEnaSrdSpecification() const{ return m_enaSrdSpecification; } /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline bool EnaSrdSpecificationHasBeenSet() const { return m_enaSrdSpecificationHasBeenSet; } /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline void SetEnaSrdSpecification(const EnaSrdSpecification& value) { m_enaSrdSpecificationHasBeenSet = true; m_enaSrdSpecification = value; } /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline void SetEnaSrdSpecification(EnaSrdSpecification&& value) { m_enaSrdSpecificationHasBeenSet = true; m_enaSrdSpecification = std::move(value); } /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline AttachNetworkInterfaceRequest& WithEnaSrdSpecification(const EnaSrdSpecification& value) { SetEnaSrdSpecification(value); return *this;} /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline AttachNetworkInterfaceRequest& WithEnaSrdSpecification(EnaSrdSpecification&& value) { SetEnaSrdSpecification(std::move(value)); return *this;} private: int m_deviceIndex; bool m_deviceIndexHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_networkInterfaceId; bool m_networkInterfaceIdHasBeenSet = false; int m_networkCardIndex; bool m_networkCardIndexHasBeenSet = false; EnaSrdSpecification m_enaSrdSpecification; bool m_enaSrdSpecificationHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws