Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs. The groups from all Regions are returned.
Parameters:
-
next_token
(Optional[PaginationToken], default:
None
)
–
A token that indicates that there is more data available. You can use this token in a subsequent operation to retrieve the next set of results.
-
max_results
(Optional[MaxGroupResults], default:
None
)
–
Specify this parameter to limit how many groups are returned each time you use the ListGroups operation. If you omit this parameter, the default of 20 is used.
Raises:
Source code in docs_src/capo_synthetics/_services/synthetics.py
| def list_groups(
self,
*,
config_overrides: Optional[syntheticsClientConfig] = None,
next_token: Optional[
"capo_synthetics.types.pagination_token.PaginationToken"
] = None,
max_results: Optional[
"capo_synthetics.types.max_group_results.MaxGroupResults"
] = None,
) -> "capo_synthetics.types.list_groups_response.ListGroupsResponse":
"""<p>Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs. The groups from all Regions are returned.</p>
Args:
next_token: <p>A token that indicates that there is more data available. You can use this token in a subsequent operation to retrieve the next set of results.</p>
max_results: <p>Specify this parameter to limit how many groups are returned each time you use the <code>ListGroups</code> operation. If you omit this parameter, the default of 20 is used.</p>
Raises:
capo_synthetics.errors.internal_server_exception.InternalServerException: <p>An unknown internal error occurred.</p>
capo_synthetics.errors.validation_exception.ValidationException: <p>A parameter could not be validated.</p>
capo_synthetics.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_synthetics.types.list_groups_request.ListGroupsRequest]",
) -> OperationResponse[
"capo_synthetics.types.list_groups_response.ListGroupsResponse"
]:
import capo_synthetics._operations.synthetics.list_groups
output, http_response = (
capo_synthetics._operations.synthetics.list_groups.list_groups(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListGroups")
)
input_: capo_synthetics.types.list_groups_request.ListGroupsRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|