SQuotaPreference

class SQuotaPreference : KotlinCustomResource

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}}

Properties

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

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 createTime: Output<String>

Create time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: 2014-10-02T15:01:23Z and 2014-10-02T15:01:23.045123456Z.

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

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 etag: Output<String>

The current etag of the quota preference. If an etag is provided on update and does not match the current server's etag of the quota preference, the request will be blocked and an ABORTED error will be returned. See https://google.aip.dev/134#etags for more details on etags.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

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>?

The reason / justification for this quota preference.

Link copied to clipboard
val name: Output<String>

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

Link copied to clipboard
val parent: Output<String>

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
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The preferred quota configuration. Structure is documented below.

Link copied to clipboard
val quotaId: Output<String>

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 reconciling: Output<Boolean>

Is the quota preference pending Google Cloud approval and fulfillment.

Link copied to clipboard
val service: Output<String>

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

Link copied to clipboard
val updateTime: Output<String>

Update time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: 2014-10-02T15:01:23Z and 2014-10-02T15:01:23.045123456Z.

Link copied to clipboard
val urn: Output<String>