OBLIGATORIO. La política completa que se debe aplicar al resource. El tamaño de la política se limita a unas pocas decenas de KB. Las políticas vacías se consideran válidas, pero algunos servicios de Google Cloud (como los proyectos) podrían rechazarlas.
OPCIONAL. Una FieldMask que especifica los campos de la política que se deben modificar. Solo se modificarán los campos de la máscara. Si no se proporciona una, se usa la siguiente máscara predeterminada:
paths: "bindings, etag"
Esta es una lista separada por comas de los nombres de campos totalmente calificados. Ejemplo: "user.displayName,photo".
Cuerpo de la respuesta
Si se ejecuta de forma correcta, el cuerpo de la respuesta contiene una instancia de Policy.
Alcances de autorización
Se necesita uno de los siguientes alcances de OAuth:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2024-04-29 (UTC)"],[[["\u003cp\u003eThis endpoint is used to set the IAM policy for a specified resource within the Analytics Hub.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a POST request utilizing gRPC Transcoding syntax with a specific resource path.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a policy object and an optional updateMask, which defines modifications to the policy.\u003c/p\u003e\n"],["\u003cp\u003eThe successful response will return the updated policy object.\u003c/p\u003e\n"],["\u003cp\u003eSetting an IAM policy requires specific OAuth scopes and IAM permissions related to \u003ccode\u003eanalyticshub\u003c/code\u003e resources.\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/v1beta1/{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\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]