describeApp method

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

Describes the app.

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<DescribeAppResponse> describeApp({
  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.DescribeApp'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AppName': appName,
      'AppType': appType.toValue(),
      'DomainId': domainId,
      'UserProfileName': userProfileName,
    },
  );

  return DescribeAppResponse.fromJson(jsonResponse.body);
}