/** * 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 namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

The details of an Amazon EC2 instance.

See Also:

AWS * API Reference

*/ class AwsEc2InstanceDetails { public: AWS_SECURITYHUB_API AwsEc2InstanceDetails(); AWS_SECURITYHUB_API AwsEc2InstanceDetails(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API AwsEc2InstanceDetails& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The instance type of the instance.

*/ inline const Aws::String& GetType() const{ return m_type; } /** *

The instance type of the instance.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The instance type of the instance.

*/ inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The instance type of the instance.

*/ inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The instance type of the instance.

*/ inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } /** *

The instance type of the instance.

*/ inline AwsEc2InstanceDetails& WithType(const Aws::String& value) { SetType(value); return *this;} /** *

The instance type of the instance.

*/ inline AwsEc2InstanceDetails& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} /** *

The instance type of the instance.

*/ inline AwsEc2InstanceDetails& WithType(const char* value) { SetType(value); return *this;} /** *

The Amazon Machine Image (AMI) ID of the instance.

*/ inline const Aws::String& GetImageId() const{ return m_imageId; } /** *

The Amazon Machine Image (AMI) ID of the instance.

*/ inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; } /** *

The Amazon Machine Image (AMI) ID of the instance.

*/ inline void SetImageId(const Aws::String& value) { m_imageIdHasBeenSet = true; m_imageId = value; } /** *

The Amazon Machine Image (AMI) ID of the instance.

*/ inline void SetImageId(Aws::String&& value) { m_imageIdHasBeenSet = true; m_imageId = std::move(value); } /** *

The Amazon Machine Image (AMI) ID of the instance.

*/ inline void SetImageId(const char* value) { m_imageIdHasBeenSet = true; m_imageId.assign(value); } /** *

The Amazon Machine Image (AMI) ID of the instance.

*/ inline AwsEc2InstanceDetails& WithImageId(const Aws::String& value) { SetImageId(value); return *this;} /** *

The Amazon Machine Image (AMI) ID of the instance.

*/ inline AwsEc2InstanceDetails& WithImageId(Aws::String&& value) { SetImageId(std::move(value)); return *this;} /** *

The Amazon Machine Image (AMI) ID of the instance.

*/ inline AwsEc2InstanceDetails& WithImageId(const char* value) { SetImageId(value); return *this;} /** *

The IPv4 addresses associated with the instance.

*/ inline const Aws::Vector& GetIpV4Addresses() const{ return m_ipV4Addresses; } /** *

The IPv4 addresses associated with the instance.

*/ inline bool IpV4AddressesHasBeenSet() const { return m_ipV4AddressesHasBeenSet; } /** *

The IPv4 addresses associated with the instance.

*/ inline void SetIpV4Addresses(const Aws::Vector& value) { m_ipV4AddressesHasBeenSet = true; m_ipV4Addresses = value; } /** *

The IPv4 addresses associated with the instance.

*/ inline void SetIpV4Addresses(Aws::Vector&& value) { m_ipV4AddressesHasBeenSet = true; m_ipV4Addresses = std::move(value); } /** *

The IPv4 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& WithIpV4Addresses(const Aws::Vector& value) { SetIpV4Addresses(value); return *this;} /** *

The IPv4 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& WithIpV4Addresses(Aws::Vector&& value) { SetIpV4Addresses(std::move(value)); return *this;} /** *

The IPv4 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& AddIpV4Addresses(const Aws::String& value) { m_ipV4AddressesHasBeenSet = true; m_ipV4Addresses.push_back(value); return *this; } /** *

The IPv4 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& AddIpV4Addresses(Aws::String&& value) { m_ipV4AddressesHasBeenSet = true; m_ipV4Addresses.push_back(std::move(value)); return *this; } /** *

The IPv4 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& AddIpV4Addresses(const char* value) { m_ipV4AddressesHasBeenSet = true; m_ipV4Addresses.push_back(value); return *this; } /** *

The IPv6 addresses associated with the instance.

*/ inline const Aws::Vector& GetIpV6Addresses() const{ return m_ipV6Addresses; } /** *

The IPv6 addresses associated with the instance.

*/ inline bool IpV6AddressesHasBeenSet() const { return m_ipV6AddressesHasBeenSet; } /** *

The IPv6 addresses associated with the instance.

*/ inline void SetIpV6Addresses(const Aws::Vector& value) { m_ipV6AddressesHasBeenSet = true; m_ipV6Addresses = value; } /** *

The IPv6 addresses associated with the instance.

*/ inline void SetIpV6Addresses(Aws::Vector&& value) { m_ipV6AddressesHasBeenSet = true; m_ipV6Addresses = std::move(value); } /** *

The IPv6 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& WithIpV6Addresses(const Aws::Vector& value) { SetIpV6Addresses(value); return *this;} /** *

The IPv6 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& WithIpV6Addresses(Aws::Vector&& value) { SetIpV6Addresses(std::move(value)); return *this;} /** *

The IPv6 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& AddIpV6Addresses(const Aws::String& value) { m_ipV6AddressesHasBeenSet = true; m_ipV6Addresses.push_back(value); return *this; } /** *

The IPv6 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& AddIpV6Addresses(Aws::String&& value) { m_ipV6AddressesHasBeenSet = true; m_ipV6Addresses.push_back(std::move(value)); return *this; } /** *

The IPv6 addresses associated with the instance.

*/ inline AwsEc2InstanceDetails& AddIpV6Addresses(const char* value) { m_ipV6AddressesHasBeenSet = true; m_ipV6Addresses.push_back(value); return *this; } /** *

The key name associated with the instance.

*/ inline const Aws::String& GetKeyName() const{ return m_keyName; } /** *

The key name associated with the instance.

*/ inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; } /** *

The key name associated with the instance.

*/ inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; } /** *

The key name associated with the instance.

*/ inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); } /** *

The key name associated with the instance.

*/ inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); } /** *

The key name associated with the instance.

*/ inline AwsEc2InstanceDetails& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;} /** *

The key name associated with the instance.

*/ inline AwsEc2InstanceDetails& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;} /** *

The key name associated with the instance.

*/ inline AwsEc2InstanceDetails& WithKeyName(const char* value) { SetKeyName(value); return *this;} /** *

The IAM profile ARN of the instance.

*/ inline const Aws::String& GetIamInstanceProfileArn() const{ return m_iamInstanceProfileArn; } /** *

The IAM profile ARN of the instance.

*/ inline bool IamInstanceProfileArnHasBeenSet() const { return m_iamInstanceProfileArnHasBeenSet; } /** *

The IAM profile ARN of the instance.

*/ inline void SetIamInstanceProfileArn(const Aws::String& value) { m_iamInstanceProfileArnHasBeenSet = true; m_iamInstanceProfileArn = value; } /** *

The IAM profile ARN of the instance.

*/ inline void SetIamInstanceProfileArn(Aws::String&& value) { m_iamInstanceProfileArnHasBeenSet = true; m_iamInstanceProfileArn = std::move(value); } /** *

The IAM profile ARN of the instance.

*/ inline void SetIamInstanceProfileArn(const char* value) { m_iamInstanceProfileArnHasBeenSet = true; m_iamInstanceProfileArn.assign(value); } /** *

The IAM profile ARN of the instance.

*/ inline AwsEc2InstanceDetails& WithIamInstanceProfileArn(const Aws::String& value) { SetIamInstanceProfileArn(value); return *this;} /** *

The IAM profile ARN of the instance.

*/ inline AwsEc2InstanceDetails& WithIamInstanceProfileArn(Aws::String&& value) { SetIamInstanceProfileArn(std::move(value)); return *this;} /** *

The IAM profile ARN of the instance.

*/ inline AwsEc2InstanceDetails& WithIamInstanceProfileArn(const char* value) { SetIamInstanceProfileArn(value); return *this;} /** *

The identifier of the VPC that the instance was launched in.

*/ inline const Aws::String& GetVpcId() const{ return m_vpcId; } /** *

The identifier of the VPC that the instance was launched in.

*/ inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; } /** *

The identifier of the VPC that the instance was launched in.

*/ inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; } /** *

The identifier of the VPC that the instance was launched in.

*/ inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); } /** *

The identifier of the VPC that the instance was launched in.

*/ inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); } /** *

The identifier of the VPC that the instance was launched in.

*/ inline AwsEc2InstanceDetails& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;} /** *

The identifier of the VPC that the instance was launched in.

*/ inline AwsEc2InstanceDetails& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;} /** *

The identifier of the VPC that the instance was launched in.

*/ inline AwsEc2InstanceDetails& WithVpcId(const char* value) { SetVpcId(value); return *this;} /** *

The identifier of the subnet that the instance was launched in.

*/ inline const Aws::String& GetSubnetId() const{ return m_subnetId; } /** *

The identifier of the subnet that the instance was launched in.

*/ inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; } /** *

The identifier of the subnet that the instance was launched in.

*/ inline void SetSubnetId(const Aws::String& value) { m_subnetIdHasBeenSet = true; m_subnetId = value; } /** *

The identifier of the subnet that the instance was launched in.

*/ inline void SetSubnetId(Aws::String&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::move(value); } /** *

The identifier of the subnet that the instance was launched in.

*/ inline void SetSubnetId(const char* value) { m_subnetIdHasBeenSet = true; m_subnetId.assign(value); } /** *

The identifier of the subnet that the instance was launched in.

*/ inline AwsEc2InstanceDetails& WithSubnetId(const Aws::String& value) { SetSubnetId(value); return *this;} /** *

The identifier of the subnet that the instance was launched in.

*/ inline AwsEc2InstanceDetails& WithSubnetId(Aws::String&& value) { SetSubnetId(std::move(value)); return *this;} /** *

The identifier of the subnet that the instance was launched in.

*/ inline AwsEc2InstanceDetails& WithSubnetId(const char* value) { SetSubnetId(value); return *this;} /** *

Indicates when the instance was launched.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline const Aws::String& GetLaunchedAt() const{ return m_launchedAt; } /** *

Indicates when the instance was launched.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline bool LaunchedAtHasBeenSet() const { return m_launchedAtHasBeenSet; } /** *

Indicates when the instance was launched.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetLaunchedAt(const Aws::String& value) { m_launchedAtHasBeenSet = true; m_launchedAt = value; } /** *

Indicates when the instance was launched.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetLaunchedAt(Aws::String&& value) { m_launchedAtHasBeenSet = true; m_launchedAt = std::move(value); } /** *

Indicates when the instance was launched.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetLaunchedAt(const char* value) { m_launchedAtHasBeenSet = true; m_launchedAt.assign(value); } /** *

Indicates when the instance was launched.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsEc2InstanceDetails& WithLaunchedAt(const Aws::String& value) { SetLaunchedAt(value); return *this;} /** *

Indicates when the instance was launched.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsEc2InstanceDetails& WithLaunchedAt(Aws::String&& value) { SetLaunchedAt(std::move(value)); return *this;} /** *

Indicates when the instance was launched.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsEc2InstanceDetails& WithLaunchedAt(const char* value) { SetLaunchedAt(value); return *this;} /** *

The identifiers of the network interfaces for the EC2 instance. The details * for each network interface are in a corresponding * AwsEc2NetworkInterfacesDetails object.

*/ inline const Aws::Vector& GetNetworkInterfaces() const{ return m_networkInterfaces; } /** *

The identifiers of the network interfaces for the EC2 instance. The details * for each network interface are in a corresponding * AwsEc2NetworkInterfacesDetails object.

*/ inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; } /** *

The identifiers of the network interfaces for the EC2 instance. The details * for each network interface are in a corresponding * AwsEc2NetworkInterfacesDetails object.

*/ inline void SetNetworkInterfaces(const Aws::Vector& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = value; } /** *

The identifiers of the network interfaces for the EC2 instance. The details * for each network interface are in a corresponding * AwsEc2NetworkInterfacesDetails object.

*/ inline void SetNetworkInterfaces(Aws::Vector&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = std::move(value); } /** *

The identifiers of the network interfaces for the EC2 instance. The details * for each network interface are in a corresponding * AwsEc2NetworkInterfacesDetails object.

*/ inline AwsEc2InstanceDetails& WithNetworkInterfaces(const Aws::Vector& value) { SetNetworkInterfaces(value); return *this;} /** *

The identifiers of the network interfaces for the EC2 instance. The details * for each network interface are in a corresponding * AwsEc2NetworkInterfacesDetails object.

*/ inline AwsEc2InstanceDetails& WithNetworkInterfaces(Aws::Vector&& value) { SetNetworkInterfaces(std::move(value)); return *this;} /** *

The identifiers of the network interfaces for the EC2 instance. The details * for each network interface are in a corresponding * AwsEc2NetworkInterfacesDetails object.

*/ inline AwsEc2InstanceDetails& AddNetworkInterfaces(const AwsEc2InstanceNetworkInterfacesDetails& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(value); return *this; } /** *

The identifiers of the network interfaces for the EC2 instance. The details * for each network interface are in a corresponding * AwsEc2NetworkInterfacesDetails object.

*/ inline AwsEc2InstanceDetails& AddNetworkInterfaces(AwsEc2InstanceNetworkInterfacesDetails&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(std::move(value)); return *this; } /** *

The virtualization type of the Amazon Machine Image (AMI) required to launch * the instance.

*/ inline const Aws::String& GetVirtualizationType() const{ return m_virtualizationType; } /** *

The virtualization type of the Amazon Machine Image (AMI) required to launch * the instance.

*/ inline bool VirtualizationTypeHasBeenSet() const { return m_virtualizationTypeHasBeenSet; } /** *

The virtualization type of the Amazon Machine Image (AMI) required to launch * the instance.

*/ inline void SetVirtualizationType(const Aws::String& value) { m_virtualizationTypeHasBeenSet = true; m_virtualizationType = value; } /** *

The virtualization type of the Amazon Machine Image (AMI) required to launch * the instance.

*/ inline void SetVirtualizationType(Aws::String&& value) { m_virtualizationTypeHasBeenSet = true; m_virtualizationType = std::move(value); } /** *

The virtualization type of the Amazon Machine Image (AMI) required to launch * the instance.

*/ inline void SetVirtualizationType(const char* value) { m_virtualizationTypeHasBeenSet = true; m_virtualizationType.assign(value); } /** *

The virtualization type of the Amazon Machine Image (AMI) required to launch * the instance.

*/ inline AwsEc2InstanceDetails& WithVirtualizationType(const Aws::String& value) { SetVirtualizationType(value); return *this;} /** *

The virtualization type of the Amazon Machine Image (AMI) required to launch * the instance.

*/ inline AwsEc2InstanceDetails& WithVirtualizationType(Aws::String&& value) { SetVirtualizationType(std::move(value)); return *this;} /** *

The virtualization type of the Amazon Machine Image (AMI) required to launch * the instance.

*/ inline AwsEc2InstanceDetails& WithVirtualizationType(const char* value) { SetVirtualizationType(value); return *this;} /** *

Details about the metadata options for the Amazon EC2 instance.

*/ inline const AwsEc2InstanceMetadataOptions& GetMetadataOptions() const{ return m_metadataOptions; } /** *

Details about the metadata options for the Amazon EC2 instance.

*/ inline bool MetadataOptionsHasBeenSet() const { return m_metadataOptionsHasBeenSet; } /** *

Details about the metadata options for the Amazon EC2 instance.

*/ inline void SetMetadataOptions(const AwsEc2InstanceMetadataOptions& value) { m_metadataOptionsHasBeenSet = true; m_metadataOptions = value; } /** *

Details about the metadata options for the Amazon EC2 instance.

*/ inline void SetMetadataOptions(AwsEc2InstanceMetadataOptions&& value) { m_metadataOptionsHasBeenSet = true; m_metadataOptions = std::move(value); } /** *

Details about the metadata options for the Amazon EC2 instance.

*/ inline AwsEc2InstanceDetails& WithMetadataOptions(const AwsEc2InstanceMetadataOptions& value) { SetMetadataOptions(value); return *this;} /** *

Details about the metadata options for the Amazon EC2 instance.

*/ inline AwsEc2InstanceDetails& WithMetadataOptions(AwsEc2InstanceMetadataOptions&& value) { SetMetadataOptions(std::move(value)); return *this;} /** *

Describes the type of monitoring that’s turned on for an instance.

*/ inline const AwsEc2InstanceMonitoringDetails& GetMonitoring() const{ return m_monitoring; } /** *

Describes the type of monitoring that’s turned on for an instance.

*/ inline bool MonitoringHasBeenSet() const { return m_monitoringHasBeenSet; } /** *

Describes the type of monitoring that’s turned on for an instance.

*/ inline void SetMonitoring(const AwsEc2InstanceMonitoringDetails& value) { m_monitoringHasBeenSet = true; m_monitoring = value; } /** *

Describes the type of monitoring that’s turned on for an instance.

*/ inline void SetMonitoring(AwsEc2InstanceMonitoringDetails&& value) { m_monitoringHasBeenSet = true; m_monitoring = std::move(value); } /** *

Describes the type of monitoring that’s turned on for an instance.

*/ inline AwsEc2InstanceDetails& WithMonitoring(const AwsEc2InstanceMonitoringDetails& value) { SetMonitoring(value); return *this;} /** *

Describes the type of monitoring that’s turned on for an instance.

*/ inline AwsEc2InstanceDetails& WithMonitoring(AwsEc2InstanceMonitoringDetails&& value) { SetMonitoring(std::move(value)); return *this;} private: Aws::String m_type; bool m_typeHasBeenSet = false; Aws::String m_imageId; bool m_imageIdHasBeenSet = false; Aws::Vector m_ipV4Addresses; bool m_ipV4AddressesHasBeenSet = false; Aws::Vector m_ipV6Addresses; bool m_ipV6AddressesHasBeenSet = false; Aws::String m_keyName; bool m_keyNameHasBeenSet = false; Aws::String m_iamInstanceProfileArn; bool m_iamInstanceProfileArnHasBeenSet = false; Aws::String m_vpcId; bool m_vpcIdHasBeenSet = false; Aws::String m_subnetId; bool m_subnetIdHasBeenSet = false; Aws::String m_launchedAt; bool m_launchedAtHasBeenSet = false; Aws::Vector m_networkInterfaces; bool m_networkInterfacesHasBeenSet = false; Aws::String m_virtualizationType; bool m_virtualizationTypeHasBeenSet = false; AwsEc2InstanceMetadataOptions m_metadataOptions; bool m_metadataOptionsHasBeenSet = false; AwsEc2InstanceMonitoringDetails m_monitoring; bool m_monitoringHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws