/** * 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 #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Xml { class XmlDocument; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes an instance attribute.

See Also:

AWS * API Reference

*/ class AWS_EC2_API DescribeInstanceAttributeResponse { public: DescribeInstanceAttributeResponse(); DescribeInstanceAttributeResponse(const Aws::AmazonWebServiceResult& result); DescribeInstanceAttributeResponse& operator=(const Aws::AmazonWebServiceResult& result); /** *

The security groups associated with the instance.

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

The security groups associated with the instance.

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

The security groups associated with the instance.

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

The security groups associated with the instance.

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

The security groups associated with the instance.

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

The security groups associated with the instance.

*/ inline DescribeInstanceAttributeResponse& AddGroups(const GroupIdentifier& value) { m_groups.push_back(value); return *this; } /** *

The security groups associated with the instance.

*/ inline DescribeInstanceAttributeResponse& AddGroups(GroupIdentifier&& value) { m_groups.push_back(std::move(value)); return *this; } /** *

The block device mapping of the instance.

*/ inline const Aws::Vector& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; } /** *

The block device mapping of the instance.

*/ inline void SetBlockDeviceMappings(const Aws::Vector& value) { m_blockDeviceMappings = value; } /** *

The block device mapping of the instance.

*/ inline void SetBlockDeviceMappings(Aws::Vector&& value) { m_blockDeviceMappings = std::move(value); } /** *

The block device mapping of the instance.

*/ inline DescribeInstanceAttributeResponse& WithBlockDeviceMappings(const Aws::Vector& value) { SetBlockDeviceMappings(value); return *this;} /** *

The block device mapping of the instance.

*/ inline DescribeInstanceAttributeResponse& WithBlockDeviceMappings(Aws::Vector&& value) { SetBlockDeviceMappings(std::move(value)); return *this;} /** *

The block device mapping of the instance.

*/ inline DescribeInstanceAttributeResponse& AddBlockDeviceMappings(const InstanceBlockDeviceMapping& value) { m_blockDeviceMappings.push_back(value); return *this; } /** *

The block device mapping of the instance.

*/ inline DescribeInstanceAttributeResponse& AddBlockDeviceMappings(InstanceBlockDeviceMapping&& value) { m_blockDeviceMappings.push_back(std::move(value)); return *this; } /** *

If the value is true, you can't terminate the instance through * the Amazon EC2 console, CLI, or API; otherwise, you can.

*/ inline const AttributeBooleanValue& GetDisableApiTermination() const{ return m_disableApiTermination; } /** *

If the value is true, you can't terminate the instance through * the Amazon EC2 console, CLI, or API; otherwise, you can.

*/ inline void SetDisableApiTermination(const AttributeBooleanValue& value) { m_disableApiTermination = value; } /** *

If the value is true, you can't terminate the instance through * the Amazon EC2 console, CLI, or API; otherwise, you can.

*/ inline void SetDisableApiTermination(AttributeBooleanValue&& value) { m_disableApiTermination = std::move(value); } /** *

If the value is true, you can't terminate the instance through * the Amazon EC2 console, CLI, or API; otherwise, you can.

*/ inline DescribeInstanceAttributeResponse& WithDisableApiTermination(const AttributeBooleanValue& value) { SetDisableApiTermination(value); return *this;} /** *

If the value is true, you can't terminate the instance through * the Amazon EC2 console, CLI, or API; otherwise, you can.

*/ inline DescribeInstanceAttributeResponse& WithDisableApiTermination(AttributeBooleanValue&& value) { SetDisableApiTermination(std::move(value)); return *this;} /** *

Indicates whether enhanced networking with ENA is enabled.

*/ inline const AttributeBooleanValue& GetEnaSupport() const{ return m_enaSupport; } /** *

Indicates whether enhanced networking with ENA is enabled.

*/ inline void SetEnaSupport(const AttributeBooleanValue& value) { m_enaSupport = value; } /** *

Indicates whether enhanced networking with ENA is enabled.

*/ inline void SetEnaSupport(AttributeBooleanValue&& value) { m_enaSupport = std::move(value); } /** *

Indicates whether enhanced networking with ENA is enabled.

*/ inline DescribeInstanceAttributeResponse& WithEnaSupport(const AttributeBooleanValue& value) { SetEnaSupport(value); return *this;} /** *

Indicates whether enhanced networking with ENA is enabled.

*/ inline DescribeInstanceAttributeResponse& WithEnaSupport(AttributeBooleanValue&& value) { SetEnaSupport(std::move(value)); return *this;} /** *

Indicates whether the instance is optimized for Amazon EBS I/O.

*/ inline const AttributeBooleanValue& GetEbsOptimized() const{ return m_ebsOptimized; } /** *

Indicates whether the instance is optimized for Amazon EBS I/O.

*/ inline void SetEbsOptimized(const AttributeBooleanValue& value) { m_ebsOptimized = value; } /** *

Indicates whether the instance is optimized for Amazon EBS I/O.

*/ inline void SetEbsOptimized(AttributeBooleanValue&& value) { m_ebsOptimized = std::move(value); } /** *

Indicates whether the instance is optimized for Amazon EBS I/O.

*/ inline DescribeInstanceAttributeResponse& WithEbsOptimized(const AttributeBooleanValue& value) { SetEbsOptimized(value); return *this;} /** *

Indicates whether the instance is optimized for Amazon EBS I/O.

*/ inline DescribeInstanceAttributeResponse& WithEbsOptimized(AttributeBooleanValue&& value) { SetEbsOptimized(std::move(value)); return *this;} /** *

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

Indicates whether an instance stops or terminates when you initiate shutdown * from the instance (using the operating system command for system shutdown).

*/ inline const AttributeValue& GetInstanceInitiatedShutdownBehavior() const{ return m_instanceInitiatedShutdownBehavior; } /** *

Indicates whether an instance stops or terminates when you initiate shutdown * from the instance (using the operating system command for system shutdown).

*/ inline void SetInstanceInitiatedShutdownBehavior(const AttributeValue& value) { m_instanceInitiatedShutdownBehavior = value; } /** *

Indicates whether an instance stops or terminates when you initiate shutdown * from the instance (using the operating system command for system shutdown).

*/ inline void SetInstanceInitiatedShutdownBehavior(AttributeValue&& value) { m_instanceInitiatedShutdownBehavior = std::move(value); } /** *

Indicates whether an instance stops or terminates when you initiate shutdown * from the instance (using the operating system command for system shutdown).

*/ inline DescribeInstanceAttributeResponse& WithInstanceInitiatedShutdownBehavior(const AttributeValue& value) { SetInstanceInitiatedShutdownBehavior(value); return *this;} /** *

Indicates whether an instance stops or terminates when you initiate shutdown * from the instance (using the operating system command for system shutdown).

*/ inline DescribeInstanceAttributeResponse& WithInstanceInitiatedShutdownBehavior(AttributeValue&& value) { SetInstanceInitiatedShutdownBehavior(std::move(value)); return *this;} /** *

The instance type.

*/ inline const AttributeValue& GetInstanceType() const{ return m_instanceType; } /** *

The instance type.

*/ inline void SetInstanceType(const AttributeValue& value) { m_instanceType = value; } /** *

The instance type.

*/ inline void SetInstanceType(AttributeValue&& value) { m_instanceType = std::move(value); } /** *

The instance type.

*/ inline DescribeInstanceAttributeResponse& WithInstanceType(const AttributeValue& value) { SetInstanceType(value); return *this;} /** *

The instance type.

*/ inline DescribeInstanceAttributeResponse& WithInstanceType(AttributeValue&& value) { SetInstanceType(std::move(value)); return *this;} /** *

The kernel ID.

*/ inline const AttributeValue& GetKernelId() const{ return m_kernelId; } /** *

The kernel ID.

*/ inline void SetKernelId(const AttributeValue& value) { m_kernelId = value; } /** *

The kernel ID.

*/ inline void SetKernelId(AttributeValue&& value) { m_kernelId = std::move(value); } /** *

The kernel ID.

*/ inline DescribeInstanceAttributeResponse& WithKernelId(const AttributeValue& value) { SetKernelId(value); return *this;} /** *

The kernel ID.

*/ inline DescribeInstanceAttributeResponse& WithKernelId(AttributeValue&& value) { SetKernelId(std::move(value)); return *this;} /** *

A list of product codes.

*/ inline const Aws::Vector& GetProductCodes() const{ return m_productCodes; } /** *

A list of product codes.

*/ inline void SetProductCodes(const Aws::Vector& value) { m_productCodes = value; } /** *

A list of product codes.

*/ inline void SetProductCodes(Aws::Vector&& value) { m_productCodes = std::move(value); } /** *

A list of product codes.

*/ inline DescribeInstanceAttributeResponse& WithProductCodes(const Aws::Vector& value) { SetProductCodes(value); return *this;} /** *

A list of product codes.

*/ inline DescribeInstanceAttributeResponse& WithProductCodes(Aws::Vector&& value) { SetProductCodes(std::move(value)); return *this;} /** *

A list of product codes.

*/ inline DescribeInstanceAttributeResponse& AddProductCodes(const ProductCode& value) { m_productCodes.push_back(value); return *this; } /** *

A list of product codes.

*/ inline DescribeInstanceAttributeResponse& AddProductCodes(ProductCode&& value) { m_productCodes.push_back(std::move(value)); return *this; } /** *

The RAM disk ID.

*/ inline const AttributeValue& GetRamdiskId() const{ return m_ramdiskId; } /** *

The RAM disk ID.

*/ inline void SetRamdiskId(const AttributeValue& value) { m_ramdiskId = value; } /** *

The RAM disk ID.

*/ inline void SetRamdiskId(AttributeValue&& value) { m_ramdiskId = std::move(value); } /** *

The RAM disk ID.

*/ inline DescribeInstanceAttributeResponse& WithRamdiskId(const AttributeValue& value) { SetRamdiskId(value); return *this;} /** *

The RAM disk ID.

*/ inline DescribeInstanceAttributeResponse& WithRamdiskId(AttributeValue&& value) { SetRamdiskId(std::move(value)); return *this;} /** *

The device name of the root device volume (for example, * /dev/sda1).

*/ inline const AttributeValue& GetRootDeviceName() const{ return m_rootDeviceName; } /** *

The device name of the root device volume (for example, * /dev/sda1).

*/ inline void SetRootDeviceName(const AttributeValue& value) { m_rootDeviceName = value; } /** *

The device name of the root device volume (for example, * /dev/sda1).

*/ inline void SetRootDeviceName(AttributeValue&& value) { m_rootDeviceName = std::move(value); } /** *

The device name of the root device volume (for example, * /dev/sda1).

*/ inline DescribeInstanceAttributeResponse& WithRootDeviceName(const AttributeValue& value) { SetRootDeviceName(value); return *this;} /** *

The device name of the root device volume (for example, * /dev/sda1).

*/ inline DescribeInstanceAttributeResponse& WithRootDeviceName(AttributeValue&& value) { SetRootDeviceName(std::move(value)); return *this;} /** *

Indicates whether source/destination checking is enabled. A value of * true means that checking is enabled, and false means * that checking is disabled. This value must be false for a NAT * instance to perform NAT.

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

Indicates whether source/destination checking is enabled. A value of * true means that checking is enabled, and false means * that checking is disabled. This value must be false for a NAT * instance to perform NAT.

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

Indicates whether source/destination checking is enabled. A value of * true means that checking is enabled, and false means * that checking is disabled. This value must be false for a NAT * instance to perform NAT.

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

Indicates whether source/destination checking is enabled. A value of * true means that checking is enabled, and false means * that checking is disabled. This value must be false for a NAT * instance to perform NAT.

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

Indicates whether source/destination checking is enabled. A value of * true means that checking is enabled, and false means * that checking is disabled. This value must be false for a NAT * instance to perform NAT.

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

Indicates whether enhanced networking with the Intel 82599 Virtual Function * interface is enabled.

*/ inline const AttributeValue& GetSriovNetSupport() const{ return m_sriovNetSupport; } /** *

Indicates whether enhanced networking with the Intel 82599 Virtual Function * interface is enabled.

*/ inline void SetSriovNetSupport(const AttributeValue& value) { m_sriovNetSupport = value; } /** *

Indicates whether enhanced networking with the Intel 82599 Virtual Function * interface is enabled.

*/ inline void SetSriovNetSupport(AttributeValue&& value) { m_sriovNetSupport = std::move(value); } /** *

Indicates whether enhanced networking with the Intel 82599 Virtual Function * interface is enabled.

*/ inline DescribeInstanceAttributeResponse& WithSriovNetSupport(const AttributeValue& value) { SetSriovNetSupport(value); return *this;} /** *

Indicates whether enhanced networking with the Intel 82599 Virtual Function * interface is enabled.

*/ inline DescribeInstanceAttributeResponse& WithSriovNetSupport(AttributeValue&& value) { SetSriovNetSupport(std::move(value)); return *this;} /** *

The user data.

*/ inline const AttributeValue& GetUserData() const{ return m_userData; } /** *

The user data.

*/ inline void SetUserData(const AttributeValue& value) { m_userData = value; } /** *

The user data.

*/ inline void SetUserData(AttributeValue&& value) { m_userData = std::move(value); } /** *

The user data.

*/ inline DescribeInstanceAttributeResponse& WithUserData(const AttributeValue& value) { SetUserData(value); return *this;} /** *

The user data.

*/ inline DescribeInstanceAttributeResponse& WithUserData(AttributeValue&& value) { SetUserData(std::move(value)); return *this;} inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } inline DescribeInstanceAttributeResponse& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} inline DescribeInstanceAttributeResponse& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} private: Aws::Vector m_groups; Aws::Vector m_blockDeviceMappings; AttributeBooleanValue m_disableApiTermination; AttributeBooleanValue m_enaSupport; AttributeBooleanValue m_ebsOptimized; Aws::String m_instanceId; AttributeValue m_instanceInitiatedShutdownBehavior; AttributeValue m_instanceType; AttributeValue m_kernelId; Aws::Vector m_productCodes; AttributeValue m_ramdiskId; AttributeValue m_rootDeviceName; AttributeBooleanValue m_sourceDestCheck; AttributeValue m_sriovNetSupport; AttributeValue m_userData; ResponseMetadata m_responseMetadata; }; } // namespace Model } // namespace EC2 } // namespace Aws