batchGetDeploymentGroups method

Future<BatchGetDeploymentGroupsOutput> batchGetDeploymentGroups({
  1. required String applicationName,
  2. required List<String> deploymentGroupNames,
})

Gets information about one or more deployment groups.

May throw ApplicationNameRequiredException. May throw InvalidApplicationNameException. May throw ApplicationDoesNotExistException. May throw DeploymentGroupNameRequiredException. May throw InvalidDeploymentGroupNameException. May throw BatchLimitExceededException. May throw DeploymentConfigDoesNotExistException.

Parameter applicationName : The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.

Parameter deploymentGroupNames : The names of the deployment groups.

Implementation

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

  return BatchGetDeploymentGroupsOutput.fromJson(jsonResponse.body);
}