Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi
gcp.sql.getTiers
Explore with Pulumi AI
Get all available machine types (tiers) for a project, for example, db-custom-1-3840. For more information see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const tiers = gcp.sql.getTiers({
project: "sample-project",
});
const allAvailableTiers = tiers.then(tiers => .map(v => (v.tier)));
export const avaialbleTiers = allAvailableTiers;
import pulumi
import pulumi_gcp as gcp
tiers = gcp.sql.get_tiers(project="sample-project")
all_available_tiers = [v.tier for v in tiers.tiers]
pulumi.export("avaialbleTiers", all_available_tiers)
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var tiers = Gcp.Sql.GetTiers.Invoke(new()
{
Project = "sample-project",
});
var allAvailableTiers = .Select(v =>
{
return v.Tier;
}).ToList();
return new Dictionary<string, object?>
{
["avaialbleTiers"] = allAvailableTiers,
};
});
Coming soon!
Coming soon!
Using getTiers
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 getTiers(args: GetTiersArgs, opts?: InvokeOptions): Promise<GetTiersResult>
function getTiersOutput(args: GetTiersOutputArgs, opts?: InvokeOptions): Output<GetTiersResult>
def get_tiers(project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTiersResult
def get_tiers_output(project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTiersResult]
func GetTiers(ctx *Context, args *GetTiersArgs, opts ...InvokeOption) (*GetTiersResult, error)
func GetTiersOutput(ctx *Context, args *GetTiersOutputArgs, opts ...InvokeOption) GetTiersResultOutput
> Note: This function is named GetTiers
in the Go SDK.
public static class GetTiers
{
public static Task<GetTiersResult> InvokeAsync(GetTiersArgs args, InvokeOptions? opts = null)
public static Output<GetTiersResult> Invoke(GetTiersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTiersResult> getTiers(GetTiersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:sql/getTiers:getTiers
arguments:
# arguments dictionary
The following arguments are supported:
- Project string
- The Project ID for which to list tiers. If
project
is not provided, the project defined within the default provider configuration is used.
- Project string
- The Project ID for which to list tiers. If
project
is not provided, the project defined within the default provider configuration is used.
- project String
- The Project ID for which to list tiers. If
project
is not provided, the project defined within the default provider configuration is used.
- project string
- The Project ID for which to list tiers. If
project
is not provided, the project defined within the default provider configuration is used.
- project str
- The Project ID for which to list tiers. If
project
is not provided, the project defined within the default provider configuration is used.
- project String
- The Project ID for which to list tiers. If
project
is not provided, the project defined within the default provider configuration is used.
getTiers Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Project string
- Tiers
List<Get
Tiers Tier> - A list of all available machine types (tiers) for project. Each contains:
- Id string
- The provider-assigned unique ID for this managed resource.
- Project string
- Tiers
[]Get
Tiers Tier - A list of all available machine types (tiers) for project. Each contains:
- id String
- The provider-assigned unique ID for this managed resource.
- project String
- tiers
List<Get
Tiers Tier> - A list of all available machine types (tiers) for project. Each contains:
- id string
- The provider-assigned unique ID for this managed resource.
- project string
- tiers
Get
Tiers Tier[] - A list of all available machine types (tiers) for project. Each contains:
- id str
- The provider-assigned unique ID for this managed resource.
- project str
- tiers
Sequence[Get
Tiers Tier] - A list of all available machine types (tiers) for project. Each contains:
- id String
- The provider-assigned unique ID for this managed resource.
- project String
- tiers List<Property Map>
- A list of all available machine types (tiers) for project. Each contains:
Supporting Types
GetTiersTier
- disk_
quota int - The maximum disk size of this tier in bytes.
- ram int
- The maximum ram usage of this tier in bytes.
- regions Sequence[str]
- The applicable regions for this tier.
- tier str
- An identifier for the machine type, for example, db-custom-1-3840.
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.