@Override
    public GetResourcePolicyResult getResourcePolicy(GetResourcePolicyRequest request) {
        request = beforeClientExecution(request);
        return executeGetResourcePolicy(request);
    }
<p>
Returns the resource-based policy document attached to the resource, which can be a table or stream, in JSON
format.
</p>
<p>
<code>GetResourcePolicy</code> follows an <a
href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html">
<i>eventually consistent</i> </a> model. The following list describes the outcomes when you issue the
<code>GetResourcePolicy</code> request immediately after issuing another request:
</p>
<ul>
<li>
<p>
If you issue a <code>GetResourcePolicy</code> request immediately after a <code>PutResourcePolicy</code> request,
DynamoDB might return a <code>PolicyNotFoundException</code>.
</p>
</li>
<li>
<p>
If you issue a <code>GetResourcePolicy</code>request immediately after a <code>DeleteResourcePolicy</code>
request, DynamoDB might return the policy that was present before the deletion request.
</p>
</li>
<li>
<p>
If you issue a <code>GetResourcePolicy</code> request immediately after a <code>CreateTable</code> request, which
includes a resource-based policy, DynamoDB might return a <code>ResourceNotFoundException</code> or a
<code>PolicyNotFoundException</code>.
</p>
</li>
</ul>
<p>
Because <code>GetResourcePolicy</code> uses an <i>eventually consistent</i> query, the metadata for your policy
or table might not be available at that moment. Wait for a few seconds, and then retry the
<code>GetResourcePolicy</code> request.
</p>
<p>
After a <code>GetResourcePolicy</code> request returns a policy created using the <code>PutResourcePolicy</code>
request, the policy will be applied in the authorization of requests to the resource. Because this process is
eventually consistent, it will take some time to apply the policy to all requests to a resource. Policies that
you attach while creating a table using the <code>CreateTable</code> request will always be applied to all
requests for that table.
</p>

@param getResourcePolicyRequest
@return Result of the GetResourcePolicy operation returned by the service.
@throws ResourceNotFoundException
        The operation tried to access a nonexistent table or index. The resource might not be specified
        correctly, or its status might not be <code>ACTIVE</code>.
@throws InternalServerErrorException
        An error occurred on the server side.
@throws PolicyNotFoundException
        The operation tried to access a nonexistent resource-based policy.</p>
        <p>
        If you specified an <code>ExpectedRevisionId</code>, it's possible that a policy is present for the
        resource but its revision ID didn't match the expected value.
@sample AmazonDynamoDB.GetResourcePolicy
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/GetResourcePolicy" target="_top">AWS API
     Documentation</a>
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/AmazonDynamoDBClient.java