import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { PutResourcePolicyRequest, PutResourcePolicyResult } from "../models/models_0"; import type { ServiceInputTypes, ServiceOutputTypes, XRayClientResolvedConfig } from "../XRayClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link PutResourcePolicyCommand}. */ export interface PutResourcePolicyCommandInput extends PutResourcePolicyRequest { } /** * @public * * The output of {@link PutResourcePolicyCommand}. */ export interface PutResourcePolicyCommandOutput extends PutResourcePolicyResult, __MetadataBearer { } declare const PutResourcePolicyCommand_base: { new (input: PutResourcePolicyCommandInput): import("@smithy/core/client").CommandImpl; new (input: PutResourcePolicyCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

* Sets the resource policy to grant one or more Amazon Web Services services and accounts permissions to * access X-Ray. Each resource policy will be associated with a specific Amazon Web Services account. * Each Amazon Web Services account can have a maximum of 5 resource policies, and each policy name must be * unique within that account. The maximum size of each resource policy is 5KB. *

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { XRayClient, PutResourcePolicyCommand } from "@aws-sdk/client-xray"; // ES Modules import * // const { XRayClient, PutResourcePolicyCommand } = require("@aws-sdk/client-xray"); // CommonJS import * // import type { XRayClientConfig } from "@aws-sdk/client-xray"; * const config = {}; // type is XRayClientConfig * const client = new XRayClient(config); * const input = { // PutResourcePolicyRequest * PolicyName: "STRING_VALUE", // required * PolicyDocument: "STRING_VALUE", // required * PolicyRevisionId: "STRING_VALUE", * BypassPolicyLockoutCheck: true || false, * }; * const command = new PutResourcePolicyCommand(input); * const response = await client.send(command); * // { // PutResourcePolicyResult * // ResourcePolicy: { // ResourcePolicy * // PolicyName: "STRING_VALUE", * // PolicyDocument: "STRING_VALUE", * // PolicyRevisionId: "STRING_VALUE", * // LastUpdatedTime: new Date("TIMESTAMP"), * // }, * // }; * * ``` * * @param PutResourcePolicyCommandInput - {@link PutResourcePolicyCommandInput} * @returns {@link PutResourcePolicyCommandOutput} * @see {@link PutResourcePolicyCommandInput} for command's `input` shape. * @see {@link PutResourcePolicyCommandOutput} for command's `response` shape. * @see {@link XRayClientResolvedConfig | config} for XRayClient's `config` shape. * * @throws {@link InvalidPolicyRevisionIdException} (client fault) *

A policy revision id was provided which does not match the latest policy revision. This exception is also * if a policy revision id of 0 is provided via PutResourcePolicy and a policy with the same name already exists.

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

The provided resource policy would prevent the caller of this request from calling PutResourcePolicy in the future.

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

Invalid policy document provided in request.

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

Exceeded the maximum number of resource policies for a target Amazon Web Services account.

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

Exceeded the maximum size for a resource policy.

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

The request exceeds the maximum number of requests per second.

* * @throws {@link XRayServiceException} *

Base exception class for all service exceptions from XRay service.

* * * @public */ export declare class PutResourcePolicyCommand extends PutResourcePolicyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: PutResourcePolicyRequest; output: PutResourcePolicyResult; }; sdk: { input: PutResourcePolicyCommandInput; output: PutResourcePolicyCommandOutput; }; }; }