describeTerms method

Future<DescribeTermsResponse> describeTerms({
  1. required String termsId,
  2. required String userPoolId,
})

Returns details for the requested terms documents ID. For more information, see Terms documents.

Learn more

May throw InternalErrorException. May throw InvalidParameterException. May throw NotAuthorizedException. May throw OperationNotEnabledException. May throw ResourceNotFoundException. May throw TooManyRequestsException.

Parameter termsId : The ID of the terms documents that you want to describe.

Parameter userPoolId : The ID of the user pool that contains the terms documents that you want to describe.

Implementation

Future<DescribeTermsResponse> describeTerms({
  required String termsId,
  required String userPoolId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSCognitoIdentityProviderService.DescribeTerms'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'TermsId': termsId,
      'UserPoolId': userPoolId,
    },
  );

  return DescribeTermsResponse.fromJson(jsonResponse.body);
}