getResourcePolicy method

Future<GetResourcePolicyResponse> getResourcePolicy({
  1. required String resourceArn,
})

Retrieves the resource-based policy attached to a dashboard, showing sharing configurations and permissions.

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

Parameter resourceArn : The ARN of the dashboard whose resource-based policy you want to retrieve.

Implementation

Future<GetResourcePolicyResponse> getResourcePolicy({
  required String resourceArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSBCMDashboardsService.GetResourcePolicy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'resourceArn': resourceArn,
    },
  );

  return GetResourcePolicyResponse.fromJson(jsonResponse.body);
}