- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetResourcePolicyCommand
Returns information about a resource policy.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { NetworkManagerClient, GetResourcePolicyCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import
// const { NetworkManagerClient, GetResourcePolicyCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import
const client = new NetworkManagerClient(config);
const input = { // GetResourcePolicyRequest
ResourceArn: "STRING_VALUE", // required
};
const command = new GetResourcePolicyCommand(input);
const response = await client.send(command);
// { // GetResourcePolicyResponse
// PolicyDocument: "STRING_VALUE",
// };
GetResourcePolicyCommand Input
See GetResourcePolicyCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ResourceArn Required | string | undefined | The ARN of the resource. |
GetResourcePolicyCommand Output
See GetResourcePolicyCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
PolicyDocument | AutomaticJsonStringConversion | string | undefined | The resource policy document. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
InternalServerException | server | The request has failed due to an internal error. |
ThrottlingException | client | The request was denied due to request throttling. |
ValidationException | client | The input fails to satisfy the constraints. |
NetworkManagerServiceException | Base exception class for all service exceptions from NetworkManager service. |