SQuotaPreferenceArgs

data class SQuotaPreferenceArgs(val contactEmail: Output<String>? = null, val dimensions: Output<Map<String, String>>? = null, val ignoreSafetyChecks: Output<String>? = null, val justification: Output<String>? = null, val name: Output<String>? = null, val parent: Output<String>? = null, val quotaConfig: Output<SQuotaPreferenceQuotaConfigArgs>? = null, val quotaId: Output<String>? = null, val service: Output<String>? = null) : ConvertibleToJava<SQuotaPreferenceArgs>

QuotaPreference represents the preferred quota configuration specified for a project, folder or organization. There is only one QuotaPreference resource for a quota value targeting a unique set of dimensions. To get more information about QuotaPreference, see:

Example Usage

Cloudquotas Quota Preference Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const preference = new gcp.cloudquota.SQuotaPreference("preference", {
parent: "projects/my-project-name",
name: "compute_googleapis_com-CPUS-per-project_us-east1",
dimensions: {
region: "us-east1",
},
service: "compute.googleapis.com",
quotaId: "CPUS-per-project-region",
contactEmail: "testuser@gmail.com",
quotaConfig: {
preferredValue: "200",
},
});
import pulumi
import pulumi_gcp as gcp
preference = gcp.cloudquota.SQuotaPreference("preference",
parent="projects/my-project-name",
name="compute_googleapis_com-CPUS-per-project_us-east1",
dimensions={
"region": "us-east1",
},
service="compute.googleapis.com",
quota_id="CPUS-per-project-region",
contact_email="testuser@gmail.com",
quota_config={
"preferred_value": "200",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var preference = new Gcp.CloudQuota.SQuotaPreference("preference", new()
{
Parent = "projects/my-project-name",
Name = "compute_googleapis_com-CPUS-per-project_us-east1",
Dimensions =
{
{ "region", "us-east1" },
},
Service = "compute.googleapis.com",
QuotaId = "CPUS-per-project-region",
ContactEmail = "testuser@gmail.com",
QuotaConfig = new Gcp.CloudQuota.Inputs.SQuotaPreferenceQuotaConfigArgs
{
PreferredValue = "200",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudquota"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudquota.NewSQuotaPreference(ctx, "preference", &cloudquota.SQuotaPreferenceArgs{
Parent: pulumi.String("projects/my-project-name"),
Name: pulumi.String("compute_googleapis_com-CPUS-per-project_us-east1"),
Dimensions: pulumi.StringMap{
"region": pulumi.String("us-east1"),
},
Service: pulumi.String("compute.googleapis.com"),
QuotaId: pulumi.String("CPUS-per-project-region"),
ContactEmail: pulumi.String("testuser@gmail.com"),
QuotaConfig: &cloudquota.SQuotaPreferenceQuotaConfigArgs{
PreferredValue: pulumi.String("200"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudquota.SQuotaPreference;
import com.pulumi.gcp.cloudquota.SQuotaPreferenceArgs;
import com.pulumi.gcp.cloudquota.inputs.SQuotaPreferenceQuotaConfigArgs;
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) {
var preference = new SQuotaPreference("preference", SQuotaPreferenceArgs.builder()
.parent("projects/my-project-name")
.name("compute_googleapis_com-CPUS-per-project_us-east1")
.dimensions(Map.of("region", "us-east1"))
.service("compute.googleapis.com")
.quotaId("CPUS-per-project-region")
.contactEmail("testuser@gmail.com")
.quotaConfig(SQuotaPreferenceQuotaConfigArgs.builder()
.preferredValue("200")
.build())
.build());
}
}
resources:
preference:
type: gcp:cloudquota:SQuotaPreference
properties:
parent: projects/my-project-name
name: compute_googleapis_com-CPUS-per-project_us-east1
dimensions:
region: us-east1
service: compute.googleapis.com
quotaId: CPUS-per-project-region
contactEmail: testuser@gmail.com
quotaConfig:
preferredValue: 200

Import

QuotaPreference can be imported using any of these accepted formats:

  • {{parent}}/locations/global/quotaPreferences/{{name}} When using the pulumi import command, QuotaPreference can be imported using one of the formats above. For example:

$ pulumi import gcp:cloudquota/sQuotaPreference:SQuotaPreference default {{parent}}/locations/global/quotaPreferences/{{name}}

Constructors

Link copied to clipboard
constructor(contactEmail: Output<String>? = null, dimensions: Output<Map<String, String>>? = null, ignoreSafetyChecks: Output<String>? = null, justification: Output<String>? = null, name: Output<String>? = null, parent: Output<String>? = null, quotaConfig: Output<SQuotaPreferenceQuotaConfigArgs>? = null, quotaId: Output<String>? = null, service: Output<String>? = null)

Properties

Link copied to clipboard
val contactEmail: Output<String>? = null

An email address that can be used for quota related communication between the Google Cloud and the user in case the Google Cloud needs further information to make a decision on whether the user preferred quota can be granted. The Google account for the email address must have quota update permission for the project, folder or organization this quota preference is for.

Link copied to clipboard
val dimensions: Output<Map<String, String>>? = null

The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota preferences configured for the specific value. NOTE: QuotaPreferences can only be applied across all values of "user" and "resource" dimension. Do not set values for "user" or "resource" in the dimension map. Example: '{"provider": "Foo Inc"}' where "provider" is a service specific dimension.

Link copied to clipboard
val ignoreSafetyChecks: Output<String>? = null

The list of quota safety checks to be ignored. Default value: "QUOTA_SAFETY_CHECK_UNSPECIFIED" Possible values: "QUOTA_SAFETY_CHECK_UNSPECIFIED", "QUOTA_DECREASE_BELOW_USAGE", "QUOTA_DECREASE_PERCENTAGE_TOO_HIGH"

Link copied to clipboard
val justification: Output<String>? = null

The reason / justification for this quota preference.

Link copied to clipboard
val name: Output<String>? = null

The resource name of the quota preference. Required except in the CREATE requests.

Link copied to clipboard
val parent: Output<String>? = null

The parent of the quota preference. Allowed parents are "projects/project-id / number" or "folders/folder-id / number" or "organizations/org-id / number".

Link copied to clipboard

The preferred quota configuration. Structure is documented below.

Link copied to clipboard
val quotaId: Output<String>? = null

The id of the quota to which the quota preference is applied. A quota id is unique in the service. Example: CPUS-per-project-region.

Link copied to clipboard
val service: Output<String>? = null

The name of the service to which the quota preference is applied.

Functions

Link copied to clipboard
open override fun toJava(): SQuotaPreferenceArgs