Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class CreateSubnetGroupCommandProtected

Creates a new subnet group.

Example

Use a bare-bones client and the command you need to make an API call.

import { DAXClient, CreateSubnetGroupCommand } from "@aws-sdk/client-dax"; // ES Modules import
// const { DAXClient, CreateSubnetGroupCommand } = require("@aws-sdk/client-dax"); // CommonJS import
const client = new DAXClient(config);
const input = { // CreateSubnetGroupRequest
SubnetGroupName: "STRING_VALUE", // required
Description: "STRING_VALUE",
SubnetIds: [ // SubnetIdentifierList // required
"STRING_VALUE",
],
};
const command = new CreateSubnetGroupCommand(input);
const response = await client.send(command);
// { // CreateSubnetGroupResponse
// SubnetGroup: { // SubnetGroup
// SubnetGroupName: "STRING_VALUE",
// Description: "STRING_VALUE",
// VpcId: "STRING_VALUE",
// Subnets: [ // SubnetList
// { // Subnet
// SubnetIdentifier: "STRING_VALUE",
// SubnetAvailabilityZone: "STRING_VALUE",
// },
// ],
// },
// };

Param

CreateSubnetGroupCommandInput

Returns

CreateSubnetGroupCommandOutput

See

Throws

InvalidSubnet (client fault)

An invalid subnet identifier was specified.

Throws

ServiceLinkedRoleNotFoundFault (client fault)

The specified service linked role (SLR) was not found.

Throws

SubnetGroupAlreadyExistsFault (client fault)

The specified subnet group already exists.

Throws

SubnetGroupQuotaExceededFault (client fault)

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

Throws

SubnetQuotaExceededFault (client fault)

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

Throws

DAXServiceException

Base exception class for all service exceptions from DAX service.

Hierarchy

Constructors

Properties

Methods