1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. getAvailabilityZone
edgecenter 0.10.4 published on Friday, Oct 31, 2025 by edge-center

edgecenter.getAvailabilityZone

Get Started
edgecenter logo
edgecenter 0.10.4 published on Friday, Oct 31, 2025 by edge-center

    Represent Availability Zones

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as edgecenter from "@pulumi/edgecenter";
    
    const rg = edgecenter.getRegion({
        name: "ED-10 Preprod",
    });
    const regionAz = rg.then(rg => edgecenter.getAvailabilityZone({
        regionId: rg.id,
    }));
    export const availabilityZones = regionAz.then(regionAz => regionAz.availabilityZones);
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    rg = edgecenter.get_region(name="ED-10 Preprod")
    region_az = edgecenter.get_availability_zone(region_id=rg.id)
    pulumi.export("availabilityZones", region_az.availability_zones)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
    			Name: "ED-10 Preprod",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		regionAz, err := edgecenter.GetAvailabilityZone(ctx, &edgecenter.GetAvailabilityZoneArgs{
    			RegionId: pulumi.Float64Ref(rg.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("availabilityZones", regionAz.AvailabilityZones)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Edgecenter = Pulumi.Edgecenter;
    
    return await Deployment.RunAsync(() => 
    {
        var rg = Edgecenter.GetRegion.Invoke(new()
        {
            Name = "ED-10 Preprod",
        });
    
        var regionAz = Edgecenter.GetAvailabilityZone.Invoke(new()
        {
            RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
        });
    
        return new Dictionary<string, object?>
        {
            ["availabilityZones"] = regionAz.Apply(getAvailabilityZoneResult => getAvailabilityZoneResult.AvailabilityZones),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.edgecenter.EdgecenterFunctions;
    import com.pulumi.edgecenter.inputs.GetRegionArgs;
    import com.pulumi.edgecenter.inputs.GetAvailabilityZoneArgs;
    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 rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
                .name("ED-10 Preprod")
                .build());
    
            final var regionAz = EdgecenterFunctions.getAvailabilityZone(GetAvailabilityZoneArgs.builder()
                .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
                .build());
    
            ctx.export("availabilityZones", regionAz.applyValue(getAvailabilityZoneResult -> getAvailabilityZoneResult.availabilityZones()));
        }
    }
    
    variables:
      rg:
        fn::invoke:
          function: edgecenter:getRegion
          arguments:
            name: ED-10 Preprod
      regionAz:
        fn::invoke:
          function: edgecenter:getAvailabilityZone
          arguments:
            regionId: ${rg.id}
    outputs:
      availabilityZones: ${regionAz.availabilityZones}
    

    Using getAvailabilityZone

    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 getAvailabilityZone(args: GetAvailabilityZoneArgs, opts?: InvokeOptions): Promise<GetAvailabilityZoneResult>
    function getAvailabilityZoneOutput(args: GetAvailabilityZoneOutputArgs, opts?: InvokeOptions): Output<GetAvailabilityZoneResult>
    def get_availability_zone(id: Optional[str] = None,
                              region_id: Optional[float] = None,
                              region_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAvailabilityZoneResult
    def get_availability_zone_output(id: Optional[pulumi.Input[str]] = None,
                              region_id: Optional[pulumi.Input[float]] = None,
                              region_name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetAvailabilityZoneResult]
    func GetAvailabilityZone(ctx *Context, args *GetAvailabilityZoneArgs, opts ...InvokeOption) (*GetAvailabilityZoneResult, error)
    func GetAvailabilityZoneOutput(ctx *Context, args *GetAvailabilityZoneOutputArgs, opts ...InvokeOption) GetAvailabilityZoneResultOutput

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

    public static class GetAvailabilityZone 
    {
        public static Task<GetAvailabilityZoneResult> InvokeAsync(GetAvailabilityZoneArgs args, InvokeOptions? opts = null)
        public static Output<GetAvailabilityZoneResult> Invoke(GetAvailabilityZoneInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAvailabilityZoneResult> getAvailabilityZone(GetAvailabilityZoneArgs args, InvokeOptions options)
    public static Output<GetAvailabilityZoneResult> getAvailabilityZone(GetAvailabilityZoneArgs args, InvokeOptions options)
    
    fn::invoke:
      function: edgecenter:index/getAvailabilityZone:getAvailabilityZone
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of this resource.
    RegionId double
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Id string
    The ID of this resource.
    RegionId float64
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    id String
    The ID of this resource.
    regionId Double
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    id string
    The ID of this resource.
    regionId number
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    id str
    The ID of this resource.
    region_id float
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    id String
    The ID of this resource.
    regionId Number
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.

    getAvailabilityZone Result

    The following output properties are available:

    AvailabilityZones List<string>
    A list of availability zones in the region.
    Id string
    The ID of this resource.
    RegionId double
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    AvailabilityZones []string
    A list of availability zones in the region.
    Id string
    The ID of this resource.
    RegionId float64
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    availabilityZones List<String>
    A list of availability zones in the region.
    id String
    The ID of this resource.
    regionId Double
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    availabilityZones string[]
    A list of availability zones in the region.
    id string
    The ID of this resource.
    regionId number
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    availability_zones Sequence[str]
    A list of availability zones in the region.
    id str
    The ID of this resource.
    region_id float
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    availabilityZones List<String>
    A list of availability zones in the region.
    id String
    The ID of this resource.
    regionId Number
    The ID of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.

    Package Details

    Repository
    edgecenter edge-center/terraform-provider-edgecenter
    License
    Notes
    This Pulumi package is based on the edgecenter Terraform Provider.
    edgecenter logo
    edgecenter 0.10.4 published on Friday, Oct 31, 2025 by edge-center
      Meet Neo: Your AI Platform Teammate