updateComputeQuota method
Update the compute allocation definition.
May throw ConflictException.
May throw ResourceLimitExceeded.
May throw ResourceNotFound.
Parameter computeQuotaId :
ID of the compute allocation definition.
Parameter targetVersion :
Target version.
Parameter activationState :
The state of the compute allocation being described. Use to enable or
disable compute allocation.
Default is Enabled.
Parameter computeQuotaConfig :
Configuration of the compute allocation definition. This includes the
resource sharing option, and the setting to preempt low priority tasks.
Parameter computeQuotaTarget :
The target entity to allocate compute resources to.
Parameter description :
Description of the compute allocation definition.
Implementation
Future<UpdateComputeQuotaResponse> updateComputeQuota({
required String computeQuotaId,
required int targetVersion,
ActivationState? activationState,
ComputeQuotaConfig? computeQuotaConfig,
ComputeQuotaTarget? computeQuotaTarget,
String? description,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdateComputeQuota'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ComputeQuotaId': computeQuotaId,
'TargetVersion': targetVersion,
if (activationState != null) 'ActivationState': activationState.value,
if (computeQuotaConfig != null)
'ComputeQuotaConfig': computeQuotaConfig,
if (computeQuotaTarget != null)
'ComputeQuotaTarget': computeQuotaTarget,
if (description != null) 'Description': description,
},
);
return UpdateComputeQuotaResponse.fromJson(jsonResponse.body);
}