import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { PutResourcePolicyRequest, PutResourcePolicyResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @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/core/client").CommandImpl; new (input: PutResourcePolicyCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Creates or updates a resource-based policy for an Amazon Managed Service for Prometheus workspace. Use resource-based policies to grant permissions to other AWS accounts or services to access your workspace.

Only Prometheus-compatible APIs can be used for workspace sharing. You can add non-Prometheus-compatible APIs to the policy, but they will be ignored. For more information, see Prometheus-compatible APIs in the Amazon Managed Service for Prometheus User Guide.

If your workspace uses customer-managed KMS keys for encryption, you must grant the principals in your resource-based policy access to those KMS keys. You can do this by creating KMS grants. For more information, see CreateGrant in the AWS Key Management Service API Reference and Encryption at rest in the Amazon Managed Service for Prometheus User Guide.

For more information about working with IAM, see Using Amazon Managed Service for Prometheus with IAM in the Amazon Managed Service for Prometheus User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { AmpClient, PutResourcePolicyCommand } from "@aws-sdk/client-amp"; // ES Modules import * // const { AmpClient, PutResourcePolicyCommand } = require("@aws-sdk/client-amp"); // CommonJS import * // import type { AmpClientConfig } from "@aws-sdk/client-amp"; * const config = {}; // type is AmpClientConfig * const client = new AmpClient(config); * const input = { // PutResourcePolicyRequest * workspaceId: "STRING_VALUE", // required * policyDocument: "STRING_VALUE", // required * clientToken: "STRING_VALUE", * revisionId: "STRING_VALUE", * }; * const command = new PutResourcePolicyCommand(input); * const response = await client.send(command); * // { // PutResourcePolicyResponse * // policyStatus: "STRING_VALUE", // required * // revisionId: "STRING_VALUE", // required * // }; * * ``` * * @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 AmpClientResolvedConfig | config} for AmpClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

You do not have sufficient access to perform this action.

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

The request would cause an inconsistent state.

* * @throws {@link InternalServerException} (server fault) *

An unexpected error occurred during the processing of the request.

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

The request references a resources that doesn't exist.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services service.

* * @throws {@link AmpServiceException} *

Base exception class for all service exceptions from Amp 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; }; }; }