updateModelCard method
Update an Amazon SageMaker Model Card.
May throw ConflictException.
May throw ResourceLimitExceeded.
May throw ResourceNotFound.
Parameter modelCardName :
The name or Amazon Resource Name (ARN) of the model card to update.
Parameter content :
The updated model card content. Content must be in model
card JSON schema and provided as a string.
When updating model card content, be sure to include the full content and not just updated content.
Parameter modelCardStatus :
The approval status of the model card within your organization. Different
organizations might have different criteria for model card review and
approval.
-
Draft: The model card is a work in progress. -
PendingReview: The model card is pending review. -
Approved: The model card is approved. -
Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported.
Implementation
Future<UpdateModelCardResponse> updateModelCard({
required String modelCardName,
String? content,
ModelCardStatus? modelCardStatus,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdateModelCard'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ModelCardName': modelCardName,
if (content != null) 'Content': content,
if (modelCardStatus != null) 'ModelCardStatus': modelCardStatus.value,
},
);
return UpdateModelCardResponse.fromJson(jsonResponse.body);
}