Skip to content

Create Default Subnet

ec2_create_default_subnet R Documentation

Creates a default subnet with a size /20 IPv4 CIDR block in the specified Availability Zone in your default VPC

Description

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 Create a default subnet in the Amazon VPC User Guide.

Usage

ec2_create_default_subnet(AvailabilityZone, DryRun, Ipv6Native,
  AvailabilityZoneId)

Arguments

AvailabilityZone

The Availability Zone in which to create the default subnet.

Either AvailabilityZone or AvailabilityZoneId must be specified, but not both.

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Ipv6Native

Indicates whether to create an IPv6 only subnet. If you already have a default subnet for this Availability Zone, you must delete it before you can create an IPv6 only subnet.

AvailabilityZoneId

The ID of the Availability Zone.

Either AvailabilityZone or AvailabilityZoneId must be specified, but not both.

Value

A list with the following syntax:

list(
  Subnet = list(
    AvailabilityZoneId = "string",
    EnableLniAtDeviceIndex = 123,
    MapCustomerOwnedIpOnLaunch = TRUE|FALSE,
    CustomerOwnedIpv4Pool = "string",
    OwnerId = "string",
    AssignIpv6AddressOnCreation = TRUE|FALSE,
    Ipv6CidrBlockAssociationSet = list(
      list(
        AssociationId = "string",
        Ipv6CidrBlock = "string",
        Ipv6CidrBlockState = list(
          State = "associating"|"associated"|"disassociating"|"disassociated"|"failing"|"failed",
          StatusMessage = "string"
        ),
        Ipv6AddressAttribute = "public"|"private",
        IpSource = "amazon"|"byoip"|"none"
      )
    ),
    Tags = list(
      list(
        Key = "string",
        Value = "string"
      )
    ),
    SubnetArn = "string",
    OutpostArn = "string",
    EnableDns64 = TRUE|FALSE,
    Ipv6Native = TRUE|FALSE,
    PrivateDnsNameOptionsOnLaunch = list(
      HostnameType = "ip-name"|"resource-name",
      EnableResourceNameDnsARecord = TRUE|FALSE,
      EnableResourceNameDnsAAAARecord = TRUE|FALSE
    ),
    BlockPublicAccessStates = list(
      InternetGatewayBlockMode = "off"|"block-bidirectional"|"block-ingress"
    ),
    Type = "string",
    SubnetId = "string",
    State = "pending"|"available"|"unavailable"|"failed"|"failed-insufficient-capacity",
    VpcId = "string",
    CidrBlock = "string",
    AvailableIpAddressCount = 123,
    AvailabilityZone = "string",
    DefaultForAz = TRUE|FALSE,
    MapPublicIpOnLaunch = TRUE|FALSE
  )
)

Request syntax

svc$create_default_subnet(
  AvailabilityZone = "string",
  DryRun = TRUE|FALSE,
  Ipv6Native = TRUE|FALSE,
  AvailabilityZoneId = "string"
)