function::set_user_short - Linux


function::set_user_short allows users to set the short username for the current Cloud Function. This is typically used for logging and monitoring purposes.


gcloud functions set_user_short FUNCTION_NAME USER_SHORT [--regions REGIONS]


  • --regions: The Cloud Regions where you want to set the user short. If omitted, this operation applies to all regions.


To set the user short to admin for all regions of the my-function function:

gcloud functions set_user_short my-function admin

To set the user short for only the us-central1 region:

gcloud functions set_user_short my-function admin --regions us-central1

Common Issues

  • Permission denied: Ensure that you have sufficient permissions to update the function.
  • Invalid user short: The user short must be between 1 and 32 characters long, and can only contain lowercase alphanumeric characters and hyphens.


function::set_user_short can be used in conjunction with other Cloud Functions commands, such as function::get and function::log to track user actions and monitor function behavior.

Related Commands