Discover Instances
| servicediscovery_discover_instances | R Documentation | 
Discovers registered instances for a specified namespace and service¶
Description¶
Discovers 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.
Usage¶
servicediscovery_discover_instances(NamespaceName, ServiceName,
  MaxResults, QueryParameters, OptionalParameters, HealthStatus)
Arguments¶
NamespaceName | 
[required] The   | 
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   | 
QueryParameters | 
Filters to scope the results based on custom attributes for the
instance (for example,   | 
OptionalParameters | 
Opportunistic filters to scope the results based on custom
attributes. If there are instances that match both the filters specified
in both the   | 
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.  | 
Value¶
A list with the following syntax:
list(
  Instances = list(
    list(
      InstanceId = "string",
      NamespaceName = "string",
      ServiceName = "string",
      HealthStatus = "HEALTHY"|"UNHEALTHY"|"UNKNOWN",
      Attributes = list(
        "string"
      )
    )
  ),
  InstancesRevision = 123
)
Request syntax¶
svc$discover_instances(
  NamespaceName = "string",
  ServiceName = "string",
  MaxResults = 123,
  QueryParameters = list(
    "string"
  ),
  OptionalParameters = list(
    "string"
  ),
  HealthStatus = "HEALTHY"|"UNHEALTHY"|"ALL"|"HEALTHY_OR_ELSE_ALL"
)
Examples¶
## Not run: 
# Example: Discover registered instances
svc$discover_instances(
  HealthStatus = "ALL",
  MaxResults = 10L,
  NamespaceName = "example.com",
  ServiceName = "myservice"
)
## End(Not run)