[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-06-28。"],[[["\u003cp\u003eThis webpage details how to set the IAM policy for a specified data policy using a \u003ccode\u003ePOST\u003c/code\u003e request to a specific URL.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eresource\u003c/code\u003e path parameter, which is a required string, must be provided in the URL to indicate the target of the policy.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include a \u003ccode\u003epolicy\u003c/code\u003e object and can optionally include an \u003ccode\u003eupdateMask\u003c/code\u003e string to define the specific fields that should be modified.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests will yield a response body containing a \u003ccode\u003ePolicy\u003c/code\u003e object, and requests require specific authorization scopes and the \u003ccode\u003ebigquery.dataPolicies.setIamPolicy\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe request URL follows gRPC Transcoding syntax, and the size of the \u003ccode\u003epolicy\u003c/code\u003e is limited to a few 10s of KB.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.dataPolicies.setIamPolicy\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n- [Try it!](#try-it)\n\nSets the IAM policy for the specified data policy.\n\n### HTTP request\n\n`POST https://bigquerydatapolicy.googleapis.com/v1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Policy](/iam/docs/reference/rest/v1/Policy).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/bigquery`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `resource` resource:\n\n- `bigquery.dataPolicies.setIamPolicy`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]