updateImageVersion method

Future<UpdateImageVersionResponse> updateImageVersion({
  1. required String imageName,
  2. String? alias,
  3. List<String>? aliasesToAdd,
  4. List<String>? aliasesToDelete,
  5. bool? horovod,
  6. JobType? jobType,
  7. String? mLFramework,
  8. Processor? processor,
  9. String? programmingLang,
  10. String? releaseNotes,
  11. VendorGuidance? vendorGuidance,
  12. int? version,
})

Updates the properties of a SageMaker AI image version.

May throw ResourceInUse. May throw ResourceNotFound.

Parameter imageName : The name of the image.

Parameter alias : The alias of the image version.

Parameter aliasesToAdd : A list of aliases to add.

Parameter aliasesToDelete : A list of aliases to delete.

Parameter horovod : Indicates Horovod compatibility.

Parameter jobType : Indicates SageMaker AI job type compatibility.

  • TRAINING: The image version is compatible with SageMaker AI training jobs.
  • INFERENCE: The image version is compatible with SageMaker AI inference jobs.
  • NOTEBOOK_KERNEL: The image version is compatible with SageMaker AI notebook kernels.

Parameter mLFramework : The machine learning framework vended in the image version.

Parameter processor : Indicates CPU or GPU compatibility.

  • CPU: The image version is compatible with CPU.
  • GPU: The image version is compatible with GPU.

Parameter programmingLang : The supported programming language and its version.

Parameter releaseNotes : The maintainer description of the image version.

Parameter vendorGuidance : The availability of the image version specified by the maintainer.

  • NOT_PROVIDED: The maintainers did not provide a status for image version stability.
  • STABLE: The image version is stable.
  • TO_BE_ARCHIVED: The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months.
  • ARCHIVED: The image version is archived. Archived image versions are not searchable and are no longer actively supported.

Parameter version : The version of the image.

Implementation

Future<UpdateImageVersionResponse> updateImageVersion({
  required String imageName,
  String? alias,
  List<String>? aliasesToAdd,
  List<String>? aliasesToDelete,
  bool? horovod,
  JobType? jobType,
  String? mLFramework,
  Processor? processor,
  String? programmingLang,
  String? releaseNotes,
  VendorGuidance? vendorGuidance,
  int? version,
}) async {
  _s.validateNumRange(
    'version',
    version,
    0,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.UpdateImageVersion'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ImageName': imageName,
      if (alias != null) 'Alias': alias,
      if (aliasesToAdd != null) 'AliasesToAdd': aliasesToAdd,
      if (aliasesToDelete != null) 'AliasesToDelete': aliasesToDelete,
      if (horovod != null) 'Horovod': horovod,
      if (jobType != null) 'JobType': jobType.value,
      if (mLFramework != null) 'MLFramework': mLFramework,
      if (processor != null) 'Processor': processor.value,
      if (programmingLang != null) 'ProgrammingLang': programmingLang,
      if (releaseNotes != null) 'ReleaseNotes': releaseNotes,
      if (vendorGuidance != null) 'VendorGuidance': vendorGuidance.value,
      if (version != null) 'Version': version,
    },
  );

  return UpdateImageVersionResponse.fromJson(jsonResponse.body);
}