import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { UpdatePolicyTemplateInput, UpdatePolicyTemplateOutput } from "../models/models_0"; import type { ServiceInputTypes, ServiceOutputTypes, VerifiedPermissionsClientResolvedConfig } from "../VerifiedPermissionsClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link UpdatePolicyTemplateCommand}. */ export interface UpdatePolicyTemplateCommandInput extends UpdatePolicyTemplateInput { } /** * @public * * The output of {@link UpdatePolicyTemplateCommand}. */ export interface UpdatePolicyTemplateCommandOutput extends UpdatePolicyTemplateOutput, __MetadataBearer { } declare const UpdatePolicyTemplateCommand_base: { new (input: UpdatePolicyTemplateCommandInput): import("@smithy/core/client").CommandImpl; new (input: UpdatePolicyTemplateCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

Updates the specified policy template. You can update only the description and the some elements of the policyBody.

Changes you make to the policy template content are immediately (within the constraints of eventual consistency) reflected in authorization decisions that involve all template-linked policies instantiated from this template.

Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { VerifiedPermissionsClient, UpdatePolicyTemplateCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import * // const { VerifiedPermissionsClient, UpdatePolicyTemplateCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import * // import type { VerifiedPermissionsClientConfig } from "@aws-sdk/client-verifiedpermissions"; * const config = {}; // type is VerifiedPermissionsClientConfig * const client = new VerifiedPermissionsClient(config); * const input = { // UpdatePolicyTemplateInput * policyStoreId: "STRING_VALUE", // required * policyTemplateId: "STRING_VALUE", // required * description: "STRING_VALUE", * statement: "STRING_VALUE", // required * name: "STRING_VALUE", * }; * const command = new UpdatePolicyTemplateCommand(input); * const response = await client.send(command); * // { // UpdatePolicyTemplateOutput * // policyStoreId: "STRING_VALUE", // required * // policyTemplateId: "STRING_VALUE", // required * // createdDate: new Date("TIMESTAMP"), // required * // lastUpdatedDate: new Date("TIMESTAMP"), // required * // }; * * ``` * * @param UpdatePolicyTemplateCommandInput - {@link UpdatePolicyTemplateCommandInput} * @returns {@link UpdatePolicyTemplateCommandOutput} * @see {@link UpdatePolicyTemplateCommandInput} for command's `input` shape. * @see {@link UpdatePolicyTemplateCommandOutput} for command's `response` shape. * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape. * * @throws {@link ConflictException} (client fault) *

The request failed because another request to modify a resource occurred at the same time.

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

The request failed because it references a resource that doesn't exist.

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

You don't have sufficient access to perform this action.

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

The request failed because of an internal error. Try your request again later

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

The request failed because it exceeded a throttling quota.

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

The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.

The possible reasons include the following:

* * @throws {@link VerifiedPermissionsServiceException} *

Base exception class for all service exceptions from VerifiedPermissions service.

* * * @example UpdatePolicyTemplate * ```javascript * // The following example updates a policy template with both a new description and a new policy body. The effect, principal, and resource are the same as the original policy template. Only the action in the head, and the when and unless clauses can be different. * * Note * The JSON in the parameters of this operation are strings that can contain embedded quotation marks (") within the outermost quotation mark pair. This requires that you stringify the JSON object by preceding all embedded quotation marks with a backslash character ( \" ) and combining all lines into a single text line with no line breaks. * * Example strings might be displayed wrapped across multiple lines here for readability, but the operation requires the parameters be submitted as single line strings. * const input = { * description: "My updated template description", * name: "name/example-policy-template-2", * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a", * policyTemplateId: "PTEXAMPLEabcdefg111111", * statement: `"ResearchAccess" * permit( * principal in ?principal, * action == Action::"view", * resource in ?resource" * ) * when { * principal has department && principal.department == "research" * };` * }; * const command = new UpdatePolicyTemplateCommand(input); * const response = await client.send(command); * /* response is * { * createdDate: "2023-05-17T18:58:48.795411Z", * lastUpdatedDate: "2023-05-17T19:18:48.870209Z", * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a", * policyTemplateId: "PTEXAMPLEabcdefg111111" * } * *\/ * ``` * * @public */ export declare class UpdatePolicyTemplateCommand extends UpdatePolicyTemplateCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: UpdatePolicyTemplateInput; output: UpdatePolicyTemplateOutput; }; sdk: { input: UpdatePolicyTemplateCommandInput; output: UpdatePolicyTemplateCommandOutput; }; }; }