Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class DeleteEnvironmentCommandProtected

Deletes an environment. Deleting an environment does not delete a configuration from a host.

Example

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

import { AppConfigClient, DeleteEnvironmentCommand } from "@aws-sdk/client-appconfig"; // ES Modules import
// const { AppConfigClient, DeleteEnvironmentCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import
const client = new AppConfigClient(config);
const input = { // DeleteEnvironmentRequest
ApplicationId: "STRING_VALUE", // required
EnvironmentId: "STRING_VALUE", // required
};
const command = new DeleteEnvironmentCommand(input);
const response = await client.send(command);
// {};

Param

DeleteEnvironmentCommandInput

Returns

DeleteEnvironmentCommandOutput

See

Throws

BadRequestException (client fault)

The input fails to satisfy the constraints specified by an Amazon Web Services service.

Throws

ConflictException (client fault)

The request could not be processed because of conflict in the current state of the resource.

Throws

InternalServerException (server fault)

There was an internal failure in the AppConfig service.

Throws

ResourceNotFoundException (client fault)

The requested resource could not be found.

Throws

AppConfigServiceException

Base exception class for all service exceptions from AppConfig service.

Example

To delete an environment

// The following delete-environment example deletes the specified application environment.
const input = {
"ApplicationId": "339ohji",
"EnvironmentId": "54j1r29"
};
const command = new DeleteEnvironmentCommand(input);
await client.send(command);
// example id: to-delete-an-environment-1632265641044

Hierarchy

Constructors

Properties

Methods