updateEnvironment method
Changes the settings of an existing Cloud9 development environment.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw LimitExceededException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter environmentId :
The ID of the environment to change settings.
Parameter description :
Any new or replacement description for the environment.
Parameter managedCredentialsAction :
Allows the environment owner to turn on or turn off the Amazon Web
Services managed temporary credentials for an Cloud9 environment by using
one of the following values:
-
ENABLE -
DISABLE
Parameter name :
A replacement name for the environment.
Implementation
Future<void> updateEnvironment({
required String environmentId,
String? description,
ManagedCredentialsAction? managedCredentialsAction,
String? name,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCloud9WorkspaceManagementService.UpdateEnvironment'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'environmentId': environmentId,
if (description != null) 'description': description,
if (managedCredentialsAction != null)
'managedCredentialsAction': managedCredentialsAction.value,
if (name != null) 'name': name,
},
);
}