I was calling the following api
POST https://iam.googleapis.com/v2/policies/ENCODED_ATTACHMENT_POINT/denypolicies?policyId=POLICY_ID
Reference: https://cloud.google.com/iam/docs/deny-access
{‘error’: {‘code’: 429, ‘message’: “Quota exceeded for quota metric ‘Policy Read Requests’ and limit ‘Policy Read Requests per minute per user’ of service ‘’ for consumer ‘project_number:<project_number>’.”, ‘status’: ‘RESOURCE_EXHAUSTED’, ‘details’: [{‘@type’: ‘, ‘reason’: ‘RATE_LIMIT_EXCEEDED’, ‘domain’: , ‘metadata’: {‘quota_location’: ‘global’, ‘quota_limit_value’: ‘5’, ‘consumer’: ‘projects/<project_number>’, ‘quota_metric’: ’, ‘quota_unit’: ‘1/min/{project}/{user}’, ‘quota_limit’: ‘ReadPolicyRequestsPerMinutePerCredentialProjectPerUser’}}, {‘@type’: ‘links’: [{‘description’: ‘Request a higher quota limit.’, }]}]}}
I increased the quota from 5 to 20 and it did get approved
This api gets called for [ (folders)+(projects)] + 1 organization present in my organization, at some point it will give me the above error.
I want to know is there any way to avoid this quota issue or an alternate api that will give me equivalent response
{
“name”: “policies/cloudresourcemanager.googleapis.com%2Fprojects%2F1234567890123/denypolicies/my-policy”,
“uid”: “6665c437-a3b2-a018-6934-54dd16d3426e”,
“kind”: “DenyPolicy”,
“displayName”: “My deny policy.”,
“etag”: “MTc3NDU4MjM4OTY0MzU5MjQ5OTI=”,
“createTime”: “2022-06-05T19:22:26.770543Z”,
“updateTime”: “2022-06-05T19:22:26.770543Z”,
“rules”: [
{
“denyRule”: {
“deniedPrincipals”: [
“principal://goog/subject/lucian@example.com”
],
“deniedPermissions”: [
“iam.googleapis.com/roles.create”
]
}
}
]
get_iam_policy api never had this issue, why is it happening in this case ![]()
Note: I want to use a rest api
