Skip to content

update_channel

update_channel(
    channel: ChannelArn,
    *,
    config_overrides: Optional[CloudTrailClientConfig] = None,
    destinations: Optional[Destinations] = None,
    name: Optional[ChannelName] = None,
) -> UpdateChannelResponse

CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change.

Updates a channel specified by a required channel ARN or UUID.

Parameters:

  • channel (ChannelArn) –

    The ARN or ID (the ARN suffix) of the channel that you want to update.

  • destinations (Optional[Destinations], default: None ) –

    The ARNs of event data stores that you want to log events arriving through the channel.

  • name (Optional[ChannelName], default: None ) –

    Changes the name of the channel.

Raises:

Source code in docs_src/capo_cloudtrail/_services/cloud_trail.py
def update_channel(
    self,
    channel: "capo_cloudtrail.types.channel_arn.ChannelArn",
    *,
    config_overrides: Optional[CloudTrailClientConfig] = None,
    destinations: Optional[
        "capo_cloudtrail.types.destinations.Destinations"
    ] = None,
    name: Optional["capo_cloudtrail.types.channel_name.ChannelName"] = None,
) -> "capo_cloudtrail.types.update_channel_response.UpdateChannelResponse":
    """<important> <p>CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-service-availability-change.html">CloudTrail Lake availability change</a>.</p> </important> <p>Updates a channel specified by a required channel ARN or UUID.</p>

    Args:
        channel: <p>The ARN or ID (the ARN suffix) of the channel that you want to update.</p>
        destinations: <p>The ARNs of event data stores that you want to log events arriving through the channel.</p>
        name: <p> Changes the name of the channel. </p>

    Raises:
        capo_cloudtrail.errors.channel_already_exists_exception.ChannelAlreadyExistsException: <p> This exception is thrown when the provided channel already exists. </p>
        capo_cloudtrail.errors.channel_arn_invalid_exception.ChannelARNInvalidException: <p>This exception is thrown when the specified value of <code>ChannelARN</code> is not valid.</p>
        capo_cloudtrail.errors.channel_not_found_exception.ChannelNotFoundException: <p>This exception is thrown when CloudTrail cannot find the specified channel.</p>
        capo_cloudtrail.errors.event_data_store_arn_invalid_exception.EventDataStoreARNInvalidException: <p>The specified event data store ARN is not valid or does not map to an event data store in your account.</p>
        capo_cloudtrail.errors.event_data_store_not_found_exception.EventDataStoreNotFoundException: <p>The specified event data store was not found.</p>
        capo_cloudtrail.errors.inactive_event_data_store_exception.InactiveEventDataStoreException: <p>The event data store is inactive.</p>
        capo_cloudtrail.errors.invalid_event_data_store_category_exception.InvalidEventDataStoreCategoryException: <p>This exception is thrown when event categories of specified event data stores are not valid.</p>
        capo_cloudtrail.errors.invalid_parameter_exception.InvalidParameterException: <p>The request includes a parameter that is not valid.</p>
        capo_cloudtrail.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>This exception is thrown when the requested operation is not permitted.</p>
        capo_cloudtrail.errors.unsupported_operation_exception.UnsupportedOperationException: <p>This exception is thrown when the requested operation is not supported.</p>
        capo_cloudtrail.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudtrail.types.update_channel_request.UpdateChannelRequest]",
    ) -> OperationResponse[
        "capo_cloudtrail.types.update_channel_response.UpdateChannelResponse"
    ]:
        import capo_cloudtrail._operations.cloud_trail_20131101.update_channel

        output, http_response = (
            capo_cloudtrail._operations.cloud_trail_20131101.update_channel.update_channel(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateChannel")
    )
    input_: capo_cloudtrail.types.update_channel_request.UpdateChannelRequest = {
        "channel": channel
    }
    if destinations is not None:
        input_["destinations"] = destinations
    if name is not None:
        input_["name"] = name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output