updateEnvironment method

Future<void> updateEnvironment({
  1. required String environmentId,
  2. String? description,
  3. String? name,
})

Changes the settings of an existing AWS Cloud9 development environment.

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 change settings.

Parameter description : Any new or replacement description for the environment.

Parameter name : A replacement name for the environment.

Implementation

Future<void> updateEnvironment({
  required String environmentId,
  String? description,
  String? name,
}) async {
  ArgumentError.checkNotNull(environmentId, 'environmentId');
  _s.validateStringLength(
    'description',
    description,
    0,
    200,
  );
  _s.validateStringLength(
    'name',
    name,
    1,
    60,
  );
  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 (name != null) 'name': name,
    },
  );
}