list_security_groups
async
¶
list_security_groups(
network_id: NetworkId,
*,
config_overrides: Optional[AsyncWickrClientConfig] = None,
next_token: Optional[GenericString] = None,
max_results: Optional[int] = None,
sort_fields: Optional[GenericString] = None,
sort_direction: Optional[SortDirection] = None,
) -> ListSecurityGroupsResponse
Retrieves a paginated list of security groups in a specified Wickr network. You can sort the results by various criteria.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network from which to list security groups.
-
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.
-
max_results(Optional[int], default:None) –The maximum number of security groups to return in a single page. Valid range is 1-100. Default is 10.
-
sort_fields(Optional[GenericString], default:None) –The field to sort security groups by. Accepted values include 'id' and 'name'.
-
sort_direction(Optional[SortDirection], default:None) –The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.
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.
-
ResourceNotFoundError–The requested resource could not be found. This error occurs when you try to access or modify a network, user, bot, security group, or other resource that doesn't exist or has been deleted.
-
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 security groups with pagination
>>> await client.list_security_groups(network_id='12345678', max_results=10, sort_fields='name', sort_direction='ASC')
List security groups - first page
Source code in docs_src/capo_wickr/_services/async_wickr.py
2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 | |