1. Packages
  2. Openstack Provider
  3. API Docs
  4. blockstorage
  5. getAvailabilityZonesV3
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.blockstorage.getAvailabilityZonesV3

Explore with Pulumi AI

OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

Use this data source to get a list of Block Storage availability zones from OpenStack

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const zones = openstack.blockstorage.getAvailabilityZonesV3({});
Copy
import pulumi
import pulumi_openstack as openstack

zones = openstack.blockstorage.get_availability_zones_v3()
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/blockstorage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := blockstorage.GetAvailabilityZonesV3(ctx, &blockstorage.GetAvailabilityZonesV3Args{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var zones = OpenStack.BlockStorage.GetAvailabilityZonesV3.Invoke();

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.blockstorage.BlockstorageFunctions;
import com.pulumi.openstack.blockstorage.inputs.GetAvailabilityZonesV3Args;
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 zones = BlockstorageFunctions.getAvailabilityZonesV3();

    }
}
Copy
variables:
  zones:
    fn::invoke:
      function: openstack:blockstorage:getAvailabilityZonesV3
      arguments: {}
Copy

Using getAvailabilityZonesV3

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 getAvailabilityZonesV3(args: GetAvailabilityZonesV3Args, opts?: InvokeOptions): Promise<GetAvailabilityZonesV3Result>
function getAvailabilityZonesV3Output(args: GetAvailabilityZonesV3OutputArgs, opts?: InvokeOptions): Output<GetAvailabilityZonesV3Result>
Copy
def get_availability_zones_v3(region: Optional[str] = None,
                              state: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAvailabilityZonesV3Result
def get_availability_zones_v3_output(region: Optional[pulumi.Input[str]] = None,
                              state: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetAvailabilityZonesV3Result]
Copy
func GetAvailabilityZonesV3(ctx *Context, args *GetAvailabilityZonesV3Args, opts ...InvokeOption) (*GetAvailabilityZonesV3Result, error)
func GetAvailabilityZonesV3Output(ctx *Context, args *GetAvailabilityZonesV3OutputArgs, opts ...InvokeOption) GetAvailabilityZonesV3ResultOutput
Copy

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

public static class GetAvailabilityZonesV3 
{
    public static Task<GetAvailabilityZonesV3Result> InvokeAsync(GetAvailabilityZonesV3Args args, InvokeOptions? opts = null)
    public static Output<GetAvailabilityZonesV3Result> Invoke(GetAvailabilityZonesV3InvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAvailabilityZonesV3Result> getAvailabilityZonesV3(GetAvailabilityZonesV3Args args, InvokeOptions options)
public static Output<GetAvailabilityZonesV3Result> getAvailabilityZonesV3(GetAvailabilityZonesV3Args args, InvokeOptions options)
Copy
fn::invoke:
  function: openstack:blockstorage/getAvailabilityZonesV3:getAvailabilityZonesV3
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Region string
The region in which to obtain the Block Storage client. If omitted, the region argument of the provider is used.
State string
The state of the availability zones to match. Can either be available or unavailable. Default is available.
Region string
The region in which to obtain the Block Storage client. If omitted, the region argument of the provider is used.
State string
The state of the availability zones to match. Can either be available or unavailable. Default is available.
region String
The region in which to obtain the Block Storage client. If omitted, the region argument of the provider is used.
state String
The state of the availability zones to match. Can either be available or unavailable. Default is available.
region string
The region in which to obtain the Block Storage client. If omitted, the region argument of the provider is used.
state string
The state of the availability zones to match. Can either be available or unavailable. Default is available.
region str
The region in which to obtain the Block Storage client. If omitted, the region argument of the provider is used.
state str
The state of the availability zones to match. Can either be available or unavailable. Default is available.
region String
The region in which to obtain the Block Storage client. If omitted, the region argument of the provider is used.
state String
The state of the availability zones to match. Can either be available or unavailable. Default is available.

getAvailabilityZonesV3 Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Names List<string>
The names of the availability zones, ordered alphanumerically, that match the queried state.
Region string
See Argument Reference above.
State string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Names []string
The names of the availability zones, ordered alphanumerically, that match the queried state.
Region string
See Argument Reference above.
State string
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
names List<String>
The names of the availability zones, ordered alphanumerically, that match the queried state.
region String
See Argument Reference above.
state String
See Argument Reference above.
id string
The provider-assigned unique ID for this managed resource.
names string[]
The names of the availability zones, ordered alphanumerically, that match the queried state.
region string
See Argument Reference above.
state string
See Argument Reference above.
id str
The provider-assigned unique ID for this managed resource.
names Sequence[str]
The names of the availability zones, ordered alphanumerically, that match the queried state.
region str
See Argument Reference above.
state str
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
names List<String>
The names of the availability zones, ordered alphanumerically, that match the queried state.
region String
See Argument Reference above.
state String
See Argument Reference above.

Package Details

Repository
OpenStack pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi