1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. serviceusage
  5. ConsumerQuotaOverride
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.serviceusage.ConsumerQuotaOverride

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    A consumer override is applied to the consumer on its own authority to limit its own quota usage. Consumer overrides cannot be used to grant more quota than would be allowed by admin overrides, producer overrides, or the default limit of the service.

    To get more information about ConsumerQuotaOverride, see:

    Example Usage

    Consumer Quota Override

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as std from "@pulumi/std";
    
    const myProject = new gcp.organizations.Project("my_project", {
        name: "tf-test-project",
        projectId: "quota",
        orgId: "123456789",
    });
    const override = new gcp.serviceusage.ConsumerQuotaOverride("override", {
        project: myProject.projectId,
        service: "servicemanagement.googleapis.com",
        metric: std.urlencode({
            input: "servicemanagement.googleapis.com/default_requests",
        }).then(invoke => invoke.result),
        limit: std.urlencode({
            input: "/min/project",
        }).then(invoke => invoke.result),
        overrideValue: "95",
        force: true,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_std as std
    
    my_project = gcp.organizations.Project("my_project",
        name="tf-test-project",
        project_id="quota",
        org_id="123456789")
    override = gcp.serviceusage.ConsumerQuotaOverride("override",
        project=my_project.project_id,
        service="servicemanagement.googleapis.com",
        metric=std.urlencode(input="servicemanagement.googleapis.com/default_requests").result,
        limit=std.urlencode(input="/min/project").result,
        override_value="95",
        force=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/serviceusage"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myProject, err := organizations.NewProject(ctx, "my_project", &organizations.ProjectArgs{
    			Name:      pulumi.String("tf-test-project"),
    			ProjectId: pulumi.String("quota"),
    			OrgId:     pulumi.String("123456789"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeUrlencode, err := std.Urlencode(ctx, &std.UrlencodeArgs{
    			Input: "servicemanagement.googleapis.com/default_requests",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		invokeUrlencode1, err := std.Urlencode(ctx, &std.UrlencodeArgs{
    			Input: "/min/project",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = serviceusage.NewConsumerQuotaOverride(ctx, "override", &serviceusage.ConsumerQuotaOverrideArgs{
    			Project:       myProject.ProjectId,
    			Service:       pulumi.String("servicemanagement.googleapis.com"),
    			Metric:        invokeUrlencode.Result,
    			Limit:         invokeUrlencode1.Result,
    			OverrideValue: pulumi.String("95"),
    			Force:         pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var myProject = new Gcp.Organizations.Project("my_project", new()
        {
            Name = "tf-test-project",
            ProjectId = "quota",
            OrgId = "123456789",
        });
    
        var @override = new Gcp.ServiceUsage.ConsumerQuotaOverride("override", new()
        {
            Project = myProject.ProjectId,
            Service = "servicemanagement.googleapis.com",
            Metric = Std.Urlencode.Invoke(new()
            {
                Input = "servicemanagement.googleapis.com/default_requests",
            }).Apply(invoke => invoke.Result),
            Limit = Std.Urlencode.Invoke(new()
            {
                Input = "/min/project",
            }).Apply(invoke => invoke.Result),
            OverrideValue = "95",
            Force = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.Project;
    import com.pulumi.gcp.organizations.ProjectArgs;
    import com.pulumi.gcp.serviceusage.ConsumerQuotaOverride;
    import com.pulumi.gcp.serviceusage.ConsumerQuotaOverrideArgs;
    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 myProject = new Project("myProject", ProjectArgs.builder()
                .name("tf-test-project")
                .projectId("quota")
                .orgId("123456789")
                .build());
    
            var override = new ConsumerQuotaOverride("override", ConsumerQuotaOverrideArgs.builder()
                .project(myProject.projectId())
                .service("servicemanagement.googleapis.com")
                .metric(StdFunctions.urlencode(UrlencodeArgs.builder()
                    .input("servicemanagement.googleapis.com/default_requests")
                    .build()).result())
                .limit(StdFunctions.urlencode(UrlencodeArgs.builder()
                    .input("/min/project")
                    .build()).result())
                .overrideValue("95")
                .force(true)
                .build());
    
        }
    }
    
    resources:
      myProject:
        type: gcp:organizations:Project
        name: my_project
        properties:
          name: tf-test-project
          projectId: quota
          orgId: '123456789'
      override:
        type: gcp:serviceusage:ConsumerQuotaOverride
        properties:
          project: ${myProject.projectId}
          service: servicemanagement.googleapis.com
          metric:
            fn::invoke:
              Function: std:urlencode
              Arguments:
                input: servicemanagement.googleapis.com/default_requests
              Return: result
          limit:
            fn::invoke:
              Function: std:urlencode
              Arguments:
                input: /min/project
              Return: result
          overrideValue: '95'
          force: true
    

    Region Consumer Quota Override

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as std from "@pulumi/std";
    
    const myProject = new gcp.organizations.Project("my_project", {
        name: "tf-test-project",
        projectId: "quota",
        orgId: "123456789",
    });
    const override = new gcp.serviceusage.ConsumerQuotaOverride("override", {
        dimensions: {
            region: "us-central1",
        },
        project: myProject.projectId,
        service: "compute.googleapis.com",
        metric: std.urlencode({
            input: "compute.googleapis.com/n2_cpus",
        }).then(invoke => invoke.result),
        limit: std.urlencode({
            input: "/project/region",
        }).then(invoke => invoke.result),
        overrideValue: "8",
        force: true,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_std as std
    
    my_project = gcp.organizations.Project("my_project",
        name="tf-test-project",
        project_id="quota",
        org_id="123456789")
    override = gcp.serviceusage.ConsumerQuotaOverride("override",
        dimensions={
            "region": "us-central1",
        },
        project=my_project.project_id,
        service="compute.googleapis.com",
        metric=std.urlencode(input="compute.googleapis.com/n2_cpus").result,
        limit=std.urlencode(input="/project/region").result,
        override_value="8",
        force=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/serviceusage"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myProject, err := organizations.NewProject(ctx, "my_project", &organizations.ProjectArgs{
    			Name:      pulumi.String("tf-test-project"),
    			ProjectId: pulumi.String("quota"),
    			OrgId:     pulumi.String("123456789"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeUrlencode, err := std.Urlencode(ctx, &std.UrlencodeArgs{
    			Input: "compute.googleapis.com/n2_cpus",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		invokeUrlencode1, err := std.Urlencode(ctx, &std.UrlencodeArgs{
    			Input: "/project/region",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = serviceusage.NewConsumerQuotaOverride(ctx, "override", &serviceusage.ConsumerQuotaOverrideArgs{
    			Dimensions: pulumi.StringMap{
    				"region": pulumi.String("us-central1"),
    			},
    			Project:       myProject.ProjectId,
    			Service:       pulumi.String("compute.googleapis.com"),
    			Metric:        invokeUrlencode.Result,
    			Limit:         invokeUrlencode1.Result,
    			OverrideValue: pulumi.String("8"),
    			Force:         pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var myProject = new Gcp.Organizations.Project("my_project", new()
        {
            Name = "tf-test-project",
            ProjectId = "quota",
            OrgId = "123456789",
        });
    
        var @override = new Gcp.ServiceUsage.ConsumerQuotaOverride("override", new()
        {
            Dimensions = 
            {
                { "region", "us-central1" },
            },
            Project = myProject.ProjectId,
            Service = "compute.googleapis.com",
            Metric = Std.Urlencode.Invoke(new()
            {
                Input = "compute.googleapis.com/n2_cpus",
            }).Apply(invoke => invoke.Result),
            Limit = Std.Urlencode.Invoke(new()
            {
                Input = "/project/region",
            }).Apply(invoke => invoke.Result),
            OverrideValue = "8",
            Force = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.Project;
    import com.pulumi.gcp.organizations.ProjectArgs;
    import com.pulumi.gcp.serviceusage.ConsumerQuotaOverride;
    import com.pulumi.gcp.serviceusage.ConsumerQuotaOverrideArgs;
    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 myProject = new Project("myProject", ProjectArgs.builder()
                .name("tf-test-project")
                .projectId("quota")
                .orgId("123456789")
                .build());
    
            var override = new ConsumerQuotaOverride("override", ConsumerQuotaOverrideArgs.builder()
                .dimensions(Map.of("region", "us-central1"))
                .project(myProject.projectId())
                .service("compute.googleapis.com")
                .metric(StdFunctions.urlencode(UrlencodeArgs.builder()
                    .input("compute.googleapis.com/n2_cpus")
                    .build()).result())
                .limit(StdFunctions.urlencode(UrlencodeArgs.builder()
                    .input("/project/region")
                    .build()).result())
                .overrideValue("8")
                .force(true)
                .build());
    
        }
    }
    
    resources:
      myProject:
        type: gcp:organizations:Project
        name: my_project
        properties:
          name: tf-test-project
          projectId: quota
          orgId: '123456789'
      override:
        type: gcp:serviceusage:ConsumerQuotaOverride
        properties:
          dimensions:
            region: us-central1
          project: ${myProject.projectId}
          service: compute.googleapis.com
          metric:
            fn::invoke:
              Function: std:urlencode
              Arguments:
                input: compute.googleapis.com/n2_cpus
              Return: result
          limit:
            fn::invoke:
              Function: std:urlencode
              Arguments:
                input: /project/region
              Return: result
          overrideValue: '8'
          force: true
    

    Consumer Quota Override Custom Dimension

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as std from "@pulumi/std";
    
    const myProject = new gcp.organizations.Project("my_project", {
        name: "tf-test-project",
        projectId: "quota",
        orgId: "123456789",
    });
    const override = new gcp.serviceusage.ConsumerQuotaOverride("override", {
        project: myProject.projectId,
        service: "libraryagent.googleapis.com",
        metric: std.urlencode({
            input: "libraryagent.googleapis.com/borrows",
        }).then(invoke => invoke.result),
        limit: std.urlencode({
            input: "/author/project",
        }).then(invoke => invoke.result),
        overrideValue: "1",
        force: true,
        dimensions: {
            author: "larry",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_std as std
    
    my_project = gcp.organizations.Project("my_project",
        name="tf-test-project",
        project_id="quota",
        org_id="123456789")
    override = gcp.serviceusage.ConsumerQuotaOverride("override",
        project=my_project.project_id,
        service="libraryagent.googleapis.com",
        metric=std.urlencode(input="libraryagent.googleapis.com/borrows").result,
        limit=std.urlencode(input="/author/project").result,
        override_value="1",
        force=True,
        dimensions={
            "author": "larry",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/serviceusage"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myProject, err := organizations.NewProject(ctx, "my_project", &organizations.ProjectArgs{
    			Name:      pulumi.String("tf-test-project"),
    			ProjectId: pulumi.String("quota"),
    			OrgId:     pulumi.String("123456789"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeUrlencode, err := std.Urlencode(ctx, &std.UrlencodeArgs{
    			Input: "libraryagent.googleapis.com/borrows",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		invokeUrlencode1, err := std.Urlencode(ctx, &std.UrlencodeArgs{
    			Input: "/author/project",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = serviceusage.NewConsumerQuotaOverride(ctx, "override", &serviceusage.ConsumerQuotaOverrideArgs{
    			Project:       myProject.ProjectId,
    			Service:       pulumi.String("libraryagent.googleapis.com"),
    			Metric:        invokeUrlencode.Result,
    			Limit:         invokeUrlencode1.Result,
    			OverrideValue: pulumi.String("1"),
    			Force:         pulumi.Bool(true),
    			Dimensions: pulumi.StringMap{
    				"author": pulumi.String("larry"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var myProject = new Gcp.Organizations.Project("my_project", new()
        {
            Name = "tf-test-project",
            ProjectId = "quota",
            OrgId = "123456789",
        });
    
        var @override = new Gcp.ServiceUsage.ConsumerQuotaOverride("override", new()
        {
            Project = myProject.ProjectId,
            Service = "libraryagent.googleapis.com",
            Metric = Std.Urlencode.Invoke(new()
            {
                Input = "libraryagent.googleapis.com/borrows",
            }).Apply(invoke => invoke.Result),
            Limit = Std.Urlencode.Invoke(new()
            {
                Input = "/author/project",
            }).Apply(invoke => invoke.Result),
            OverrideValue = "1",
            Force = true,
            Dimensions = 
            {
                { "author", "larry" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.Project;
    import com.pulumi.gcp.organizations.ProjectArgs;
    import com.pulumi.gcp.serviceusage.ConsumerQuotaOverride;
    import com.pulumi.gcp.serviceusage.ConsumerQuotaOverrideArgs;
    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 myProject = new Project("myProject", ProjectArgs.builder()
                .name("tf-test-project")
                .projectId("quota")
                .orgId("123456789")
                .build());
    
            var override = new ConsumerQuotaOverride("override", ConsumerQuotaOverrideArgs.builder()
                .project(myProject.projectId())
                .service("libraryagent.googleapis.com")
                .metric(StdFunctions.urlencode(UrlencodeArgs.builder()
                    .input("libraryagent.googleapis.com/borrows")
                    .build()).result())
                .limit(StdFunctions.urlencode(UrlencodeArgs.builder()
                    .input("/author/project")
                    .build()).result())
                .overrideValue("1")
                .force(true)
                .dimensions(Map.of("author", "larry"))
                .build());
    
        }
    }
    
    resources:
      myProject:
        type: gcp:organizations:Project
        name: my_project
        properties:
          name: tf-test-project
          projectId: quota
          orgId: '123456789'
      override:
        type: gcp:serviceusage:ConsumerQuotaOverride
        properties:
          project: ${myProject.projectId}
          service: libraryagent.googleapis.com
          metric:
            fn::invoke:
              Function: std:urlencode
              Arguments:
                input: libraryagent.googleapis.com/borrows
              Return: result
          limit:
            fn::invoke:
              Function: std:urlencode
              Arguments:
                input: /author/project
              Return: result
          overrideValue: '1'
          force: true
          dimensions:
            author: larry
    

    Create ConsumerQuotaOverride Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ConsumerQuotaOverride(name: string, args: ConsumerQuotaOverrideArgs, opts?: CustomResourceOptions);
    @overload
    def ConsumerQuotaOverride(resource_name: str,
                              args: ConsumerQuotaOverrideArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConsumerQuotaOverride(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              limit: Optional[str] = None,
                              metric: Optional[str] = None,
                              override_value: Optional[str] = None,
                              service: Optional[str] = None,
                              dimensions: Optional[Mapping[str, str]] = None,
                              force: Optional[bool] = None,
                              project: Optional[str] = None)
    func NewConsumerQuotaOverride(ctx *Context, name string, args ConsumerQuotaOverrideArgs, opts ...ResourceOption) (*ConsumerQuotaOverride, error)
    public ConsumerQuotaOverride(string name, ConsumerQuotaOverrideArgs args, CustomResourceOptions? opts = null)
    public ConsumerQuotaOverride(String name, ConsumerQuotaOverrideArgs args)
    public ConsumerQuotaOverride(String name, ConsumerQuotaOverrideArgs args, CustomResourceOptions options)
    
    type: gcp:serviceusage:ConsumerQuotaOverride
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConsumerQuotaOverrideArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConsumerQuotaOverrideArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConsumerQuotaOverrideArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConsumerQuotaOverrideArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConsumerQuotaOverrideArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var consumerQuotaOverrideResource = new Gcp.ServiceUsage.ConsumerQuotaOverride("consumerQuotaOverrideResource", new()
    {
        Limit = "string",
        Metric = "string",
        OverrideValue = "string",
        Service = "string",
        Dimensions = 
        {
            { "string", "string" },
        },
        Force = false,
        Project = "string",
    });
    
    example, err := serviceusage.NewConsumerQuotaOverride(ctx, "consumerQuotaOverrideResource", &serviceusage.ConsumerQuotaOverrideArgs{
    	Limit:         pulumi.String("string"),
    	Metric:        pulumi.String("string"),
    	OverrideValue: pulumi.String("string"),
    	Service:       pulumi.String("string"),
    	Dimensions: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Force:   pulumi.Bool(false),
    	Project: pulumi.String("string"),
    })
    
    var consumerQuotaOverrideResource = new ConsumerQuotaOverride("consumerQuotaOverrideResource", ConsumerQuotaOverrideArgs.builder()
        .limit("string")
        .metric("string")
        .overrideValue("string")
        .service("string")
        .dimensions(Map.of("string", "string"))
        .force(false)
        .project("string")
        .build());
    
    consumer_quota_override_resource = gcp.serviceusage.ConsumerQuotaOverride("consumerQuotaOverrideResource",
        limit="string",
        metric="string",
        override_value="string",
        service="string",
        dimensions={
            "string": "string",
        },
        force=False,
        project="string")
    
    const consumerQuotaOverrideResource = new gcp.serviceusage.ConsumerQuotaOverride("consumerQuotaOverrideResource", {
        limit: "string",
        metric: "string",
        overrideValue: "string",
        service: "string",
        dimensions: {
            string: "string",
        },
        force: false,
        project: "string",
    });
    
    type: gcp:serviceusage:ConsumerQuotaOverride
    properties:
        dimensions:
            string: string
        force: false
        limit: string
        metric: string
        overrideValue: string
        project: string
        service: string
    

    ConsumerQuotaOverride Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ConsumerQuotaOverride resource accepts the following input properties:

    Limit string

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    Metric string
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    OverrideValue string
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    Service string
    The service that the metrics belong to, e.g. compute.googleapis.com.
    Dimensions Dictionary<string, string>
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    Force bool
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Limit string

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    Metric string
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    OverrideValue string
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    Service string
    The service that the metrics belong to, e.g. compute.googleapis.com.
    Dimensions map[string]string
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    Force bool
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    limit String

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    metric String
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    overrideValue String
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    service String
    The service that the metrics belong to, e.g. compute.googleapis.com.
    dimensions Map<String,String>
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    force Boolean
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    limit string

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    metric string
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    overrideValue string
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    service string
    The service that the metrics belong to, e.g. compute.googleapis.com.
    dimensions {[key: string]: string}
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    force boolean
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    limit str

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    metric str
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    override_value str
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    service str
    The service that the metrics belong to, e.g. compute.googleapis.com.
    dimensions Mapping[str, str]
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    force bool
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    limit String

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    metric String
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    overrideValue String
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    service String
    The service that the metrics belong to, e.g. compute.googleapis.com.
    dimensions Map<String>
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    force Boolean
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ConsumerQuotaOverride resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The server-generated name of the quota override.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The server-generated name of the quota override.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The server-generated name of the quota override.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The server-generated name of the quota override.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The server-generated name of the quota override.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The server-generated name of the quota override.

    Look up Existing ConsumerQuotaOverride Resource

    Get an existing ConsumerQuotaOverride resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ConsumerQuotaOverrideState, opts?: CustomResourceOptions): ConsumerQuotaOverride
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dimensions: Optional[Mapping[str, str]] = None,
            force: Optional[bool] = None,
            limit: Optional[str] = None,
            metric: Optional[str] = None,
            name: Optional[str] = None,
            override_value: Optional[str] = None,
            project: Optional[str] = None,
            service: Optional[str] = None) -> ConsumerQuotaOverride
    func GetConsumerQuotaOverride(ctx *Context, name string, id IDInput, state *ConsumerQuotaOverrideState, opts ...ResourceOption) (*ConsumerQuotaOverride, error)
    public static ConsumerQuotaOverride Get(string name, Input<string> id, ConsumerQuotaOverrideState? state, CustomResourceOptions? opts = null)
    public static ConsumerQuotaOverride get(String name, Output<String> id, ConsumerQuotaOverrideState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Dimensions Dictionary<string, string>
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    Force bool
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    Limit string

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    Metric string
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    Name string
    The server-generated name of the quota override.
    OverrideValue string
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Service string
    The service that the metrics belong to, e.g. compute.googleapis.com.
    Dimensions map[string]string
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    Force bool
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    Limit string

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    Metric string
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    Name string
    The server-generated name of the quota override.
    OverrideValue string
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Service string
    The service that the metrics belong to, e.g. compute.googleapis.com.
    dimensions Map<String,String>
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    force Boolean
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    limit String

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    metric String
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    name String
    The server-generated name of the quota override.
    overrideValue String
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    service String
    The service that the metrics belong to, e.g. compute.googleapis.com.
    dimensions {[key: string]: string}
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    force boolean
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    limit string

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    metric string
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    name string
    The server-generated name of the quota override.
    overrideValue string
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    service string
    The service that the metrics belong to, e.g. compute.googleapis.com.
    dimensions Mapping[str, str]
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    force bool
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    limit str

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    metric str
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    name str
    The server-generated name of the quota override.
    override_value str
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    service str
    The service that the metrics belong to, e.g. compute.googleapis.com.
    dimensions Map<String>
    If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit.
    force Boolean
    If the new quota would decrease the existing quota by more than 10%, the request is rejected. If force is true, that safety check is ignored.
    limit String

    The limit on the metric, e.g. /project/region.

    Make sure that limit is in a format that doesn't start with 1/ or contain curly braces. E.g. use /project/user instead of 1/{project}/{user}.


    metric String
    The metric that should be limited, e.g. compute.googleapis.com/cpus.
    name String
    The server-generated name of the quota override.
    overrideValue String
    The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    service String
    The service that the metrics belong to, e.g. compute.googleapis.com.

    Import

    ConsumerQuotaOverride can be imported using any of these accepted formats:

    • projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}

    • services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}

    • {{service}}/{{metric}}/{{limit}}/{{name}}

    When using the pulumi import command, ConsumerQuotaOverride can be imported using one of the formats above. For example:

    $ pulumi import gcp:serviceusage/consumerQuotaOverride:ConsumerQuotaOverride default projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}
    
    $ pulumi import gcp:serviceusage/consumerQuotaOverride:ConsumerQuotaOverride default services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}
    
    $ pulumi import gcp:serviceusage/consumerQuotaOverride:ConsumerQuotaOverride default {{service}}/{{metric}}/{{limit}}/{{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi