WAJIB: Kebijakan lengkap yang akan diterapkan ke resource. Ukuran kebijakan dibatasi hingga beberapa 10 KB. Kebijakan kosong adalah kebijakan yang valid, tetapi layanan Google Cloud tertentu (seperti Project) mungkin menolaknya.
OPSIONAL: FieldMask yang menentukan kolom kebijakan yang akan diubah. Hanya kolom dalam mask yang akan diubah. Jika tidak ada mask yang disediakan, mask default berikut akan digunakan:
paths: "bindings, etag"
Ini adalah daftar yang dipisahkan koma yang berisi nama kolom yang sepenuhnya memenuhi syarat. Contoh: "user.displayName,photo".
Isi respons
Jika berhasil, isi respons akan berisi instance Policy.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2024-04-19 UTC."],[[["\u003cp\u003eThis document outlines the process for setting an IAM policy for a resource using a POST HTTP request to the Google Analytics Hub API.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the target resource via a URL path parameter and includes a JSON-formatted request body that contains the policy and an optional update mask.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests will return a \u003ccode\u003ePolicy\u003c/code\u003e object in the response body, detailing the new IAM policy that was set.\u003c/p\u003e\n"],["\u003cp\u003eTo authorize this action, you must provide one of the specified OAuth scopes and hold at least one of the listed IAM permissions that correspond to the type of resource being modified.\u003c/p\u003e\n"],["\u003cp\u003eThe path parameter \u003ccode\u003eresource\u003c/code\u003e is required and a string that specifies the target resource to have the IAM policy applied to it, as seen in the \u003ccode\u003ePOST\u003c/code\u003e endpoint.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.dataExchanges.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.\n\n### HTTP request\n\n`POST https://analyticshub.googleapis.com/v1/{resource=projects/*/locations/*/dataExchanges/*}: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](/bigquery/docs/reference/analytics-hub/rest/Shared.Types/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 **one of** the following [IAM](https://cloud.google.com/iam/docs) permissions on the `resource` resource, depending on the resource type:\n\n- `analyticshub.dataExchanges.setIamPolicy`\n- `analyticshub.listings.setIamPolicy`\n- `analyticshub.subscriptions.setIamPolicy`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]