Skip to content

Lists summary information about the instances that you registered by using a specified service

Description

Lists summary information about the instances that you registered by using a specified service.

Usage

servicediscovery_list_instances(ServiceId, NextToken, MaxResults)

Arguments

  • ServiceId

    [required] The ID or Amazon Resource Name (ARN) of the service that you want to list instances for. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.

  • NextToken

    For the first list_instances request, omit this value.

    If more than MaxResults instances match the specified criteria, you can submit another list_instances request to get the next group of results. Specify the value of NextToken from the previous response in the next request.

  • MaxResults

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

Value

A list with the following syntax:

list(
  ResourceOwner = "string",
  Instances = list(
    list(
      Id = "string",
      Attributes = list(
        "string"
      ),
      CreatedByAccount = "string"
    )
  ),
  NextToken = "string"
)

Request syntax

svc$list_instances(
  ServiceId = "string",
  NextToken = "string",
  MaxResults = 123
)

Examples

# Example: List service instances
svc$list_instances(
  ServiceId = "srv-qzpwvt2tfqcegapy"
)