0
0
GCPcloud~10 mins

Access Context Manager 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 create an Access Level with a basic condition.

GCP
access_level = {
  "name": "accessPolicies/123/accessLevels/level1",
  "title": "Office Hours Access",
  "basic": {
    "conditions": [
      {
        "ipSubnetworks": ["[1]"],
        "members": ["user:alice@example.com"]
      }
    ]
  }
}
Drag options to blanks, or click blank then click option'
A"0.0.0.0/0"
B"10.0.0.0/8"
C"172.16.0.0/12"
D"192.168.1.0/24"
Attempts:
3 left
💡 Hint
Common Mistakes
Using a public IP range like 0.0.0.0/0 which allows all IPs.
Choosing a subnet too broad for office access.
2fill in blank
medium

Complete the code to define an Access Policy with a specific parent resource.

GCP
access_policy = {
  "parent": "[1]",
  "title": "My Access Policy"
}
Drag options to blanks, or click blank then click option'
A"organizations/456"
B"projects/123"
C"folders/789"
D"users/abc"
Attempts:
3 left
💡 Hint
Common Mistakes
Using a project or folder as the parent resource.
Using an invalid resource type like users.
3fill in blank
hard

Fix the error in the Access Level condition to correctly specify device policy.

GCP
access_level = {
  "name": "accessPolicies/123/accessLevels/level2",
  "devicePolicy": {
    "requireScreenlock": [1]
  }
}
Drag options to blanks, or click blank then click option'
A"true"
Btrue
C"false"
DFalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using string "true" instead of boolean true.
Using Python-style False instead of JSON false.
4fill in blank
hard

Fill both blanks to create a condition that restricts access by device OS and IP subnet.

GCP
condition = {
  "devicePolicy": {
    "osType": "[1]"
  },
  "ipSubnetworks": ["[2]"]
}
Drag options to blanks, or click blank then click option'
AANDROID
BIOS
C192.168.0.0/16
D10.1.0.0/16
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing OS types with IP subnets.
Using public IP ranges instead of private ones.
5fill in blank
hard

Fill all three blanks to define an Access Level with title, description, and a condition requiring a specific member.

GCP
access_level = {
  "title": "[1]",
  "description": "[2]",
  "basic": {
    "conditions": [
      {
        "members": ["[3]"]
      }
    ]
  }
}
Drag options to blanks, or click blank then click option'
ARemote Access
BAccess for remote employees
Cuser:bob@example.com
Duser:alice@example.com
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping title and description values.
Using the wrong user email for members.