deleteApp method

Future<void> deleteApp({
  1. required String appName,
  2. required AppType appType,
  3. required String domainId,
  4. String? spaceName,
  5. 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 spaceName : The name of the space. If this value is not set, then UserProfileName must be set.

Parameter userProfileName : The user profile name. If this value is not set, then SpaceName must be set.

Implementation

Future<void> deleteApp({
  required String appName,
  required AppType appType,
  required String domainId,
  String? spaceName,
  String? userProfileName,
}) async {
  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.value,
      'DomainId': domainId,
      if (spaceName != null) 'SpaceName': spaceName,
      if (userProfileName != null) 'UserProfileName': userProfileName,
    },
  );
}