import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateSecurityPolicyRequest, CreateSecurityPolicyResponse } from "../models/models_0"; import type { OpenSearchServerlessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OpenSearchServerlessClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateSecurityPolicyCommand}. */ export interface CreateSecurityPolicyCommandInput extends CreateSecurityPolicyRequest { } /** * @public * * The output of {@link CreateSecurityPolicyCommand}. */ export interface CreateSecurityPolicyCommandOutput extends CreateSecurityPolicyResponse, __MetadataBearer { } declare const CreateSecurityPolicyCommand_base: { new (input: CreateSecurityPolicyCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateSecurityPolicyCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Creates a security policy to be used by one or more OpenSearch Serverless collections. Security policies provide access to a collection and its OpenSearch Dashboards endpoint from public networks or specific VPC endpoints. They also allow you to secure a collection with a KMS encryption key. For more information, see Network access for Amazon OpenSearch Serverless and Encryption at rest for Amazon OpenSearch Serverless.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { OpenSearchServerlessClient, CreateSecurityPolicyCommand } from "@aws-sdk/client-opensearchserverless"; // ES Modules import * // const { OpenSearchServerlessClient, CreateSecurityPolicyCommand } = require("@aws-sdk/client-opensearchserverless"); // CommonJS import * // import type { OpenSearchServerlessClientConfig } from "@aws-sdk/client-opensearchserverless"; * const config = {}; // type is OpenSearchServerlessClientConfig * const client = new OpenSearchServerlessClient(config); * const input = { // CreateSecurityPolicyRequest * type: "STRING_VALUE", // required * name: "STRING_VALUE", // required * description: "STRING_VALUE", * policy: "STRING_VALUE", // required * clientToken: "STRING_VALUE", * }; * const command = new CreateSecurityPolicyCommand(input); * const response = await client.send(command); * // { // CreateSecurityPolicyResponse * // securityPolicyDetail: { // SecurityPolicyDetail * // type: "STRING_VALUE", * // name: "STRING_VALUE", * // policyVersion: "STRING_VALUE", * // description: "STRING_VALUE", * // policy: "DOCUMENT_VALUE", * // createdDate: Number("long"), * // lastModifiedDate: Number("long"), * // }, * // }; * * ``` * * @param CreateSecurityPolicyCommandInput - {@link CreateSecurityPolicyCommandInput} * @returns {@link CreateSecurityPolicyCommandOutput} * @see {@link CreateSecurityPolicyCommandInput} for command's `input` shape. * @see {@link CreateSecurityPolicyCommandOutput} for command's `response` shape. * @see {@link OpenSearchServerlessClientResolvedConfig | config} for OpenSearchServerlessClient's `config` shape. * * @throws {@link ConflictException} (client fault) *

When creating a resource, thrown when a resource with the same name already exists or is being created. When deleting a resource, thrown when the resource is not in the ACTIVE, FAILED, or UPDATE_FAILED state.

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

Thrown when an error internal to the service occurs while processing a request.

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

Thrown when you attempt to create more resources than the service allows based on service quotas.

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

Thrown when the HTTP request contains invalid input or is missing required input.

* * @throws {@link OpenSearchServerlessServiceException} *

Base exception class for all service exceptions from OpenSearchServerless service.

* * * @public */ export declare class CreateSecurityPolicyCommand extends CreateSecurityPolicyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateSecurityPolicyRequest; output: CreateSecurityPolicyResponse; }; sdk: { input: CreateSecurityPolicyCommandInput; output: CreateSecurityPolicyCommandOutput; }; }; }