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

Creates or updates the policy schema in the specified policy store. The schema is used to validate any Cedar policies and policy templates submitted to the policy store. Any changes to the schema validate only policies and templates submitted after the schema change. Existing policies and templates are not re-evaluated against the changed schema. If you later update a policy, then it is evaluated against the new schema at that time.

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, PutSchemaCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import * // const { VerifiedPermissionsClient, PutSchemaCommand } = 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 = { // PutSchemaInput * policyStoreId: "STRING_VALUE", // required * definition: { // SchemaDefinition Union: only one key present * cedarJson: "STRING_VALUE", * }, * }; * const command = new PutSchemaCommand(input); * const response = await client.send(command); * // { // PutSchemaOutput * // policyStoreId: "STRING_VALUE", // required * // namespaces: [ // NamespaceList // required * // "STRING_VALUE", * // ], * // createdDate: new Date("TIMESTAMP"), // required * // lastUpdatedDate: new Date("TIMESTAMP"), // required * // }; * * ``` * * @param PutSchemaCommandInput - {@link PutSchemaCommandInput} * @returns {@link PutSchemaCommandOutput} * @see {@link PutSchemaCommandInput} for command's `input` shape. * @see {@link PutSchemaCommandOutput} 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 ServiceQuotaExceededException} (client fault) *

The request failed because it would cause a service quota to be exceeded.

* * @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 PutSchema * ```javascript * // The following example creates a new schema, or updates an existing schema, in the specified policy store. Note that the schema text is shown line wrapped for readability. You should submit the entire schema text as a single line of text. * * 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 = { * definition: { * cedarJson: `{"MySampleNamespace": {"actions": {"remoteAccess": {"appliesTo": {"principalTypes": ["Employee"]}}},"entityTypes": {"Employee": {"shape": {"attributes": {"jobLevel": {"type": "Long"},"name": {"type": "String"}},"type": "Record"}}}}}` * }, * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a" * }; * const command = new PutSchemaCommand(input); * const response = await client.send(command); * /* response is * { * createdDate: "2023-06-13T19:28:06.003726Z", * lastUpdatedDate: "2023-06-13T19:28:06.003726Z", * namespaces: [ * "My::Sample::Namespace" * ], * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a" * } * *\/ * ``` * * @public */ export declare class PutSchemaCommand extends PutSchemaCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: PutSchemaInput; output: PutSchemaOutput; }; sdk: { input: PutSchemaCommandInput; output: PutSchemaCommandOutput; }; }; }