1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. eflo
  5. getSubnets
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.eflo.getSubnets

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides Eflo Subnet available to the user.What is Subnet

NOTE: Available in 1.204.0+

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = alicloud.eflo.getSubnets({
    nameRegex: defaultAlicloudEfloSubnet.name,
    subnetName: "SubnetTestForTerraform",
    vpdId: vpdId,
    zoneId: zoneId,
});
export const alicloudEfloSubnetExampleId = _default.then(_default => _default.subnets?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.eflo.get_subnets(name_regex=default_alicloud_eflo_subnet["name"],
    subnet_name="SubnetTestForTerraform",
    vpd_id=vpd_id,
    zone_id=zone_id)
pulumi.export("alicloudEfloSubnetExampleId", default.subnets[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eflo"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := eflo.GetSubnets(ctx, &eflo.GetSubnetsArgs{
			NameRegex:  pulumi.StringRef(defaultAlicloudEfloSubnet.Name),
			SubnetName: pulumi.StringRef("SubnetTestForTerraform"),
			VpdId:      pulumi.StringRef(vpdId),
			ZoneId:     pulumi.StringRef(zoneId),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("alicloudEfloSubnetExampleId", _default.Subnets[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.Eflo.GetSubnets.Invoke(new()
    {
        NameRegex = defaultAlicloudEfloSubnet.Name,
        SubnetName = "SubnetTestForTerraform",
        VpdId = vpdId,
        ZoneId = zoneId,
    });

    return new Dictionary<string, object?>
    {
        ["alicloudEfloSubnetExampleId"] = @default.Apply(@default => @default.Apply(getSubnetsResult => getSubnetsResult.Subnets[0]?.Id)),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eflo.EfloFunctions;
import com.pulumi.alicloud.eflo.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 = EfloFunctions.getSubnets(GetSubnetsArgs.builder()
            .nameRegex(defaultAlicloudEfloSubnet.name())
            .subnetName("SubnetTestForTerraform")
            .vpdId(vpdId)
            .zoneId(zoneId)
            .build());

        ctx.export("alicloudEfloSubnetExampleId", default_.subnets()[0].id());
    }
}
Copy
variables:
  default:
    fn::invoke:
      function: alicloud:eflo:getSubnets
      arguments:
        nameRegex: ${defaultAlicloudEfloSubnet.name}
        subnetName: SubnetTestForTerraform
        vpdId: ${vpdId}
        zoneId: ${zoneId}
outputs:
  alicloudEfloSubnetExampleId: ${default.subnets[0].id}
Copy

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>
Copy
def get_subnets(ids: Optional[Sequence[str]] = None,
                name_regex: Optional[str] = None,
                output_file: Optional[str] = None,
                page_number: Optional[int] = None,
                page_size: Optional[int] = None,
                resource_group_id: Optional[str] = None,
                status: Optional[str] = None,
                subnet_id: Optional[str] = None,
                subnet_name: Optional[str] = None,
                type: Optional[str] = None,
                vpd_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,
                page_number: Optional[pulumi.Input[int]] = None,
                page_size: Optional[pulumi.Input[int]] = None,
                resource_group_id: Optional[pulumi.Input[str]] = None,
                status: Optional[pulumi.Input[str]] = None,
                subnet_id: Optional[pulumi.Input[str]] = None,
                subnet_name: Optional[pulumi.Input[str]] = None,
                type: Optional[pulumi.Input[str]] = None,
                vpd_id: Optional[pulumi.Input[str]] = None,
                zone_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetSubnetsResult]
Copy
func GetSubnets(ctx *Context, args *GetSubnetsArgs, opts ...InvokeOption) (*GetSubnetsResult, error)
func GetSubnetsOutput(ctx *Context, args *GetSubnetsOutputArgs, opts ...InvokeOption) GetSubnetsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSubnetsResult> getSubnets(GetSubnetsArgs args, InvokeOptions options)
public static Output<GetSubnetsResult> getSubnets(GetSubnetsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:eflo/getSubnets:getSubnets
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids List<string>
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
ResourceGroupId Changes to this property will trigger replacement. string
Resource Group ID.
Status Changes to this property will trigger replacement. string
The status of the resource.
SubnetId Changes to this property will trigger replacement. string
Primary key ID.
SubnetName Changes to this property will trigger replacement. string
The Subnet name.
Type Changes to this property will trigger replacement. string
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
VpdId Changes to this property will trigger replacement. string
The Eflo VPD ID.
ZoneId Changes to this property will trigger replacement. string
The zone ID of the resource.
Ids []string
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
ResourceGroupId Changes to this property will trigger replacement. string
Resource Group ID.
Status Changes to this property will trigger replacement. string
The status of the resource.
SubnetId Changes to this property will trigger replacement. string
Primary key ID.
SubnetName Changes to this property will trigger replacement. string
The Subnet name.
Type Changes to this property will trigger replacement. string
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
VpdId Changes to this property will trigger replacement. string
The Eflo VPD ID.
ZoneId Changes to this property will trigger replacement. string
The zone ID of the resource.
ids List<String>
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Group Metric Rule name.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Integer
pageSize Integer
resourceGroupId Changes to this property will trigger replacement. String
Resource Group ID.
status Changes to this property will trigger replacement. String
The status of the resource.
subnetId Changes to this property will trigger replacement. String
Primary key ID.
subnetName Changes to this property will trigger replacement. String
The Subnet name.
type Changes to this property will trigger replacement. String
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
vpdId Changes to this property will trigger replacement. String
The Eflo VPD ID.
zoneId Changes to this property will trigger replacement. String
The zone ID of the resource.
ids string[]
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
outputFile string
File name where to save data source results (after running pulumi preview).
pageNumber number
pageSize number
resourceGroupId Changes to this property will trigger replacement. string
Resource Group ID.
status Changes to this property will trigger replacement. string
The status of the resource.
subnetId Changes to this property will trigger replacement. string
Primary key ID.
subnetName Changes to this property will trigger replacement. string
The Subnet name.
type Changes to this property will trigger replacement. string
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
vpdId Changes to this property will trigger replacement. string
The Eflo VPD ID.
zoneId Changes to this property will trigger replacement. string
The zone ID of the resource.
ids Sequence[str]
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Group Metric Rule name.
output_file str
File name where to save data source results (after running pulumi preview).
page_number int
page_size int
resource_group_id Changes to this property will trigger replacement. str
Resource Group ID.
status Changes to this property will trigger replacement. str
The status of the resource.
subnet_id Changes to this property will trigger replacement. str
Primary key ID.
subnet_name Changes to this property will trigger replacement. str
The Subnet name.
type Changes to this property will trigger replacement. str
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
vpd_id Changes to this property will trigger replacement. str
The Eflo VPD ID.
zone_id Changes to this property will trigger replacement. str
The zone ID of the resource.
ids List<String>
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Group Metric Rule name.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Number
pageSize Number
resourceGroupId Changes to this property will trigger replacement. String
Resource Group ID.
status Changes to this property will trigger replacement. String
The status of the resource.
subnetId Changes to this property will trigger replacement. String
Primary key ID.
subnetName Changes to this property will trigger replacement. String
The Subnet name.
type Changes to this property will trigger replacement. String
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
vpdId Changes to this property will trigger replacement. String
The Eflo VPD ID.
zoneId Changes to this property will trigger replacement. String
The zone ID of the resource.

getSubnets Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
A list of name of Subnets.
Subnets List<Pulumi.AliCloud.Eflo.Outputs.GetSubnetsSubnet>
A list of Subnet Entries. Each element contains the following attributes:
NameRegex string
OutputFile string
PageNumber int
PageSize int
ResourceGroupId string
Resource Group ID.
Status string
The status of the resource.
SubnetId string
The Eflo subnet ID.
SubnetName string
The Subnet name.
Type string
Eflo subnet usage type.
VpdId string
Eflo VPD ID.
ZoneId string
The zone ID of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
A list of name of Subnets.
Subnets []GetSubnetsSubnet
A list of Subnet Entries. Each element contains the following attributes:
NameRegex string
OutputFile string
PageNumber int
PageSize int
ResourceGroupId string
Resource Group ID.
Status string
The status of the resource.
SubnetId string
The Eflo subnet ID.
SubnetName string
The Subnet name.
Type string
Eflo subnet usage type.
VpdId string
Eflo VPD ID.
ZoneId string
The zone ID of the resource.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of name of Subnets.
subnets List<GetSubnetsSubnet>
A list of Subnet Entries. Each element contains the following attributes:
nameRegex String
outputFile String
pageNumber Integer
pageSize Integer
resourceGroupId String
Resource Group ID.
status String
The status of the resource.
subnetId String
The Eflo subnet ID.
subnetName String
The Subnet name.
type String
Eflo subnet usage type.
vpdId String
Eflo VPD ID.
zoneId String
The zone ID of the resource.
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
A list of name of Subnets.
subnets GetSubnetsSubnet[]
A list of Subnet Entries. Each element contains the following attributes:
nameRegex string
outputFile string
pageNumber number
pageSize number
resourceGroupId string
Resource Group ID.
status string
The status of the resource.
subnetId string
The Eflo subnet ID.
subnetName string
The Subnet name.
type string
Eflo subnet usage type.
vpdId string
Eflo VPD ID.
zoneId string
The zone ID of the resource.
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
A list of name of Subnets.
subnets Sequence[GetSubnetsSubnet]
A list of Subnet Entries. Each element contains the following attributes:
name_regex str
output_file str
page_number int
page_size int
resource_group_id str
Resource Group ID.
status str
The status of the resource.
subnet_id str
The Eflo subnet ID.
subnet_name str
The Subnet name.
type str
Eflo subnet usage type.
vpd_id str
Eflo VPD ID.
zone_id str
The zone ID of the resource.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of name of Subnets.
subnets List<Property Map>
A list of Subnet Entries. Each element contains the following attributes:
nameRegex String
outputFile String
pageNumber Number
pageSize Number
resourceGroupId String
Resource Group ID.
status String
The status of the resource.
subnetId String
The Eflo subnet ID.
subnetName String
The Subnet name.
type String
Eflo subnet usage type.
vpdId String
Eflo VPD ID.
zoneId String
The zone ID of the resource.

Supporting Types

GetSubnetsSubnet

Cidr This property is required. string
Network segment
CreateTime This property is required. string
The creation time of the resource
GmtModified This property is required. string
Modification time
Id This property is required. string
The ID of the resource.
Message This property is required. string
Error message
ResourceGroupId This property is required. string
Resource Group ID.
Status This property is required. string
The status of the resource.
SubnetId This property is required. string
Primary key ID.
SubnetName This property is required. string
The Subnet name.
Type This property is required. string
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
VpdId This property is required. string
The Eflo VPD ID.
ZoneId This property is required. string
The zone ID of the resource.
Cidr This property is required. string
Network segment
CreateTime This property is required. string
The creation time of the resource
GmtModified This property is required. string
Modification time
Id This property is required. string
The ID of the resource.
Message This property is required. string
Error message
ResourceGroupId This property is required. string
Resource Group ID.
Status This property is required. string
The status of the resource.
SubnetId This property is required. string
Primary key ID.
SubnetName This property is required. string
The Subnet name.
Type This property is required. string
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
VpdId This property is required. string
The Eflo VPD ID.
ZoneId This property is required. string
The zone ID of the resource.
cidr This property is required. String
Network segment
createTime This property is required. String
The creation time of the resource
gmtModified This property is required. String
Modification time
id This property is required. String
The ID of the resource.
message This property is required. String
Error message
resourceGroupId This property is required. String
Resource Group ID.
status This property is required. String
The status of the resource.
subnetId This property is required. String
Primary key ID.
subnetName This property is required. String
The Subnet name.
type This property is required. String
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
vpdId This property is required. String
The Eflo VPD ID.
zoneId This property is required. String
The zone ID of the resource.
cidr This property is required. string
Network segment
createTime This property is required. string
The creation time of the resource
gmtModified This property is required. string
Modification time
id This property is required. string
The ID of the resource.
message This property is required. string
Error message
resourceGroupId This property is required. string
Resource Group ID.
status This property is required. string
The status of the resource.
subnetId This property is required. string
Primary key ID.
subnetName This property is required. string
The Subnet name.
type This property is required. string
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
vpdId This property is required. string
The Eflo VPD ID.
zoneId This property is required. string
The zone ID of the resource.
cidr This property is required. str
Network segment
create_time This property is required. str
The creation time of the resource
gmt_modified This property is required. str
Modification time
id This property is required. str
The ID of the resource.
message This property is required. str
Error message
resource_group_id This property is required. str
Resource Group ID.
status This property is required. str
The status of the resource.
subnet_id This property is required. str
Primary key ID.
subnet_name This property is required. str
The Subnet name.
type This property is required. str
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
vpd_id This property is required. str
The Eflo VPD ID.
zone_id This property is required. str
The zone ID of the resource.
cidr This property is required. String
Network segment
createTime This property is required. String
The creation time of the resource
gmtModified This property is required. String
Modification time
id This property is required. String
The ID of the resource.
message This property is required. String
Error message
resourceGroupId This property is required. String
Resource Group ID.
status This property is required. String
The status of the resource.
subnetId This property is required. String
Primary key ID.
subnetName This property is required. String
The Subnet name.
type This property is required. String
Eflo subnet usage type, optional value:

  • General type is not filled in
  • OOB:OOB type
  • LB: LB type
vpdId This property is required. String
The Eflo VPD ID.
zoneId This property is required. String
The zone ID of the resource.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi