dcloud ec2 subnets create

Create a subnet: a range of the VPC in one availability zone

IAM ec2:CreateSubnetChanges state

An instance launched with `subnetId` gets an address in the range and runs in the subnet’s zone. Ranges are /16 to /28, inside the VPC and not overlapping another subnet.

Synopsis

dcloud ec2 subnets create id --cidr-block cidrBlock [flags]

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: uuid

Flags

  • --cidr-blockRequired

    string

    IPv4 range inside the VPC, e.g. 10.0.1.0/24

    Constraints: 9-18 chars

  • --availability-zone-idOptional

    string

    The zone (e.g. de1b); default de1a

    Constraints: /^[a-z]+[0-9]+[a-z]$/

  • --nameOptional

    string

    A display name; omitted: none

    Constraints: max 64 chars

  • --tagsOptional

    map of string

    Tags for the new resource, e.g. {"env": "prod", "project": "shop"}. Keys your organization marks required must be present, or the create is refused with the missing keys (GET /tags/api/keys lists them).

    Constraints: key=value

Example

dcloud ec2 subnets create id --cidr-block example

Generated from the API description, the same one the API checks requests against and the CLI is built from.