Skip to content

validate_pipeline async

validate_pipeline(
    pipeline_configuration_body: PipelineConfigurationBody,
    *,
    config_overrides: Optional[AsyncOSISClientConfig] = None,
) -> ValidatePipelineResponse

Checks whether an OpenSearch Ingestion pipeline configuration is valid prior to creation. For more information, see Creating Amazon OpenSearch Ingestion pipelines.

Parameters:

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

Raises:

Source code in docs_src/capo_osis/_services/async_osis.py
async def validate_pipeline(
    self,
    pipeline_configuration_body: "capo_osis.types.pipeline_configuration_body.PipelineConfigurationBody",
    *,
    config_overrides: Optional[AsyncOSISClientConfig] = None,
) -> "capo_osis.types.validate_pipeline_response.ValidatePipelineResponse":
    r"""<p>Checks whether an OpenSearch Ingestion pipeline configuration is valid prior to creation. 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_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>

    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.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.validate_pipeline_request.ValidatePipelineRequest]",
    ) -> AsyncOperationResponse[
        "capo_osis.types.validate_pipeline_response.ValidatePipelineResponse"
    ]:
        import capo_osis._operations.amazon_open_search_ingestion_service.validate_pipeline

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ValidatePipeline")
    )
    input_: capo_osis.types.validate_pipeline_request.ValidatePipelineRequest = {
        "pipeline_configuration_body": pipeline_configuration_body
    }

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