putActionRevision method

Future<PutActionRevisionOutput> putActionRevision({
  1. required String actionName,
  2. required ActionRevision actionRevision,
  3. required String pipelineName,
  4. required String stageName,
})

Provides information to AWS CodePipeline about new revisions to a source.

May throw PipelineNotFoundException. May throw StageNotFoundException. May throw ActionNotFoundException. May throw ValidationException.

Parameter actionName : The name of the action that processes the revision.

Parameter actionRevision : Represents information about the version (or revision) of an action.

Parameter pipelineName : The name of the pipeline that starts processing the revision to the source.

Parameter stageName : The name of the stage that contains the action that acts on the revision.

Implementation

Future<PutActionRevisionOutput> putActionRevision({
  required String actionName,
  required ActionRevision actionRevision,
  required String pipelineName,
  required String stageName,
}) async {
  ArgumentError.checkNotNull(actionName, 'actionName');
  _s.validateStringLength(
    'actionName',
    actionName,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(actionRevision, 'actionRevision');
  ArgumentError.checkNotNull(pipelineName, 'pipelineName');
  _s.validateStringLength(
    'pipelineName',
    pipelineName,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(stageName, 'stageName');
  _s.validateStringLength(
    'stageName',
    stageName,
    1,
    100,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.PutActionRevision'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'actionName': actionName,
      'actionRevision': actionRevision,
      'pipelineName': pipelineName,
      'stageName': stageName,
    },
  );

  return PutActionRevisionOutput.fromJson(jsonResponse.body);
}