Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine
volcengine.vpc.Subnets
Explore with Pulumi AI
Use this data source to query detailed information of subnets
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
const default = volcengine.vpc.Subnets({
    ids: ["subnet-274zsa5kfmj287fap8soo5e19"],
});
import pulumi
import pulumi_volcengine as volcengine
default = volcengine.vpc.subnets(ids=["subnet-274zsa5kfmj287fap8soo5e19"])
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpc.Subnets(ctx, &vpc.SubnetsArgs{
			Ids: []string{
				"subnet-274zsa5kfmj287fap8soo5e19",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var @default = Volcengine.Vpc.Subnets.Invoke(new()
    {
        Ids = new[]
        {
            "subnet-274zsa5kfmj287fap8soo5e19",
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vpc.VpcFunctions;
import com.pulumi.volcengine.vpc.inputs.SubnetsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var default = VpcFunctions.Subnets(SubnetsArgs.builder()
            .ids("subnet-274zsa5kfmj287fap8soo5e19")
            .build());
    }
}
variables:
  default:
    fn::invoke:
      Function: volcengine:vpc:Subnets
      Arguments:
        ids:
          - subnet-274zsa5kfmj287fap8soo5e19
Using Subnets
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function subnets(args: SubnetsArgs, opts?: InvokeOptions): Promise<SubnetsResult>
function subnetsOutput(args: SubnetsOutputArgs, opts?: InvokeOptions): Output<SubnetsResult>def subnets(ids: Optional[Sequence[str]] = None,
            name_regex: Optional[str] = None,
            output_file: Optional[str] = None,
            route_table_id: Optional[str] = None,
            subnet_name: Optional[str] = None,
            tags: Optional[Sequence[SubnetsTag]] = None,
            vpc_id: Optional[str] = None,
            zone_id: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> SubnetsResult
def subnets_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            name_regex: Optional[pulumi.Input[str]] = None,
            output_file: Optional[pulumi.Input[str]] = None,
            route_table_id: Optional[pulumi.Input[str]] = None,
            subnet_name: Optional[pulumi.Input[str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[SubnetsTagArgs]]]] = None,
            vpc_id: Optional[pulumi.Input[str]] = None,
            zone_id: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[SubnetsResult]func Subnets(ctx *Context, args *SubnetsArgs, opts ...InvokeOption) (*SubnetsResult, error)
func SubnetsOutput(ctx *Context, args *SubnetsOutputArgs, opts ...InvokeOption) SubnetsResultOutputpublic static class Subnets 
{
    public static Task<SubnetsResult> InvokeAsync(SubnetsArgs args, InvokeOptions? opts = null)
    public static Output<SubnetsResult> Invoke(SubnetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<SubnetsResult> subnets(SubnetsArgs args, InvokeOptions options)
public static Output<SubnetsResult> subnets(SubnetsArgs args, InvokeOptions options)
fn::invoke:
  function: volcengine:vpc:Subnets
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ids List<string>
 - A list of Subnet IDs.
 - Name
Regex string - A Name Regex of Subnet.
 - Output
File string - File name where to save data source results.
 - Route
Table stringId  - The ID of route table which subnet associated with.
 - Subnet
Name string - The subnet name to query.
 - 
List<Subnets
Tag>  - Tags.
 - Vpc
Id string - The ID of VPC which subnet belongs to.
 - Zone
Id string - The ID of zone which subnet belongs to.
 
- Ids []string
 - A list of Subnet IDs.
 - Name
Regex string - A Name Regex of Subnet.
 - Output
File string - File name where to save data source results.
 - Route
Table stringId  - The ID of route table which subnet associated with.
 - Subnet
Name string - The subnet name to query.
 - 
[]Subnets
Tag  - Tags.
 - Vpc
Id string - The ID of VPC which subnet belongs to.
 - Zone
Id string - The ID of zone which subnet belongs to.
 
- ids List<String>
 - A list of Subnet IDs.
 - name
Regex String - A Name Regex of Subnet.
 - output
File String - File name where to save data source results.
 - route
Table StringId  - The ID of route table which subnet associated with.
 - subnet
Name String - The subnet name to query.
 - 
List<Subnets
Tag>  - Tags.
 - vpc
Id String - The ID of VPC which subnet belongs to.
 - zone
Id String - The ID of zone which subnet belongs to.
 
- ids string[]
 - A list of Subnet IDs.
 - name
Regex string - A Name Regex of Subnet.
 - output
File string - File name where to save data source results.
 - route
Table stringId  - The ID of route table which subnet associated with.
 - subnet
Name string - The subnet name to query.
 - 
Subnets
Tag[]  - Tags.
 - vpc
Id string - The ID of VPC which subnet belongs to.
 - zone
Id string - The ID of zone which subnet belongs to.
 
- ids Sequence[str]
 - A list of Subnet IDs.
 - name_
regex str - A Name Regex of Subnet.
 - output_
file str - File name where to save data source results.
 - route_
table_ strid  - The ID of route table which subnet associated with.
 - subnet_
name str - The subnet name to query.
 - 
Sequence[Subnets
Tag]  - Tags.
 - vpc_
id str - The ID of VPC which subnet belongs to.
 - zone_
id str - The ID of zone which subnet belongs to.
 
- ids List<String>
 - A list of Subnet IDs.
 - name
Regex String - A Name Regex of Subnet.
 - output
File String - File name where to save data source results.
 - route
Table StringId  - The ID of route table which subnet associated with.
 - subnet
Name String - The subnet name to query.
 - List<Property Map>
 - Tags.
 - vpc
Id String - The ID of VPC which subnet belongs to.
 - zone
Id String - The ID of zone which subnet belongs to.
 
Subnets Result
The following output properties are available:
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Subnets
List<Subnets
Subnet>  - The collection of Subnet query.
 - Total
Count int - The total count of Subnet query.
 - Ids List<string>
 - Name
Regex string - Output
File string - Route
Table stringId  - The route table ID.
 - Subnet
Name string - The Name of Subnet.
 - 
List<Subnets
Tag>  - Tags.
 - Vpc
Id string - The Vpc ID of Subnet.
 - Zone
Id string - The ID of Zone.
 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Subnets
[]Subnets
Subnet  - The collection of Subnet query.
 - Total
Count int - The total count of Subnet query.
 - Ids []string
 - Name
Regex string - Output
File string - Route
Table stringId  - The route table ID.
 - Subnet
Name string - The Name of Subnet.
 - 
[]Subnets
Tag  - Tags.
 - Vpc
Id string - The Vpc ID of Subnet.
 - Zone
Id string - The ID of Zone.
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - subnets
List<Subnets
Subnet>  - The collection of Subnet query.
 - total
Count Integer - The total count of Subnet query.
 - ids List<String>
 - name
Regex String - output
File String - route
Table StringId  - The route table ID.
 - subnet
Name String - The Name of Subnet.
 - 
List<Subnets
Tag>  - Tags.
 - vpc
Id String - The Vpc ID of Subnet.
 - zone
Id String - The ID of Zone.
 
- id string
 - The provider-assigned unique ID for this managed resource.
 - subnets
Subnets
Subnet[]  - The collection of Subnet query.
 - total
Count number - The total count of Subnet query.
 - ids string[]
 - name
Regex string - output
File string - route
Table stringId  - The route table ID.
 - subnet
Name string - The Name of Subnet.
 - 
Subnets
Tag[]  - Tags.
 - vpc
Id string - The Vpc ID of Subnet.
 - zone
Id string - The ID of Zone.
 
- id str
 - The provider-assigned unique ID for this managed resource.
 - subnets
Sequence[Subnets
Subnet]  - The collection of Subnet query.
 - total_
count int - The total count of Subnet query.
 - ids Sequence[str]
 - name_
regex str - output_
file str - route_
table_ strid  - The route table ID.
 - subnet_
name str - The Name of Subnet.
 - 
Sequence[Subnets
Tag]  - Tags.
 - vpc_
id str - The Vpc ID of Subnet.
 - zone_
id str - The ID of Zone.
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - subnets List<Property Map>
 - The collection of Subnet query.
 - total
Count Number - The total count of Subnet query.
 - ids List<String>
 - name
Regex String - output
File String - route
Table StringId  - The route table ID.
 - subnet
Name String - The Name of Subnet.
 - List<Property Map>
 - Tags.
 - vpc
Id String - The Vpc ID of Subnet.
 - zone
Id String - The ID of Zone.
 
Supporting Types
SubnetsSubnet 
- Account
Id string - The account ID which the subnet belongs to.
 - Available
Ip intAddress Count  - The count of available ip address.
 - Cidr
Block string - The cidr block of Subnet.
 - Creation
Time string - Creation time of Subnet.
 - Description string
 - The description of Subnet.
 - Id string
 - The ID of Subnet.
 - Ipv6Cidr
Block string - The IPv6 CIDR block of the VPC.
 - Network
Acl stringId  - The ID of network acl which this subnet associate with.
 - Route
Table SubnetsSubnet Route Table  - The route table information.
 - Route
Table stringId  - The ID of route table which subnet associated with.
 - Route
Table stringType  - The route table type.
 - Status string
 - The Status of Subnet.
 - Subnet
Name string - The subnet name to query.
 - 
List<Subnets
Subnet Tag>  - Tags.
 - Total
Ipv4Count int - The Count of ipv4.
 - Update
Time string - Update time of Subnet.
 - Vpc
Id string - The ID of VPC which subnet belongs to.
 - Zone
Id string - The ID of zone which subnet belongs to.
 
- Account
Id string - The account ID which the subnet belongs to.
 - Available
Ip intAddress Count  - The count of available ip address.
 - Cidr
Block string - The cidr block of Subnet.
 - Creation
Time string - Creation time of Subnet.
 - Description string
 - The description of Subnet.
 - Id string
 - The ID of Subnet.
 - Ipv6Cidr
Block string - The IPv6 CIDR block of the VPC.
 - Network
Acl stringId  - The ID of network acl which this subnet associate with.
 - Route
Table SubnetsSubnet Route Table  - The route table information.
 - Route
Table stringId  - The ID of route table which subnet associated with.
 - Route
Table stringType  - The route table type.
 - Status string
 - The Status of Subnet.
 - Subnet
Name string - The subnet name to query.
 - 
[]Subnets
Subnet Tag  - Tags.
 - Total
Ipv4Count int - The Count of ipv4.
 - Update
Time string - Update time of Subnet.
 - Vpc
Id string - The ID of VPC which subnet belongs to.
 - Zone
Id string - The ID of zone which subnet belongs to.
 
- account
Id String - The account ID which the subnet belongs to.
 - available
Ip IntegerAddress Count  - The count of available ip address.
 - cidr
Block String - The cidr block of Subnet.
 - creation
Time String - Creation time of Subnet.
 - description String
 - The description of Subnet.
 - id String
 - The ID of Subnet.
 - ipv6Cidr
Block String - The IPv6 CIDR block of the VPC.
 - network
Acl StringId  - The ID of network acl which this subnet associate with.
 - route
Table SubnetsSubnet Route Table  - The route table information.
 - route
Table StringId  - The ID of route table which subnet associated with.
 - route
Table StringType  - The route table type.
 - status String
 - The Status of Subnet.
 - subnet
Name String - The subnet name to query.
 - 
List<Subnets
Subnet Tag>  - Tags.
 - total
Ipv4Count Integer - The Count of ipv4.
 - update
Time String - Update time of Subnet.
 - vpc
Id String - The ID of VPC which subnet belongs to.
 - zone
Id String - The ID of zone which subnet belongs to.
 
- account
Id string - The account ID which the subnet belongs to.
 - available
Ip numberAddress Count  - The count of available ip address.
 - cidr
Block string - The cidr block of Subnet.
 - creation
Time string - Creation time of Subnet.
 - description string
 - The description of Subnet.
 - id string
 - The ID of Subnet.
 - ipv6Cidr
Block string - The IPv6 CIDR block of the VPC.
 - network
Acl stringId  - The ID of network acl which this subnet associate with.
 - route
Table SubnetsSubnet Route Table  - The route table information.
 - route
Table stringId  - The ID of route table which subnet associated with.
 - route
Table stringType  - The route table type.
 - status string
 - The Status of Subnet.
 - subnet
Name string - The subnet name to query.
 - 
Subnets
Subnet Tag[]  - Tags.
 - total
Ipv4Count number - The Count of ipv4.
 - update
Time string - Update time of Subnet.
 - vpc
Id string - The ID of VPC which subnet belongs to.
 - zone
Id string - The ID of zone which subnet belongs to.
 
- account_
id str - The account ID which the subnet belongs to.
 - available_
ip_ intaddress_ count  - The count of available ip address.
 - cidr_
block str - The cidr block of Subnet.
 - creation_
time str - Creation time of Subnet.
 - description str
 - The description of Subnet.
 - id str
 - The ID of Subnet.
 - ipv6_
cidr_ strblock  - The IPv6 CIDR block of the VPC.
 - network_
acl_ strid  - The ID of network acl which this subnet associate with.
 - route_
table SubnetsSubnet Route Table  - The route table information.
 - route_
table_ strid  - The ID of route table which subnet associated with.
 - route_
table_ strtype  - The route table type.
 - status str
 - The Status of Subnet.
 - subnet_
name str - The subnet name to query.
 - 
Sequence[Subnets
Subnet Tag]  - Tags.
 - total_
ipv4_ intcount  - The Count of ipv4.
 - update_
time str - Update time of Subnet.
 - vpc_
id str - The ID of VPC which subnet belongs to.
 - zone_
id str - The ID of zone which subnet belongs to.
 
- account
Id String - The account ID which the subnet belongs to.
 - available
Ip NumberAddress Count  - The count of available ip address.
 - cidr
Block String - The cidr block of Subnet.
 - creation
Time String - Creation time of Subnet.
 - description String
 - The description of Subnet.
 - id String
 - The ID of Subnet.
 - ipv6Cidr
Block String - The IPv6 CIDR block of the VPC.
 - network
Acl StringId  - The ID of network acl which this subnet associate with.
 - route
Table Property Map - The route table information.
 - route
Table StringId  - The ID of route table which subnet associated with.
 - route
Table StringType  - The route table type.
 - status String
 - The Status of Subnet.
 - subnet
Name String - The subnet name to query.
 - List<Property Map>
 - Tags.
 - total
Ipv4Count Number - The Count of ipv4.
 - update
Time String - Update time of Subnet.
 - vpc
Id String - The ID of VPC which subnet belongs to.
 - zone
Id String - The ID of zone which subnet belongs to.
 
SubnetsSubnetRouteTable   
- Route
Table stringId  - The ID of route table which subnet associated with.
 - Route
Table stringType  - The route table type.
 
- Route
Table stringId  - The ID of route table which subnet associated with.
 - Route
Table stringType  - The route table type.
 
- route
Table StringId  - The ID of route table which subnet associated with.
 - route
Table StringType  - The route table type.
 
- route
Table stringId  - The ID of route table which subnet associated with.
 - route
Table stringType  - The route table type.
 
- route_
table_ strid  - The ID of route table which subnet associated with.
 - route_
table_ strtype  - The route table type.
 
- route
Table StringId  - The ID of route table which subnet associated with.
 - route
Table StringType  - The route table type.
 
SubnetsSubnetTag  
SubnetsTag 
Package Details
- Repository
 - volcengine volcengine/pulumi-volcengine
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
volcengineTerraform Provider.