1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. Subnet

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.97.0 published on Wednesday, Feb 21, 2024 by Pulumi

aws-native.ec2.Subnet

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.97.0 published on Wednesday, Feb 21, 2024 by Pulumi

    Resource Type definition for AWS::EC2::Subnet

    Create Subnet Resource

    new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
    @overload
    def Subnet(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               assign_ipv6_address_on_creation: Optional[bool] = None,
               availability_zone: Optional[str] = None,
               availability_zone_id: Optional[str] = None,
               cidr_block: Optional[str] = None,
               enable_dns64: Optional[bool] = None,
               ipv4_ipam_pool_id: Optional[str] = None,
               ipv4_netmask_length: Optional[int] = None,
               ipv6_cidr_block: Optional[str] = None,
               ipv6_cidr_blocks: Optional[Sequence[str]] = None,
               ipv6_ipam_pool_id: Optional[str] = None,
               ipv6_native: Optional[bool] = None,
               ipv6_netmask_length: Optional[int] = None,
               map_public_ip_on_launch: Optional[bool] = None,
               outpost_arn: Optional[str] = None,
               private_dns_name_options_on_launch: Optional[PrivateDnsNameOptionsOnLaunchPropertiesArgs] = None,
               tags: Optional[Sequence[SubnetTagArgs]] = None,
               vpc_id: Optional[str] = None)
    @overload
    def Subnet(resource_name: str,
               args: SubnetArgs,
               opts: Optional[ResourceOptions] = None)
    func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)
    public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)
    public Subnet(String name, SubnetArgs args)
    public Subnet(String name, SubnetArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:Subnet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Subnet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Subnet resource accepts the following input properties:

    VpcId string
    AssignIpv6AddressOnCreation bool
    AvailabilityZone string
    AvailabilityZoneId string
    CidrBlock string
    EnableDns64 bool
    Ipv4IpamPoolId string
    The ID of an IPv4 IPAM pool you want to use for allocating this subnet's CIDR
    Ipv4NetmaskLength int
    The netmask length of the IPv4 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    Ipv6CidrBlock string
    Ipv6CidrBlocks List<string>
    Ipv6IpamPoolId string
    The ID of an IPv6 IPAM pool you want to use for allocating this subnet's CIDR
    Ipv6Native bool
    Ipv6NetmaskLength int
    The netmask length of the IPv6 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    MapPublicIpOnLaunch bool
    OutpostArn string
    PrivateDnsNameOptionsOnLaunch Pulumi.AwsNative.Ec2.Inputs.PrivateDnsNameOptionsOnLaunchProperties
    Tags List<Pulumi.AwsNative.Ec2.Inputs.SubnetTag>
    VpcId string
    AssignIpv6AddressOnCreation bool
    AvailabilityZone string
    AvailabilityZoneId string
    CidrBlock string
    EnableDns64 bool
    Ipv4IpamPoolId string
    The ID of an IPv4 IPAM pool you want to use for allocating this subnet's CIDR
    Ipv4NetmaskLength int
    The netmask length of the IPv4 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    Ipv6CidrBlock string
    Ipv6CidrBlocks []string
    Ipv6IpamPoolId string
    The ID of an IPv6 IPAM pool you want to use for allocating this subnet's CIDR
    Ipv6Native bool
    Ipv6NetmaskLength int
    The netmask length of the IPv6 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    MapPublicIpOnLaunch bool
    OutpostArn string
    PrivateDnsNameOptionsOnLaunch PrivateDnsNameOptionsOnLaunchPropertiesArgs
    Tags []SubnetTagArgs
    vpcId String
    assignIpv6AddressOnCreation Boolean
    availabilityZone String
    availabilityZoneId String
    cidrBlock String
    enableDns64 Boolean
    ipv4IpamPoolId String
    The ID of an IPv4 IPAM pool you want to use for allocating this subnet's CIDR
    ipv4NetmaskLength Integer
    The netmask length of the IPv4 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    ipv6CidrBlock String
    ipv6CidrBlocks List<String>
    ipv6IpamPoolId String
    The ID of an IPv6 IPAM pool you want to use for allocating this subnet's CIDR
    ipv6Native Boolean
    ipv6NetmaskLength Integer
    The netmask length of the IPv6 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    mapPublicIpOnLaunch Boolean
    outpostArn String
    privateDnsNameOptionsOnLaunch PrivateDnsNameOptionsOnLaunchProperties
    tags List<SubnetTag>
    vpcId string
    assignIpv6AddressOnCreation boolean
    availabilityZone string
    availabilityZoneId string
    cidrBlock string
    enableDns64 boolean
    ipv4IpamPoolId string
    The ID of an IPv4 IPAM pool you want to use for allocating this subnet's CIDR
    ipv4NetmaskLength number
    The netmask length of the IPv4 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    ipv6CidrBlock string
    ipv6CidrBlocks string[]
    ipv6IpamPoolId string
    The ID of an IPv6 IPAM pool you want to use for allocating this subnet's CIDR
    ipv6Native boolean
    ipv6NetmaskLength number
    The netmask length of the IPv6 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    mapPublicIpOnLaunch boolean
    outpostArn string
    privateDnsNameOptionsOnLaunch PrivateDnsNameOptionsOnLaunchProperties
    tags SubnetTag[]
    vpc_id str
    assign_ipv6_address_on_creation bool
    availability_zone str
    availability_zone_id str
    cidr_block str
    enable_dns64 bool
    ipv4_ipam_pool_id str
    The ID of an IPv4 IPAM pool you want to use for allocating this subnet's CIDR
    ipv4_netmask_length int
    The netmask length of the IPv4 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    ipv6_cidr_block str
    ipv6_cidr_blocks Sequence[str]
    ipv6_ipam_pool_id str
    The ID of an IPv6 IPAM pool you want to use for allocating this subnet's CIDR
    ipv6_native bool
    ipv6_netmask_length int
    The netmask length of the IPv6 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    map_public_ip_on_launch bool
    outpost_arn str
    private_dns_name_options_on_launch PrivateDnsNameOptionsOnLaunchPropertiesArgs
    tags Sequence[SubnetTagArgs]
    vpcId String
    assignIpv6AddressOnCreation Boolean
    availabilityZone String
    availabilityZoneId String
    cidrBlock String
    enableDns64 Boolean
    ipv4IpamPoolId String
    The ID of an IPv4 IPAM pool you want to use for allocating this subnet's CIDR
    ipv4NetmaskLength Number
    The netmask length of the IPv4 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    ipv6CidrBlock String
    ipv6CidrBlocks List<String>
    ipv6IpamPoolId String
    The ID of an IPv6 IPAM pool you want to use for allocating this subnet's CIDR
    ipv6Native Boolean
    ipv6NetmaskLength Number
    The netmask length of the IPv6 CIDR you want to allocate to this subnet from an Amazon VPC IP Address Manager (IPAM) pool
    mapPublicIpOnLaunch Boolean
    outpostArn String
    privateDnsNameOptionsOnLaunch Property Map
    tags List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkAclAssociationId string
    The ID of the network ACL that is associated with the subnet's VPC
    SubnetId string
    The ID of the subnet
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkAclAssociationId string
    The ID of the network ACL that is associated with the subnet's VPC
    SubnetId string
    The ID of the subnet
    id String
    The provider-assigned unique ID for this managed resource.
    networkAclAssociationId String
    The ID of the network ACL that is associated with the subnet's VPC
    subnetId String
    The ID of the subnet
    id string
    The provider-assigned unique ID for this managed resource.
    networkAclAssociationId string
    The ID of the network ACL that is associated with the subnet's VPC
    subnetId string
    The ID of the subnet
    id str
    The provider-assigned unique ID for this managed resource.
    network_acl_association_id str
    The ID of the network ACL that is associated with the subnet's VPC
    subnet_id str
    The ID of the subnet
    id String
    The provider-assigned unique ID for this managed resource.
    networkAclAssociationId String
    The ID of the network ACL that is associated with the subnet's VPC
    subnetId String
    The ID of the subnet

    Supporting Types

    PrivateDnsNameOptionsOnLaunchProperties, PrivateDnsNameOptionsOnLaunchPropertiesArgs

    SubnetTag, SubnetTagArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.97.0 published on Wednesday, Feb 21, 2024 by Pulumi