batchGetApplicationRevisions method

Future<BatchGetApplicationRevisionsOutput> batchGetApplicationRevisions({
  1. required String applicationName,
  2. required List<RevisionLocation> revisions,
})

Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25.

May throw ApplicationDoesNotExistException. May throw ApplicationNameRequiredException. May throw InvalidApplicationNameException. May throw RevisionRequiredException. May throw InvalidRevisionException. May throw BatchLimitExceededException.

Parameter applicationName : The name of an AWS CodeDeploy application about which to get revision information.

Parameter revisions : An array of RevisionLocation objects that specify information to get about the application revisions, including type and location. The maximum number of RevisionLocation objects you can specify is 25.

Implementation

Future<BatchGetApplicationRevisionsOutput> batchGetApplicationRevisions({
  required String applicationName,
  required List<RevisionLocation> revisions,
}) async {
  ArgumentError.checkNotNull(applicationName, 'applicationName');
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(revisions, 'revisions');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeDeploy_20141006.BatchGetApplicationRevisions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'applicationName': applicationName,
      'revisions': revisions,
    },
  );

  return BatchGetApplicationRevisionsOutput.fromJson(jsonResponse.body);
}