updateInferenceComponent method

Future<UpdateInferenceComponentOutput> updateInferenceComponent({
  1. required String inferenceComponentName,
  2. InferenceComponentDeploymentConfig? deploymentConfig,
  3. InferenceComponentRuntimeConfig? runtimeConfig,
  4. InferenceComponentSpecification? specification,
  5. List<InferenceComponentSpecification>? specifications,
})

Updates an inference component.

May throw ResourceLimitExceeded.

Parameter inferenceComponentName : The name of the inference component.

Parameter deploymentConfig : The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.

Parameter runtimeConfig : Runtime settings for a model that is deployed with an inference component.

Parameter specification : Details about the resources to deploy with this inference component, including the model, container, and compute resources.

Parameter specifications : A list of specification objects for the inference component, one per instance type. Use this parameter when you want to specify different model or resource configurations for the inference component on each instance type. You can use either this parameter or the singular Specification parameter, but not both.

Implementation

Future<UpdateInferenceComponentOutput> updateInferenceComponent({
  required String inferenceComponentName,
  InferenceComponentDeploymentConfig? deploymentConfig,
  InferenceComponentRuntimeConfig? runtimeConfig,
  InferenceComponentSpecification? specification,
  List<InferenceComponentSpecification>? specifications,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.UpdateInferenceComponent'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'InferenceComponentName': inferenceComponentName,
      if (deploymentConfig != null) 'DeploymentConfig': deploymentConfig,
      if (runtimeConfig != null) 'RuntimeConfig': runtimeConfig,
      if (specification != null) 'Specification': specification,
      if (specifications != null) 'Specifications': specifications,
    },
  );

  return UpdateInferenceComponentOutput.fromJson(jsonResponse.body);
}