Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse
scaleway.getAvailabilityZones
Explore with Pulumi AI
Use this data source to get the available zones information based on its Region.
For technical and legal reasons, some products are split by Region or by Availability Zones. When using such product, you can choose the location that better fits your need (country, latency, …).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
const main = scaleway.getAvailabilityZones({
region: "nl-ams",
});
import pulumi
import pulumi_scaleway as scaleway
main = scaleway.get_availability_zones(region="nl-ams")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.GetAvailabilityZones(ctx, &scaleway.GetAvailabilityZonesArgs{
Region: pulumi.StringRef("nl-ams"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = Scaleway.GetAvailabilityZones.Invoke(new()
{
Region = "nl-ams",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetAvailabilityZonesArgs;
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 main = ScalewayFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
.region("nl-ams")
.build());
}
}
variables:
main:
fn::invoke:
Function: scaleway:getAvailabilityZones
Arguments:
region: nl-ams
Using getAvailabilityZones
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 getAvailabilityZones(args: GetAvailabilityZonesArgs, opts?: InvokeOptions): Promise<GetAvailabilityZonesResult>
function getAvailabilityZonesOutput(args: GetAvailabilityZonesOutputArgs, opts?: InvokeOptions): Output<GetAvailabilityZonesResult>
def get_availability_zones(region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAvailabilityZonesResult
def get_availability_zones_output(region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAvailabilityZonesResult]
func GetAvailabilityZones(ctx *Context, args *GetAvailabilityZonesArgs, opts ...InvokeOption) (*GetAvailabilityZonesResult, error)
func GetAvailabilityZonesOutput(ctx *Context, args *GetAvailabilityZonesOutputArgs, opts ...InvokeOption) GetAvailabilityZonesResultOutput
> Note: This function is named GetAvailabilityZones
in the Go SDK.
public static class GetAvailabilityZones
{
public static Task<GetAvailabilityZonesResult> InvokeAsync(GetAvailabilityZonesArgs args, InvokeOptions? opts = null)
public static Output<GetAvailabilityZonesResult> Invoke(GetAvailabilityZonesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAvailabilityZonesResult> getAvailabilityZones(GetAvailabilityZonesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: scaleway:index/getAvailabilityZones:getAvailabilityZones
arguments:
# arguments dictionary
The following arguments are supported:
- Region string
- Region is represented as a Geographical area such as France. Defaults:
fr-par
.
- Region string
- Region is represented as a Geographical area such as France. Defaults:
fr-par
.
- region String
- Region is represented as a Geographical area such as France. Defaults:
fr-par
.
- region string
- Region is represented as a Geographical area such as France. Defaults:
fr-par
.
- region str
- Region is represented as a Geographical area such as France. Defaults:
fr-par
.
- region String
- Region is represented as a Geographical area such as France. Defaults:
fr-par
.
getAvailabilityZones Result
The following output properties are available:
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.