deleteModelPackage method

Future<void> deleteModelPackage({
  1. required String modelPackageName,
})

Deletes a model package.

A model package is used to create Amazon SageMaker models or list on AWS Marketplace. Buyers can subscribe to model packages listed on AWS Marketplace to create models in Amazon SageMaker.

May throw ConflictException.

Parameter modelPackageName : The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

Implementation

Future<void> deleteModelPackage({
  required String modelPackageName,
}) async {
  ArgumentError.checkNotNull(modelPackageName, 'modelPackageName');
  _s.validateStringLength(
    'modelPackageName',
    modelPackageName,
    1,
    176,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DeleteModelPackage'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ModelPackageName': modelPackageName,
    },
  );
}