Skip to content

update_pipe async

update_pipe(
    name: PipeName,
    role_arn: RoleArn,
    *,
    config_overrides: Optional[AsyncPipesClientConfig] = None,
    description: Optional[PipeDescription] = None,
    desired_state: Optional[RequestedPipeState] = None,
    source_parameters: Optional[UpdatePipeSourceParameters] = None,
    enrichment: Optional[OptionalArn] = None,
    enrichment_parameters: Optional[PipeEnrichmentParameters] = None,
    target: Optional[Arn] = None,
    target_parameters: Optional[PipeTargetParameters] = None,
    log_configuration: Optional[PipeLogConfigurationParameters] = None,
    kms_key_identifier: Optional[KmsKeyIdentifier] = None,
) -> UpdatePipeResponse

Update an existing pipe. When you call UpdatePipe, EventBridge only the updates fields you have specified in the request; the rest remain unchanged. The exception to this is if you modify any Amazon Web Services-service specific fields in the SourceParameters, EnrichmentParameters, or TargetParameters objects. For example, DynamoDBStreamParameters or EventBridgeEventBusParameters. EventBridge updates the fields in these objects atomically as one and overrides existing values. This is by design, and means that if you don't specify an optional field in one of these Parameters objects, EventBridge sets that field to its system-default value during the update.

For more information about pipes, see Amazon EventBridge Pipes in the Amazon EventBridge User Guide.

Parameters:

  • name (PipeName) –

    The name of the pipe.

  • description (Optional[PipeDescription], default: None ) –

    A description of the pipe.

  • desired_state (Optional[RequestedPipeState], default: None ) –

    The state the pipe should be in.

  • source_parameters (Optional[UpdatePipeSourceParameters], default: None ) –

    The parameters required to set up a source for your pipe.

  • enrichment (Optional[OptionalArn], default: None ) –

    The ARN of the enrichment resource.

  • enrichment_parameters (Optional[PipeEnrichmentParameters], default: None ) –

    The parameters required to set up enrichment on your pipe.

  • target (Optional[Arn], default: None ) –

    The ARN of the target resource.

  • target_parameters (Optional[PipeTargetParameters], default: None ) –

    The parameters required to set up a target for your pipe.

    For more information about pipe target parameters, including how to use dynamic path parameters, see Target parameters in the Amazon EventBridge User Guide.

  • role_arn (RoleArn) –

    The ARN of the role that allows the pipe to send data to the target.

  • log_configuration (Optional[PipeLogConfigurationParameters], default: None ) –

    The logging configuration settings for the pipe.

  • kms_key_identifier (Optional[KmsKeyIdentifier], default: None ) –

    The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.

    To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.

    To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.

    For more information, see Managing keys in the Key Management Service Developer Guide.

Raises:

Source code in docs_src/capo_pipes/_services/async_pipes.py
async def update_pipe(
    self,
    name: "capo_pipes.types.pipe_name.PipeName",
    role_arn: "capo_pipes.types.role_arn.RoleArn",
    *,
    config_overrides: Optional[AsyncPipesClientConfig] = None,
    description: Optional[
        "capo_pipes.types.pipe_description.PipeDescription"
    ] = None,
    desired_state: Optional[
        "capo_pipes.types.requested_pipe_state.RequestedPipeState"
    ] = None,
    source_parameters: Optional[
        "capo_pipes.types.update_pipe_source_parameters.UpdatePipeSourceParameters"
    ] = None,
    enrichment: Optional["capo_pipes.types.optional_arn.OptionalArn"] = None,
    enrichment_parameters: Optional[
        "capo_pipes.types.pipe_enrichment_parameters.PipeEnrichmentParameters"
    ] = None,
    target: Optional["capo_pipes.types.arn.Arn"] = None,
    target_parameters: Optional[
        "capo_pipes.types.pipe_target_parameters.PipeTargetParameters"
    ] = None,
    log_configuration: Optional[
        "capo_pipes.types.pipe_log_configuration_parameters.PipeLogConfigurationParameters"
    ] = None,
    kms_key_identifier: Optional[
        "capo_pipes.types.kms_key_identifier.KmsKeyIdentifier"
    ] = None,
) -> "capo_pipes.types.update_pipe_response.UpdatePipeResponse":
    """<p>Update an existing pipe. When you call <code>UpdatePipe</code>, EventBridge only the updates fields you have specified in the request; the rest remain unchanged. The exception to this is if you modify any Amazon Web Services-service specific fields in the <code>SourceParameters</code>, <code>EnrichmentParameters</code>, or <code>TargetParameters</code> objects. For example, <code>DynamoDBStreamParameters</code> or <code>EventBridgeEventBusParameters</code>. EventBridge updates the fields in these objects atomically as one and overrides existing values. This is by design, and means that if you don't specify an optional field in one of these <code>Parameters</code> objects, EventBridge sets that field to its system-default value during the update.</p> <p>For more information about pipes, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html"> Amazon EventBridge Pipes</a> in the Amazon EventBridge User Guide.</p>

    Args:
        name: <p>The name of the pipe.</p>
        description: <p>A description of the pipe.</p>
        desired_state: <p>The state the pipe should be in.</p>
        source_parameters: <p>The parameters required to set up a source for your pipe.</p>
        enrichment: <p>The ARN of the enrichment resource.</p>
        enrichment_parameters: <p>The parameters required to set up enrichment on your pipe.</p>
        target: <p>The ARN of the target resource.</p>
        target_parameters: <p>The parameters required to set up a target for your pipe.</p> <p>For more information about pipe target parameters, including how to use dynamic path parameters, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html">Target parameters</a> in the <i>Amazon EventBridge User Guide</i>.</p>
        role_arn: <p>The ARN of the role that allows the pipe to send data to the target.</p>
        log_configuration: <p>The logging configuration settings for the pipe.</p>
        kms_key_identifier: <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p> <p>To update a pipe that is using the default Amazon Web Services owned key to use a customer managed key instead, or update a pipe that is using a customer managed key to use a different customer managed key, specify a customer managed key identifier.</p> <p>To update a pipe that is using a customer managed key to use the default Amazon Web Services owned key, specify an empty string.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html">Managing keys</a> in the <i>Key Management Service Developer Guide</i>. </p>

    Raises:
        capo_pipes.errors.conflict_exception.ConflictException: <p>An action you attempted resulted in an exception.</p>
        capo_pipes.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_pipes.errors.not_found_exception.NotFoundException: <p>An entity that you specified does not exist.</p>
        capo_pipes.errors.throttling_exception.ThrottlingException: <p>An action was throttled.</p>
        capo_pipes.errors.validation_exception.ValidationException: <p>Indicates that an error has occurred while performing a validate operation.</p>
        capo_pipes.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pipes.types.update_pipe_request.UpdatePipeRequest]",
    ) -> AsyncOperationResponse[
        "capo_pipes.types.update_pipe_response.UpdatePipeResponse"
    ]:
        import capo_pipes._operations.pipes.update_pipe

        (
            output,
            http_response,
        ) = await capo_pipes._operations.pipes.update_pipe.async_update_pipe(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_pipes.types.update_pipe_request.UpdatePipeRequest",
    ) -> dict[str, Any]:
        import capo_pipes.types.update_pipe_request

        return capo_pipes.types.update_pipe_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePipe", redact_input=_redact_input)
    )
    input_: capo_pipes.types.update_pipe_request.UpdatePipeRequest = {
        "name": name,
        "role_arn": role_arn,
    }
    if description is not None:
        input_["description"] = description
    if desired_state is not None:
        input_["desired_state"] = desired_state
    if source_parameters is not None:
        input_["source_parameters"] = source_parameters
    if enrichment is not None:
        input_["enrichment"] = enrichment
    if enrichment_parameters is not None:
        input_["enrichment_parameters"] = enrichment_parameters
    if target is not None:
        input_["target"] = target
    if target_parameters is not None:
        input_["target_parameters"] = target_parameters
    if log_configuration is not None:
        input_["log_configuration"] = log_configuration
    if kms_key_identifier is not None:
        input_["kms_key_identifier"] = kms_key_identifier

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