updateDevEnvironment method
Changes one or more values for a Dev Environment. Updating certain values of the Dev Environment will cause a restart.
Parameter id :
The system-generated unique ID of the Dev Environment.
Parameter projectName :
The name of the project in the space.
Parameter spaceName :
The name of the space.
Parameter alias :
The user-specified alias for the Dev Environment. Changing this value will
not cause a restart.
Parameter clientToken :
A user-specified idempotency token. Idempotency ensures that an API
request completes only once. With an idempotent request, if the original
request completes successfully, the subsequent retries return the result
from the original successful request and have no additional effect.
Parameter ides :
Information about the integrated development environment (IDE) configured
for a Dev Environment.
Parameter inactivityTimeoutMinutes :
The amount of time the Dev Environment will run without any activity
detected before stopping, in minutes. Only whole integers are allowed. Dev
Environments consume compute minutes when running.
Parameter instanceType :
The Amazon EC2 instace type to use for the Dev Environment.
Implementation
Future<UpdateDevEnvironmentResponse> updateDevEnvironment({
required String id,
required String projectName,
required String spaceName,
String? alias,
String? clientToken,
List<IdeConfiguration>? ides,
int? inactivityTimeoutMinutes,
InstanceType? instanceType,
}) async {
_s.validateNumRange(
'inactivityTimeoutMinutes',
inactivityTimeoutMinutes,
0,
1200,
);
final $payload = <String, dynamic>{
if (alias != null) 'alias': alias,
if (clientToken != null) 'clientToken': clientToken,
if (ides != null) 'ides': ides,
if (inactivityTimeoutMinutes != null)
'inactivityTimeoutMinutes': inactivityTimeoutMinutes,
if (instanceType != null) 'instanceType': instanceType.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/v1/spaces/${Uri.encodeComponent(spaceName)}/projects/${Uri.encodeComponent(projectName)}/devEnvironments/${Uri.encodeComponent(id)}',
exceptionFnMap: _exceptionFns,
);
return UpdateDevEnvironmentResponse.fromJson(response);
}