import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ImagebuilderClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ImagebuilderClient"; import type { PutComponentPolicyRequest, PutComponentPolicyResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link PutComponentPolicyCommand}. */ export interface PutComponentPolicyCommandInput extends PutComponentPolicyRequest { } /** * @public * * The output of {@link PutComponentPolicyCommand}. */ export interface PutComponentPolicyCommandOutput extends PutComponentPolicyResponse, __MetadataBearer { } declare const PutComponentPolicyCommand_base: { new (input: PutComponentPolicyCommandInput): import("@smithy/core/client").CommandImpl; new (input: PutComponentPolicyCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

Applies a policy to a component. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API * PutComponentPolicy, you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be * visible to all principals with whom the resource is shared.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ImagebuilderClient, PutComponentPolicyCommand } from "@aws-sdk/client-imagebuilder"; // ES Modules import * // const { ImagebuilderClient, PutComponentPolicyCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import * // import type { ImagebuilderClientConfig } from "@aws-sdk/client-imagebuilder"; * const config = {}; // type is ImagebuilderClientConfig * const client = new ImagebuilderClient(config); * const input = { // PutComponentPolicyRequest * componentArn: "STRING_VALUE", // required * policy: "STRING_VALUE", // required * }; * const command = new PutComponentPolicyCommand(input); * const response = await client.send(command); * // { // PutComponentPolicyResponse * // requestId: "STRING_VALUE", * // componentArn: "STRING_VALUE", * // }; * * ``` * * @param PutComponentPolicyCommandInput - {@link PutComponentPolicyCommandInput} * @returns {@link PutComponentPolicyCommandOutput} * @see {@link PutComponentPolicyCommandInput} for command's `input` shape. * @see {@link PutComponentPolicyCommandOutput} for command's `response` shape. * @see {@link ImagebuilderClientResolvedConfig | config} for ImagebuilderClient's `config` shape. * * @throws {@link CallRateLimitExceededException} (client fault) *

You have exceeded the permitted request rate for the specific operation.

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

These errors are usually caused by a client action, such as using an action or * resource on behalf of a user that doesn't have permissions to use the action or * resource, or specifying an invalid resource identifier.

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

You are not authorized to perform the requested operation.

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

The value that you provided for the specified parameter is invalid.

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

You have requested an action that that the service doesn't support.

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

At least one of the resources referenced by your request does not exist.

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

This exception is thrown when the service encounters an unrecoverable * exception.

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

The service is unable to process your request at this time.

* * @throws {@link ImagebuilderServiceException} *

Base exception class for all service exceptions from Imagebuilder service.

* * * @public */ export declare class PutComponentPolicyCommand extends PutComponentPolicyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: PutComponentPolicyRequest; output: PutComponentPolicyResponse; }; sdk: { input: PutComponentPolicyCommandInput; output: PutComponentPolicyCommandOutput; }; }; }