/** * 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 ServiceDiscovery { namespace Model { /** */ class DiscoverInstancesRequest : public ServiceDiscoveryRequest { public: AWS_SERVICEDISCOVERY_API DiscoverInstancesRequest(); // 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 "DiscoverInstances"; } AWS_SERVICEDISCOVERY_API Aws::String SerializePayload() const override; AWS_SERVICEDISCOVERY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The HttpName name of the namespace. It's found in the * HttpProperties member of the Properties member of the * namespace.

*/ inline const Aws::String& GetNamespaceName() const{ return m_namespaceName; } /** *

The HttpName name of the namespace. It's found in the * HttpProperties member of the Properties member of the * namespace.

*/ inline bool NamespaceNameHasBeenSet() const { return m_namespaceNameHasBeenSet; } /** *

The HttpName name of the namespace. It's found in the * HttpProperties member of the Properties member of the * namespace.

*/ inline void SetNamespaceName(const Aws::String& value) { m_namespaceNameHasBeenSet = true; m_namespaceName = value; } /** *

The HttpName name of the namespace. It's found in the * HttpProperties member of the Properties member of the * namespace.

*/ inline void SetNamespaceName(Aws::String&& value) { m_namespaceNameHasBeenSet = true; m_namespaceName = std::move(value); } /** *

The HttpName name of the namespace. It's found in the * HttpProperties member of the Properties member of the * namespace.

*/ inline void SetNamespaceName(const char* value) { m_namespaceNameHasBeenSet = true; m_namespaceName.assign(value); } /** *

The HttpName name of the namespace. It's found in the * HttpProperties member of the Properties member of the * namespace.

*/ inline DiscoverInstancesRequest& WithNamespaceName(const Aws::String& value) { SetNamespaceName(value); return *this;} /** *

The HttpName name of the namespace. It's found in the * HttpProperties member of the Properties member of the * namespace.

*/ inline DiscoverInstancesRequest& WithNamespaceName(Aws::String&& value) { SetNamespaceName(std::move(value)); return *this;} /** *

The HttpName name of the namespace. It's found in the * HttpProperties member of the Properties member of the * namespace.

*/ inline DiscoverInstancesRequest& WithNamespaceName(const char* value) { SetNamespaceName(value); return *this;} /** *

The name of the service that you specified when you registered the * instance.

*/ inline const Aws::String& GetServiceName() const{ return m_serviceName; } /** *

The name of the service that you specified when you registered the * instance.

*/ inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; } /** *

The name of the service that you specified when you registered the * instance.

*/ inline void SetServiceName(const Aws::String& value) { m_serviceNameHasBeenSet = true; m_serviceName = value; } /** *

The name of the service that you specified when you registered the * instance.

*/ inline void SetServiceName(Aws::String&& value) { m_serviceNameHasBeenSet = true; m_serviceName = std::move(value); } /** *

The name of the service that you specified when you registered the * instance.

*/ inline void SetServiceName(const char* value) { m_serviceNameHasBeenSet = true; m_serviceName.assign(value); } /** *

The name of the service that you specified when you registered the * instance.

*/ inline DiscoverInstancesRequest& WithServiceName(const Aws::String& value) { SetServiceName(value); return *this;} /** *

The name of the service that you specified when you registered the * instance.

*/ inline DiscoverInstancesRequest& WithServiceName(Aws::String&& value) { SetServiceName(std::move(value)); return *this;} /** *

The name of the service that you specified when you registered the * instance.

*/ inline DiscoverInstancesRequest& WithServiceName(const char* value) { SetServiceName(value); return *this;} /** *

The maximum number of instances that you want Cloud Map to return in the * response to a DiscoverInstances request. If you don't specify a * value for MaxResults, Cloud Map returns up to 100 instances.

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

The maximum number of instances that you want Cloud Map to return in the * response to a DiscoverInstances request. If you don't specify a * value for MaxResults, Cloud Map returns up to 100 instances.

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

The maximum number of instances that you want Cloud Map to return in the * response to a DiscoverInstances request. If you don't specify a * value for MaxResults, Cloud Map returns up to 100 instances.

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

The maximum number of instances that you want Cloud Map to return in the * response to a DiscoverInstances request. If you don't specify a * value for MaxResults, Cloud Map returns up to 100 instances.

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

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline const Aws::Map& GetQueryParameters() const{ return m_queryParameters; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline bool QueryParametersHasBeenSet() const { return m_queryParametersHasBeenSet; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline void SetQueryParameters(const Aws::Map& value) { m_queryParametersHasBeenSet = true; m_queryParameters = value; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline void SetQueryParameters(Aws::Map&& value) { m_queryParametersHasBeenSet = true; m_queryParameters = std::move(value); } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& WithQueryParameters(const Aws::Map& value) { SetQueryParameters(value); return *this;} /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& WithQueryParameters(Aws::Map&& value) { SetQueryParameters(std::move(value)); return *this;} /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& AddQueryParameters(const Aws::String& key, const Aws::String& value) { m_queryParametersHasBeenSet = true; m_queryParameters.emplace(key, value); return *this; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& AddQueryParameters(Aws::String&& key, const Aws::String& value) { m_queryParametersHasBeenSet = true; m_queryParameters.emplace(std::move(key), value); return *this; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& AddQueryParameters(const Aws::String& key, Aws::String&& value) { m_queryParametersHasBeenSet = true; m_queryParameters.emplace(key, std::move(value)); return *this; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& AddQueryParameters(Aws::String&& key, Aws::String&& value) { m_queryParametersHasBeenSet = true; m_queryParameters.emplace(std::move(key), std::move(value)); return *this; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& AddQueryParameters(const char* key, Aws::String&& value) { m_queryParametersHasBeenSet = true; m_queryParameters.emplace(key, std::move(value)); return *this; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& AddQueryParameters(Aws::String&& key, const char* value) { m_queryParametersHasBeenSet = true; m_queryParameters.emplace(std::move(key), value); return *this; } /** *

Filters to scope the results based on custom attributes for the instance (for * example, {version=v1, az=1a}). Only instances that match all the * specified key-value pairs are returned.

*/ inline DiscoverInstancesRequest& AddQueryParameters(const char* key, const char* value) { m_queryParametersHasBeenSet = true; m_queryParameters.emplace(key, value); return *this; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline const Aws::Map& GetOptionalParameters() const{ return m_optionalParameters; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline bool OptionalParametersHasBeenSet() const { return m_optionalParametersHasBeenSet; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline void SetOptionalParameters(const Aws::Map& value) { m_optionalParametersHasBeenSet = true; m_optionalParameters = value; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline void SetOptionalParameters(Aws::Map&& value) { m_optionalParametersHasBeenSet = true; m_optionalParameters = std::move(value); } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& WithOptionalParameters(const Aws::Map& value) { SetOptionalParameters(value); return *this;} /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& WithOptionalParameters(Aws::Map&& value) { SetOptionalParameters(std::move(value)); return *this;} /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& AddOptionalParameters(const Aws::String& key, const Aws::String& value) { m_optionalParametersHasBeenSet = true; m_optionalParameters.emplace(key, value); return *this; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& AddOptionalParameters(Aws::String&& key, const Aws::String& value) { m_optionalParametersHasBeenSet = true; m_optionalParameters.emplace(std::move(key), value); return *this; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& AddOptionalParameters(const Aws::String& key, Aws::String&& value) { m_optionalParametersHasBeenSet = true; m_optionalParameters.emplace(key, std::move(value)); return *this; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& AddOptionalParameters(Aws::String&& key, Aws::String&& value) { m_optionalParametersHasBeenSet = true; m_optionalParameters.emplace(std::move(key), std::move(value)); return *this; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& AddOptionalParameters(const char* key, Aws::String&& value) { m_optionalParametersHasBeenSet = true; m_optionalParameters.emplace(key, std::move(value)); return *this; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& AddOptionalParameters(Aws::String&& key, const char* value) { m_optionalParametersHasBeenSet = true; m_optionalParameters.emplace(std::move(key), value); return *this; } /** *

Opportunistic filters to scope the results based on custom attributes. If * there are instances that match both the filters specified in both the * QueryParameters parameter and this parameter, all of these * instances are returned. Otherwise, the filters are ignored, and only instances * that match the filters that are specified in the QueryParameters * parameter are returned.

*/ inline DiscoverInstancesRequest& AddOptionalParameters(const char* key, const char* value) { m_optionalParametersHasBeenSet = true; m_optionalParameters.emplace(key, value); return *this; } /** *

The health status of the instances that you want to discover. This parameter * is ignored for services that don't have a health check configured, and all * instances are returned.

HEALTHY

Returns healthy * instances.

UNHEALTHY

Returns unhealthy instances.

*
ALL

Returns all instances.

*
HEALTHY_OR_ELSE_ALL

Returns healthy instances, unless none are * reporting a healthy state. In that case, return all instances. This is also * called failing open.

*/ inline const HealthStatusFilter& GetHealthStatus() const{ return m_healthStatus; } /** *

The health status of the instances that you want to discover. This parameter * is ignored for services that don't have a health check configured, and all * instances are returned.

HEALTHY

Returns healthy * instances.

UNHEALTHY

Returns unhealthy instances.

*
ALL

Returns all instances.

*
HEALTHY_OR_ELSE_ALL

Returns healthy instances, unless none are * reporting a healthy state. In that case, return all instances. This is also * called failing open.

*/ inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; } /** *

The health status of the instances that you want to discover. This parameter * is ignored for services that don't have a health check configured, and all * instances are returned.

HEALTHY

Returns healthy * instances.

UNHEALTHY

Returns unhealthy instances.

*
ALL

Returns all instances.

*
HEALTHY_OR_ELSE_ALL

Returns healthy instances, unless none are * reporting a healthy state. In that case, return all instances. This is also * called failing open.

*/ inline void SetHealthStatus(const HealthStatusFilter& value) { m_healthStatusHasBeenSet = true; m_healthStatus = value; } /** *

The health status of the instances that you want to discover. This parameter * is ignored for services that don't have a health check configured, and all * instances are returned.

HEALTHY

Returns healthy * instances.

UNHEALTHY

Returns unhealthy instances.

*
ALL

Returns all instances.

*
HEALTHY_OR_ELSE_ALL

Returns healthy instances, unless none are * reporting a healthy state. In that case, return all instances. This is also * called failing open.

*/ inline void SetHealthStatus(HealthStatusFilter&& value) { m_healthStatusHasBeenSet = true; m_healthStatus = std::move(value); } /** *

The health status of the instances that you want to discover. This parameter * is ignored for services that don't have a health check configured, and all * instances are returned.

HEALTHY

Returns healthy * instances.

UNHEALTHY

Returns unhealthy instances.

*
ALL

Returns all instances.

*
HEALTHY_OR_ELSE_ALL

Returns healthy instances, unless none are * reporting a healthy state. In that case, return all instances. This is also * called failing open.

*/ inline DiscoverInstancesRequest& WithHealthStatus(const HealthStatusFilter& value) { SetHealthStatus(value); return *this;} /** *

The health status of the instances that you want to discover. This parameter * is ignored for services that don't have a health check configured, and all * instances are returned.

HEALTHY

Returns healthy * instances.

UNHEALTHY

Returns unhealthy instances.

*
ALL

Returns all instances.

*
HEALTHY_OR_ELSE_ALL

Returns healthy instances, unless none are * reporting a healthy state. In that case, return all instances. This is also * called failing open.

*/ inline DiscoverInstancesRequest& WithHealthStatus(HealthStatusFilter&& value) { SetHealthStatus(std::move(value)); return *this;} private: Aws::String m_namespaceName; bool m_namespaceNameHasBeenSet = false; Aws::String m_serviceName; bool m_serviceNameHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::Map m_queryParameters; bool m_queryParametersHasBeenSet = false; Aws::Map m_optionalParameters; bool m_optionalParametersHasBeenSet = false; HealthStatusFilter m_healthStatus; bool m_healthStatusHasBeenSet = false; }; } // namespace Model } // namespace ServiceDiscovery } // namespace Aws