1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. pvtz
  5. getZones
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.pvtz.getZones

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    This data source lists a number of Private Zones resource information owned by an Alibaba Cloud account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const pvtzZonesDs = alicloud.pvtz.getZones({
        keyword: alicloud_pvtz_zone.basic.zone_name,
    });
    export const firstZoneId = pvtzZonesDs.then(pvtzZonesDs => pvtzZonesDs.zones?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    pvtz_zones_ds = alicloud.pvtz.get_zones(keyword=alicloud_pvtz_zone["basic"]["zone_name"])
    pulumi.export("firstZoneId", pvtz_zones_ds.zones[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pvtz"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pvtzZonesDs, err := pvtz.GetZones(ctx, &pvtz.GetZonesArgs{
    			Keyword: pulumi.StringRef(alicloud_pvtz_zone.Basic.Zone_name),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstZoneId", pvtzZonesDs.Zones[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var pvtzZonesDs = AliCloud.Pvtz.GetZones.Invoke(new()
        {
            Keyword = alicloud_pvtz_zone.Basic.Zone_name,
        });
    
        return new Dictionary<string, object?>
        {
            ["firstZoneId"] = pvtzZonesDs.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.pvtz.PvtzFunctions;
    import com.pulumi.alicloud.pvtz.inputs.GetZonesArgs;
    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 pvtzZonesDs = PvtzFunctions.getZones(GetZonesArgs.builder()
                .keyword(alicloud_pvtz_zone.basic().zone_name())
                .build());
    
            ctx.export("firstZoneId", pvtzZonesDs.applyValue(getZonesResult -> getZonesResult.zones()[0].id()));
        }
    }
    
    variables:
      pvtzZonesDs:
        fn::invoke:
          Function: alicloud:pvtz:getZones
          Arguments:
            keyword: ${alicloud_pvtz_zone.basic.zone_name}
    outputs:
      firstZoneId: ${pvtzZonesDs.zones[0].id}
    

    Using getZones

    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 getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>
    function getZonesOutput(args: GetZonesOutputArgs, opts?: InvokeOptions): Output<GetZonesResult>
    def get_zones(enable_details: Optional[bool] = None,
                  ids: Optional[Sequence[str]] = None,
                  keyword: Optional[str] = None,
                  lang: Optional[str] = None,
                  name_regex: Optional[str] = None,
                  output_file: Optional[str] = None,
                  query_region_id: Optional[str] = None,
                  query_vpc_id: Optional[str] = None,
                  resource_group_id: Optional[str] = None,
                  search_mode: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetZonesResult
    def get_zones_output(enable_details: Optional[pulumi.Input[bool]] = None,
                  ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  keyword: Optional[pulumi.Input[str]] = None,
                  lang: Optional[pulumi.Input[str]] = None,
                  name_regex: Optional[pulumi.Input[str]] = None,
                  output_file: Optional[pulumi.Input[str]] = None,
                  query_region_id: Optional[pulumi.Input[str]] = None,
                  query_vpc_id: Optional[pulumi.Input[str]] = None,
                  resource_group_id: Optional[pulumi.Input[str]] = None,
                  search_mode: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]
    func GetZones(ctx *Context, args *GetZonesArgs, opts ...InvokeOption) (*GetZonesResult, error)
    func GetZonesOutput(ctx *Context, args *GetZonesOutputArgs, opts ...InvokeOption) GetZonesResultOutput

    > Note: This function is named GetZones in the Go SDK.

    public static class GetZones 
    {
        public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
        public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:pvtz/getZones:getZones
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnableDetails bool
    Default to false. Set it to true can output more details.
    Ids List<string>
    A list of zone IDs.
    Keyword string
    keyword for zone name.
    Lang string
    User language.
    NameRegex string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    QueryRegionId string
    query_region_id for zone regionId.
    QueryVpcId string
    query_vpc_id for zone vpcId.
    ResourceGroupId string
    resource_group_id for zone resourceGroupId.
    SearchMode string
    Search mode. Value:

    • LIKE: fuzzy search.
    • EXACT: precise search. It is not filled in by default.
    EnableDetails bool
    Default to false. Set it to true can output more details.
    Ids []string
    A list of zone IDs.
    Keyword string
    keyword for zone name.
    Lang string
    User language.
    NameRegex string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    QueryRegionId string
    query_region_id for zone regionId.
    QueryVpcId string
    query_vpc_id for zone vpcId.
    ResourceGroupId string
    resource_group_id for zone resourceGroupId.
    SearchMode string
    Search mode. Value:

    • LIKE: fuzzy search.
    • EXACT: precise search. It is not filled in by default.
    enableDetails Boolean
    Default to false. Set it to true can output more details.
    ids List<String>
    A list of zone IDs.
    keyword String
    keyword for zone name.
    lang String
    User language.
    nameRegex String
    outputFile String
    File name where to save data source results (after running pulumi preview).
    queryRegionId String
    query_region_id for zone regionId.
    queryVpcId String
    query_vpc_id for zone vpcId.
    resourceGroupId String
    resource_group_id for zone resourceGroupId.
    searchMode String
    Search mode. Value:

    • LIKE: fuzzy search.
    • EXACT: precise search. It is not filled in by default.
    enableDetails boolean
    Default to false. Set it to true can output more details.
    ids string[]
    A list of zone IDs.
    keyword string
    keyword for zone name.
    lang string
    User language.
    nameRegex string
    outputFile string
    File name where to save data source results (after running pulumi preview).
    queryRegionId string
    query_region_id for zone regionId.
    queryVpcId string
    query_vpc_id for zone vpcId.
    resourceGroupId string
    resource_group_id for zone resourceGroupId.
    searchMode string
    Search mode. Value:

    • LIKE: fuzzy search.
    • EXACT: precise search. It is not filled in by default.
    enable_details bool
    Default to false. Set it to true can output more details.
    ids Sequence[str]
    A list of zone IDs.
    keyword str
    keyword for zone name.
    lang str
    User language.
    name_regex str
    output_file str
    File name where to save data source results (after running pulumi preview).
    query_region_id str
    query_region_id for zone regionId.
    query_vpc_id str
    query_vpc_id for zone vpcId.
    resource_group_id str
    resource_group_id for zone resourceGroupId.
    search_mode str
    Search mode. Value:

    • LIKE: fuzzy search.
    • EXACT: precise search. It is not filled in by default.
    enableDetails Boolean
    Default to false. Set it to true can output more details.
    ids List<String>
    A list of zone IDs.
    keyword String
    keyword for zone name.
    lang String
    User language.
    nameRegex String
    outputFile String
    File name where to save data source results (after running pulumi preview).
    queryRegionId String
    query_region_id for zone regionId.
    queryVpcId String
    query_vpc_id for zone vpcId.
    resourceGroupId String
    resource_group_id for zone resourceGroupId.
    searchMode String
    Search mode. Value:

    • LIKE: fuzzy search.
    • EXACT: precise search. It is not filled in by default.

    getZones Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of zone IDs.
    Names List<string>
    A list of zone names.
    Zones List<Pulumi.AliCloud.Pvtz.Outputs.GetZonesZone>
    A list of zones. Each element contains the following attributes:
    EnableDetails bool
    Keyword string
    Lang string
    NameRegex string
    OutputFile string
    QueryRegionId string
    QueryVpcId string
    ResourceGroupId string
    The Id of resource group which the Private Zone belongs.
    SearchMode string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of zone IDs.
    Names []string
    A list of zone names.
    Zones []GetZonesZone
    A list of zones. Each element contains the following attributes:
    EnableDetails bool
    Keyword string
    Lang string
    NameRegex string
    OutputFile string
    QueryRegionId string
    QueryVpcId string
    ResourceGroupId string
    The Id of resource group which the Private Zone belongs.
    SearchMode string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of zone IDs.
    names List<String>
    A list of zone names.
    zones List<GetZonesZone>
    A list of zones. Each element contains the following attributes:
    enableDetails Boolean
    keyword String
    lang String
    nameRegex String
    outputFile String
    queryRegionId String
    queryVpcId String
    resourceGroupId String
    The Id of resource group which the Private Zone belongs.
    searchMode String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of zone IDs.
    names string[]
    A list of zone names.
    zones GetZonesZone[]
    A list of zones. Each element contains the following attributes:
    enableDetails boolean
    keyword string
    lang string
    nameRegex string
    outputFile string
    queryRegionId string
    queryVpcId string
    resourceGroupId string
    The Id of resource group which the Private Zone belongs.
    searchMode string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of zone IDs.
    names Sequence[str]
    A list of zone names.
    zones Sequence[GetZonesZone]
    A list of zones. Each element contains the following attributes:
    enable_details bool
    keyword str
    lang str
    name_regex str
    output_file str
    query_region_id str
    query_vpc_id str
    resource_group_id str
    The Id of resource group which the Private Zone belongs.
    search_mode str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of zone IDs.
    names List<String>
    A list of zone names.
    zones List<Property Map>
    A list of zones. Each element contains the following attributes:
    enableDetails Boolean
    keyword String
    lang String
    nameRegex String
    outputFile String
    queryRegionId String
    queryVpcId String
    resourceGroupId String
    The Id of resource group which the Private Zone belongs.
    searchMode String

    Supporting Types

    GetZonesZone

    BindVpcs List<Pulumi.AliCloud.Pvtz.Inputs.GetZonesZoneBindVpc>
    List of the VPCs is bound to the Private Zone:
    CreateTimestamp int
    Time of create of the Private Zone.
    CreationTime string
    Id string
    ID of the Private Zone.
    IsPtr bool
    Whether the Private Zone is ptr.
    Name string
    Name of the Private Zone.
    ProxyPattern string
    The recursive DNS proxy.
    RecordCount int
    Count of the Private Zone Record.
    Remark string
    Remark of the Private Zone.
    ResourceGroupId string
    resource_group_id for zone resourceGroupId.
    SlaveDns bool
    Whether to turn on secondary DNS.
    UpdateTime string
    UpdateTimestamp int
    Time of update of the Private Zone.
    ZoneId string
    ZoneId of the Private Zone.
    ZoneName string
    ZoneName of the Private Zone.
    BindVpcs []GetZonesZoneBindVpc
    List of the VPCs is bound to the Private Zone:
    CreateTimestamp int
    Time of create of the Private Zone.
    CreationTime string
    Id string
    ID of the Private Zone.
    IsPtr bool
    Whether the Private Zone is ptr.
    Name string
    Name of the Private Zone.
    ProxyPattern string
    The recursive DNS proxy.
    RecordCount int
    Count of the Private Zone Record.
    Remark string
    Remark of the Private Zone.
    ResourceGroupId string
    resource_group_id for zone resourceGroupId.
    SlaveDns bool
    Whether to turn on secondary DNS.
    UpdateTime string
    UpdateTimestamp int
    Time of update of the Private Zone.
    ZoneId string
    ZoneId of the Private Zone.
    ZoneName string
    ZoneName of the Private Zone.
    bindVpcs List<GetZonesZoneBindVpc>
    List of the VPCs is bound to the Private Zone:
    createTimestamp Integer
    Time of create of the Private Zone.
    creationTime String
    id String
    ID of the Private Zone.
    isPtr Boolean
    Whether the Private Zone is ptr.
    name String
    Name of the Private Zone.
    proxyPattern String
    The recursive DNS proxy.
    recordCount Integer
    Count of the Private Zone Record.
    remark String
    Remark of the Private Zone.
    resourceGroupId String
    resource_group_id for zone resourceGroupId.
    slaveDns Boolean
    Whether to turn on secondary DNS.
    updateTime String
    updateTimestamp Integer
    Time of update of the Private Zone.
    zoneId String
    ZoneId of the Private Zone.
    zoneName String
    ZoneName of the Private Zone.
    bindVpcs GetZonesZoneBindVpc[]
    List of the VPCs is bound to the Private Zone:
    createTimestamp number
    Time of create of the Private Zone.
    creationTime string
    id string
    ID of the Private Zone.
    isPtr boolean
    Whether the Private Zone is ptr.
    name string
    Name of the Private Zone.
    proxyPattern string
    The recursive DNS proxy.
    recordCount number
    Count of the Private Zone Record.
    remark string
    Remark of the Private Zone.
    resourceGroupId string
    resource_group_id for zone resourceGroupId.
    slaveDns boolean
    Whether to turn on secondary DNS.
    updateTime string
    updateTimestamp number
    Time of update of the Private Zone.
    zoneId string
    ZoneId of the Private Zone.
    zoneName string
    ZoneName of the Private Zone.
    bind_vpcs Sequence[GetZonesZoneBindVpc]
    List of the VPCs is bound to the Private Zone:
    create_timestamp int
    Time of create of the Private Zone.
    creation_time str
    id str
    ID of the Private Zone.
    is_ptr bool
    Whether the Private Zone is ptr.
    name str
    Name of the Private Zone.
    proxy_pattern str
    The recursive DNS proxy.
    record_count int
    Count of the Private Zone Record.
    remark str
    Remark of the Private Zone.
    resource_group_id str
    resource_group_id for zone resourceGroupId.
    slave_dns bool
    Whether to turn on secondary DNS.
    update_time str
    update_timestamp int
    Time of update of the Private Zone.
    zone_id str
    ZoneId of the Private Zone.
    zone_name str
    ZoneName of the Private Zone.
    bindVpcs List<Property Map>
    List of the VPCs is bound to the Private Zone:
    createTimestamp Number
    Time of create of the Private Zone.
    creationTime String
    id String
    ID of the Private Zone.
    isPtr Boolean
    Whether the Private Zone is ptr.
    name String
    Name of the Private Zone.
    proxyPattern String
    The recursive DNS proxy.
    recordCount Number
    Count of the Private Zone Record.
    remark String
    Remark of the Private Zone.
    resourceGroupId String
    resource_group_id for zone resourceGroupId.
    slaveDns Boolean
    Whether to turn on secondary DNS.
    updateTime String
    updateTimestamp Number
    Time of update of the Private Zone.
    zoneId String
    ZoneId of the Private Zone.
    zoneName String
    ZoneName of the Private Zone.

    GetZonesZoneBindVpc

    RegionId string
    Binding the regionId of VPC.
    RegionName string
    Binding the regionName of VPC.
    VpcId string
    Binding the vpcId of VPC.
    VpcName string
    RegionId string
    Binding the regionId of VPC.
    RegionName string
    Binding the regionName of VPC.
    VpcId string
    Binding the vpcId of VPC.
    VpcName string
    regionId String
    Binding the regionId of VPC.
    regionName String
    Binding the regionName of VPC.
    vpcId String
    Binding the vpcId of VPC.
    vpcName String
    regionId string
    Binding the regionId of VPC.
    regionName string
    Binding the regionName of VPC.
    vpcId string
    Binding the vpcId of VPC.
    vpcName string
    region_id str
    Binding the regionId of VPC.
    region_name str
    Binding the regionName of VPC.
    vpc_id str
    Binding the vpcId of VPC.
    vpc_name str
    regionId String
    Binding the regionId of VPC.
    regionName String
    Binding the regionName of VPC.
    vpcId String
    Binding the vpcId of VPC.
    vpcName String

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi