Professional Cloud DevOps Engineer
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.
Your enterprise organization manages multiple environments across staging and production folders in Google Cloud. To prevent data exfiltration and enforce infrastructure standards across all development teams, your DevOps team must implement a Policy-as-Code guardrail with the following requirements:
How should you define and enforce this guardrail using Google Cloud Organization Policy custom constraints?
Custom organization policy constraints allow organization administrators to define granular, programmatic guardrails based on specific resource attributes and fields. Unlike legacy managed constraints that have predefined, fixed behaviors, custom constraints use Common Expression Language (CEL) expressions to evaluate REST resource payloads during operations.
resourceTypes), supported operations such as CREATE or UPDATE (under methodTypes), a CEL expression (under condition), and an action (ALLOW or DENY under actionType).description and displayName fields within the constraint definition are returned as descriptive error messages when an API call is blocked by policy evaluation.gcloud org-policies set-custom-constraint.gcloud org-policies set-policy.This approach uses the native Google Cloud Organization Policy Service, providing preventive, control-plane enforcement directly at the Cloud Resource Manager layer without needing third-party admission controllers or post-deployment remediation loops.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.