1. Packages
  2. Volcengine
  3. API Docs
  4. vpc
  5. Subnets
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.vpc.Subnets

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Use this data source to query detailed information of subnets

    Example Usage

    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 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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    default = volcengine.vpc.subnets(ids=["subnet-274zsa5kfmj287fap8soo5e19"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const default = volcengine.vpc.Subnets({
        ids: ["subnet-274zsa5kfmj287fap8soo5e19"],
    });
    
    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) SubnetsResultOutput
    public 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: volcengine:vpc:Subnets
      arguments:
        # arguments dictionary

    The 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.
    RouteTableId string
    The ID of route table which subnet associated with.
    SubnetName string
    The subnet name to query.
    Tags 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.
    RouteTableId string
    The ID of route table which subnet associated with.
    SubnetName string
    The subnet name to query.
    Tags []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.
    routeTableId String
    The ID of route table which subnet associated with.
    subnetName String
    The subnet name to query.
    tags 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.
    routeTableId string
    The ID of route table which subnet associated with.
    subnetName string
    The subnet name to query.
    tags 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_id str
    The ID of route table which subnet associated with.
    subnet_name str
    The subnet name to query.
    tags 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.
    routeTableId String
    The ID of route table which subnet associated with.
    subnetName String
    The subnet name to query.
    tags 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
    RouteTableId string
    The route table ID.
    SubnetName string
    The Name of Subnet.
    Tags 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
    RouteTableId string
    The route table ID.
    SubnetName string
    The Name of Subnet.
    Tags []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
    routeTableId String
    The route table ID.
    subnetName String
    The Name of Subnet.
    tags 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
    routeTableId string
    The route table ID.
    subnetName string
    The Name of Subnet.
    tags 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_id str
    The route table ID.
    subnet_name str
    The Name of Subnet.
    tags 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
    routeTableId String
    The route table ID.
    subnetName String
    The Name of Subnet.
    tags 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.
    AvailableIpAddressCount int
    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.
    NetworkAclId string
    The ID of network acl which this subnet associate with.
    RouteTable SubnetsSubnetRouteTable
    The route table information.
    RouteTableId string
    The ID of route table which subnet associated with.
    RouteTableType string
    The route table type.
    Status string
    The Status of Subnet.
    SubnetName string
    The subnet name to query.
    Tags List<SubnetsSubnetTag>
    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.
    AvailableIpAddressCount int
    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.
    NetworkAclId string
    The ID of network acl which this subnet associate with.
    RouteTable SubnetsSubnetRouteTable
    The route table information.
    RouteTableId string
    The ID of route table which subnet associated with.
    RouteTableType string
    The route table type.
    Status string
    The Status of Subnet.
    SubnetName string
    The subnet name to query.
    Tags []SubnetsSubnetTag
    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.
    availableIpAddressCount Integer
    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.
    networkAclId String
    The ID of network acl which this subnet associate with.
    routeTable SubnetsSubnetRouteTable
    The route table information.
    routeTableId String
    The ID of route table which subnet associated with.
    routeTableType String
    The route table type.
    status String
    The Status of Subnet.
    subnetName String
    The subnet name to query.
    tags List<SubnetsSubnetTag>
    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.
    availableIpAddressCount number
    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.
    networkAclId string
    The ID of network acl which this subnet associate with.
    routeTable SubnetsSubnetRouteTable
    The route table information.
    routeTableId string
    The ID of route table which subnet associated with.
    routeTableType string
    The route table type.
    status string
    The Status of Subnet.
    subnetName string
    The subnet name to query.
    tags SubnetsSubnetTag[]
    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_address_count int
    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_block str
    The IPv6 CIDR block of the VPC.
    network_acl_id str
    The ID of network acl which this subnet associate with.
    route_table SubnetsSubnetRouteTable
    The route table information.
    route_table_id str
    The ID of route table which subnet associated with.
    route_table_type str
    The route table type.
    status str
    The Status of Subnet.
    subnet_name str
    The subnet name to query.
    tags Sequence[SubnetsSubnetTag]
    Tags.
    total_ipv4_count int
    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.
    availableIpAddressCount Number
    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.
    networkAclId String
    The ID of network acl which this subnet associate with.
    routeTable Property Map
    The route table information.
    routeTableId String
    The ID of route table which subnet associated with.
    routeTableType String
    The route table type.
    status String
    The Status of Subnet.
    subnetName String
    The subnet name to query.
    tags 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

    RouteTableId string
    The ID of route table which subnet associated with.
    RouteTableType string
    The route table type.
    RouteTableId string
    The ID of route table which subnet associated with.
    RouteTableType string
    The route table type.
    routeTableId String
    The ID of route table which subnet associated with.
    routeTableType String
    The route table type.
    routeTableId string
    The ID of route table which subnet associated with.
    routeTableType string
    The route table type.
    route_table_id str
    The ID of route table which subnet associated with.
    route_table_type str
    The route table type.
    routeTableId String
    The ID of route table which subnet associated with.
    routeTableType String
    The route table type.

    SubnetsSubnetTag

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    SubnetsTag

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine