import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { PutResourcePolicyRequest, PutResourcePolicyResponse } from "../models/models_1"; import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient"; /** * @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; }; /** *

Creates or updates a Systems Manager resource policy. A resource policy helps you to define the * IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. * The following resources support Systems Manager resource policies.

* * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSMClient, PutResourcePolicyCommand } from "@aws-sdk/client-ssm"; // ES Modules import * // const { SSMClient, PutResourcePolicyCommand } = require("@aws-sdk/client-ssm"); // CommonJS import * const client = new SSMClient(config); * const input = { // PutResourcePolicyRequest * ResourceArn: "STRING_VALUE", // required * Policy: "STRING_VALUE", // required * PolicyId: "STRING_VALUE", * PolicyHash: "STRING_VALUE", * }; * const command = new PutResourcePolicyCommand(input); * const response = await client.send(command); * // { // PutResourcePolicyResponse * // PolicyId: "STRING_VALUE", * // PolicyHash: "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 SSMClientResolvedConfig | config} for SSMClient's `config` shape. * * @throws {@link InternalServerError} (server fault) *

An error occurred on the server side.

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

The specified policy document is malformed or invalid, or excessive * PutResourcePolicy or DeleteResourcePolicy calls have been made.

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

The specified parameter to be shared could not be found.

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

The hash provided in the call doesn't match the stored hash. This exception is thrown when * trying to update an obsolete policy version or when multiple requests to update a policy are * sent.

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

One or more parameters specified for the call aren't valid. Verify the parameters and their * values and try again.

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

The PutResourcePolicy API action enforces two limits. A policy can't be * greater than 1024 bytes in size. And only one policy can be attached to * OpsItemGroup. Verify these limits and try again.

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

No policies with the specified policy ID and hash could be found.

* * @throws {@link SSMServiceException} *

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