describeResourceServer method
Describes a resource server.
May throw InvalidParameterException. May throw ResourceNotFoundException. May throw NotAuthorizedException. May throw TooManyRequestsException. May throw InternalErrorException.
Parameter identifier
:
The identifier for the resource server
Parameter userPoolId
:
The user pool ID for the user pool that hosts the resource server.
Implementation
Future<DescribeResourceServerResponse> describeResourceServer({
required String identifier,
required String userPoolId,
}) async {
ArgumentError.checkNotNull(identifier, 'identifier');
_s.validateStringLength(
'identifier',
identifier,
1,
256,
isRequired: true,
);
ArgumentError.checkNotNull(userPoolId, 'userPoolId');
_s.validateStringLength(
'userPoolId',
userPoolId,
1,
55,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityProviderService.DescribeResourceServer'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Identifier': identifier,
'UserPoolId': userPoolId,
},
);
return DescribeResourceServerResponse.fromJson(jsonResponse.body);
}