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/code_pipeline.py
| def get_pipeline(
self,
name: "capo_codepipeline.types.pipeline_name.PipelineName",
*,
config_overrides: Optional[CodePipelineClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_codepipeline.types.get_pipeline_input.GetPipelineInput]",
) -> OperationResponse[
"capo_codepipeline.types.get_pipeline_output.GetPipelineOutput"
]:
import capo_codepipeline._operations.code_pipeline_20150709.get_pipeline
output, http_response = (
capo_codepipeline._operations.code_pipeline_20150709.get_pipeline.get_pipeline(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|