deleteDeploymentGroup method

Future<DeleteDeploymentGroupOutput> deleteDeploymentGroup({
  1. required String applicationName,
  2. required String deploymentGroupName,
})

Deletes a deployment group.

May throw ApplicationNameRequiredException. May throw DeploymentGroupNameRequiredException. May throw InvalidApplicationNameException. May throw InvalidDeploymentGroupNameException. May throw InvalidRoleException.

Parameter applicationName : The name of an CodeDeploy application associated with the user or Amazon Web Services account.

Parameter deploymentGroupName : The name of a deployment group for the specified application.

Implementation

Future<DeleteDeploymentGroupOutput> deleteDeploymentGroup({
  required String applicationName,
  required String deploymentGroupName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeDeploy_20141006.DeleteDeploymentGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'applicationName': applicationName,
      'deploymentGroupName': deploymentGroupName,
    },
  );

  return DeleteDeploymentGroupOutput.fromJson(jsonResponse.body);
}