Skip to content

update_channel async

update_channel(
    space_id: SpaceId,
    channel_id: ChannelId,
    channel_name: ChannelName,
    *,
    config_overrides: Optional[AsyncrepostspaceClientConfig] = None,
    channel_description: Optional[ChannelDescription] = None,
) -> UpdateChannelOutput

Modifies an existing channel.

Parameters:

  • space_id (SpaceId) –

    The unique ID of the private re:Post.

  • channel_id (ChannelId) –

    The unique ID of the private re:Post channel.

  • channel_name (ChannelName) –

    The name for the channel. This must be unique per private re:Post.

  • channel_description (Optional[ChannelDescription], default: None ) –

    A description for the channel. This is used only to help you identify this channel.

Raises:

Examples:

UpdateChannel

>>> await client.update_channel(space_id='SP1234567890abcdefghijkl', channel_id='WS1234567890abcdefghijkl', channel_name='Better Channel', channel_description='Better channel description')
Source code in docs_src/capo_repostspace/_services/async_repostspace.py
async def update_channel(
    self,
    space_id: "capo_repostspace.types.space_id.SpaceId",
    channel_id: "capo_repostspace.types.channel_id.ChannelId",
    channel_name: "capo_repostspace.types.channel_name.ChannelName",
    *,
    config_overrides: Optional[AsyncrepostspaceClientConfig] = None,
    channel_description: Optional[
        "capo_repostspace.types.channel_description.ChannelDescription"
    ] = None,
) -> "capo_repostspace.types.update_channel_output.UpdateChannelOutput":
    """<p>Modifies an existing channel.</p>

    Args:
        space_id: <p>The unique ID of the private re:Post.</p>
        channel_id: <p>The unique ID of the private re:Post channel.</p>
        channel_name: <p>The name for the channel. This must be unique per private re:Post.</p>
        channel_description: <p>A description for the channel. This is used only to help you identify this channel.</p>

    Raises:
        capo_repostspace.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_repostspace.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_repostspace.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_repostspace.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</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:
        UpdateChannel

        >>> await client.update_channel(space_id='SP1234567890abcdefghijkl', channel_id='WS1234567890abcdefghijkl', channel_name='Better Channel', channel_description='Better channel description')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_repostspace.types.update_channel_input.UpdateChannelInput]",
    ) -> AsyncOperationResponse[
        "capo_repostspace.types.update_channel_output.UpdateChannelOutput"
    ]:
        import capo_repostspace._operations.repost_space.update_channel

        (
            output,
            http_response,
        ) = await capo_repostspace._operations.repost_space.update_channel.async_update_channel(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_repostspace.types.update_channel_input.UpdateChannelInput",
    ) -> dict[str, Any]:
        import capo_repostspace.types.update_channel_input

        return capo_repostspace.types.update_channel_input.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateChannel", redact_input=_redact_input),
    )
    input_: capo_repostspace.types.update_channel_input.UpdateChannelInput = {
        "space_id": space_id,
        "channel_id": channel_id,
        "channel_name": channel_name,
    }
    if channel_description is not None:
        input_["channel_description"] = channel_description

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output