1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. Subnet
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.vpc.Subnet

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
    Deprecated: This resource has been deprecated and replaced by the Switch resource.

    Create Subnet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
    @overload
    def Subnet(resource_name: str,
               args: SubnetArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Subnet(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               availability_zone: Optional[str] = None,
               cidr_block: Optional[str] = None,
               description: Optional[str] = None,
               enable_ipv6: Optional[bool] = None,
               ipv6_cidr_block_mask: Optional[int] = None,
               name: Optional[str] = None,
               tags: Optional[Mapping[str, Any]] = None,
               vpc_id: Optional[str] = None,
               vswitch_name: Optional[str] = None,
               zone_id: Optional[str] = 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: alicloud:vpc:Subnet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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:

    CidrBlock string
    VpcId string
    AvailabilityZone string

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    Description string
    EnableIpv6 bool
    Ipv6CidrBlockMask int
    Name string

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    Tags Dictionary<string, object>
    VswitchName string
    ZoneId string
    CidrBlock string
    VpcId string
    AvailabilityZone string

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    Description string
    EnableIpv6 bool
    Ipv6CidrBlockMask int
    Name string

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    Tags map[string]interface{}
    VswitchName string
    ZoneId string
    cidrBlock String
    vpcId String
    availabilityZone String

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    description String
    enableIpv6 Boolean
    ipv6CidrBlockMask Integer
    name String

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    tags Map<String,Object>
    vswitchName String
    zoneId String
    cidrBlock string
    vpcId string
    availabilityZone string

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    description string
    enableIpv6 boolean
    ipv6CidrBlockMask number
    name string

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    tags {[key: string]: any}
    vswitchName string
    zoneId string
    cidr_block str
    vpc_id str
    availability_zone str

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    description str
    enable_ipv6 bool
    ipv6_cidr_block_mask int
    name str

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    tags Mapping[str, Any]
    vswitch_name str
    zone_id str
    cidrBlock String
    vpcId String
    availabilityZone String

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    description String
    enableIpv6 Boolean
    ipv6CidrBlockMask Number
    name String

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    tags Map<Any>
    vswitchName String
    zoneId String

    Outputs

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

    CreateTime string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6CidrBlock string
    Status string
    CreateTime string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6CidrBlock string
    Status string
    createTime String
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6CidrBlock String
    status String
    createTime string
    id string
    The provider-assigned unique ID for this managed resource.
    ipv6CidrBlock string
    status string
    create_time str
    id str
    The provider-assigned unique ID for this managed resource.
    ipv6_cidr_block str
    status str
    createTime String
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6CidrBlock String
    status String

    Look up Existing Subnet Resource

    Get an existing Subnet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SubnetState, opts?: CustomResourceOptions): Subnet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_zone: Optional[str] = None,
            cidr_block: Optional[str] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            enable_ipv6: Optional[bool] = None,
            ipv6_cidr_block: Optional[str] = None,
            ipv6_cidr_block_mask: Optional[int] = None,
            name: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            vpc_id: Optional[str] = None,
            vswitch_name: Optional[str] = None,
            zone_id: Optional[str] = None) -> Subnet
    func GetSubnet(ctx *Context, name string, id IDInput, state *SubnetState, opts ...ResourceOption) (*Subnet, error)
    public static Subnet Get(string name, Input<string> id, SubnetState? state, CustomResourceOptions? opts = null)
    public static Subnet get(String name, Output<String> id, SubnetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AvailabilityZone string

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    CidrBlock string
    CreateTime string
    Description string
    EnableIpv6 bool
    Ipv6CidrBlock string
    Ipv6CidrBlockMask int
    Name string

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    Status string
    Tags Dictionary<string, object>
    VpcId string
    VswitchName string
    ZoneId string
    AvailabilityZone string

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    CidrBlock string
    CreateTime string
    Description string
    EnableIpv6 bool
    Ipv6CidrBlock string
    Ipv6CidrBlockMask int
    Name string

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    Status string
    Tags map[string]interface{}
    VpcId string
    VswitchName string
    ZoneId string
    availabilityZone String

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    cidrBlock String
    createTime String
    description String
    enableIpv6 Boolean
    ipv6CidrBlock String
    ipv6CidrBlockMask Integer
    name String

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    status String
    tags Map<String,Object>
    vpcId String
    vswitchName String
    zoneId String
    availabilityZone string

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    cidrBlock string
    createTime string
    description string
    enableIpv6 boolean
    ipv6CidrBlock string
    ipv6CidrBlockMask number
    name string

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    status string
    tags {[key: string]: any}
    vpcId string
    vswitchName string
    zoneId string
    availability_zone str

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    cidr_block str
    create_time str
    description str
    enable_ipv6 bool
    ipv6_cidr_block str
    ipv6_cidr_block_mask int
    name str

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    status str
    tags Mapping[str, Any]
    vpc_id str
    vswitch_name str
    zone_id str
    availabilityZone String

    Deprecated: Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

    cidrBlock String
    createTime String
    description String
    enableIpv6 Boolean
    ipv6CidrBlock String
    ipv6CidrBlockMask Number
    name String

    Deprecated: Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

    status String
    tags Map<Any>
    vpcId String
    vswitchName String
    zoneId String

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi