getApplicationRevision method

Future<GetApplicationRevisionOutput> getApplicationRevision({
  1. required String applicationName,
  2. required RevisionLocation revision,
})

Gets information about an application revision.

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

Parameter applicationName : The name of the application that corresponds to the revision.

Parameter revision : Information about the application revision to get, including type and location.

Implementation

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

  return GetApplicationRevisionOutput.fromJson(jsonResponse.body);
}