describeContext method

Future<DescribeContextResponse> describeContext({
  1. required String contextName,
})

Describes a context.

May throw ResourceNotFound.

Parameter contextName : The name of the context to describe.

Implementation

Future<DescribeContextResponse> describeContext({
  required String contextName,
}) async {
  ArgumentError.checkNotNull(contextName, 'contextName');
  _s.validateStringLength(
    'contextName',
    contextName,
    1,
    120,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DescribeContext'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ContextName': contextName,
    },
  );

  return DescribeContextResponse.fromJson(jsonResponse.body);
}