Stay organized with collections
Save and categorize content based on your preferences.
Sets the access control policy for a Queue. Replaces any existing
policy. Note: The Cloud Console does not check queue-level IAM
permissions yet. Project-level permissions are required to use the Cloud
Console. Authorization requires the following Google
IAM permission on the specified resource
parent: * cloudtasks.queues.setIamPolicy
Arguments
Parameters
resource
string
REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Method: googleapis.cloudtasks.v2.projects.locations.queues.setIamPolicy\n\nSets the access control policy for a Queue. Replaces any existing\npolicy. Note: The Cloud Console does not check queue-level IAM\npermissions yet. Project-level permissions are required to use the Cloud\nConsole. Authorization requires the following [Google\nIAM](https://cloud.google.com/iam) permission on the specified resource\nparent: \\* `cloudtasks.queues.setIamPolicy`\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`Policy`](/workflows/docs/reference/googleapis/cloudtasks/v2/Overview#Policy).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/setIamPolicy). \n\n### YAML\n\n```yaml\n- setIamPolicy:\n call: googleapis.cloudtasks.v2.projects.locations.queues.setIamPolicy\n args:\n resource: ...\n body:\n policy:\n bindings: ...\n etag: ...\n version: ...\n result: setIamPolicyResult\n```\n\n### JSON\n\n```json\n[\n {\n \"setIamPolicy\": {\n \"call\": \"googleapis.cloudtasks.v2.projects.locations.queues.setIamPolicy\",\n \"args\": {\n \"resource\": \"...\",\n \"body\": {\n \"policy\": {\n \"bindings\": \"...\",\n \"etag\": \"...\",\n \"version\": \"...\"\n }\n }\n },\n \"result\": \"setIamPolicyResult\"\n }\n }\n]\n```"]]