Skip to content

update_channel

update_channel(
    channel_arn: __string,
    cluster_arn: __string,
    *,
    config_overrides: Optional[KafkaClientConfig] = None,
    iceberg_destination_update: Optional[IcebergDestinationUpdate] = None,
    s3_destination_update: Optional[S3DestinationUpdate] = None,
) -> UpdateChannelResponse

Updates the destination configuration of an existing channel. Exactly one of icebergDestinationUpdate or s3DestinationUpdate must be supplied.

Parameters:

  • channel_arn (__string) –

    The Amazon Resource Name (ARN) that uniquely identifies the channel.

  • cluster_arn (__string) –

    The Amazon Resource Name (ARN) that uniquely identifies the cluster.

  • iceberg_destination_update (Optional[IcebergDestinationUpdate], default: None ) –

    Updates fields on an Apache Iceberg destination. Use only when the channel was created with an Iceberg destination.

  • s3_destination_update (Optional[S3DestinationUpdate], default: None ) –

    Updates fields on an Amazon S3 destination. Use only when the channel was created with an Amazon S3 destination.

Raises:

Source code in docs_src/capo_kafka/_services/kafka.py
def update_channel(
    self,
    channel_arn: "capo_kafka.types.__string.__string",
    cluster_arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[KafkaClientConfig] = None,
    iceberg_destination_update: Optional[
        "capo_kafka.types.iceberg_destination_update.IcebergDestinationUpdate"
    ] = None,
    s3_destination_update: Optional[
        "capo_kafka.types.s3_destination_update.S3DestinationUpdate"
    ] = None,
) -> "capo_kafka.types.update_channel_response.UpdateChannelResponse":
    """<p>Updates the destination configuration of an existing channel. Exactly one of icebergDestinationUpdate or s3DestinationUpdate must be supplied.</p>

    Args:
        channel_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the channel.</p>
        cluster_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
        iceberg_destination_update: <p>Updates fields on an Apache Iceberg destination. Use only when the channel was created with an Iceberg destination.</p>
        s3_destination_update: <p>Updates fields on an Amazon S3 destination. Use only when the channel was created with an Amazon S3 destination.</p>

    Raises:
        capo_kafka.errors.bad_request_exception.BadRequestException: <p>Returns information about an error.</p>
        capo_kafka.errors.forbidden_exception.ForbiddenException: <p>Returns information about an error.</p>
        capo_kafka.errors.internal_server_error_exception.InternalServerErrorException: <p>Returns information about an error.</p>
        capo_kafka.errors.not_found_exception.NotFoundException: <p>Returns information about an error.</p>
        capo_kafka.errors.service_unavailable_exception.ServiceUnavailableException: <p>Returns information about an error.</p>
        capo_kafka.errors.too_many_requests_exception.TooManyRequestsException: <p>Returns information about an error.</p>
        capo_kafka.errors.unauthorized_exception.UnauthorizedException: <p>Returns information about an error.</p>
        capo_kafka.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_kafka._operations.kafka.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_kafka.types.update_channel_request.UpdateChannelRequest = {
        "channel_arn": channel_arn,
        "cluster_arn": cluster_arn,
    }
    if iceberg_destination_update is not None:
        input_["iceberg_destination_update"] = iceberg_destination_update
    if s3_destination_update is not None:
        input_["s3_destination_update"] = s3_destination_update

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