Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.vpc.getEnhancedNatAvailableZones
Explore with Pulumi AI
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:
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- output
File String - File name where to save data source results (after running
pulumi preview
).
- output
File 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
).
- output
File 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.
Ali Cloud. Vpc. Outputs. Get Enhanced Nat Available Zones Zone> - A list of available zones. Each element contains the following attributes:
- Output
File 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
[]Get
Enhanced Nat Available Zones Zone - A list of available zones. Each element contains the following attributes:
- Output
File 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<Get
Enhanced Nat Available Zones Zone> - A list of available zones. Each element contains the following attributes:
- output
File 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
Get
Enhanced Nat Available Zones Zone[] - A list of available zones. Each element contains the following attributes:
- output
File 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[Get
Enhanced Nat Available Zones Zone] - 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:
- output
File String
Supporting Types
GetEnhancedNatAvailableZonesZone
- local_
name str - Name of the available zone.
- zone_
id str - 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.