Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.vpc.Subnet
Explore with Pulumi AI
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:
- Cidr
Block string - Vpc
Id string - Availability
Zone string - Description string
- Enable
Ipv6 bool - Ipv6Cidr
Block intMask - Name string
- Dictionary<string, object>
- Vswitch
Name string - Zone
Id string
- Cidr
Block string - Vpc
Id string - Availability
Zone string - Description string
- Enable
Ipv6 bool - Ipv6Cidr
Block intMask - Name string
- map[string]interface{}
- Vswitch
Name string - Zone
Id string
- cidr
Block String - vpc
Id String - availability
Zone String - description String
- enable
Ipv6 Boolean - ipv6Cidr
Block IntegerMask - name String
- Map<String,Object>
- vswitch
Name String - zone
Id String
- cidr
Block string - vpc
Id string - availability
Zone string - description string
- enable
Ipv6 boolean - ipv6Cidr
Block numberMask - name string
- {[key: string]: any}
- vswitch
Name string - zone
Id string
- cidr_
block str - vpc_
id str - availability_
zone str - description str
- enable_
ipv6 bool - ipv6_
cidr_ intblock_ mask - name str
- Mapping[str, Any]
- vswitch_
name str - zone_
id str
- cidr
Block String - vpc
Id String - availability
Zone String - description String
- enable
Ipv6 Boolean - ipv6Cidr
Block NumberMask - name String
- Map<Any>
- vswitch
Name String - zone
Id String
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:
- Create
Time string - Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Cidr
Block string - Status string
- Create
Time string - Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Cidr
Block string - Status string
- create
Time String - id String
- The provider-assigned unique ID for this managed resource.
- ipv6Cidr
Block String - status String
- create
Time string - id string
- The provider-assigned unique ID for this managed resource.
- ipv6Cidr
Block string - status string
- create_
time str - id str
- The provider-assigned unique ID for this managed resource.
- ipv6_
cidr_ strblock - status str
- create
Time String - id String
- The provider-assigned unique ID for this managed resource.
- ipv6Cidr
Block 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.
- Availability
Zone string - Cidr
Block string - Create
Time string - Description string
- Enable
Ipv6 bool - Ipv6Cidr
Block string - Ipv6Cidr
Block intMask - Name string
- Status string
- Dictionary<string, object>
- Vpc
Id string - Vswitch
Name string - Zone
Id string
- Availability
Zone string - Cidr
Block string - Create
Time string - Description string
- Enable
Ipv6 bool - Ipv6Cidr
Block string - Ipv6Cidr
Block intMask - Name string
- Status string
- map[string]interface{}
- Vpc
Id string - Vswitch
Name string - Zone
Id string
- availability
Zone String - cidr
Block String - create
Time String - description String
- enable
Ipv6 Boolean - ipv6Cidr
Block String - ipv6Cidr
Block IntegerMask - name String
- status String
- Map<String,Object>
- vpc
Id String - vswitch
Name String - zone
Id String
- availability
Zone string - cidr
Block string - create
Time string - description string
- enable
Ipv6 boolean - ipv6Cidr
Block string - ipv6Cidr
Block numberMask - name string
- status string
- {[key: string]: any}
- vpc
Id string - vswitch
Name string - zone
Id string
- availability_
zone str - cidr_
block str - create_
time str - description str
- enable_
ipv6 bool - ipv6_
cidr_ strblock - ipv6_
cidr_ intblock_ mask - name str
- status str
- Mapping[str, Any]
- vpc_
id str - vswitch_
name str - zone_
id str
- availability
Zone String - cidr
Block String - create
Time String - description String
- enable
Ipv6 Boolean - ipv6Cidr
Block String - ipv6Cidr
Block NumberMask - name String
- status String
- Map<Any>
- vpc
Id String - vswitch
Name String - zone
Id String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.