Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A cloud architect is developing an administrative shell script to automate operational maintenance across multiple environments that use distinct service accounts and settings.
The script must satisfy the following technical requirements:
Which combination of gcloud CLI commands and flags meets these requirements?
In the Google Cloud CLI, a named configuration is a distinct, saved group of settings and properties (such as authenticated accounts, target projects, default regions, and zones). The gcloud config configurations activate command switches the active CLI profile to the specified configuration instantly. To format output for administrative scripting, the global --format flag controls the output projection, where the value() transform prints raw property values without headers or decoration.
gcloud config configurations activate switches all active CLI properties—including authentication identity and default project—without interactive prompts or credential re-entry.--project PROJECT_ID takes precedence over stored configuration properties for only that specific execution, leaving the active configuration's underlying properties unchanged.--format="value(PROPERTY)" expression strips all table headers, borders, and wrapper formatting, printing only the requested property value so it can be assigned directly to shell variables.value() formatting with shell variable assignments eliminates the need for complex external text processing tools like awk, sed, or cut.This pattern leverages native Google Cloud SDK configuration management features. It completely avoids error-prone shell text parsing, maintains isolated credential contexts, and avoids persistent state corruption caused by repeatedly mutating active configuration properties.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.