Returns summaries of the customer's organizations.
Parameters:
-
next_token
(Optional[NextToken], default:
None
)
–
The token to use to retrieve the next page of results. The first call does not contain any tokens.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of results to return in a single call.
Raises:
Source code in docs_src/capo_workmail/_services/work_mail.py
| def list_organizations(
self,
*,
config_overrides: Optional[WorkMailClientConfig] = None,
next_token: Optional["capo_workmail.types.next_token.NextToken"] = None,
max_results: Optional["capo_workmail.types.max_results.MaxResults"] = None,
) -> "capo_workmail.types.list_organizations_response.ListOrganizationsResponse":
"""<p>Returns summaries of the customer's organizations.</p>
Args:
next_token: <p>The token to use to retrieve the next page of results. The first call does not contain any tokens.</p>
max_results: <p>The maximum number of results to return in a single call.</p>
Raises:
capo_workmail.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the input parameters don't match the service's restrictions.</p>
capo_workmail.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_workmail.types.list_organizations_request.ListOrganizationsRequest]",
) -> OperationResponse[
"capo_workmail.types.list_organizations_response.ListOrganizationsResponse"
]:
import capo_workmail._operations.work_mail_service.list_organizations
output, http_response = (
capo_workmail._operations.work_mail_service.list_organizations.list_organizations(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListOrganizations")
)
input_: capo_workmail.types.list_organizations_request.ListOrganizationsRequest = {}
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
|