import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import type { GetResourcePolicyInput, GetResourcePolicyOutput } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link GetResourcePolicyCommand}. */ export interface GetResourcePolicyCommandInput extends GetResourcePolicyInput { } /** * @public * * The output of {@link GetResourcePolicyCommand}. */ export interface GetResourcePolicyCommandOutput extends GetResourcePolicyOutput, __MetadataBearer { } declare const GetResourcePolicyCommand_base: { new (input: GetResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: GetResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Returns the resource-based policy document attached to the resource, which can be a * table or stream, in JSON format.

*

* GetResourcePolicy follows an * eventually consistent * model. The following list * describes the outcomes when you issue the GetResourcePolicy request * immediately after issuing another request:

* *

Because GetResourcePolicy uses an eventually * consistent query, the metadata for your policy or table might not be * available at that moment. Wait for a few seconds, and then retry the * GetResourcePolicy request.

*

After a GetResourcePolicy request returns a policy created using the * PutResourcePolicy 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 CreateTable * request will always be applied to all requests for that table.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { DynamoDBClient, GetResourcePolicyCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import * // const { DynamoDBClient, GetResourcePolicyCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import * // import type { DynamoDBClientConfig } from "@aws-sdk/client-dynamodb"; * const config = {}; // type is DynamoDBClientConfig * const client = new DynamoDBClient(config); * const input = { // GetResourcePolicyInput * ResourceArn: "STRING_VALUE", // required * }; * const command = new GetResourcePolicyCommand(input); * const response = await client.send(command); * // { // GetResourcePolicyOutput * // Policy: "STRING_VALUE", * // RevisionId: "STRING_VALUE", * // }; * * ``` * * @param GetResourcePolicyCommandInput - {@link GetResourcePolicyCommandInput} * @returns {@link GetResourcePolicyCommandOutput} * @see {@link GetResourcePolicyCommandInput} for command's `input` shape. * @see {@link GetResourcePolicyCommandOutput} for command's `response` shape. * @see {@link DynamoDBClientResolvedConfig | config} for DynamoDBClient's `config` shape. * * @throws {@link InternalServerError} (server fault) *

An error occurred on the server side.

* * @throws {@link InvalidEndpointException} (client fault) * * @throws {@link PolicyNotFoundException} (client fault) *

The operation tried to access a nonexistent resource-based policy.

*

If you specified an ExpectedRevisionId, it's possible that a policy is * present for the resource but its revision ID didn't match the expected value.

* * @throws {@link ResourceNotFoundException} (client fault) *

The operation tried to access a nonexistent table or index. The resource might not * be specified correctly, or its status might not be ACTIVE.

* * @throws {@link DynamoDBServiceException} *

Base exception class for all service exceptions from DynamoDB service.

* * * @public */ export declare class GetResourcePolicyCommand extends GetResourcePolicyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: GetResourcePolicyInput; output: GetResourcePolicyOutput; }; sdk: { input: GetResourcePolicyCommandInput; output: GetResourcePolicyCommandOutput; }; }; }