Septentrio
Septentrio

Reputation: 57

Google cloud platform send quota increase request using API

I need to automate sending quota increase request to GCP support for each new project. Is there a wasy to send quota increase request using API? Thuis is how it looks in web ui: enter image description here

Upvotes: 1

Views: 544

Answers (1)

PjoterS
PjoterS

Reputation: 14092

I've run various scenarios but I was not able to increase this limit using the API. Default Quota values can be found here. Under ES Agent, in example for Agent Assist analyze text/audio operations you have a default quota 300 requests per minute.

When you are requesting an increased limit for the first time using UI, there is Request Description. This description is sent to your service provider, analyzed and evaluated and then approved or rejected.

enter image description here

I don't think the API affords a justification at the moment as this mechanism creates a support case for the quota increase request and is handled by support. If you would use it, you will get error response:

"reason": "COMMON_QUOTA_CONSUMER_OVERRIDE_TOO_HIGH"

Quota increase must be approved by support, thus API is not able to set additional quota.

Answering to your question:

Is there a wasy to send quota increase request using API?

I don't think it's possible for new projects as actions from service provider are required. For additional quota, the GCP user must submit through the UI.

Just as addition, guillaume blaquiere mentioned in his great guide (in my opinion) how to change quotas (within quota limits) using Terraform. It looks like this:

provider "google" {
    project = "<PrjoectName>"
    region = "us-central"
}

resource "google_service_usage_consumer_quota_override" "override" {
    provider = google-beta
    project = "<ProjectName>"
    service = "dialogflow.googleapis.com"
    metric = "dialogflow.googleapis.com%2FAnalyzeContentOperations"
    limit = "%2Fmin%2Fproject"
    override_value = "250"
    force = true
}

Upvotes: 1

Related Questions