View a markdown version of this page

Use DeleteEnvironment with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use DeleteEnvironment with a CLI

The following code examples show how to use DeleteEnvironment.

CLI
AWS CLI

To delete an AWS Cloud9 development environment

The following delete-environment example deletes the specified AWS Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, this example also terminates the instance.

aws cloud9 delete-environment \ --environment-id 8a34f51ce1e04a08882f1e811bd706EX

This command produces no output.

For more information, see Deleting an environment in AWS Cloud9 in the AWS Cloud9 User Guide.

PowerShell
Tools for PowerShell V4

Example 1: This example deletes the specified AWS Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.

Remove-C9Environment -EnvironmentId ffd88420d4824eeeaeaa8a04bfde8cEX
  • For API details, see DeleteEnvironment in AWS Tools for PowerShell Cmdlet Reference (V4).

Tools for PowerShell V5

Example 1: This example deletes the specified AWS Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.

Remove-C9Environment -EnvironmentId ffd88420d4824eeeaeaa8a04bfde8cEX
  • For API details, see DeleteEnvironment in AWS Tools for PowerShell Cmdlet Reference (V5).