Creates a default subnet with a size /20 IPv4 CIDR block in the
specified Availability Zone in your default VPC. You can have only one default subnet
per Availability Zone. For more information, see Creating a default
subnet in the Amazon Virtual Private Cloud User Guide.
example
Use a bare-bones client and the command you need to make an API call.
Creates a default subnet with a size
/20
IPv4 CIDR block in the specified Availability Zone in your default VPC. You can have only one default subnet per Availability Zone. For more information, see Creating a default subnet in the Amazon Virtual Private Cloud User Guide.Use a bare-bones client and the command you need to make an API call.
import { EC2Client, CreateDefaultSubnetCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, CreateDefaultSubnetCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new CreateDefaultSubnetCommand(input); const response = await client.send(command);
CreateDefaultSubnetCommandInput for command's
input
shape.CreateDefaultSubnetCommandOutput for command's
response
shape.config for EC2Client's
config
shape.