deleteApp method

Future<void> deleteApp({
  1. required String appName,
  2. required AppType appType,
  3. required String domainId,
  4. required String userProfileName,
})

Used to stop and delete an app.

May throw ResourceInUse. May throw ResourceNotFound.

Parameter appName : The name of the app.

Parameter appType : The type of app.

Parameter domainId : The domain ID.

Parameter userProfileName : The user profile name.

Implementation

Future<void> deleteApp({
  required String appName,
  required AppType appType,
  required String domainId,
  required String userProfileName,
}) async {
  ArgumentError.checkNotNull(appName, 'appName');
  _s.validateStringLength(
    'appName',
    appName,
    0,
    63,
    isRequired: true,
  );
  ArgumentError.checkNotNull(appType, 'appType');
  ArgumentError.checkNotNull(domainId, 'domainId');
  _s.validateStringLength(
    'domainId',
    domainId,
    0,
    63,
    isRequired: true,
  );
  ArgumentError.checkNotNull(userProfileName, 'userProfileName');
  _s.validateStringLength(
    'userProfileName',
    userProfileName,
    0,
    63,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DeleteApp'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AppName': appName,
      'AppType': appType.toValue(),
      'DomainId': domainId,
      'UserProfileName': userProfileName,
    },
  );
}