Method: projects.locations.policyBindings.create Stay organized with collections Save and categorize content based on your preferences.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Examples
- Try it!
Creates a policy binding and returns a long-running operation. Callers will need the IAM permissions on both the policy and target. After the binding is created, the policy is applied to the target.
HTTP request
POST https://iam.googleapis.com/v3beta/{parent=projects/*/locations/*}/policyBindings
The URL usesgRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The parent resource where this policy binding will be created. The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target. Format:
|
Query parameters
| Parameters | |
|---|---|
policyBindingId |
Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-.]{2,62}/. |
validateOnly |
Optional. If set, validate the request and preview the creation, but do not actually post it. |
Request body
The request body contains an instance ofPolicyBinding.
Response body
If successful, the response body contains a newly created instance ofOperation.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see theAuthentication Overview.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-12 UTC.