From c33d99184a2d75e69703ee957c28e0e7a1e9ed1c Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Fri, 20 Mar 2026 15:49:56 -0700 Subject: [PATCH] Simplify getting actual Customer ID --- src/GamCommands.txt | 4 ++++ src/GamUpdate.txt | 11 +++++++++-- src/gam/__init__.py | 7 +++++++ src/gam/gamlib/glclargs.py | 1 + 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 978ebb9c..3c0d5874 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -3548,6 +3548,10 @@ gam info customer [formatjson] gam info instance [formatjson] +gam info customerid + +gam info gcporgid + # Data Transfers gam print|show transferapps diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 201d3e57..e7a343a1 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -9,18 +9,25 @@ gam create|update|delete caalevel gam print|show caalevels gam print|show tokens gcpdetails ``` -You can get and set the `gcp_org_id` value with these commands: +You can get and set the `gam.cfg/gcp_org_id` value with these commands: ``` $ gam info gcporgid organizations/906207637890 $ gam config gcp_org_id organizations/906207637890 save ``` +You can get and set the `gam.cfg/customer_id` value with these commands: +``` +$ gam info customerid +C78abc9de +$ gam config customer_id C78abc9de save +``` + Added the following options to `gam report `. ``` +applicationinfofilter networkinfofilter statusfilter -applicationinfofilter includesensitivedata ``` diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 21727b40..4a2a9ccf 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -12006,6 +12006,12 @@ def getCRMOrgId(forceSearch=False): return orgs[0].get('name') return GC.Values[GC.GCP_ORG_ID] +# gam info customerid +def doInfoCustomerId(): + checkForExtraneousArguments() + setTrueCustomerId(cd=None) + writeStdout(f'{GC.Values[GC.CUSTOMER_ID]}\n') + # gam info gcporgid def doInfoGCPOrgId(): checkForExtraneousArguments() @@ -80200,6 +80206,7 @@ MAIN_COMMANDS_WITH_OBJECTS = { Cmd.ARG_CROSTELEMETRY: doInfoPrintShowCrOSTelemetry, Cmd.ARG_CURRENTPROJECTID: doInfoCurrentProjectId, Cmd.ARG_CUSTOMER: doInfoCustomer, + Cmd.ARG_CUSTOMERID: doInfoCustomerId, Cmd.ARG_DATATRANSFER: doInfoDataTransfer, Cmd.ARG_DEVICE: doInfoCIDevice, Cmd.ARG_DEVICEUSER: doInfoCIDeviceUser, diff --git a/src/gam/gamlib/glclargs.py b/src/gam/gamlib/glclargs.py index b79816b6..e872c8ac 100644 --- a/src/gam/gamlib/glclargs.py +++ b/src/gam/gamlib/glclargs.py @@ -830,6 +830,7 @@ class GamCLArgs(): ARG_CSEKEYPAIRS = 'csekeypairs' ARG_CURRENTPROJECTID = 'currentprojectid' ARG_CUSTOMER = 'customer' + ARG_CUSTOMERID = 'customerid' ARG_DATASTUDIOASSET = 'datastudioasset' ARG_DATASTUDIOASSETS = 'datastudioassets' ARG_DATASTUDIOPERMISSION = 'datastudiopermission'