Listing Amazon Cloud Map namespaces - Amazon Cloud Map
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Listing Amazon Cloud Map namespaces

After creating namespaces, you can view a list of the namespaces you've created by following these steps.

Amazon Web Services Management Console
  1. Sign in to the Amazon Web Services Management Console and open the Amazon Cloud Map console at https://console.amazonaws.cn/cloudmap/.

  2. In the navigation pane, choose Namespaces to view a list of namespaces. You can order namespaces by name, description, instance discovery mode, or namespace ID. You can also enter a namespace name or ID into the search field to locate and view a specific namespace.

Amazon CLI
  • List namespaces with the list-namespaces command.

    aws servicediscovery list-namespaces
Amazon SDK for Python (Boto3)
  1. If you don't already have Boto3 installed, you can find instructions for installing, configuring, and using Boto3 here.

  2. Import Boto3 and use servicediscovery as your service.

    import boto3 client = boto3.client('servicediscovery')
  3. List namespaces with list_namespaces().

    response = client.list_namespaces() # If you want to see the response print(response)

    Example response output

    { 'Namespaces': [ { 'Arn': 'arn:aws-cn::servicediscovery:us-west-2:123456789012:namespace/ns-xxxxxxxxxxxxxxx', 'CreateDate': 1585354387.357, 'Id': 'ns-xxxxxxxxxxxxxxx', 'Name': 'myFirstNamespace', 'Properties': { 'DnsProperties': { 'HostedZoneId': 'Z06752353VBUDTC32S84S', }, 'HttpProperties': { 'HttpName': 'myFirstNamespace', }, }, 'Type': 'DNS_PRIVATE', }, { 'Arn': 'arn:aws-cn::servicediscovery:us-west-2:123456789012:namespace/ns-xxxxxxxxxxxxxxx', 'CreateDate': 1586468974.698, 'Description': 'My second namespace', 'Id': 'ns-xxxxxxxxxxxxxxx', 'Name': 'mySecondNamespace.com', 'Properties': { 'DnsProperties': { }, 'HttpProperties': { 'HttpName': 'mySecondNamespace.com', }, }, 'Type': 'HTTP', }, { 'Arn': 'arn:aws-cn::servicediscovery:us-west-2:123456789012:namespace/ns-xxxxxxxxxxxxxxx', 'CreateDate': 1587055896.798, 'Id': 'ns-xxxxxxxxxxxxxxx', 'Name': 'myThirdNamespace.com', 'Properties': { 'DnsProperties': { 'HostedZoneId': 'Z09983722P0QME1B3KC8I', }, 'HttpProperties': { 'HttpName': 'myThirdNamespace.com', }, }, 'Type': 'DNS_PRIVATE', }, ], 'ResponseMetadata': { '...': '...', }, }