Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerQuotaOverride ¶
type ConsumerQuotaOverride struct { pulumi.CustomResourceState // If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. Dimensions pulumi.StringMapOutput `pulumi:"dimensions"` // 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. Force pulumi.BoolPtrOutput `pulumi:"force"` // The limit on the metric, e.g. `/project/region`. Limit pulumi.StringOutput `pulumi:"limit"` // The metric that should be limited, e.g. `compute.googleapis.com/cpus`. Metric pulumi.StringOutput `pulumi:"metric"` // The server-generated name of the quota override. Name pulumi.StringOutput `pulumi:"name"` // The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota). OverrideValue pulumi.StringOutput `pulumi:"overrideValue"` // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringOutput `pulumi:"project"` // The service that the metrics belong to, e.g. `compute.googleapis.com`. Service pulumi.StringOutput `pulumi:"service"` }
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:
* How-to Guides
- [Getting Started](https://cloud.google.com/service-usage/docs/getting-started)
- [REST API documentation](https://cloud.google.com/service-usage/docs/reference/rest/v1beta1/services.consumerQuotaMetrics.limits.consumerOverrides)
## Example Usage ### Consumer Quota Override
```go package main
import (
"fmt" "github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/organizations" "github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/serviceusage" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { myProject, err := organizations.NewProject(ctx, "myProject", &organizations.ProjectArgs{ ProjectId: pulumi.String("quota"), OrgId: pulumi.String("123456789"), }, pulumi.Provider(google_beta)) if err != nil { return err } _, err = serviceusage.NewConsumerQuotaOverride(ctx, "override", &serviceusage.ConsumerQuotaOverrideArgs{ Project: myProject.ProjectId, Service: pulumi.String("servicemanagement.googleapis.com"), Metric: pulumi.String(fmt.Sprintf("%v%v%v", "servicemanagement.googleapis.com", "%", "2Fdefault_requests")), Limit: pulumi.String(fmt.Sprintf("%v%v%v%v", "%", "2Fmin", "%", "2Fproject")), OverrideValue: pulumi.String("95"), Force: pulumi.Bool(true), }, pulumi.Provider(google_beta)) if err != nil { return err } return nil }) }
```
## Import
ConsumerQuotaOverride can be imported using any of these accepted formats ¶
```sh
$ pulumi import gcp:serviceusage/consumerQuotaOverride:ConsumerQuotaOverride default projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}
```
```sh
$ pulumi import gcp:serviceusage/consumerQuotaOverride:ConsumerQuotaOverride default {{project}}/{{service}}/{{metric}}/{{limit}}/{{name}}
```
```sh
$ pulumi import gcp:serviceusage/consumerQuotaOverride:ConsumerQuotaOverride default {{service}}/{{metric}}/{{limit}}/{{name}}
```
func GetConsumerQuotaOverride ¶
func GetConsumerQuotaOverride(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ConsumerQuotaOverrideState, opts ...pulumi.ResourceOption) (*ConsumerQuotaOverride, error)
GetConsumerQuotaOverride gets an existing ConsumerQuotaOverride resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewConsumerQuotaOverride ¶
func NewConsumerQuotaOverride(ctx *pulumi.Context, name string, args *ConsumerQuotaOverrideArgs, opts ...pulumi.ResourceOption) (*ConsumerQuotaOverride, error)
NewConsumerQuotaOverride registers a new resource with the given unique name, arguments, and options.
func (ConsumerQuotaOverride) ElementType ¶ added in v4.4.0
func (ConsumerQuotaOverride) ElementType() reflect.Type
func (ConsumerQuotaOverride) ToConsumerQuotaOverrideOutput ¶ added in v4.4.0
func (i ConsumerQuotaOverride) ToConsumerQuotaOverrideOutput() ConsumerQuotaOverrideOutput
func (ConsumerQuotaOverride) ToConsumerQuotaOverrideOutputWithContext ¶ added in v4.4.0
func (i ConsumerQuotaOverride) ToConsumerQuotaOverrideOutputWithContext(ctx context.Context) ConsumerQuotaOverrideOutput
type ConsumerQuotaOverrideArgs ¶
type ConsumerQuotaOverrideArgs struct { // If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. Dimensions pulumi.StringMapInput // 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. Force pulumi.BoolPtrInput // The limit on the metric, e.g. `/project/region`. Limit pulumi.StringInput // The metric that should be limited, e.g. `compute.googleapis.com/cpus`. Metric pulumi.StringInput // The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota). OverrideValue pulumi.StringInput // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringPtrInput // The service that the metrics belong to, e.g. `compute.googleapis.com`. Service pulumi.StringInput }
The set of arguments for constructing a ConsumerQuotaOverride resource.
func (ConsumerQuotaOverrideArgs) ElementType ¶
func (ConsumerQuotaOverrideArgs) ElementType() reflect.Type
type ConsumerQuotaOverrideInput ¶ added in v4.4.0
type ConsumerQuotaOverrideInput interface { pulumi.Input ToConsumerQuotaOverrideOutput() ConsumerQuotaOverrideOutput ToConsumerQuotaOverrideOutputWithContext(ctx context.Context) ConsumerQuotaOverrideOutput }
type ConsumerQuotaOverrideOutput ¶ added in v4.4.0
type ConsumerQuotaOverrideOutput struct {
*pulumi.OutputState
}
func (ConsumerQuotaOverrideOutput) ElementType ¶ added in v4.4.0
func (ConsumerQuotaOverrideOutput) ElementType() reflect.Type
func (ConsumerQuotaOverrideOutput) ToConsumerQuotaOverrideOutput ¶ added in v4.4.0
func (o ConsumerQuotaOverrideOutput) ToConsumerQuotaOverrideOutput() ConsumerQuotaOverrideOutput
func (ConsumerQuotaOverrideOutput) ToConsumerQuotaOverrideOutputWithContext ¶ added in v4.4.0
func (o ConsumerQuotaOverrideOutput) ToConsumerQuotaOverrideOutputWithContext(ctx context.Context) ConsumerQuotaOverrideOutput
type ConsumerQuotaOverrideState ¶
type ConsumerQuotaOverrideState struct { // If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. Dimensions pulumi.StringMapInput // 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. Force pulumi.BoolPtrInput // The limit on the metric, e.g. `/project/region`. Limit pulumi.StringPtrInput // The metric that should be limited, e.g. `compute.googleapis.com/cpus`. Metric pulumi.StringPtrInput // The server-generated name of the quota override. Name pulumi.StringPtrInput // The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota). OverrideValue pulumi.StringPtrInput // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringPtrInput // The service that the metrics belong to, e.g. `compute.googleapis.com`. Service pulumi.StringPtrInput }
func (ConsumerQuotaOverrideState) ElementType ¶
func (ConsumerQuotaOverrideState) ElementType() reflect.Type