1. Packages
  2. Alicloud Provider
  3. API Docs
  4. pvtz
  5. getResolverZones
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.pvtz.getResolverZones

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides the available zones with the Private Zone Resolver of the current Alibaba Cloud user.

    NOTE: Available in v1.143.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.pvtz.getResolverZones({
        status: "NORMAL",
    });
    export const firstZonesId = _default.then(_default => _default.zones?.[0]?.zoneId);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.pvtz.get_resolver_zones(status="NORMAL")
    pulumi.export("firstZonesId", default.zones[0].zone_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 {
    		_default, err := pvtz.GetResolverZones(ctx, &pvtz.GetResolverZonesArgs{
    			Status: pulumi.StringRef("NORMAL"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstZonesId", _default.Zones[0].ZoneId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Pvtz.GetResolverZones.Invoke(new()
        {
            Status = "NORMAL",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstZonesId"] = @default.Apply(@default => @default.Apply(getResolverZonesResult => getResolverZonesResult.Zones[0]?.ZoneId)),
        };
    });
    
    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.GetResolverZonesArgs;
    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 = PvtzFunctions.getResolverZones(GetResolverZonesArgs.builder()
                .status("NORMAL")
                .build());
    
            ctx.export("firstZonesId", default_.zones()[0].zoneId());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:pvtz:getResolverZones
          Arguments:
            status: NORMAL
    outputs:
      firstZonesId: ${default.zones[0].zoneId}
    

    Using getResolverZones

    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 getResolverZones(args: GetResolverZonesArgs, opts?: InvokeOptions): Promise<GetResolverZonesResult>
    function getResolverZonesOutput(args: GetResolverZonesOutputArgs, opts?: InvokeOptions): Output<GetResolverZonesResult>
    def get_resolver_zones(output_file: Optional[str] = None,
                           status: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetResolverZonesResult
    def get_resolver_zones_output(output_file: Optional[pulumi.Input[str]] = None,
                           status: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetResolverZonesResult]
    func GetResolverZones(ctx *Context, args *GetResolverZonesArgs, opts ...InvokeOption) (*GetResolverZonesResult, error)
    func GetResolverZonesOutput(ctx *Context, args *GetResolverZonesOutputArgs, opts ...InvokeOption) GetResolverZonesResultOutput

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

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

    The following arguments are supported:

    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the Zone. Valid values: NORMAL, SOLD_OUT.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the Zone. Valid values: NORMAL, SOLD_OUT.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the Zone. Valid values: NORMAL, SOLD_OUT.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the Zone. Valid values: NORMAL, SOLD_OUT.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the Zone. Valid values: NORMAL, SOLD_OUT.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the Zone. Valid values: NORMAL, SOLD_OUT.

    getResolverZones Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Zones List<Pulumi.AliCloud.Pvtz.Outputs.GetResolverZonesZone>
    OutputFile string
    Status string
    Id string
    The provider-assigned unique ID for this managed resource.
    Zones []GetResolverZonesZone
    OutputFile string
    Status string
    id String
    The provider-assigned unique ID for this managed resource.
    zones List<GetResolverZonesZone>
    outputFile String
    status String
    id string
    The provider-assigned unique ID for this managed resource.
    zones GetResolverZonesZone[]
    outputFile string
    status string
    id str
    The provider-assigned unique ID for this managed resource.
    zones Sequence[GetResolverZonesZone]
    output_file str
    status str
    id String
    The provider-assigned unique ID for this managed resource.
    zones List<Property Map>
    outputFile String
    status String

    Supporting Types

    GetResolverZonesZone

    Status string
    The status of the Zone.
    ZoneId string
    The zone ID.
    Status string
    The status of the Zone.
    ZoneId string
    The zone ID.
    status String
    The status of the Zone.
    zoneId String
    The zone ID.
    status string
    The status of the Zone.
    zoneId string
    The zone ID.
    status str
    The status of the Zone.
    zone_id str
    The zone ID.
    status String
    The status of the Zone.
    zoneId String
    The zone ID.

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi