Returns a list of AWS re:Post Private private re:Posts in the account with some information about each private re:Post.
Parameters:
-
next_token
(Optional[str], default:
None
)
–
The token for the next set of private re:Posts to return. You receive this token from a previous ListSpaces operation.
-
max_results
(Optional[ListSpacesLimit], default:
None
)
–
The maximum number of private re:Posts to include in the results.
Raises:
Source code in docs_src/capo_repostspace/_services/repostspace.py
| def list_spaces(
self,
*,
config_overrides: Optional[repostspaceClientConfig] = None,
next_token: Optional[str] = None,
max_results: Optional[
"capo_repostspace.types.list_spaces_limit.ListSpacesLimit"
] = None,
) -> "capo_repostspace.types.list_spaces_output.ListSpacesOutput":
"""<p>Returns a list of AWS re:Post Private private re:Posts in the account with some information about each private re:Post.</p>
Args:
next_token: <p>The token for the next set of private re:Posts to return. You receive this token from a previous ListSpaces operation.</p>
max_results: <p>The maximum number of private re:Posts to include in the results.</p>
Raises:
capo_repostspace.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_repostspace.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
capo_repostspace.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
capo_repostspace.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
capo_repostspace.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_repostspace.types.list_spaces_input.ListSpacesInput]",
) -> OperationResponse[
"capo_repostspace.types.list_spaces_output.ListSpacesOutput"
]:
import capo_repostspace._operations.repost_space.list_spaces
output, http_response = (
capo_repostspace._operations.repost_space.list_spaces.list_spaces(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_repostspace.types.list_spaces_output.ListSpacesOutput",
) -> dict[str, Any]:
import capo_repostspace.types.list_spaces_output
return capo_repostspace.types.list_spaces_output.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("ListSpaces", redact_output=_redact_output),
)
input_: capo_repostspace.types.list_spaces_input.ListSpacesInput = {}
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
|