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.
- NameRegex string
- A Name Regex of Subnet.
- OutputFile string
- File name where to save data source results.
- RouteTable stringId 
- The ID of route table which subnet associated with.
- SubnetName string
- The subnet name to query.
- 
List<SubnetsTag> 
- Tags.
- VpcId string
- The ID of VPC which subnet belongs to.
- ZoneId string
- The ID of zone which subnet belongs to.
- Ids []string
- A list of Subnet IDs.
- NameRegex string
- A Name Regex of Subnet.
- OutputFile string
- File name where to save data source results.
- RouteTable stringId 
- The ID of route table which subnet associated with.
- SubnetName string
- The subnet name to query.
- 
[]SubnetsTag 
- Tags.
- VpcId string
- The ID of VPC which subnet belongs to.
- ZoneId string
- The ID of zone which subnet belongs to.
- ids List<String>
- A list of Subnet IDs.
- nameRegex String
- A Name Regex of Subnet.
- outputFile String
- File name where to save data source results.
- routeTable StringId 
- The ID of route table which subnet associated with.
- subnetName String
- The subnet name to query.
- 
List<SubnetsTag> 
- Tags.
- vpcId String
- The ID of VPC which subnet belongs to.
- zoneId String
- The ID of zone which subnet belongs to.
- ids string[]
- A list of Subnet IDs.
- nameRegex string
- A Name Regex of Subnet.
- outputFile string
- File name where to save data source results.
- routeTable stringId 
- The ID of route table which subnet associated with.
- subnetName string
- The subnet name to query.
- 
SubnetsTag[] 
- Tags.
- vpcId string
- The ID of VPC which subnet belongs to.
- zoneId 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[SubnetsTag] 
- 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.
- nameRegex String
- A Name Regex of Subnet.
- outputFile String
- File name where to save data source results.
- routeTable StringId 
- The ID of route table which subnet associated with.
- subnetName String
- The subnet name to query.
- List<Property Map>
- Tags.
- vpcId String
- The ID of VPC which subnet belongs to.
- zoneId 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<SubnetsSubnet> 
- The collection of Subnet query.
- TotalCount int
- The total count of Subnet query.
- Ids List<string>
- NameRegex string
- OutputFile string
- RouteTable stringId 
- The route table ID.
- SubnetName string
- The Name of Subnet.
- 
List<SubnetsTag> 
- Tags.
- VpcId string
- The Vpc ID of Subnet.
- ZoneId string
- The ID of Zone.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subnets
[]SubnetsSubnet 
- The collection of Subnet query.
- TotalCount int
- The total count of Subnet query.
- Ids []string
- NameRegex string
- OutputFile string
- RouteTable stringId 
- The route table ID.
- SubnetName string
- The Name of Subnet.
- 
[]SubnetsTag 
- Tags.
- VpcId string
- The Vpc ID of Subnet.
- ZoneId string
- The ID of Zone.
- id String
- The provider-assigned unique ID for this managed resource.
- subnets
List<SubnetsSubnet> 
- The collection of Subnet query.
- totalCount Integer
- The total count of Subnet query.
- ids List<String>
- nameRegex String
- outputFile String
- routeTable StringId 
- The route table ID.
- subnetName String
- The Name of Subnet.
- 
List<SubnetsTag> 
- Tags.
- vpcId String
- The Vpc ID of Subnet.
- zoneId String
- The ID of Zone.
- id string
- The provider-assigned unique ID for this managed resource.
- subnets
SubnetsSubnet[] 
- The collection of Subnet query.
- totalCount number
- The total count of Subnet query.
- ids string[]
- nameRegex string
- outputFile string
- routeTable stringId 
- The route table ID.
- subnetName string
- The Name of Subnet.
- 
SubnetsTag[] 
- Tags.
- vpcId string
- The Vpc ID of Subnet.
- zoneId string
- The ID of Zone.
- id str
- The provider-assigned unique ID for this managed resource.
- subnets
Sequence[SubnetsSubnet] 
- 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[SubnetsTag] 
- 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.
- totalCount Number
- The total count of Subnet query.
- ids List<String>
- nameRegex String
- outputFile String
- routeTable StringId 
- The route table ID.
- subnetName String
- The Name of Subnet.
- List<Property Map>
- Tags.
- vpcId String
- The Vpc ID of Subnet.
- zoneId String
- The ID of Zone.
Supporting Types
SubnetsSubnet 
- AccountId string
- The account ID which the subnet belongs to.
- AvailableIp intAddress Count 
- The count of available ip address.
- CidrBlock string
- The cidr block of Subnet.
- CreationTime string
- Creation time of Subnet.
- Description string
- The description of Subnet.
- Id string
- The ID of Subnet.
- Ipv6CidrBlock string
- The IPv6 CIDR block of the VPC.
- NetworkAcl stringId 
- The ID of network acl which this subnet associate with.
- RouteTable SubnetsSubnet Route Table 
- The route table information.
- RouteTable stringId 
- The ID of route table which subnet associated with.
- RouteTable stringType 
- The route table type.
- Status string
- The Status of Subnet.
- SubnetName string
- The subnet name to query.
- 
List<SubnetsSubnet Tag> 
- Tags.
- TotalIpv4Count int
- The Count of ipv4.
- UpdateTime string
- Update time of Subnet.
- VpcId string
- The ID of VPC which subnet belongs to.
- ZoneId string
- The ID of zone which subnet belongs to.
- AccountId string
- The account ID which the subnet belongs to.
- AvailableIp intAddress Count 
- The count of available ip address.
- CidrBlock string
- The cidr block of Subnet.
- CreationTime string
- Creation time of Subnet.
- Description string
- The description of Subnet.
- Id string
- The ID of Subnet.
- Ipv6CidrBlock string
- The IPv6 CIDR block of the VPC.
- NetworkAcl stringId 
- The ID of network acl which this subnet associate with.
- RouteTable SubnetsSubnet Route Table 
- The route table information.
- RouteTable stringId 
- The ID of route table which subnet associated with.
- RouteTable stringType 
- The route table type.
- Status string
- The Status of Subnet.
- SubnetName string
- The subnet name to query.
- 
[]SubnetsSubnet Tag 
- Tags.
- TotalIpv4Count int
- The Count of ipv4.
- UpdateTime string
- Update time of Subnet.
- VpcId string
- The ID of VPC which subnet belongs to.
- ZoneId string
- The ID of zone which subnet belongs to.
- accountId String
- The account ID which the subnet belongs to.
- availableIp IntegerAddress Count 
- The count of available ip address.
- cidrBlock String
- The cidr block of Subnet.
- creationTime String
- Creation time of Subnet.
- description String
- The description of Subnet.
- id String
- The ID of Subnet.
- ipv6CidrBlock String
- The IPv6 CIDR block of the VPC.
- networkAcl StringId 
- The ID of network acl which this subnet associate with.
- routeTable SubnetsSubnet Route Table 
- The route table information.
- routeTable StringId 
- The ID of route table which subnet associated with.
- routeTable StringType 
- The route table type.
- status String
- The Status of Subnet.
- subnetName String
- The subnet name to query.
- 
List<SubnetsSubnet Tag> 
- Tags.
- totalIpv4Count Integer
- The Count of ipv4.
- updateTime String
- Update time of Subnet.
- vpcId String
- The ID of VPC which subnet belongs to.
- zoneId String
- The ID of zone which subnet belongs to.
- accountId string
- The account ID which the subnet belongs to.
- availableIp numberAddress Count 
- The count of available ip address.
- cidrBlock string
- The cidr block of Subnet.
- creationTime string
- Creation time of Subnet.
- description string
- The description of Subnet.
- id string
- The ID of Subnet.
- ipv6CidrBlock string
- The IPv6 CIDR block of the VPC.
- networkAcl stringId 
- The ID of network acl which this subnet associate with.
- routeTable SubnetsSubnet Route Table 
- The route table information.
- routeTable stringId 
- The ID of route table which subnet associated with.
- routeTable stringType 
- The route table type.
- status string
- The Status of Subnet.
- subnetName string
- The subnet name to query.
- 
SubnetsSubnet Tag[] 
- Tags.
- totalIpv4Count number
- The Count of ipv4.
- updateTime string
- Update time of Subnet.
- vpcId string
- The ID of VPC which subnet belongs to.
- zoneId 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[SubnetsSubnet 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.
- accountId String
- The account ID which the subnet belongs to.
- availableIp NumberAddress Count 
- The count of available ip address.
- cidrBlock String
- The cidr block of Subnet.
- creationTime String
- Creation time of Subnet.
- description String
- The description of Subnet.
- id String
- The ID of Subnet.
- ipv6CidrBlock String
- The IPv6 CIDR block of the VPC.
- networkAcl StringId 
- The ID of network acl which this subnet associate with.
- routeTable Property Map
- The route table information.
- routeTable StringId 
- The ID of route table which subnet associated with.
- routeTable StringType 
- The route table type.
- status String
- The Status of Subnet.
- subnetName String
- The subnet name to query.
- List<Property Map>
- Tags.
- totalIpv4Count Number
- The Count of ipv4.
- updateTime String
- Update time of Subnet.
- vpcId String
- The ID of VPC which subnet belongs to.
- zoneId String
- The ID of zone which subnet belongs to.
SubnetsSubnetRouteTable   
- RouteTable stringId 
- The ID of route table which subnet associated with.
- RouteTable stringType 
- The route table type.
- RouteTable stringId 
- The ID of route table which subnet associated with.
- RouteTable stringType 
- The route table type.
- routeTable StringId 
- The ID of route table which subnet associated with.
- routeTable StringType 
- The route table type.
- routeTable stringId 
- The ID of route table which subnet associated with.
- routeTable stringType 
- The route table type.
- route_table_ strid 
- The ID of route table which subnet associated with.
- route_table_ strtype 
- The route table type.
- routeTable StringId 
- The ID of route table which subnet associated with.
- routeTable 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.