| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/google-cloud-sdk/lib/surface/projects/ |
Upload File : |
- release_tracks: [ALPHA]
help_text:
brief: Set IAM policy for a project.
description: |
Sets the IAM policy for a project, given a project ID and a file encoded
in JSON or YAML that contains the IAM policy.
examples: |
The following command reads an IAM policy defined in a JSON file
`policy.json` and sets it for a project with the ID
`example-project-id-1`:
$ {command} example-project-id-1 policy.json
See https://cloud.google.com/iam/docs/managing-policies for details of the
policy file format and contents.
request:
collection: cloudresourcemanager.projects
use_relative_name: false
modify_request_hooks:
- googlecloudsdk.command_lib.projects.util:SetIamPolicyFromFileHook
- googlecloudsdk.command_lib.iam.hooks:UseMaxRequestedPolicyVersion:api_field=setIamPolicyRequest.policy.version
arguments:
resource:
help_text: The project to set the IAM policy for.
spec: !REF googlecloudsdk.command_lib.projects.resources:project