Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are building an event-driven image-processing service deployed on Cloud Run in the us-central1 region. You need to trigger this service whenever new objects are uploaded to a specific Cloud Storage bucket named media-uploads-eu in the eu multi-region, while meeting these requirements:
Which Eventarc trigger configuration should you implement?
global location with --destination-run-region=us-central1, filtering on type=google.cloud.storage.object.v1.finalized and bucket=media-uploads-eu.global Eventarc trigger doesA global Eventarc trigger listens for matching events across all Google Cloud regions rather than a single region or multi-region. It is primarily used for global services or Cloud Audit Logs triggers that need to aggregate events emitted from resources spanning multiple geographical locations.
global location. Attempting to create a direct Cloud Storage trigger with --location=global fails validation because the trigger location must exactly match the bucket's single-region, dual-region, or multi-region location.eu or us).--location=global.--destination-run-region, not by setting the trigger location to global.INVALID_ARGUMENT error.You were creating a Cloud Audit Logs trigger to capture events from resources across multiple regions worldwide (for example, monitoring buckets in both eu and us multi-regions) and did not have strict requirements for direct-event latency, strongly typed direct schemas, or avoiding audit log costs.
eu location with --destination-run-region=us-central1, filtering on type=google.cloud.audit.log.v1.written, serviceName=storage.googleapis.com, and methodName=storage.objects.create.A Cloud Audit Logs trigger monitors Admin Activity or Data Access audit logs written by Google Cloud services and forwards matching log entries to a destination such as Cloud Run. Filters specify the serviceName and methodName associated with the audited API call.
global. They are not supported in dual-region or multi-region locations such as eu.serviceName=storage.googleapis.com and methodName=storage.objects.create lacks a bucket-level filter, causing the trigger to match object creation across multiple buckets rather than isolating media-uploads-eu.google.cloud.audit.log.v1.written event type along with serviceName and methodName filters.bucket attribute filtering like native Cloud Storage triggers do (requiring full resource names or path patterns instead).You needed to react to a Cloud Storage API operation that is not exposed as a direct event—or an event from a service without direct Eventarc support—and you deployed the trigger in a single region or global location.
eu location with --destination-run-region=us-central1, filtering on type=google.cloud.storage.object.v1.finalized and bucket=media-uploads-eu.A direct Cloud Storage trigger in Eventarc captures state changes emitted directly from Cloud Storage without routing through Cloud Audit Logs. Under the hood, Eventarc uses Cloud Pub/Sub as its transport layer and delivers events to the target Cloud Run service as HTTP POST requests in the standardized CloudEvents format.
--event-filters="type=google.cloud.storage.object.v1.finalized" and --event-filters="bucket=media-uploads-eu" ensures Eventarc routes object-creation events exclusively from the media-uploads-eu bucket.eu). Meanwhile, Eventarc supports cross-region delivery to Cloud Run by setting --destination-run-region=us-central1.bucket) for exact resource isolation.google.cloud.storage.object.v1.finalized events when new objects are created or existing objects are overwritten.Whenever an event provider supports both direct events and Cloud Audit Logs events, choosing the direct event route is the recommended best practice. Configuring the trigger in eu satisfies Eventarc's regional alignment requirement for the multi-region bucket while still routing payloads seamlessly to the us-central1 Cloud Run service.
us-central1 location to match the Cloud Run service, filtering on type=google.cloud.storage.object.v1.finalized and bucket=media-uploads-*.Eventarc separates the trigger location (--location) from the target destination location (--destination-run-region). In addition, standard --event-filters flags evaluate attributes using exact string matching rather than pattern matching.
eu), not the Cloud Run service's location (us-central1). Creating the trigger in us-central1 for an eu bucket fails with an INVALID_ARGUMENT error.--event-filters: Standard Eventarc --event-filters do not support wildcards (*) or regular expressions. Passing bucket=media-uploads-* causes a literal string comparison that fails to match media-uploads-eu.media-uploads-* would risk capturing events from unintended buckets sharing that prefix.--event-filters-path-pattern supports wildcards (* for single segments and ** for multi-segment paths) on compatible resource path attributes, not --event-filters.--location must always match the bucket's region, dual-region, or multi-region.--destination-run-region.The bucket itself resided in us-central1 and the filter specified the exact bucket name rather than a wildcard expression.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated