Discovers registered instances for a specified namespace and service
Source:R/servicediscovery_operations.R
servicediscovery_discover_instances.RdDiscovers registered instances for a specified namespace and service. You can use discover_instances to discover instances for any type of namespace. discover_instances returns a randomized list of instances allowing customers to distribute traffic evenly across instances. For public and private DNS namespaces, you can also use DNS queries to discover instances.
See https://www.paws-r-sdk.com/docs/servicediscovery_discover_instances/ for full documentation.
Usage
servicediscovery_discover_instances(
NamespaceName,
ServiceName,
MaxResults = NULL,
QueryParameters = NULL,
OptionalParameters = NULL,
HealthStatus = NULL,
OwnerAccount = NULL
)Arguments
- NamespaceName
[required] The
HttpNamename of the namespace. TheHttpNameis found in theHttpPropertiesmember of thePropertiesmember of the namespace. In most cases,NameandHttpNamematch. However, if you reuseNamefor namespace creation, a generated hash is added toHttpNameto distinguish the two.- ServiceName
[required] The name of the service that you specified when you registered the instance.
- MaxResults
The maximum number of instances that you want Cloud Map to return in the response to a
discover_instancesrequest. If you don't specify a value forMaxResults, Cloud Map returns up to 100 instances.- 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.- OptionalParameters
Opportunistic filters to scope the results based on custom attributes. If there are instances that match both the filters specified in both the
QueryParametersparameter 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 theQueryParametersparameter are returned.- 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.
- OwnerAccount
The ID of the Amazon Web Services account that owns the namespace associated with the instance, as specified in the namespace
ResourceOwnerfield. For instances associated with namespaces that are shared with your account, you must specify anOwnerAccount.