Skip to content

create_pipeline async

create_pipeline(
    pipeline_name: PipelineName,
    min_units: PipelineUnits,
    max_units: PipelineUnits,
    pipeline_configuration_body: PipelineConfigurationBody,
    *,
    config_overrides: Optional[AsyncOSISClientConfig] = None,
    log_publishing_options: Optional[LogPublishingOptions] = None,
    vpc_options: Optional[VpcOptions] = None,
    buffer_options: Optional[BufferOptions] = None,
    encryption_at_rest_options: Optional[EncryptionAtRestOptions] = None,
    tags: Optional[TagList] = None,
    pipeline_role_arn: Optional[PipelineRoleArn] = None,
) -> CreatePipelineResponse

Creates an OpenSearch Ingestion pipeline. For more information, see Creating Amazon OpenSearch Ingestion pipelines.

Parameters:

  • pipeline_name (PipelineName) –

    The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region.

  • min_units (PipelineUnits) –

    The minimum pipeline capacity, in Ingestion Compute Units (ICUs).

  • max_units (PipelineUnits) –

    The maximum pipeline capacity, in Ingestion Compute Units (ICUs).

  • pipeline_configuration_body (PipelineConfigurationBody) –

    The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \n.

  • log_publishing_options (Optional[LogPublishingOptions], default: None ) –

    Key-value pairs to configure log publishing.

  • vpc_options (Optional[VpcOptions], default: None ) –

    Container for the values required to configure VPC access for the pipeline. If you don't specify these values, OpenSearch Ingestion creates the pipeline with a public endpoint.

  • buffer_options (Optional[BufferOptions], default: None ) –

    Key-value pairs to configure persistent buffering for the pipeline.

  • encryption_at_rest_options (Optional[EncryptionAtRestOptions], default: None ) –

    Key-value pairs to configure encryption for data that is written to a persistent buffer.

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

    List of tags to add to the pipeline upon creation.

  • pipeline_role_arn (Optional[PipelineRoleArn], default: None ) –

    The Amazon Resource Name (ARN) of the IAM role that grants the pipeline permission to access Amazon Web Services resources.

Raises:

Source code in docs_src/capo_osis/_services/async_osis.py
async def create_pipeline(
    self,
    pipeline_name: "capo_osis.types.pipeline_name.PipelineName",
    min_units: "capo_osis.types.pipeline_units.PipelineUnits",
    max_units: "capo_osis.types.pipeline_units.PipelineUnits",
    pipeline_configuration_body: "capo_osis.types.pipeline_configuration_body.PipelineConfigurationBody",
    *,
    config_overrides: Optional[AsyncOSISClientConfig] = None,
    log_publishing_options: Optional[
        "capo_osis.types.log_publishing_options.LogPublishingOptions"
    ] = None,
    vpc_options: Optional["capo_osis.types.vpc_options.VpcOptions"] = None,
    buffer_options: Optional["capo_osis.types.buffer_options.BufferOptions"] = None,
    encryption_at_rest_options: Optional[
        "capo_osis.types.encryption_at_rest_options.EncryptionAtRestOptions"
    ] = None,
    tags: Optional["capo_osis.types.tag_list.TagList"] = None,
    pipeline_role_arn: Optional[
        "capo_osis.types.pipeline_role_arn.PipelineRoleArn"
    ] = None,
) -> "capo_osis.types.create_pipeline_response.CreatePipelineResponse":
    r"""<p>Creates an OpenSearch Ingestion pipeline. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/creating-pipeline.html">Creating Amazon OpenSearch Ingestion pipelines</a>.</p>

    Args:
        pipeline_name: <p>The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region.</p>
        min_units: <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
        max_units: <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
        pipeline_configuration_body: <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
        log_publishing_options: <p>Key-value pairs to configure log publishing.</p>
        vpc_options: <p>Container for the values required to configure VPC access for the pipeline. If you don't specify these values, OpenSearch Ingestion creates the pipeline with a public endpoint.</p>
        buffer_options: <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
        encryption_at_rest_options: <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
        tags: <p>List of tags to add to the pipeline upon creation.</p>
        pipeline_role_arn: <p>The Amazon Resource Name (ARN) of the IAM role that grants the pipeline permission to access Amazon Web Services resources.</p>

    Raises:
        capo_osis.errors.access_denied_exception.AccessDeniedException: <p>You don't have permissions to access the resource.</p>
        capo_osis.errors.disabled_operation_exception.DisabledOperationException: <p>Exception is thrown when an operation has been disabled.</p>
        capo_osis.errors.internal_exception.InternalException: <p>The request failed because of an unknown error, exception, or failure (the failure is internal to the service).</p>
        capo_osis.errors.limit_exceeded_exception.LimitExceededException: <p>You attempted to create more than the allowed number of tags.</p>
        capo_osis.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>You attempted to create a resource that already exists.</p>
        capo_osis.errors.resource_not_found_exception.ResourceNotFoundException: <p>You attempted to access or delete a resource that does not exist.</p>
        capo_osis.errors.validation_exception.ValidationException: <p>An exception for missing or invalid input fields.</p>
        capo_osis.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_osis.types.create_pipeline_request.CreatePipelineRequest]",
    ) -> AsyncOperationResponse[
        "capo_osis.types.create_pipeline_response.CreatePipelineResponse"
    ]:
        import capo_osis._operations.amazon_open_search_ingestion_service.create_pipeline

        (
            output,
            http_response,
        ) = await capo_osis._operations.amazon_open_search_ingestion_service.create_pipeline.async_create_pipeline(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePipeline")
    )
    input_: capo_osis.types.create_pipeline_request.CreatePipelineRequest = {
        "pipeline_name": pipeline_name,
        "min_units": min_units,
        "max_units": max_units,
        "pipeline_configuration_body": pipeline_configuration_body,
    }
    if log_publishing_options is not None:
        input_["log_publishing_options"] = log_publishing_options
    if vpc_options is not None:
        input_["vpc_options"] = vpc_options
    if buffer_options is not None:
        input_["buffer_options"] = buffer_options
    if encryption_at_rest_options is not None:
        input_["encryption_at_rest_options"] = encryption_at_rest_options
    if tags is not None:
        input_["tags"] = tags
    if pipeline_role_arn is not None:
        input_["pipeline_role_arn"] = pipeline_role_arn

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