Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Discovers registered instances for a specified namespace and service.
You can use DiscoverInstances
to discover instances for any type of
namespace. For public and private DNS namespaces, you can also use DNS
queries to discover instances.
Synopsis
- data DiscoverInstances = DiscoverInstances' {}
- newDiscoverInstances :: Text -> Text -> DiscoverInstances
- discoverInstances_queryParameters :: Lens' DiscoverInstances (Maybe (HashMap Text Text))
- discoverInstances_optionalParameters :: Lens' DiscoverInstances (Maybe (HashMap Text Text))
- discoverInstances_healthStatus :: Lens' DiscoverInstances (Maybe HealthStatusFilter)
- discoverInstances_maxResults :: Lens' DiscoverInstances (Maybe Natural)
- discoverInstances_namespaceName :: Lens' DiscoverInstances Text
- discoverInstances_serviceName :: Lens' DiscoverInstances Text
- data DiscoverInstancesResponse = DiscoverInstancesResponse' {}
- newDiscoverInstancesResponse :: Int -> DiscoverInstancesResponse
- discoverInstancesResponse_instances :: Lens' DiscoverInstancesResponse (Maybe [HttpInstanceSummary])
- discoverInstancesResponse_httpStatus :: Lens' DiscoverInstancesResponse Int
Creating a Request
data DiscoverInstances Source #
See: newDiscoverInstances
smart constructor.
DiscoverInstances' | |
|
Instances
:: Text | |
-> Text | |
-> DiscoverInstances |
Create a value of DiscoverInstances
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:queryParameters:DiscoverInstances'
, discoverInstances_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.
$sel:optionalParameters:DiscoverInstances'
, discoverInstances_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.
$sel:healthStatus:DiscoverInstances'
, discoverInstances_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.
$sel:maxResults:DiscoverInstances'
, discoverInstances_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.
$sel:namespaceName:DiscoverInstances'
, discoverInstances_namespaceName
- The HttpName
name of the namespace. It's found in the
HttpProperties
member of the Properties
member of the namespace.
$sel:serviceName:DiscoverInstances'
, discoverInstances_serviceName
- The name of the service that you specified when you registered the
instance.
Request Lenses
discoverInstances_queryParameters :: Lens' DiscoverInstances (Maybe (HashMap Text Text)) Source #
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.
discoverInstances_optionalParameters :: Lens' DiscoverInstances (Maybe (HashMap Text Text)) Source #
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.
discoverInstances_healthStatus :: Lens' DiscoverInstances (Maybe HealthStatusFilter) Source #
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.
discoverInstances_maxResults :: Lens' DiscoverInstances (Maybe Natural) Source #
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.
discoverInstances_namespaceName :: Lens' DiscoverInstances Text Source #
The HttpName
name of the namespace. It's found in the
HttpProperties
member of the Properties
member of the namespace.
discoverInstances_serviceName :: Lens' DiscoverInstances Text Source #
The name of the service that you specified when you registered the instance.
Destructuring the Response
data DiscoverInstancesResponse Source #
See: newDiscoverInstancesResponse
smart constructor.
DiscoverInstancesResponse' | |
|
Instances
newDiscoverInstancesResponse Source #
Create a value of DiscoverInstancesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:instances:DiscoverInstancesResponse'
, discoverInstancesResponse_instances
- A complex type that contains one HttpInstanceSummary
for each
registered instance.
$sel:httpStatus:DiscoverInstancesResponse'
, discoverInstancesResponse_httpStatus
- The response's http status code.
Response Lenses
discoverInstancesResponse_instances :: Lens' DiscoverInstancesResponse (Maybe [HttpInstanceSummary]) Source #
A complex type that contains one HttpInstanceSummary
for each
registered instance.
discoverInstancesResponse_httpStatus :: Lens' DiscoverInstancesResponse Int Source #
The response's http status code.