list_namespaces
async
¶
list_namespaces(
*,
config_overrides: Optional[AsyncServiceDiscoveryClientConfig] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[MaxResults] = None,
filters: Optional[NamespaceFilters] = None,
) -> ListNamespacesResponse
Lists summary information about the namespaces that were created by the current Amazon Web Services account and shared with the current Amazon Web Services account.
Parameters:
-
next_token(Optional[NextToken], default:None) –For the first
ListNamespacesrequest, omit this value.If the response contains
NextToken, submit anotherListNamespacesrequest to get the next group of results. Specify the value ofNextTokenfrom the previous response in the next request.Cloud Map gets
MaxResultsnamespaces and then filters them based on the specified criteria. It's possible that no namespaces in the firstMaxResultsnamespaces matched the specified criteria but that subsequent groups ofMaxResultsnamespaces do contain namespaces that match the criteria. -
max_results(Optional[MaxResults], default:None) –The maximum number of namespaces that you want Cloud Map to return in the response to a
ListNamespacesrequest. If you don't specify a value forMaxResults, Cloud Map returns up to 100 namespaces. -
filters(Optional[NamespaceFilters], default:None) –A complex type that contains specifications for the namespaces that you want to list.
If you specify more than one filter, a namespace must match all filters to be returned by
ListNamespaces.
Raises:
-
InvalidInput–One or more specified values aren't valid. For example, a required value might be missing, a numeric value might be outside the allowed range, or a string value might exceed length constraints.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Example: List namespaces Example: List namespaces
>>> await client.list_namespaces()
List namespaces filtered by resource owner
This example shows how to list namespaces that are shared with you from other AWS accounts using the RESOURCE_OWNER filter.
>>> await client.list_namespaces(filters=[{'Name': 'RESOURCE_OWNER', 'Values': ['OTHER_ACCOUNTS']}])
Source code in docs_src/capo_servicediscovery/_services/async_service_discovery.py
1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 | |