Skip to content

create_pipe async

create_pipe(
    name: PipeName,
    source: ArnOrUrl,
    target: Arn,
    role_arn: RoleArn,
    *,
    config_overrides: Optional[AsyncPipesClientConfig] = None,
    description: Optional[PipeDescription] = None,
    desired_state: Optional[RequestedPipeState] = None,
    source_parameters: Optional[PipeSourceParameters] = None,
    enrichment: Optional[OptionalArn] = None,
    enrichment_parameters: Optional[PipeEnrichmentParameters] = None,
    target_parameters: Optional[PipeTargetParameters] = None,
    tags: Optional[TagMap] = None,
    log_configuration: Optional[PipeLogConfigurationParameters] = None,
    kms_key_identifier: Optional[KmsKeyIdentifier] = None,
) -> CreatePipeResponse

Create a pipe. Amazon EventBridge Pipes connect event sources to targets and reduces the need for specialized knowledge and integration code.

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 (ArnOrUrl) –

    The ARN of the source resource.

  • source_parameters (Optional[PipeSourceParameters], 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 (Arn) –

    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.

  • tags (Optional[TagMap], default: None ) –

    The list of key-value pairs to associate with the pipe.

  • 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.

    If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.

    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 create_pipe(
    self,
    name: "capo_pipes.types.pipe_name.PipeName",
    source: "capo_pipes.types.arn_or_url.ArnOrUrl",
    target: "capo_pipes.types.arn.Arn",
    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.pipe_source_parameters.PipeSourceParameters"
    ] = None,
    enrichment: Optional["capo_pipes.types.optional_arn.OptionalArn"] = None,
    enrichment_parameters: Optional[
        "capo_pipes.types.pipe_enrichment_parameters.PipeEnrichmentParameters"
    ] = None,
    target_parameters: Optional[
        "capo_pipes.types.pipe_target_parameters.PipeTargetParameters"
    ] = None,
    tags: Optional["capo_pipes.types.tag_map.TagMap"] = 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.create_pipe_response.CreatePipeResponse":
    """<p>Create a pipe. Amazon EventBridge Pipes connect event sources to targets and reduces the need for specialized knowledge and integration code.</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: <p>The ARN of the source resource.</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>
        tags: <p>The list of key-value pairs to associate with the pipe.</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>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt pipe data.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A quota has been exceeded.</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.create_pipe_request.CreatePipeRequest]",
    ) -> AsyncOperationResponse[
        "capo_pipes.types.create_pipe_response.CreatePipeResponse"
    ]:
        import capo_pipes._operations.pipes.create_pipe

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

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

        return capo_pipes.types.create_pipe_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePipe", redact_input=_redact_input)
    )
    input_: capo_pipes.types.create_pipe_request.CreatePipeRequest = {
        "name": name,
        "source": source,
        "target": target,
        "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_parameters is not None:
        input_["target_parameters"] = target_parameters
    if tags is not None:
        input_["tags"] = tags
    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