updateImage method
Updates the properties of a SageMaker AI image. To change the image's tags, use the AddTags and DeleteTags APIs.
May throw ResourceInUse.
May throw ResourceNotFound.
Parameter imageName :
The name of the image to update.
Parameter deleteProperties :
A list of properties to delete. Only the Description and
DisplayName properties can be deleted.
Parameter description :
The new description for the image.
Parameter displayName :
The new display name for the image.
Parameter roleArn :
The new ARN for the IAM role that enables Amazon SageMaker AI to perform
tasks on your behalf.
Implementation
Future<UpdateImageResponse> updateImage({
required String imageName,
List<String>? deleteProperties,
String? description,
String? displayName,
String? roleArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdateImage'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ImageName': imageName,
if (deleteProperties != null) 'DeleteProperties': deleteProperties,
if (description != null) 'Description': description,
if (displayName != null) 'DisplayName': displayName,
if (roleArn != null) 'RoleArn': roleArn,
},
);
return UpdateImageResponse.fromJson(jsonResponse.body);
}