1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eflo
  5. getSubnets
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.eflo.getSubnets

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 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);
    
    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)
    
    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
    	})
    }
    
    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)),
        };
    });
    
    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());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:eflo:getSubnets
          Arguments:
            nameRegex: ${defaultAlicloudEfloSubnet.name}
            subnetName: SubnetTestForTerraform
            vpdId: ${vpdId}
            zoneId: ${zoneId}
    outputs:
      alicloudEfloSubnetExampleId: ${default.subnets[0].id}
    

    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,
                    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]
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:eflo/getSubnets:getSubnets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    NameRegex 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 string
    Resource Group ID.
    Status string
    The status of the resource.
    SubnetId string
    Primary key ID.
    SubnetName string
    The Subnet name.
    Type string
    Eflo subnet usage type, optional value:

    • General type is not filled in
    • OOB:OOB type
    • LB: LB type
    VpdId string
    The Eflo VPD ID.
    ZoneId string
    The zone ID of the resource.
    Ids []string
    NameRegex 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 string
    Resource Group ID.
    Status string
    The status of the resource.
    SubnetId string
    Primary key ID.
    SubnetName string
    The Subnet name.
    Type string
    Eflo subnet usage type, optional value:

    • General type is not filled in
    • OOB:OOB type
    • LB: LB type
    VpdId string
    The Eflo VPD ID.
    ZoneId string
    The zone ID of the resource.
    ids List<String>
    nameRegex 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 String
    Resource Group ID.
    status String
    The status of the resource.
    subnetId String
    Primary key ID.
    subnetName String
    The Subnet name.
    type String
    Eflo subnet usage type, optional value:

    • General type is not filled in
    • OOB:OOB type
    • LB: LB type
    vpdId String
    The Eflo VPD ID.
    zoneId String
    The zone ID of the resource.
    ids string[]
    nameRegex 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 string
    Resource Group ID.
    status string
    The status of the resource.
    subnetId string
    Primary key ID.
    subnetName string
    The Subnet name.
    type string
    Eflo subnet usage type, optional value:

    • General type is not filled in
    • OOB:OOB type
    • LB: LB type
    vpdId string
    The Eflo VPD ID.
    zoneId string
    The zone ID of the resource.
    ids Sequence[str]
    name_regex 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 str
    Resource Group ID.
    status str
    The status of the resource.
    subnet_id str
    Primary key ID.
    subnet_name str
    The Subnet name.
    type str
    Eflo subnet usage type, optional value:

    • General type is not filled in
    • OOB:OOB type
    • LB: LB type
    vpd_id str
    The Eflo VPD ID.
    zone_id str
    The zone ID of the resource.
    ids List<String>
    nameRegex 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 String
    Resource Group ID.
    status String
    The status of the resource.
    subnetId String
    Primary key ID.
    subnetName String
    The Subnet name.
    type String
    Eflo subnet usage type, optional value:

    • General type is not filled in
    • OOB:OOB type
    • LB: LB type
    vpdId String
    The Eflo VPD ID.
    zoneId 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 string
    Network segment
    CreateTime string
    The creation time of the resource
    GmtModified string
    Modification time
    Id string
    The ID of the resource.
    Message string
    Error message
    ResourceGroupId string
    Resource Group ID.
    Status string
    The status of the resource.
    SubnetId string
    Primary key ID.
    SubnetName string
    The Subnet name.
    Type string
    Eflo subnet usage type, optional value:

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

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

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

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

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

    • General type is not filled in
    • OOB:OOB type
    • LB: LB type
    vpdId String
    The Eflo VPD ID.
    zoneId 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.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi