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).
Viewing a List of Services That You Created in a Namespace
To view a list of the services that you created in a namespace, perform the following procedure.
- Amazon Web Services Management Console
-
Sign in to the Amazon Web Services Management Console and open the Amazon Cloud Map console at https://console.amazonaws.cn/cloudmap/.
-
In the navigation pane, choose Namespaces.
-
Choose the name of the namespace that contains the services that you want to list.
- Amazon CLI
-
- Amazon SDK for Python (Boto3)
-
-
If you don't already have Boto3
installed, you can find
instructions for installing, configuring, and using Boto3
here.
-
Import Boto3
and use servicediscovery
as your service.
import boto3
client = boto3.client('servicediscovery')
-
List services with list_services()
.
response = client.list_services()
# If you want to see the response
print(response)
Example response output
{
'Services': [
{
'Arn': 'arn:aws-cn:servicediscovery:us-west-2:123456789012:service/srv-xxxxxxxxxxxxxxxx',
'CreateDate': 1587081768.334,
'DnsConfig': {
'DnsRecords': [
{
'TTL': 60,
'Type': 'A',
},
],
'RoutingPolicy': 'MULTIVALUE',
},
'Id': 'srv-xxxxxxxxxxxxxxxx',
'Name': 'myservice',
},
],
'ResponseMetadata': {
'...': '...',
},
}