Returns the list of channel within a private re:Post with some information about each channel.
Parameters:
-
space_id
(SpaceId)
–
The unique ID of the private re:Post.
-
next_token
(Optional[str], default:
None
)
–
The token for the next set of channel to return. You receive this token from a previous ListChannels operation.
-
max_results
(Optional[ListChannelsLimit], default:
None
)
–
The maximum number of channels to include in the results.
Raises:
Examples:
ListChannels
>>> client.list_channels(space_id='SP1234567890abcdefghijkl')
Source code in docs_src/capo_repostspace/_services/repostspace.py
| def list_channels(
self,
space_id: "capo_repostspace.types.space_id.SpaceId",
*,
config_overrides: Optional[repostspaceClientConfig] = None,
next_token: Optional[str] = None,
max_results: Optional[
"capo_repostspace.types.list_channels_limit.ListChannelsLimit"
] = None,
) -> "capo_repostspace.types.list_channels_output.ListChannelsOutput":
"""<p>Returns the list of channel within a private re:Post with some information about each channel.</p>
Args:
space_id: <p>The unique ID of the private re:Post.</p>
next_token: <p>The token for the next set of channel to return. You receive this token from a previous ListChannels operation.</p>
max_results: <p>The maximum number of channels 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.
Examples:
ListChannels
>>> client.list_channels(space_id='SP1234567890abcdefghijkl')
"""
def _handler(
req: "OperationRequest[capo_repostspace.types.list_channels_input.ListChannelsInput]",
) -> OperationResponse[
"capo_repostspace.types.list_channels_output.ListChannelsOutput"
]:
import capo_repostspace._operations.repost_space.list_channels
output, http_response = (
capo_repostspace._operations.repost_space.list_channels.list_channels(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_repostspace.types.list_channels_output.ListChannelsOutput",
) -> dict[str, Any]:
import capo_repostspace.types.list_channels_output
return capo_repostspace.types.list_channels_output.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("ListChannels", redact_output=_redact_output),
)
input_: capo_repostspace.types.list_channels_input.ListChannelsInput = {
"space_id": space_id
}
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
|