deleteDeploymentGroup method

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

Deletes a deployment group.

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

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

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

Implementation

Future<DeleteDeploymentGroupOutput> deleteDeploymentGroup({
  required String applicationName,
  required String deploymentGroupName,
}) async {
  ArgumentError.checkNotNull(applicationName, 'applicationName');
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(deploymentGroupName, 'deploymentGroupName');
  _s.validateStringLength(
    'deploymentGroupName',
    deploymentGroupName,
    1,
    100,
    isRequired: true,
  );
  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);
}