Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
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.getSubnets({
ids: ["subnet-274zsa5kfmj287fap8soo5e19"],
});
import pulumi
import pulumi_volcengine as volcengine
default = volcengine.vpc.get_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.GetSubnets(ctx, &vpc.GetSubnetsArgs{
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.GetSubnets.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.GetSubnetsArgs;
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.getSubnets(GetSubnetsArgs.builder()
.ids("subnet-274zsa5kfmj287fap8soo5e19")
.build());
}
}
variables:
default:
fn::invoke:
Function: volcengine:vpc:getSubnets
Arguments:
ids:
- subnet-274zsa5kfmj287fap8soo5e19
Using getSubnets
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 getSubnets(args: GetSubnetsArgs, opts?: InvokeOptions): Promise<GetSubnetsResult>
function getSubnetsOutput(args: GetSubnetsOutputArgs, opts?: InvokeOptions): Output<GetSubnetsResult>def get_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,
subnet_owner_id: Optional[int] = None,
tags: Optional[Sequence[GetSubnetsTag]] = None,
vpc_id: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubnetsResult
def get_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,
subnet_owner_id: Optional[pulumi.Input[int]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubnetsTagArgs]]]] = None,
vpc_id: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubnetsResult]func GetSubnets(ctx *Context, args *GetSubnetsArgs, opts ...InvokeOption) (*GetSubnetsResult, error)
func GetSubnetsOutput(ctx *Context, args *GetSubnetsOutputArgs, opts ...InvokeOption) GetSubnetsResultOutput> Note: This function is named GetSubnets in the Go SDK.
public static class GetSubnets
{
public static Task<GetSubnetsResult> InvokeAsync(GetSubnetsArgs args, InvokeOptions? opts = null)
public static Output<GetSubnetsResult> Invoke(GetSubnetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSubnetsResult> getSubnets(GetSubnetsArgs args, InvokeOptions options)
public static Output<GetSubnetsResult> getSubnets(GetSubnetsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:vpc/getSubnets:getSubnets
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.
- Subnet
Owner intId - The owner ID of the subnet.
-
List<Get
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.
- Subnet
Owner intId - The owner ID of the subnet.
-
[]Get
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.
- subnet
Owner IntegerId - The owner ID of the subnet.
-
List<Get
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.
- subnet
Owner numberId - The owner ID of the subnet.
-
Get
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.
- subnet_
owner_ intid - The owner ID of the subnet.
-
Sequence[Get
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.
- subnet
Owner NumberId - The owner ID of the subnet.
- 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.
getSubnets Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Subnets
List<Get
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.
- Subnet
Owner intId -
List<Get
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
[]Get
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.
- Subnet
Owner intId -
[]Get
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<Get
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.
- subnet
Owner IntegerId -
List<Get
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
Get
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.
- subnet
Owner numberId -
Get
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[Get
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.
- subnet_
owner_ intid -
Sequence[Get
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.
- subnet
Owner NumberId - List<Property Map>
- Tags.
- vpc
Id String - The Vpc ID of Subnet.
- zone
Id String - The ID of Zone.
Supporting Types
GetSubnetsSubnet
- 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 GetSubnets Subnet 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<Get
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 GetSubnets Subnet 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.
-
[]Get
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 GetSubnets Subnet 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<Get
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 GetSubnets Subnet 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.
-
Get
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 GetSubnets Subnet 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[Get
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.
GetSubnetsSubnetRouteTable
- 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.
GetSubnetsSubnetTag
GetSubnetsTag
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
