describeModelCard method
Describes the content, creation time, and security configuration of an Amazon SageMaker Model Card.
May throw ResourceNotFound.
Parameter modelCardName :
The name or Amazon Resource Name (ARN) of the model card to describe.
Parameter includedData :
Specifies the level of model card data to include in the response. Use
this parameter to call DescribeModelCard without requiring
kms:Decrypt permission on the customer-managed Amazon Web
Services KMS key.
-
AllData: Returns the full model cardContent. This option requireskms:Decryptpermission on the customer-managed key, if one is associated with the model card. This is the default. -
MetadataOnly: Returns the model card with sanitizedContentthat includes only a small set of unencrypted metadata fields. This option does not requirekms:Decryptpermission. For the list of fields preserved in the response, seeContent.
AllData.
Parameter modelCardVersion :
The version of the model card to describe. If a version is not provided,
then the latest version of the model card is described.
Implementation
Future<DescribeModelCardResponse> describeModelCard({
required String modelCardName,
IncludedData? includedData,
int? modelCardVersion,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.DescribeModelCard'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ModelCardName': modelCardName,
if (includedData != null) 'IncludedData': includedData.value,
if (modelCardVersion != null) 'ModelCardVersion': modelCardVersion,
},
);
return DescribeModelCardResponse.fromJson(jsonResponse.body);
}