1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. alloydb
  5. getLocations
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.alloydb.getLocations

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    Use this data source to get information about the available locations. For more details refer the API docs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const qa = gcp.alloydb.getLocations({});
    
    import pulumi
    import pulumi_gcp as gcp
    
    qa = gcp.alloydb.get_locations()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/alloydb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := alloydb.GetLocations(ctx, &alloydb.GetLocationsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var qa = Gcp.Alloydb.GetLocations.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.alloydb.AlloydbFunctions;
    import com.pulumi.gcp.alloydb.inputs.GetLocationsArgs;
    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 qa = AlloydbFunctions.getLocations();
    
        }
    }
    
    variables:
      qa:
        fn::invoke:
          Function: gcp:alloydb:getLocations
          Arguments: {}
    

    Using getLocations

    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 getLocations(args: GetLocationsArgs, opts?: InvokeOptions): Promise<GetLocationsResult>
    function getLocationsOutput(args: GetLocationsOutputArgs, opts?: InvokeOptions): Output<GetLocationsResult>
    def get_locations(project: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetLocationsResult
    def get_locations_output(project: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetLocationsResult]
    func GetLocations(ctx *Context, args *GetLocationsArgs, opts ...InvokeOption) (*GetLocationsResult, error)
    func GetLocationsOutput(ctx *Context, args *GetLocationsOutputArgs, opts ...InvokeOption) GetLocationsResultOutput

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

    public static class GetLocations 
    {
        public static Task<GetLocationsResult> InvokeAsync(GetLocationsArgs args, InvokeOptions? opts = null)
        public static Output<GetLocationsResult> Invoke(GetLocationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLocationsResult> getLocations(GetLocationsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:alloydb/getLocations:getLocations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Project string
    The ID of the project.
    Project string
    The ID of the project.
    project String
    The ID of the project.
    project string
    The ID of the project.
    project str
    The ID of the project.
    project String
    The ID of the project.

    getLocations Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Locations List<GetLocationsLocation>
    Contains a list of location, which contains the details about a particular location.
    Project string
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations []GetLocationsLocation
    Contains a list of location, which contains the details about a particular location.
    Project string
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<GetLocationsLocation>
    Contains a list of location, which contains the details about a particular location.
    project String
    id string
    The provider-assigned unique ID for this managed resource.
    locations GetLocationsLocation[]
    Contains a list of location, which contains the details about a particular location.
    project string
    id str
    The provider-assigned unique ID for this managed resource.
    locations Sequence[GetLocationsLocation]
    Contains a list of location, which contains the details about a particular location.
    project str
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<Property Map>
    Contains a list of location, which contains the details about a particular location.
    project String

    Supporting Types

    GetLocationsLocation

    DisplayName string
    The friendly name for this location, typically a nearby city name. For example, "Tokyo".
    Labels Dictionary<string, string>
    Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}.
    LocationId string
    The canonical id for this location. For example: "us-east1"..
    Metadata Dictionary<string, string>
    Service-specific metadata. For example the available capacity at the given location.
    Name string
    Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
    DisplayName string
    The friendly name for this location, typically a nearby city name. For example, "Tokyo".
    Labels map[string]string
    Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}.
    LocationId string
    The canonical id for this location. For example: "us-east1"..
    Metadata map[string]string
    Service-specific metadata. For example the available capacity at the given location.
    Name string
    Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
    displayName String
    The friendly name for this location, typically a nearby city name. For example, "Tokyo".
    labels Map<String,String>
    Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}.
    locationId String
    The canonical id for this location. For example: "us-east1"..
    metadata Map<String,String>
    Service-specific metadata. For example the available capacity at the given location.
    name String
    Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
    displayName string
    The friendly name for this location, typically a nearby city name. For example, "Tokyo".
    labels {[key: string]: string}
    Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}.
    locationId string
    The canonical id for this location. For example: "us-east1"..
    metadata {[key: string]: string}
    Service-specific metadata. For example the available capacity at the given location.
    name string
    Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
    display_name str
    The friendly name for this location, typically a nearby city name. For example, "Tokyo".
    labels Mapping[str, str]
    Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}.
    location_id str
    The canonical id for this location. For example: "us-east1"..
    metadata Mapping[str, str]
    Service-specific metadata. For example the available capacity at the given location.
    name str
    Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
    displayName String
    The friendly name for this location, typically a nearby city name. For example, "Tokyo".
    labels Map<String>
    Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}.
    locationId String
    The canonical id for this location. For example: "us-east1"..
    metadata Map<String>
    Service-specific metadata. For example the available capacity at the given location.
    name String
    Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi