updateServiceEnvironment method

Future<UpdateServiceEnvironmentResponse> updateServiceEnvironment({
  1. required String serviceEnvironment,
  2. List<CapacityLimit>? capacityLimits,
  3. ServiceEnvironmentState? state,
})

Updates a service environment. You can update the state of a service environment from ENABLED to DISABLED to prevent new service jobs from being placed in the service environment.

May throw ClientException. May throw ServerException.

Parameter serviceEnvironment : The name or ARN of the service environment to update.

Parameter capacityLimits : The capacity limits for the service environment. This defines the maximum resources that can be used by service jobs in this environment.

Parameter state : The state of the service environment.

Implementation

Future<UpdateServiceEnvironmentResponse> updateServiceEnvironment({
  required String serviceEnvironment,
  List<CapacityLimit>? capacityLimits,
  ServiceEnvironmentState? state,
}) async {
  final $payload = <String, dynamic>{
    'serviceEnvironment': serviceEnvironment,
    if (capacityLimits != null) 'capacityLimits': capacityLimits,
    if (state != null) 'state': state.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/updateserviceenvironment',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateServiceEnvironmentResponse.fromJson(response);
}