gcloud alpha iap settings set Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha iap settings set - set the setting for an IAP resource
- SYNOPSIS
gcloud alpha iap settings setSETTING_FILE[--folder=FOLDER--organization=ORGANIZATION--project=PROJECT--region=REGION--resource-type=RESOURCE_TYPE--service=SERVICE--version=VERSION][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Set the setting for an IAP resource.- EXAMPLES
- To set the IAP setting for the resources within an organization, run:
gcloudalphaiapsettingssetiap_settings.yaml--organization=ORGANIZATION_IDTosettheIAPsettingfortheresourceswithinafolder,run:
gcloudalphaiapsettingssetiap_settings.yaml--folder=FOLDER_IDTosettheIAPsettingfortheresourceswithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_IDTosettheIAPsettingforwebtyperesourceswithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=iap_webTosettheIAPsettingforallappengineserviceswithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=app-engineTosettheIAPsettingforanappengineservicewithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=app-engine--service=SERVICE_IDTosettheIAPsettingforanappengineserviceversionwithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=app-engine--service=SERVICE_ID--version=VERSION_IDTosettheIAPsettingforallbackendserviceswithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=backend-servicesTosettheIAPsettingforabackendservicewithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=backend-services--service=SERVICE_IDTosettheIAPsettingforaregionbackendservicewithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=backend-services--service=SERVICE_ID--region=REGION_IDTosettheIAPsettingforallforwardingrulewithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=forwarding-ruleTosettheIAPsettingforaforwardingrulewithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=forwarding-rule--service=SERVICE_IDTosettheIAPsettingforaregionforwardingrulewithinaproject,run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=forwarding-rule--service=SERVICE_ID--region=REGION_IDTo set the IAP setting for the all cloud run services within a region of aproject, run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=cloud-run--region=REGION_IDTo set the IAP setting for a cloud run service within a project, run:
gcloudalphaiapsettingssetiap_settings.yaml--project=PROJECT_ID--resource-type=cloud-run--region=REGION_ID--service=SERVICE_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_hintgcipSettings:tenantIds:-tenant1-p9puj-tenant2-y8rxcloginPageUri:https://test.com/?apiKey=abcd_efghcorsSettings:allowHttpOptions:trueapplicationSettings: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 forglobal scoped compute. Required whenresource-type=cloud-run. --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,forwarding-rule,cloud-run,backend-services. --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
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudiapsettingssetgcloudbetaiapsettingsset
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-22 UTC.