deleteEnvironment method
Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.
May throw BadRequestException. May throw ConflictException. May throw NotFoundException. May throw ForbiddenException. May throw TooManyRequestsException. May throw LimitExceededException. May throw InternalServerErrorException.
Parameter environmentId
:
The ID of the environment to delete.
Implementation
Future<void> deleteEnvironment({
required String environmentId,
}) async {
ArgumentError.checkNotNull(environmentId, 'environmentId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCloud9WorkspaceManagementService.DeleteEnvironment'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'environmentId': environmentId,
},
);
}