/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class DescribeHostsRequest : public EC2Request { public: AWS_EC2_API DescribeHostsRequest(); // 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 "DescribeHosts"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The filters.

  • auto-placement - Whether * auto-placement is enabled or disabled (on | off).

    *
  • availability-zone - The Availability Zone of the * host.

  • client-token - The idempotency token that * you provided when you allocated the host.

  • * host-reservation-id - The ID of the reservation assigned to this * host.

  • instance-type - The instance type size * that the Dedicated Host is configured to support.

  • * state - The allocation state of the Dedicated Host * (available | under-assessment | * permanent-failure | released | * released-permanent-failure).

  • * tag-key - The key of a tag assigned to the resource. Use this * filter to find all resources assigned a tag with a specific key, regardless of * the tag value.

*/ inline const Aws::Vector& GetFilter() const{ return m_filter; } /** *

The filters.

  • auto-placement - Whether * auto-placement is enabled or disabled (on | off).

    *
  • availability-zone - The Availability Zone of the * host.

  • client-token - The idempotency token that * you provided when you allocated the host.

  • * host-reservation-id - The ID of the reservation assigned to this * host.

  • instance-type - The instance type size * that the Dedicated Host is configured to support.

  • * state - The allocation state of the Dedicated Host * (available | under-assessment | * permanent-failure | released | * released-permanent-failure).

  • * tag-key - The key of a tag assigned to the resource. Use this * filter to find all resources assigned a tag with a specific key, regardless of * the tag value.

*/ inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; } /** *

The filters.

  • auto-placement - Whether * auto-placement is enabled or disabled (on | off).

    *
  • availability-zone - The Availability Zone of the * host.

  • client-token - The idempotency token that * you provided when you allocated the host.

  • * host-reservation-id - The ID of the reservation assigned to this * host.

  • instance-type - The instance type size * that the Dedicated Host is configured to support.

  • * state - The allocation state of the Dedicated Host * (available | under-assessment | * permanent-failure | released | * released-permanent-failure).

  • * tag-key - The key of a tag assigned to the resource. Use this * filter to find all resources assigned a tag with a specific key, regardless of * the tag value.

*/ inline void SetFilter(const Aws::Vector& value) { m_filterHasBeenSet = true; m_filter = value; } /** *

The filters.

  • auto-placement - Whether * auto-placement is enabled or disabled (on | off).

    *
  • availability-zone - The Availability Zone of the * host.

  • client-token - The idempotency token that * you provided when you allocated the host.

  • * host-reservation-id - The ID of the reservation assigned to this * host.

  • instance-type - The instance type size * that the Dedicated Host is configured to support.

  • * state - The allocation state of the Dedicated Host * (available | under-assessment | * permanent-failure | released | * released-permanent-failure).

  • * tag-key - The key of a tag assigned to the resource. Use this * filter to find all resources assigned a tag with a specific key, regardless of * the tag value.

*/ inline void SetFilter(Aws::Vector&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); } /** *

The filters.

  • auto-placement - Whether * auto-placement is enabled or disabled (on | off).

    *
  • availability-zone - The Availability Zone of the * host.

  • client-token - The idempotency token that * you provided when you allocated the host.

  • * host-reservation-id - The ID of the reservation assigned to this * host.

  • instance-type - The instance type size * that the Dedicated Host is configured to support.

  • * state - The allocation state of the Dedicated Host * (available | under-assessment | * permanent-failure | released | * released-permanent-failure).

  • * tag-key - The key of a tag assigned to the resource. Use this * filter to find all resources assigned a tag with a specific key, regardless of * the tag value.

*/ inline DescribeHostsRequest& WithFilter(const Aws::Vector& value) { SetFilter(value); return *this;} /** *

The filters.

  • auto-placement - Whether * auto-placement is enabled or disabled (on | off).

    *
  • availability-zone - The Availability Zone of the * host.

  • client-token - The idempotency token that * you provided when you allocated the host.

  • * host-reservation-id - The ID of the reservation assigned to this * host.

  • instance-type - The instance type size * that the Dedicated Host is configured to support.

  • * state - The allocation state of the Dedicated Host * (available | under-assessment | * permanent-failure | released | * released-permanent-failure).

  • * tag-key - The key of a tag assigned to the resource. Use this * filter to find all resources assigned a tag with a specific key, regardless of * the tag value.

*/ inline DescribeHostsRequest& WithFilter(Aws::Vector&& value) { SetFilter(std::move(value)); return *this;} /** *

The filters.

  • auto-placement - Whether * auto-placement is enabled or disabled (on | off).

    *
  • availability-zone - The Availability Zone of the * host.

  • client-token - The idempotency token that * you provided when you allocated the host.

  • * host-reservation-id - The ID of the reservation assigned to this * host.

  • instance-type - The instance type size * that the Dedicated Host is configured to support.

  • * state - The allocation state of the Dedicated Host * (available | under-assessment | * permanent-failure | released | * released-permanent-failure).

  • * tag-key - The key of a tag assigned to the resource. Use this * filter to find all resources assigned a tag with a specific key, regardless of * the tag value.

*/ inline DescribeHostsRequest& AddFilter(const Filter& value) { m_filterHasBeenSet = true; m_filter.push_back(value); return *this; } /** *

The filters.

  • auto-placement - Whether * auto-placement is enabled or disabled (on | off).

    *
  • availability-zone - The Availability Zone of the * host.

  • client-token - The idempotency token that * you provided when you allocated the host.

  • * host-reservation-id - The ID of the reservation assigned to this * host.

  • instance-type - The instance type size * that the Dedicated Host is configured to support.

  • * state - The allocation state of the Dedicated Host * (available | under-assessment | * permanent-failure | released | * released-permanent-failure).

  • * tag-key - The key of a tag assigned to the resource. Use this * filter to find all resources assigned a tag with a specific key, regardless of * the tag value.

*/ inline DescribeHostsRequest& AddFilter(Filter&& value) { m_filterHasBeenSet = true; m_filter.push_back(std::move(value)); return *this; } /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline const Aws::Vector& GetHostIds() const{ return m_hostIds; } /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline bool HostIdsHasBeenSet() const { return m_hostIdsHasBeenSet; } /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline void SetHostIds(const Aws::Vector& value) { m_hostIdsHasBeenSet = true; m_hostIds = value; } /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline void SetHostIds(Aws::Vector&& value) { m_hostIdsHasBeenSet = true; m_hostIds = std::move(value); } /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline DescribeHostsRequest& WithHostIds(const Aws::Vector& value) { SetHostIds(value); return *this;} /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline DescribeHostsRequest& WithHostIds(Aws::Vector&& value) { SetHostIds(std::move(value)); return *this;} /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline DescribeHostsRequest& AddHostIds(const Aws::String& value) { m_hostIdsHasBeenSet = true; m_hostIds.push_back(value); return *this; } /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline DescribeHostsRequest& AddHostIds(Aws::String&& value) { m_hostIdsHasBeenSet = true; m_hostIds.push_back(std::move(value)); return *this; } /** *

The IDs of the Dedicated Hosts. The IDs are used for targeted instance * launches.

*/ inline DescribeHostsRequest& AddHostIds(const char* value) { m_hostIdsHasBeenSet = true; m_hostIds.push_back(value); return *this; } /** *

The maximum number of results to return for the request in a single page. The * remaining results can be seen by sending another request with the returned * nextToken value. This value can be between 5 and 500. If * maxResults is given a larger value than 500, you receive an * error.

You cannot specify this parameter and the host IDs parameter in * the same request.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

The maximum number of results to return for the request in a single page. The * remaining results can be seen by sending another request with the returned * nextToken value. This value can be between 5 and 500. If * maxResults is given a larger value than 500, you receive an * error.

You cannot specify this parameter and the host IDs parameter in * the same request.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

The maximum number of results to return for the request in a single page. The * remaining results can be seen by sending another request with the returned * nextToken value. This value can be between 5 and 500. If * maxResults is given a larger value than 500, you receive an * error.

You cannot specify this parameter and the host IDs parameter in * the same request.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

The maximum number of results to return for the request in a single page. The * remaining results can be seen by sending another request with the returned * nextToken value. This value can be between 5 and 500. If * maxResults is given a larger value than 500, you receive an * error.

You cannot specify this parameter and the host IDs parameter in * the same request.

*/ inline DescribeHostsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

The token to use to retrieve the next page of results.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

The token to use to retrieve the next page of results.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

The token to use to retrieve the next page of results.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

The token to use to retrieve the next page of results.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

The token to use to retrieve the next page of results.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

The token to use to retrieve the next page of results.

*/ inline DescribeHostsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

The token to use to retrieve the next page of results.

*/ inline DescribeHostsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

The token to use to retrieve the next page of results.

*/ inline DescribeHostsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} private: Aws::Vector m_filter; bool m_filterHasBeenSet = false; Aws::Vector m_hostIds; bool m_hostIdsHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws