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
1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 | |