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)

Arguments

AvailabilityZone

[required] The Availability Zone in which to create the default subnet.

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.

Value

A list with the following syntax:

list(
  Subnet = list(
    AvailabilityZone = "string",
    AvailabilityZoneId = "string",
    AvailableIpAddressCount = 123,
    CidrBlock = "string",
    DefaultForAz = TRUE|FALSE,
    EnableLniAtDeviceIndex = 123,
    MapPublicIpOnLaunch = TRUE|FALSE,
    MapCustomerOwnedIpOnLaunch = TRUE|FALSE,
    CustomerOwnedIpv4Pool = "string",
    State = "pending"|"available"|"unavailable",
    SubnetId = "string",
    VpcId = "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
    )
  )
)

Request syntax

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