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

Contains the parameters for ModifyNetworkInterfaceAttribute.

See * Also:

AWS * API Reference

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

Information about the interface attachment. If modifying the delete on * termination attribute, you must specify the ID of the interface * attachment.

*/ inline const NetworkInterfaceAttachmentChanges& GetAttachment() const{ return m_attachment; } /** *

Information about the interface attachment. If modifying the delete on * termination attribute, you must specify the ID of the interface * attachment.

*/ inline bool AttachmentHasBeenSet() const { return m_attachmentHasBeenSet; } /** *

Information about the interface attachment. If modifying the delete on * termination attribute, you must specify the ID of the interface * attachment.

*/ inline void SetAttachment(const NetworkInterfaceAttachmentChanges& value) { m_attachmentHasBeenSet = true; m_attachment = value; } /** *

Information about the interface attachment. If modifying the delete on * termination attribute, you must specify the ID of the interface * attachment.

*/ inline void SetAttachment(NetworkInterfaceAttachmentChanges&& value) { m_attachmentHasBeenSet = true; m_attachment = std::move(value); } /** *

Information about the interface attachment. If modifying the delete on * termination attribute, you must specify the ID of the interface * attachment.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithAttachment(const NetworkInterfaceAttachmentChanges& value) { SetAttachment(value); return *this;} /** *

Information about the interface attachment. If modifying the delete on * termination attribute, you must specify the ID of the interface * attachment.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithAttachment(NetworkInterfaceAttachmentChanges&& value) { SetAttachment(std::move(value)); return *this;} /** *

A description for the network interface.

*/ inline const AttributeValue& GetDescription() const{ return m_description; } /** *

A description for the network interface.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description for the network interface.

*/ inline void SetDescription(const AttributeValue& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description for the network interface.

*/ inline void SetDescription(AttributeValue&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description for the network interface.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithDescription(const AttributeValue& value) { SetDescription(value); return *this;} /** *

A description for the network interface.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithDescription(AttributeValue&& value) { SetDescription(std::move(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 ModifyNetworkInterfaceAttributeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline const Aws::Vector& GetGroups() const{ return m_groups; } /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; } /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline void SetGroups(const Aws::Vector& value) { m_groupsHasBeenSet = true; m_groups = value; } /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline void SetGroups(Aws::Vector&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); } /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithGroups(const Aws::Vector& value) { SetGroups(value); return *this;} /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithGroups(Aws::Vector&& value) { SetGroups(std::move(value)); return *this;} /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline ModifyNetworkInterfaceAttributeRequest& AddGroups(const Aws::String& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline ModifyNetworkInterfaceAttributeRequest& AddGroups(Aws::String&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; } /** *

Changes the security groups for the network interface. The new set of groups * you specify replaces the current set. You must specify at least one group, even * if it's just the default security group in the VPC. You must specify the ID of * the security group, not the name.

*/ inline ModifyNetworkInterfaceAttributeRequest& AddGroups(const char* value) { m_groupsHasBeenSet = true; m_groups.push_back(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 ModifyNetworkInterfaceAttributeRequest& WithNetworkInterfaceId(const Aws::String& value) { SetNetworkInterfaceId(value); return *this;} /** *

The ID of the network interface.

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

The ID of the network interface.

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

Enable or disable source/destination checks, which ensure that the instance * is either the source or the destination of any traffic that it receives. If the * value is true, source/destination checks are enabled; otherwise, * they are disabled. The default value is true. You must disable * source/destination checks if the instance runs services such as network address * translation, routing, or firewalls.

*/ inline const AttributeBooleanValue& GetSourceDestCheck() const{ return m_sourceDestCheck; } /** *

Enable or disable source/destination checks, which ensure that the instance * is either the source or the destination of any traffic that it receives. If the * value is true, source/destination checks are enabled; otherwise, * they are disabled. The default value is true. You must disable * source/destination checks if the instance runs services such as network address * translation, routing, or firewalls.

*/ inline bool SourceDestCheckHasBeenSet() const { return m_sourceDestCheckHasBeenSet; } /** *

Enable or disable source/destination checks, which ensure that the instance * is either the source or the destination of any traffic that it receives. If the * value is true, source/destination checks are enabled; otherwise, * they are disabled. The default value is true. You must disable * source/destination checks if the instance runs services such as network address * translation, routing, or firewalls.

*/ inline void SetSourceDestCheck(const AttributeBooleanValue& value) { m_sourceDestCheckHasBeenSet = true; m_sourceDestCheck = value; } /** *

Enable or disable source/destination checks, which ensure that the instance * is either the source or the destination of any traffic that it receives. If the * value is true, source/destination checks are enabled; otherwise, * they are disabled. The default value is true. You must disable * source/destination checks if the instance runs services such as network address * translation, routing, or firewalls.

*/ inline void SetSourceDestCheck(AttributeBooleanValue&& value) { m_sourceDestCheckHasBeenSet = true; m_sourceDestCheck = std::move(value); } /** *

Enable or disable source/destination checks, which ensure that the instance * is either the source or the destination of any traffic that it receives. If the * value is true, source/destination checks are enabled; otherwise, * they are disabled. The default value is true. You must disable * source/destination checks if the instance runs services such as network address * translation, routing, or firewalls.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithSourceDestCheck(const AttributeBooleanValue& value) { SetSourceDestCheck(value); return *this;} /** *

Enable or disable source/destination checks, which ensure that the instance * is either the source or the destination of any traffic that it receives. If the * value is true, source/destination checks are enabled; otherwise, * they are disabled. The default value is true. You must disable * source/destination checks if the instance runs services such as network address * translation, routing, or firewalls.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithSourceDestCheck(AttributeBooleanValue&& value) { SetSourceDestCheck(std::move(value)); return *this;} /** *

Updates the ENA Express configuration for the network interface that’s * attached to the instance.

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

Updates the ENA Express configuration for the network interface that’s * attached to the instance.

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

Updates the ENA Express configuration for the network interface that’s * attached to the instance.

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

Updates the ENA Express configuration for the network interface that’s * attached to the instance.

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

Updates the ENA Express configuration for the network interface that’s * attached to the instance.

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

Updates the ENA Express configuration for the network interface that’s * attached to the instance.

*/ inline ModifyNetworkInterfaceAttributeRequest& WithEnaSrdSpecification(EnaSrdSpecification&& value) { SetEnaSrdSpecification(std::move(value)); return *this;} private: NetworkInterfaceAttachmentChanges m_attachment; bool m_attachmentHasBeenSet = false; AttributeValue m_description; bool m_descriptionHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::Vector m_groups; bool m_groupsHasBeenSet = false; Aws::String m_networkInterfaceId; bool m_networkInterfaceIdHasBeenSet = false; AttributeBooleanValue m_sourceDestCheck; bool m_sourceDestCheckHasBeenSet = false; EnaSrdSpecification m_enaSrdSpecification; bool m_enaSrdSpecificationHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws