getPolicy method

Future<GetPolicyResponse> getPolicy({
  1. required String applicationId,
})

Retrieves the current permission policy for a Amazon Q Business application. The policy is returned as a JSON-formatted string and defines the IAM actions that are allowed or denied for the application's resources.

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

Parameter applicationId : The unique identifier of the Amazon Q Business application.

Implementation

Future<GetPolicyResponse> getPolicy({
  required String applicationId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/applications/${Uri.encodeComponent(applicationId)}/policy',
    exceptionFnMap: _exceptionFns,
  );
  return GetPolicyResponse.fromJson(response);
}