overrideStageCondition method

Future<void> overrideStageCondition({
  1. required ConditionType conditionType,
  2. required String pipelineExecutionId,
  3. required String pipelineName,
  4. required String stageName,
})

Used to override a stage condition. For more information about conditions, see Stage conditions and How do stage conditions work?.

May throw ConcurrentPipelineExecutionsLimitExceededException. May throw ConditionNotOverridableException. May throw ConflictException. May throw NotLatestPipelineExecutionException. May throw PipelineNotFoundException. May throw StageNotFoundException. May throw ValidationException.

Parameter conditionType : The type of condition to override for the stage, such as entry conditions, failure conditions, or success conditions.

Parameter pipelineExecutionId : The ID of the pipeline execution for the override.

Parameter pipelineName : The name of the pipeline with the stage that will override the condition.

Parameter stageName : The name of the stage for the override.

Implementation

Future<void> overrideStageCondition({
  required ConditionType conditionType,
  required String pipelineExecutionId,
  required String pipelineName,
  required String stageName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.OverrideStageCondition'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'conditionType': conditionType.value,
      'pipelineExecutionId': pipelineExecutionId,
      'pipelineName': pipelineName,
      'stageName': stageName,
    },
  );
}