DeleteApplicationCommand

Deletes the specified application along with all associated versions and configurations. The application versions will not be deleted from your Amazon S3 bucket.

You cannot delete an application that has a running environment.

Example Syntax

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

import { ElasticBeanstalkClient, DeleteApplicationCommand } from "@aws-sdk/client-elastic-beanstalk"; // ES Modules import
// const { ElasticBeanstalkClient, DeleteApplicationCommand } = require("@aws-sdk/client-elastic-beanstalk"); // CommonJS import
const client = new ElasticBeanstalkClient(config);
const input = { // DeleteApplicationMessage
  ApplicationName: "STRING_VALUE", // required
  TerminateEnvByForce: true || false,
};
const command = new DeleteApplicationCommand(input);
const response = await client.send(command);
// {};

Example Usage

 Loading code editor

DeleteApplicationCommand Input

See DeleteApplicationCommandInput for more details

Parameter
Type
Description
ApplicationName
Required
string | undefined

The name of the application to delete.

TerminateEnvByForce
boolean | undefined

When set to true, running environments will be terminated before deleting the application.

DeleteApplicationCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
OperationInProgressException
client

Unable to perform the specified operation because another operation that effects an element in this activity is already in progress.

ElasticBeanstalkServiceException
Base exception class for all service exceptions from ElasticBeanstalk service.