enableStageTransition method
Future<void>
enableStageTransition({
- required String pipelineName,
- required String stageName,
- required StageTransitionType transitionType,
Enables artifacts in a pipeline to transition to a stage in a pipeline.
May throw ValidationException. May throw PipelineNotFoundException. May throw StageNotFoundException.
Parameter pipelineName
:
The name of the pipeline in which you want to enable the flow of artifacts
from one stage to another.
Parameter 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).
Parameter transitionType
:
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).
Implementation
Future<void> enableStageTransition({
required String pipelineName,
required String stageName,
required StageTransitionType transitionType,
}) async {
ArgumentError.checkNotNull(pipelineName, 'pipelineName');
_s.validateStringLength(
'pipelineName',
pipelineName,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(stageName, 'stageName');
_s.validateStringLength(
'stageName',
stageName,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(transitionType, 'transitionType');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodePipeline_20150709.EnableStageTransition'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'pipelineName': pipelineName,
'stageName': stageName,
'transitionType': transitionType.toValue(),
},
);
}