Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Em algumas situações, pode ser preferível limitar o tipo de destino do job. Para fazer
isso, os administradores com a função Administrador de políticas da organização
podem configurar uma política
para controlar que tipo de destino de job (HTTP, Pub/Sub e/ou App Engine HTTP) pode
ser criado na organização.
Console
Acesse a página Políticas da organização da seção IAM e administrador.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-18 UTC."],[],[],null,["# Limiting target types\n\nIn some situations it might be preferable to limit the job target type. To do\nthis, administrators who have the [Organization Policy Administrator](/iam/docs/understanding-roles#organization-policy-roles)\nrole can configure a [policy](/resource-manager/docs/organization-policy/overview#organization_policy)\nto control what kind of job targets (HTTP, Pub/Sub, and/or App Engine HTTP) can\nbe created in their organization. \n\n### Console\n\n1. Visit the **Organization policies** page of the **IAM \\& Admin** section.\n\n [IAM \\& Admin](https://console.cloud.google.com/iam-admin/orgpolicies/list)\n2. From the top left dropdown, select the resource (organization or project)\n to which you wish to apply the constraint.\n\n3. Select **Allowed target types for jobs** from the list of **Organization\n Policies**.\n\n4. On the policy page, click the **Edit** button.\n\n5. Under **Rules** , open **Add Rule**\n\n 1. Select **Custom** for **Policy values**.\n\n 2. Select **Allow** for **Policy type**.\n\n 3. Add the type (PUBSUB, HTTP, or APPENGINE) to allowlist.\n\n 4. Click on **New Policy Value** to add multiple job types.\n\n 5. **Save** to enforce the policy.\n\n### Gcloud\n\n- To see the value of the constraint in an existing policy:\n\n ```\n gcloud resource-manager org-policies describe cloudscheduler.allowedTargetTypes --RESOURCE_TYPE=RESOURCE_ID\n \n ```\n\n \u003cbr /\u003e\n\n Where RESOURCE_TYPE is either `project`, `folder`, or `organization`,\n depending on where in the hierarchy the policy is attached.\n\n Which should return something like this: \n\n ```\n constraint: constraints/cloudscheduler.allowedTargetTypes\n etag: ETAG_VALUE\n listPolicy:\n allowedValues:\n - PUBSUB\n updateTime: '2021-09-04T15:30:45.313018Z'\n ```\n Make a note of the ETAG_VALUE for the next step.\n\n \u003cbr /\u003e\n\n- To create a `policy.yaml` file with the constraint:\n\n ```\n cat \u003epolicy.yaml\n constraint: constraints/cloudscheduler.allowedTargetTypes --RESOURCE_TYPE=RESOURCE_ID\n etag: ETAG_VALUE\n listPolicy:\n allowedValues:\n - PUBSUB\n ```\n\n \u003cbr /\u003e\n\n- To set the policy:\n\n \u003cbr /\u003e\n\n ```\n gcloud resource-manager org-policies set-policy --RESOURCE_TYPE=RESOURCE_ID policy.yaml\n ```\n\n \u003cbr /\u003e\n\n- To delete the constraint:\n\n \u003cbr /\u003e\n\n ```\n gcloud resource-manager org-policies delete --RESOURCE_TYPE=RESOURCE_ID\n constraints/cloudscheduler.allowedTargetTypes\n ```\n\n \u003cbr /\u003e"]]