import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ElastiCacheClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ElastiCacheClient"; import type { CreateCacheSubnetGroupMessage, CreateCacheSubnetGroupResult } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateCacheSubnetGroupCommand}. */ export interface CreateCacheSubnetGroupCommandInput extends CreateCacheSubnetGroupMessage { } /** * @public * * The output of {@link CreateCacheSubnetGroupCommand}. */ export interface CreateCacheSubnetGroupCommandOutput extends CreateCacheSubnetGroupResult, __MetadataBearer { } declare const CreateCacheSubnetGroupCommand_base: { new (input: CreateCacheSubnetGroupCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateCacheSubnetGroupCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Creates a new cache subnet group.

*

Use this parameter only when you are creating a cluster in an Amazon Virtual Private * Cloud (Amazon VPC).

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ElastiCacheClient, CreateCacheSubnetGroupCommand } from "@aws-sdk/client-elasticache"; // ES Modules import * // const { ElastiCacheClient, CreateCacheSubnetGroupCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import * // import type { ElastiCacheClientConfig } from "@aws-sdk/client-elasticache"; * const config = {}; // type is ElastiCacheClientConfig * const client = new ElastiCacheClient(config); * const input = { // CreateCacheSubnetGroupMessage * CacheSubnetGroupName: "STRING_VALUE", // required * CacheSubnetGroupDescription: "STRING_VALUE", // required * SubnetIds: [ // SubnetIdentifierList // required * "STRING_VALUE", * ], * Tags: [ // TagList * { // Tag * Key: "STRING_VALUE", * Value: "STRING_VALUE", * }, * ], * }; * const command = new CreateCacheSubnetGroupCommand(input); * const response = await client.send(command); * // { // CreateCacheSubnetGroupResult * // CacheSubnetGroup: { // CacheSubnetGroup * // CacheSubnetGroupName: "STRING_VALUE", * // CacheSubnetGroupDescription: "STRING_VALUE", * // VpcId: "STRING_VALUE", * // Subnets: [ // SubnetList * // { // Subnet * // SubnetIdentifier: "STRING_VALUE", * // SubnetAvailabilityZone: { // AvailabilityZone * // Name: "STRING_VALUE", * // }, * // SubnetOutpost: { // SubnetOutpost * // SubnetOutpostArn: "STRING_VALUE", * // }, * // SupportedNetworkTypes: [ // NetworkTypeList * // "ipv4" || "ipv6" || "dual_stack", * // ], * // }, * // ], * // ARN: "STRING_VALUE", * // SupportedNetworkTypes: [ * // "ipv4" || "ipv6" || "dual_stack", * // ], * // }, * // }; * * ``` * * @param CreateCacheSubnetGroupCommandInput - {@link CreateCacheSubnetGroupCommandInput} * @returns {@link CreateCacheSubnetGroupCommandOutput} * @see {@link CreateCacheSubnetGroupCommandInput} for command's `input` shape. * @see {@link CreateCacheSubnetGroupCommandOutput} for command's `response` shape. * @see {@link ElastiCacheClientResolvedConfig | config} for ElastiCacheClient's `config` shape. * * @throws {@link CacheSubnetGroupAlreadyExistsFault} (client fault) *

The requested cache subnet group name is already in use by an existing cache subnet * group.

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

The request cannot be processed because it would exceed the allowed number of cache * subnet groups.

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

The request cannot be processed because it would exceed the allowed number of subnets * in a cache subnet group.

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

An invalid subnet identifier was specified.

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

At least one subnet ID does not match the other subnet IDs. This mismatch typically * occurs when a user sets one subnet ID to a regional Availability Zone and a different * one to an outpost. Or when a user sets the subnet ID to an Outpost when not subscribed * on this service.

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

The request cannot be processed because it would cause the resource to have more than * the allowed number of tags. The maximum number of tags permitted on a resource is * 50.

* * @throws {@link ElastiCacheServiceException} *

Base exception class for all service exceptions from ElastiCache service.

* * * @example CreateCacheSubnet * ```javascript * // Creates a new cache subnet group. * const input = { * CacheSubnetGroupDescription: "Sample subnet group", * CacheSubnetGroupName: "my-sn-grp2", * SubnetIds: [ * "subnet-6f28c982", * "subnet-bcd382f3", * "subnet-845b3e7c0" * ] * }; * const command = new CreateCacheSubnetGroupCommand(input); * const response = await client.send(command); * /* response is * { * CacheSubnetGroup: { * CacheSubnetGroupDescription: "My subnet group.", * CacheSubnetGroupName: "my-sn-grp", * Subnets: [ * { * SubnetAvailabilityZone: { * Name: "us-east-1a" * }, * SubnetIdentifier: "subnet-6f28c982" * }, * { * SubnetAvailabilityZone: { * Name: "us-east-1c" * }, * SubnetIdentifier: "subnet-bcd382f3" * }, * { * SubnetAvailabilityZone: { * Name: "us-east-1b" * }, * SubnetIdentifier: "subnet-845b3e7c0" * } * ], * VpcId: "vpc-91280df6" * } * } * *\/ * ``` * * @public */ export declare class CreateCacheSubnetGroupCommand extends CreateCacheSubnetGroupCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateCacheSubnetGroupMessage; output: CreateCacheSubnetGroupResult; }; sdk: { input: CreateCacheSubnetGroupCommandInput; output: CreateCacheSubnetGroupCommandOutput; }; }; }