1. Packages
  2. Exoscale
  3. API Docs
  4. getZones
Exoscale v0.59.2 published on Monday, Jul 22, 2024 by Pulumiverse

exoscale.getZones

Explore with Pulumi AI

exoscale logo
Exoscale v0.59.2 published on Monday, Jul 22, 2024 by Pulumiverse

    Lists all zones.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as exoscale from "@pulumi/exoscale";
    
    const exampleZones = exoscale.getZones({});
    export const zonesOutput = exampleZones.then(exampleZones => exampleZones.zones);
    
    import pulumi
    import pulumi_exoscale as exoscale
    
    example_zones = exoscale.get_zones()
    pulumi.export("zonesOutput", example_zones.zones)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleZones, err := exoscale.GetZones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("zonesOutput", exampleZones.Zones)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Exoscale = Pulumi.Exoscale;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleZones = Exoscale.GetZones.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["zonesOutput"] = exampleZones.Apply(getZonesResult => getZonesResult.Zones),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.exoscale.ExoscaleFunctions;
    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 exampleZones = ExoscaleFunctions.getZones();
    
            ctx.export("zonesOutput", exampleZones.applyValue(getZonesResult -> getZonesResult.zones()));
        }
    }
    
    variables:
      exampleZones:
        fn::invoke:
          Function: exoscale:getZones
          Arguments: {}
    outputs:
      # Outputs
      zonesOutput: ${exampleZones.zones}
    

    Please refer to the examples directory for complete configuration examples.

    Using getZones

    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 getZones(opts?: InvokeOptions): Promise<GetZonesResult>
    function getZonesOutput(opts?: InvokeOptions): Output<GetZonesResult>
    def get_zones(opts: Optional[InvokeOptions] = None) -> GetZonesResult
    def get_zones_output(opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]
    func GetZones(ctx *Context, opts ...InvokeOption) (*GetZonesResult, error)
    func GetZonesOutput(ctx *Context, opts ...InvokeOption) GetZonesResultOutput

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

    public static class GetZones 
    {
        public static Task<GetZonesResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetZonesResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetZonesResult> getZones(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: exoscale:index/getZones:getZones
      arguments:
        # arguments dictionary

    getZones Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Zones List<string>
    List of zones
    Id string
    The provider-assigned unique ID for this managed resource.
    Zones []string
    List of zones
    id String
    The provider-assigned unique ID for this managed resource.
    zones List<String>
    List of zones
    id string
    The provider-assigned unique ID for this managed resource.
    zones string[]
    List of zones
    id str
    The provider-assigned unique ID for this managed resource.
    zones Sequence[str]
    List of zones
    id String
    The provider-assigned unique ID for this managed resource.
    zones List<String>
    List of zones

    Package Details

    Repository
    exoscale pulumiverse/pulumi-exoscale
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the exoscale Terraform Provider.
    exoscale logo
    Exoscale v0.59.2 published on Monday, Jul 22, 2024 by Pulumiverse