0
0
GCPcloud~10 mins

Billing accounts and budgets in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to list all billing accounts using gcloud CLI.

GCP
gcloud [1] billing accounts list
Drag options to blanks, or click blank then click option'
Abilling
Bcompute
Cbeta
Dprojects
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'compute' or 'projects' instead of 'billing' causes the command to fail.
Omitting the billing group results in an invalid command.
2fill in blank
medium

Complete the code to create a budget for a billing account using gcloud CLI.

GCP
gcloud beta billing budgets create --billing-account=[1] --amount=1000 --display-name="My Budget"
Drag options to blanks, or click blank then click option'
Aus-central1
Bbudget-123
C012345-6789AB-CDEF01
Dmy-project
Attempts:
3 left
💡 Hint
Common Mistakes
Using project ID instead of billing account ID.
Using region names instead of billing account ID.
3fill in blank
hard

Fix the error in the command to update a budget amount.

GCP
gcloud beta billing budgets update [1] --amount=1500
Drag options to blanks, or click blank then click option'
Abudget-123
B--billing-account=012345-6789AB-CDEF01
C012345-6789AB-CDEF01
D--budget-id=budget-123
Attempts:
3 left
💡 Hint
Common Mistakes
Using flags instead of positional argument for budget ID.
Confusing billing account ID with budget ID.
4fill in blank
hard

Fill both blanks to create a budget filter for projects and services.

GCP
gcloud beta billing budgets create --billing-account=[1] --filter='projects:[2]'
Drag options to blanks, or click blank then click option'
A012345-6789AB-CDEF01
Bmy-project-1
Cmy-project-2
Dus-central1
Attempts:
3 left
💡 Hint
Common Mistakes
Using region names instead of billing account or project IDs.
Mixing billing account ID with project ID.
5fill in blank
hard

Fill all three blanks to list budgets for a billing account with gcloud CLI.

GCP
gcloud beta billing budgets list --billing-account=[1] --format=[2] --filter=[3]
Drag options to blanks, or click blank then click option'
A012345-6789AB-CDEF01
Bjson
C"displayName:My Budget"
Dtable
Attempts:
3 left
💡 Hint
Common Mistakes
Using JSON format when table is clearer for beginners.
Not quoting the filter string properly.