Skip to content

get_pipeline async

get_pipeline(
    name: PipelineName,
    *,
    config_overrides: Optional[AsyncCodePipelineClientConfig] = None,
    version: Optional[PipelineVersion] = None,
) -> GetPipelineOutput

Returns the metadata, structure, stages, and actions of a pipeline. Can be used to return the entire structure of a pipeline in JSON format, which can then be modified and used to update the pipeline structure with UpdatePipeline.

Parameters:

  • name (PipelineName) –

    The name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.

  • version (Optional[PipelineVersion], default: None ) –

    The version number of the pipeline. If you do not specify a version, defaults to the current version.

Raises:

Source code in docs_src/capo_codepipeline/_services/async_code_pipeline.py
async def get_pipeline(
    self,
    name: "capo_codepipeline.types.pipeline_name.PipelineName",
    *,
    config_overrides: Optional[AsyncCodePipelineClientConfig] = None,
    version: Optional[
        "capo_codepipeline.types.pipeline_version.PipelineVersion"
    ] = None,
) -> "capo_codepipeline.types.get_pipeline_output.GetPipelineOutput":
    """<p>Returns the metadata, structure, stages, and actions of a pipeline. Can be used to return the entire structure of a pipeline in JSON format, which can then be modified and used to update the pipeline structure with <a>UpdatePipeline</a>.</p>

    Args:
        name: <p>The name of the pipeline for which you want to get information. Pipeline names must be unique in an Amazon Web Services account.</p>
        version: <p>The version number of the pipeline. If you do not specify a version, defaults to the current version.</p>

    Raises:
        capo_codepipeline.errors.pipeline_not_found_exception.PipelineNotFoundException: <p>The pipeline was specified in an invalid format or cannot be found.</p>
        capo_codepipeline.errors.pipeline_version_not_found_exception.PipelineVersionNotFoundException: <p>The pipeline version was specified in an invalid format or cannot be found.</p>
        capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
        capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codepipeline.types.get_pipeline_input.GetPipelineInput]",
    ) -> AsyncOperationResponse[
        "capo_codepipeline.types.get_pipeline_output.GetPipelineOutput"
    ]:
        import capo_codepipeline._operations.code_pipeline_20150709.get_pipeline

        (
            output,
            http_response,
        ) = await capo_codepipeline._operations.code_pipeline_20150709.get_pipeline.async_get_pipeline(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPipeline")
    )
    input_: capo_codepipeline.types.get_pipeline_input.GetPipelineInput = {
        "name": name
    }
    if version is not None:
        input_["version"] = version

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