list_bots
¶
list_bots(
network_id: NetworkId,
*,
config_overrides: Optional[WickrClientConfig] = None,
next_token: Optional[GenericString] = None,
max_results: Optional[int] = None,
sort_fields: Optional[GenericString] = None,
sort_direction: Optional[SortDirection] = None,
display_name: Optional[GenericString] = None,
username: Optional[GenericString] = None,
status: Optional[BotStatus] = None,
group_id: Optional[GenericString] = None,
) -> ListBotsResponse
Retrieves a paginated list of bots in a specified Wickr network. You can filter and sort the results based on various criteria.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network from which to list bots.
-
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 bots to return in a single page. Valid range is 1-100. Default is 10.
-
sort_fields(Optional[GenericString], default:None) –The fields to sort bots by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'displayName', 'status', and 'groupId'.
-
sort_direction(Optional[SortDirection], default:None) –The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.
-
display_name(Optional[GenericString], default:None) –Filter results to only include bots with display names matching this value.
-
username(Optional[GenericString], default:None) –Filter results to only include bots with usernames matching this value.
-
status(Optional[BotStatus], default:None) –Filter results to only include bots with this status (1 for pending, 2 for active).
-
group_id(Optional[GenericString], default:None) –Filter results to only include bots belonging to this security group.
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 bots with pagination
>>> client.list_bots(network_id='12345678', max_results=10, sort_fields='username', sort_direction='ASC')
List bots with filters
Source code in docs_src/capo_wickr/_services/wickr.py
2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 | |