- NAME
-
- gcloud iap settings set - set the setting for an IAP resource
- SYNOPSIS
-
-
gcloud iap settings setSETTING_FILE[--folder=FOLDER--organization=ORGANIZATION--project=PROJECT--region=REGION--resource-type=RESOURCE_TYPE--service=SERVICE--version=VERSION] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
- Set the setting for an IAP resource.
- EXAMPLES
-
To set the IAP setting for the resources within an organization, run:
gcloud iap settings set iap_settings.yaml --organization=ORGANIZATION_IDTo set the IAP setting for the resources within a folder, run:
gcloud iap settings set iap_settings.yaml --folder=FOLDER_IDTo set the IAP setting for the resources within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_IDTo set the IAP setting for web type resources within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=iap_webTo set the IAP setting for all app engine services within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=app-engineTo set the IAP setting for an app engine service within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=app-engine --service=SERVICE_IDTo set the IAP setting for an app engine service version within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=app-engine --service=SERVICE_ID --version=VERSION_IDTo set the IAP setting for all backend services within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=backend-servicesTo set the IAP setting for a backend service within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=backend-services --service=SERVICE_IDTo set the IAP setting for a region backend service within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=backend-services --service=SERVICE_ID --region=REGION_IDTo set the IAP setting for all forwarding rule within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=forwarding-ruleTo set the IAP setting for a forwarding rule within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=forwarding-rule --service=SERVICE_IDTo set the IAP setting for a region forwarding rule within a project, run:
gcloud iap settings set iap_settings.yaml --project=PROJECT_ID --resource-type=forwarding-rule --service=SERVICE_ID --region=REGION_ID - POSITIONAL ARGUMENTS
-
SETTING_FILE-
JSON or YAML file containing the IAP resource settings.
JSON example:
{ "access_settings": { "oauth_settings": { "login_hint": { "value": "test_hint" } }, "gcip_settings": { "tenant_ids": [ "tenant1-p9puj", "tenant2-y8rxc" ], "login_page_uri": { "value": "https://test.com/?apiKey=abcd_efgh" } }, "cors_settings": { "allow_http_options": { "value": true } } }, "application_settings": { "csm_settings": { "rctoken_aud": { "value": "test_aud" } } } }
YAML example:
accessSettings : oauthSettings: loginHint: test_hint gcipSettings: tenantIds: - tenant1-p9puj - tenant2-y8rxc loginPageUri: https://test.com/?apiKey=abcd_efgh corsSettings: allowHttpOptions: true applicationSettings: csmSettings: rctokenAud: test_aud
- FLAGS
-
--folder=FOLDER- Folder ID.
--organization=ORGANIZATION- Organization ID.
--project=PROJECT- Project ID.
--region=REGION-
Region name. Not applicable for
app-engine. Required whenresource-type=computeand regional scoped. Not applicable for global scoped compute. --resource-type=RESOURCE_TYPE-
Resource type of the IAP resource. For Backend Services, you can use both
computeandbackend-servicesas resource type.RESOURCE_TYPEmust be one of:app-engine,iap_web,compute,organization,folder,backend-services,forwarding-rule. --service=SERVICE-
Service name. Optional when
resource-typeiscomputeorapp-engine. --version=VERSION-
Version name. Not applicable for
compute. Optional whenresource-type=app-engine.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
-
These variants are also available:
gcloud alpha iap settings setgcloud beta iap settings set
gcloud iap settings set
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-22 UTC.