DeleteDeploymentGroupCommand

Deletes a deployment group.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { CodeDeployClient, DeleteDeploymentGroupCommand } from "@aws-sdk/client-codedeploy"; // ES Modules import
// const { CodeDeployClient, DeleteDeploymentGroupCommand } = require("@aws-sdk/client-codedeploy"); // CommonJS import
const client = new CodeDeployClient(config);
const input = { // DeleteDeploymentGroupInput
  applicationName: "STRING_VALUE", // required
  deploymentGroupName: "STRING_VALUE", // required
};
const command = new DeleteDeploymentGroupCommand(input);
const response = await client.send(command);
// { // DeleteDeploymentGroupOutput
//   hooksNotCleanedUp: [ // AutoScalingGroupList
//     { // AutoScalingGroup
//       name: "STRING_VALUE",
//       hook: "STRING_VALUE",
//       terminationHook: "STRING_VALUE",
//     },
//   ],
// };

DeleteDeploymentGroupCommand Input

Parameter
Type
Description
applicationName
Required
string | undefined

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

deploymentGroupName
Required
string | undefined

The name of a deployment group for the specified application.

DeleteDeploymentGroupCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
hooksNotCleanedUp
AutoScalingGroup[] | undefined

If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group. If the output contains data, CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group.

Throws

Name
Fault
Details
ApplicationNameRequiredException
client

The minimum number of required application names was not specified.

DeploymentGroupNameRequiredException
client

The deployment group name was not specified.

InvalidApplicationNameException
client

The application name was specified in an invalid format.

InvalidDeploymentGroupNameException
client

The deployment group name was specified in an invalid format.

InvalidRoleException
client

The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.

CodeDeployServiceException
Base exception class for all service exceptions from CodeDeploy service.