list_networks
¶
list_networks(
*,
config_overrides: Optional[WickrClientConfig] = None,
max_results: Optional[int] = None,
sort_fields: Optional[GenericString] = None,
sort_direction: Optional[SortDirection] = None,
next_token: Optional[GenericString] = None,
) -> ListNetworksResponse
Retrieves a paginated list of all Wickr networks associated with your Amazon Web Services account. You can sort the results by network ID or name.
Parameters:
-
max_results(Optional[int], default:None) –The maximum number of networks to return in a single page. Valid range is 1-100. Default is 10.
-
sort_fields(Optional[GenericString], default:None) –The field to sort networks by. Accepted values are 'networkId' and 'networkName'. Default is 'networkId'.
-
sort_direction(Optional[SortDirection], default:None) –The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.
-
next_token(Optional[GenericString], default:None) –The token for retrieving the next page of results. This is returned from a previous request when there are more results available.
Raises:
-
BadRequestError–The request was invalid or malformed. This error occurs when the request parameters do not meet the API requirements, such as invalid field values, missing required parameters, or improperly formatted data.
-
ForbiddenError–Access to the requested resource is forbidden. This error occurs when the authenticated user does not have the necessary permissions to perform the requested operation, even though they are authenticated.
-
InternalServerError–An unexpected error occurred on the server while processing the request. This indicates a problem with the Wickr service itself rather than with the request. If this error persists, contact Amazon Web Services Support.
-
RateLimitError–The request was throttled because too many requests were sent in a short period of time. Wait a moment and retry the request. Consider implementing exponential backoff in your application.
-
UnauthorizedError–The request was not authenticated or the authentication credentials were invalid. This error occurs when the request lacks valid authentication credentials or the credentials have expired.
-
ValidationError–One or more fields in the request failed validation. This error provides detailed information about which fields were invalid and why, allowing you to correct the request and retry.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
List networks with pagination
>>> client.list_networks(max_results=10, sort_fields='networkName', sort_direction='ASC')
List networks - first page
Source code in docs_src/capo_wickr/_services/wickr.py
2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 | |