Enables artifacts in a pipeline to transition to a stage in a pipeline.
Parameters:
-
pipeline_name
(PipelineName)
–
The name of the pipeline in which you want to enable the flow of artifacts from one stage to another.
-
stage_name
(StageName)
–
The name of the stage where you want to enable the transition of artifacts, either into the stage (inbound) or from that stage to the next stage (outbound).
-
transition_type
(StageTransitionType)
–
Specifies whether artifacts are allowed to enter the stage and be processed by the actions in that stage (inbound) or whether already processed artifacts are allowed to transition to the next stage (outbound).
Raises:
Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
| def enable_stage_transition(
self,
pipeline_name: "capo_codepipeline.types.pipeline_name.PipelineName",
stage_name: "capo_codepipeline.types.stage_name.StageName",
transition_type: "capo_codepipeline.types.stage_transition_type.StageTransitionType",
*,
config_overrides: Optional[CodePipelineClientConfig] = None,
) -> None:
"""<p>Enables artifacts in a pipeline to transition to a stage in a pipeline.</p>
Args:
pipeline_name: <p>The name of the pipeline in which you want to enable the flow of artifacts from one stage to another.</p>
stage_name: <p>The name of the stage where you want to enable the transition of artifacts, either into the stage (inbound) or from that stage to the next stage (outbound).</p>
transition_type: <p>Specifies whether artifacts are allowed to enter the stage and be processed by the actions in that stage (inbound) or whether already processed artifacts are allowed to transition to the next stage (outbound).</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.stage_not_found_exception.StageNotFoundException: <p>The stage 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.enable_stage_transition_input.EnableStageTransitionInput]",
) -> OperationResponse[None]:
import capo_codepipeline._operations.code_pipeline_20150709.enable_stage_transition
output, http_response = (
capo_codepipeline._operations.code_pipeline_20150709.enable_stage_transition.enable_stage_transition(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("EnableStageTransition")
)
input_: capo_codepipeline.types.enable_stage_transition_input.EnableStageTransitionInput = {
"pipeline_name": pipeline_name,
"stage_name": stage_name,
"transition_type": transition_type,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|