getApplicationGrant method

Future<GetApplicationGrantResponse> getApplicationGrant({
  1. required String applicationArn,
  2. required GrantType grantType,
})

Retrieves details about an application grant.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter applicationArn : Specifies the ARN of the application that contains the grant.

Parameter grantType : Specifies the type of grant.

Implementation

Future<GetApplicationGrantResponse> getApplicationGrant({
  required String applicationArn,
  required GrantType grantType,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SWBExternalService.GetApplicationGrant'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationArn': applicationArn,
      'GrantType': grantType.value,
    },
  );

  return GetApplicationGrantResponse.fromJson(jsonResponse.body);
}