import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CloudTrailClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudTrailClient"; import type { PutResourcePolicyRequest, PutResourcePolicyResponse } from "../models/models_0"; /** * @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 PutResourcePolicyResponse, __MetadataBearer { } declare const PutResourcePolicyCommand_base: { new (input: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

* Attaches a resource-based permission policy to a CloudTrail event data store, dashboard, or channel. For more information about resource-based policies, see * CloudTrail resource-based policy examples * in the CloudTrail User Guide. *

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudTrailClient, PutResourcePolicyCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import * // const { CloudTrailClient, PutResourcePolicyCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import * // import type { CloudTrailClientConfig } from "@aws-sdk/client-cloudtrail"; * const config = {}; // type is CloudTrailClientConfig * const client = new CloudTrailClient(config); * const input = { // PutResourcePolicyRequest * ResourceArn: "STRING_VALUE", // required * ResourcePolicy: "STRING_VALUE", // required * }; * const command = new PutResourcePolicyCommand(input); * const response = await client.send(command); * // { // PutResourcePolicyResponse * // ResourceArn: "STRING_VALUE", * // ResourcePolicy: "STRING_VALUE", * // DelegatedAdminResourcePolicy: "STRING_VALUE", * // }; * * ``` * * @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 CloudTrailClientResolvedConfig | config} for CloudTrailClient's `config` shape. * * @throws {@link ConflictException} (client fault) *

This exception is thrown when the specified resource is not ready for an operation. This * can occur when you try to run an operation on a resource before CloudTrail has time * to fully load the resource, or because another operation is modifying the resource. If this exception occurs, wait a few minutes, and then try the * operation again.

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

This exception is thrown when the requested operation is not permitted.

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

* This exception is thrown when the provided resource does not exist, or the ARN format of the resource is not valid. *

*

The following is the format of an event data store ARN: * arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE *

*

The following is the format of a dashboard ARN: arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash *

*

The following is the format of a channel ARN: * arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890 *

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

This exception is thrown when the specified resource is not found.

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

* This exception is thrown when the resouce-based policy has syntax errors, or contains a principal that is not valid. *

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

This exception is thrown when the specified resource type is not supported by CloudTrail.

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

This exception is thrown when the requested operation is not supported.

* * @throws {@link CloudTrailServiceException} *

Base exception class for all service exceptions from CloudTrail service.

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