

# GetResourcePolicy
<a name="API_GetResourcePolicy"></a>

Retrieves the account's consolidated AWS Sign-In resource-based policy. Returns the complete policy document that aggregates all permission statements into a single policy.

## Response Syntax
<a name="API_GetResourcePolicy_ResponseSyntax"></a>

```
{
   "signinResourceBasedPolicy": { 
      "statement": [ 
         { 
            "action": [ "string" ],
            "condition": { 
               "string" : { 
                  "string" : [ "string" ]
               }
            },
            "effect": "string",
            "principal": { 
               "string" : "string" 
            },
            "resource": "string"
         }
      ],
      "version": "string"
   }
}
```

## Response Elements
<a name="API_GetResourcePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [signinResourceBasedPolicy](#API_GetResourcePolicy_ResponseSyntax) **   <a name="signin-GetResourcePolicy-response-signinResourceBasedPolicy"></a>
The consolidated AWS Sign-In resource-based policy for the account.  
Type: [SigninResourceBasedPolicy](API_SigninResourceBasedPolicy.md) object

## Errors
<a name="API_GetResourcePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You do not have sufficient access to perform this action.  
HTTP Status Code: 400

 ** InternalServerException **   
The request processing has failed because of an unknown error, exception or failure with an internal server.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The request was denied because the specified resource was not found.  
HTTP Status Code: 400

 ** TooManyRequestsError **   
The request was denied due to rate limiting.  
HTTP Status Code: 400

## See Also
<a name="API_GetResourcePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/signincontrolplane-2022-07-26/GetResourcePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/signincontrolplane-2022-07-26/GetResourcePolicy) 