createModelPackageGroup method
Creates a model group. A model group contains a group of model versions.
May throw ResourceLimitExceeded.
Parameter modelPackageGroupName
:
The name of the model group.
Parameter modelPackageGroupDescription
:
A description for the model group.
Parameter tags
:
A list of key value pairs associated with the model group. For more
information, see Tagging
AWS resources in the AWS General Reference Guide.
Implementation
Future<CreateModelPackageGroupOutput> createModelPackageGroup({
required String modelPackageGroupName,
String? modelPackageGroupDescription,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(modelPackageGroupName, 'modelPackageGroupName');
_s.validateStringLength(
'modelPackageGroupName',
modelPackageGroupName,
1,
63,
isRequired: true,
);
_s.validateStringLength(
'modelPackageGroupDescription',
modelPackageGroupDescription,
0,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreateModelPackageGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ModelPackageGroupName': modelPackageGroupName,
if (modelPackageGroupDescription != null)
'ModelPackageGroupDescription': modelPackageGroupDescription,
if (tags != null) 'Tags': tags,
},
);
return CreateModelPackageGroupOutput.fromJson(jsonResponse.body);
}