1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. vpc
  5. getEnhancedNatAvailableZones
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.vpc.getEnhancedNatAvailableZones

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

    This data source provides a list of available zones by the enhanced Nat Gateway.

    NOTE: Available since 1.102.0+.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = alicloud.vpc.getEnhancedNatAvailableZones({});
    export const zones = _default.then(_default => _default.zones?.[0]?.zoneId);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.vpc.get_enhanced_nat_available_zones()
    pulumi.export("zones", default.zones[0].zone_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := vpc.GetEnhancedNatAvailableZones(ctx, &vpc.GetEnhancedNatAvailableZonesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("zones", _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.Vpc.GetEnhancedNatAvailableZones.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["zones"] = @default.Apply(@default => @default.Apply(getEnhancedNatAvailableZonesResult => getEnhancedNatAvailableZonesResult.Zones[0]?.ZoneId)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetEnhancedNatAvailableZonesArgs;
    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.getEnhancedNatAvailableZones();
    
            ctx.export("zones", default_.zones()[0].zoneId());
        }
    }
    
    variables:
      default:
        fn::invoke:
          function: alicloud:vpc:getEnhancedNatAvailableZones
          arguments: {}
    outputs:
      zones: ${default.zones[0].zoneId}
    

    Using getEnhancedNatAvailableZones

    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 getEnhancedNatAvailableZones(args: GetEnhancedNatAvailableZonesArgs, opts?: InvokeOptions): Promise<GetEnhancedNatAvailableZonesResult>
    function getEnhancedNatAvailableZonesOutput(args: GetEnhancedNatAvailableZonesOutputArgs, opts?: InvokeOptions): Output<GetEnhancedNatAvailableZonesResult>
    def get_enhanced_nat_available_zones(output_file: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetEnhancedNatAvailableZonesResult
    def get_enhanced_nat_available_zones_output(output_file: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetEnhancedNatAvailableZonesResult]
    func GetEnhancedNatAvailableZones(ctx *Context, args *GetEnhancedNatAvailableZonesArgs, opts ...InvokeOption) (*GetEnhancedNatAvailableZonesResult, error)
    func GetEnhancedNatAvailableZonesOutput(ctx *Context, args *GetEnhancedNatAvailableZonesOutputArgs, opts ...InvokeOption) GetEnhancedNatAvailableZonesResultOutput

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

    public static class GetEnhancedNatAvailableZones 
    {
        public static Task<GetEnhancedNatAvailableZonesResult> InvokeAsync(GetEnhancedNatAvailableZonesArgs args, InvokeOptions? opts = null)
        public static Output<GetEnhancedNatAvailableZonesResult> Invoke(GetEnhancedNatAvailableZonesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnhancedNatAvailableZonesResult> getEnhancedNatAvailableZones(GetEnhancedNatAvailableZonesArgs args, InvokeOptions options)
    public static Output<GetEnhancedNatAvailableZonesResult> getEnhancedNatAvailableZones(GetEnhancedNatAvailableZonesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: alicloud:vpc/getEnhancedNatAvailableZones:getEnhancedNatAvailableZones
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OutputFile string
    File name where to save data source results (after running pulumi preview).
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    outputFile String
    File name where to save data source results (after running pulumi preview).
    outputFile string
    File name where to save data source results (after running pulumi preview).
    output_file str
    File name where to save data source results (after running pulumi preview).
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getEnhancedNatAvailableZones Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    (Optional) A list of available zones IDs by the enhanced NAT gateway.
    Zones List<Pulumi.AliCloud.Vpc.Outputs.GetEnhancedNatAvailableZonesZone>
    A list of available zones. Each element contains the following attributes:
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    (Optional) A list of available zones IDs by the enhanced NAT gateway.
    Zones []GetEnhancedNatAvailableZonesZone
    A list of available zones. Each element contains the following attributes:
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    (Optional) A list of available zones IDs by the enhanced NAT gateway.
    zones List<GetEnhancedNatAvailableZonesZone>
    A list of available zones. Each element contains the following attributes:
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    (Optional) A list of available zones IDs by the enhanced NAT gateway.
    zones GetEnhancedNatAvailableZonesZone[]
    A list of available zones. Each element contains the following attributes:
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    (Optional) A list of available zones IDs by the enhanced NAT gateway.
    zones Sequence[GetEnhancedNatAvailableZonesZone]
    A list of available zones. Each element contains the following attributes:
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    (Optional) A list of available zones IDs by the enhanced NAT gateway.
    zones List<Property Map>
    A list of available zones. Each element contains the following attributes:
    outputFile String

    Supporting Types

    GetEnhancedNatAvailableZonesZone

    LocalName string
    Name of the available zone.
    ZoneId string
    The ID of the available zone.
    LocalName string
    Name of the available zone.
    ZoneId string
    The ID of the available zone.
    localName String
    Name of the available zone.
    zoneId String
    The ID of the available zone.
    localName string
    Name of the available zone.
    zoneId string
    The ID of the available zone.
    local_name str
    Name of the available zone.
    zone_id str
    The ID of the available zone.
    localName String
    Name of the available zone.
    zoneId String
    The ID of the available zone.

    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.75.0 published on Friday, Mar 7, 2025 by Pulumi