Google Professional Cloud Developer Practice Test Questions and Exam Dumps Part18 Q341-360

View Full Google Professional Cloud Developer Exam Dumps and Practice Test Dumps.

 

Question 341

A Cloud Run service needs CPU available while it performs work outside active request handling. Which configuration is relevant?

  1. CPU allocation
  2. Maximum instances
  3. Ingress control
  4. Revision tag

Correct Answer: 1

Explanation

Cloud Run CPU allocation determines when CPU resources are available to a running container. Request-based allocation is suitable for applications whose CPU work occurs primarily while handling requests. Workloads that intentionally perform background processing while an instance remains active may require an allocation mode that keeps CPU available beyond request processing. Developers should evaluate whether the workload is appropriate for Cloud Run’s execution model and consider scaling behavior before relying on background work. CPU allocation is independent of memory size and instance limits, so changing those settings does not provide the same control over background CPU availability.

Question 342

A developer wants a Cloud Run revision to receive test traffic through a dedicated URL while the existing production revision remains unchanged. Which feature should be used?

  1. Minimum instances
  2. Revision tag
  3. Maximum instances
  4. Service timeout

Correct Answer: 2

Explanation

A Cloud Run revision tag provides a URL associated with a specific revision. Developers can use that URL to test a newly deployed revision without assigning normal production traffic to it. This approach is useful for smoke testing, integration validation, and controlled verification before changing traffic allocation. The tagged revision remains independently addressable while the service continues operating normally. Developers should still configure appropriate authentication and access restrictions for testing endpoints. A revision tag identifies a revision for access; it does not itself determine how the service distributes ordinary production traffic.

Question 343

A Cloud Run Job processes independent partitions of a dataset. The developer wants several partitions processed concurrently. Which setting should be configured?

  1. Request timeout
  2. Task parallelism
  3. Service ingress
  4. Revision traffic

Correct Answer: 2

Explanation

Cloud Run Jobs can execute multiple tasks and control how many tasks run concurrently through task parallelism. This is useful when a dataset can be divided into independent partitions that do not require sequential processing. Increasing parallelism can shorten total execution time, but developers should consider database capacity, external API quotas, available resources, and the amount of work performed by each task. Task parallelism applies to job execution rather than incoming requests to a Cloud Run service. The application should also ensure that task partitioning is deterministic enough to prevent unintended duplicate processing.

Question 344

A Cloud Run Job should stop a task that runs longer than the application’s permitted execution period. Which configuration addresses this requirement?

  1. Maximum instances
  2. Container concurrency
  3. Task timeout
  4. Revision tag

Correct Answer: 3

Explanation

Cloud Run Jobs support task execution time limits that define how long an individual task may run before it is terminated. A suitable timeout prevents a malfunctioning or unexpectedly slow task from consuming resources indefinitely. Developers should select a value that accommodates legitimate processing time while still protecting the workload from runaway execution. Timeout configuration should be considered alongside task retries because a timed-out task may be retried according to the job’s settings. Applications performing long-running work should also provide sufficient checkpointing or recovery behavior when partial progress can occur before a task reaches its timeout.

Question 345

A developer needs to pass command-line arguments to each execution of a Cloud Run Job’s container. Which configuration is appropriate?

  1. Job arguments
  2. Service ingress
  3. Traffic splitting
  4. Revision tag

Correct Answer: 1

Explanation

Cloud Run Jobs allow developers to configure the command and arguments supplied to the container when tasks execute. This is useful when the same container image supports different processing modes based on runtime parameters. Keeping the image reusable while providing arguments at execution time can reduce the need to build separate images for closely related jobs. Developers should ensure that argument values are validated by the application and that sensitive information is not passed as plain command-line data. Runtime configuration should remain separate from the immutable application artifact whenever possible.

Question 346

An Eventarc trigger should react only to audit-log events generated by a particular Google Cloud service. What should the developer configure?

  1. A broader Pub/Sub retention period
  2. Specific event-type and attribute filters
  3. A Cloud Storage lifecycle rule
  4. A Cloud Run minimum instance count

Correct Answer: 2

Explanation

Eventarc triggers can use event attributes and filters to restrict which events activate a destination. For audit-log-based events, developers can filter on relevant attributes such as the service name, method, resource type, or other available event metadata. Narrow filtering prevents unrelated events from invoking the application and reduces unnecessary processing. Developers should inspect the event structure before defining filters so that the selected attributes match the actual emitted event. Precise filters are especially useful in environments containing many services because they allow one trigger to respond only to the administrative or resource activity relevant to the application.

Question 347

A developer wants an Eventarc trigger in one Google Cloud project to invoke a destination associated with another project. What should be considered first?

  1. Cross-project IAM and event routing permissions
  2. Cloud Storage object versioning
  3. BigQuery clustering
  4. Container concurrency

Correct Answer: 1

Explanation

Cross-project Eventarc configurations require appropriate permissions and supported event-routing arrangements between the participating resources. Developers should verify that the identities involved can access the required event source, trigger, and destination resources across project boundaries. IAM configuration is particularly important because project separation normally provides an additional administrative boundary. The exact permissions depend on the event source and destination configuration. Developers should avoid granting broad project-level roles when narrower resource-level permissions are sufficient. Cross-project event routing should also be tested with representative events before being used for critical production workflows.

Question 348

A workflow calls a service that may temporarily fail. The developer wants the workflow to retry the call before treating it as an unrecoverable error. Which mechanism is suitable?

  1. Workflow retry policy
  2. Firestore TTL
  3. Storage lifecycle rule
  4. Artifact cleanup policy

Correct Answer: 1

Explanation

Cloud Workflows supports retry behavior for steps that may encounter transient failures. A retry policy can specify how a failed operation should be attempted again before the workflow ultimately treats the failure as unsuccessful. This is useful for temporary network problems or transient service conditions. Developers should distinguish transient failures from permanent errors and avoid retrying operations that cannot succeed through repetition. When retries can repeat side effects, the called operation should be designed to be idempotent. Proper retry configuration can improve resilience without requiring every application service to implement its own orchestration logic.

Question 349

A Workflows definition needs to store a value produced by one step and use it in later steps. Which workflow feature provides this capability?

  1. Variables
  2. Revision tags
  3. Storage classes
  4. Subscription filters

Correct Answer: 1

Explanation

Cloud Workflows variables allow values to be stored and referenced by later workflow steps. This makes it possible to pass information between operations, construct subsequent requests, and retain intermediate results during workflow execution. Developers can use expressions to work with stored values and can structure workflows so that each step receives the information it needs. Variables are different from external persistent databases because they represent workflow execution state rather than a general-purpose long-term data store. Developers should keep workflow state focused on orchestration needs and use suitable persistent services when application data must survive independently of a workflow execution.

Question 350

A developer wants one Workflows definition to call reusable logic with different input values. Which feature should be used?

  1. Cloud Tasks
  2. Subworkflows with parameters
  3. Artifact Registry
  4. Pub/Sub snapshots

Correct Answer: 2

Explanation

Workflows supports subworkflows that can encapsulate reusable logic and accept parameters. A parent workflow can call the same subworkflow with different input values, reducing duplication and improving organization. This is useful when several workflow branches perform similar processing but operate on different resources or data. Developers can keep common operations in one reusable definition while allowing callers to provide context-specific values. Subworkflows do not represent independently deployed compute services; they organize and reuse logic within Workflows. This structure becomes increasingly valuable as orchestration definitions grow and repeated operations would otherwise be copied across many steps.

Question 351

A Cloud Tasks queue should temporarily stop dispatching tasks while the application undergoes maintenance. Which queue operation is appropriate?

  1. Pause the queue
  2. Delete the queue
  3. Increase task payload size
  4. Change the task name

Correct Answer: 1

Explanation

Cloud Tasks allows a queue to be paused so that task dispatch temporarily stops while tasks remain associated with the queue. This can be useful during maintenance, downstream outages, controlled migrations, or application changes where processing should temporarily be suspended. Pausing differs from deleting a queue because the queued work is preserved rather than intentionally removed. After the maintenance activity is complete, the queue can be resumed so eligible tasks can continue dispatching. Developers should understand how accumulated tasks may affect workload volume when processing resumes and ensure that the receiving service can handle the resulting demand.

Question 352

A Cloud Tasks request must complete within a defined maximum dispatch period. Which configuration controls how long a task is allowed to remain in dispatch processing?

  1. Task dispatch deadline
  2. Queue location
  3. OIDC audience
  4. Task name

Correct Answer: 1

Explanation

The Cloud Tasks dispatch deadline defines the maximum duration permitted for an attempt to dispatch a task to its target. If the target does not complete the request within the applicable deadline, the attempt can be treated as unsuccessful according to Cloud Tasks behavior and retry configuration. Developers should choose a deadline that reflects the expected processing time of the target service without allowing stalled requests to consume resources unnecessarily. The dispatch deadline should be considered alongside retry settings and application idempotency. A task name identifies a task, while an OIDC audience addresses authentication rather than dispatch duration.

Question 353

A Pub/Sub subscriber requires stronger protection against duplicate deliveries for supported workloads. Which delivery capability should the developer evaluate?

  1. Exactly-once delivery
  2. Subscription labels
  3. Topic naming rules
  4. Storage lifecycle

Correct Answer: 1

Explanation

Pub/Sub provides exactly-once delivery capabilities for supported subscription configurations and client scenarios. When applicable, exactly-once delivery can reduce the risk of a subscriber processing the same message more than once successfully. Developers should understand that this capability has specific availability and implementation requirements and should not eliminate good application-level idempotency practices. Message processing can still encounter failures, and applications should handle errors correctly. Exactly-once delivery should therefore be evaluated alongside acknowledgment behavior, client support, and the business consequences of duplicate processing rather than being treated as a universal substitute for robust application design.

Question 354

A Pub/Sub topic needs messages retained even when a subscription has not yet acknowledged them. Which retention concept should the developer examine?

  1. Topic message retention
  2. Cloud Run minimum instances
  3. Firestore TTL
  4. Cloud Build substitutions

Correct Answer: 1

Explanation

Pub/Sub supports message retention at the topic level, allowing messages to remain available for subscriptions according to the configured retention policy. This can be useful when messages may need to be replayed or when subscriptions may be created after messages were published, depending on the retention configuration. Developers should distinguish topic retention from subscription retention because they address different storage and replay scenarios. Retention periods should be selected according to recovery and replay requirements while considering storage costs. Applications should not assume that messages remain available indefinitely unless an appropriate retention configuration has been explicitly established.

Question 355

A Bigtable application experiences concentrated writes because sequential row keys place new records near one another. What design change can reduce this hotspotting?

  1. Use a more distributed row-key design
  2. Increase Cloud Run concurrency
  3. Add a Firestore transaction
  4. Enable Cloud Scheduler

Correct Answer: 1

Explanation

Bigtable performance depends heavily on row-key design because related keys can map workload activity into concentrated portions of the keyspace. Sequential keys can create hotspots when new records are continually written to a narrow range. Developers can introduce a suitable distribution component or otherwise redesign keys so writes are spread across the keyspace while preserving the application’s required access patterns. The exact design depends on query requirements, such as whether records must be retrieved by time range or another identifier. Good row-key design balances efficient reads with distributed workload placement and should be evaluated before production-scale data ingestion.

Question 356

A Firestore application needs to update a numeric field without first reading its current value in application code. Which field transform is suitable?

  1. Increment
  2. Collection group
  3. Composite index
  4. Security Rule

Correct Answer: 1

Explanation

Firestore supports atomic field transforms such as increment, which can increase or decrease a numeric field as part of a write operation. This is useful for counters where application code should not need to read the existing value before applying an adjustment. The operation is performed as part of Firestore’s write semantics, reducing the need for separate read-modify-write logic. Developers should still consider contention and application workload when using counters at scale. Other Firestore capabilities serve different purposes: collection group queries retrieve related collections, indexes support querying, and Security Rules control access to data.

Question 357

A Cloud Storage bucket should prevent users from relying on object ACLs and instead use IAM permissions consistently at the bucket level. Which setting supports this?

  1. Uniform bucket-level access
  2. Object versioning
  3. Lifecycle management
  4. Retention duration

Correct Answer: 1

Explanation

Uniform bucket-level access makes access control rely on IAM rather than individual object ACLs for the bucket. This provides a more consistent authorization model and simplifies permission management when an organization wants access decisions centralized through IAM. Developers should review existing object-level permissions before enabling the setting because applications or workflows that depend on ACLs may need adjustment. Uniform bucket-level access does not control how long objects are retained or whether older object versions are preserved. Those concerns are handled through separate Cloud Storage features such as lifecycle rules, retention policies, and object versioning.

Question 358

A Cloud Storage bucket must prevent an object from being deleted or replaced until a required retention period has elapsed. Which feature addresses this requirement?

  1. Retention policy
  2. Cloud Run timeout
  3. Pub/Sub filter
  4. BigQuery materialized view

Correct Answer: 1

Explanation

A Cloud Storage retention policy specifies a minimum retention period during which covered objects cannot be deleted or replaced before the retention requirement is satisfied. This can help organizations enforce data-retention obligations and protect records from premature modification or deletion. Developers should distinguish retention policies from lifecycle rules because lifecycle rules automate object actions, while retention policies establish restrictions on deletion or replacement. Object holds can provide additional object-specific protection when needed. Retention configurations should be planned carefully because they can affect operational cleanup and application workflows that expect objects to be removed earlier.

Question 359

A Cloud Build pipeline repeatedly downloads the same dependencies, increasing build time. Which optimization can help reduce unnecessary repeated downloads?

  1. Build caching
  2. Cloud Run ingress
  3. Firestore TTL
  4. Pub/Sub ordering

Correct Answer: 1

Explanation

Build caching can improve Cloud Build performance by reusing suitable intermediate outputs or dependencies rather than rebuilding or downloading everything from scratch on every execution. Effective caching can reduce build duration and resource consumption, particularly for projects with large dependency sets or expensive compilation stages. Developers should ensure that cached content is invalidated appropriately when source files, dependency versions, or build instructions change. A cache should never be treated as the authoritative source for required artifacts. Build reproducibility remains important, so caching should complement rather than replace deterministic dependency management and controlled build configuration.

Question 360

A deployment pipeline should prevent an unverified container image from reaching production. Which Google Cloud capability can enforce deployment-time artifact authorization?

  1. Binary Authorization
  2. Cloud Scheduler
  3. Firestore TTL
  4. BigQuery clustering

Correct Answer: 1

Explanation

Binary Authorization provides deployment-time controls that can require container images to satisfy defined authorization policies before they are deployed to supported environments. Organizations can use attestations and policy requirements to establish that an image passed designated checks or originated from an approved build process. This creates an additional control between artifact creation and deployment. Developers should configure policies carefully so legitimate releases can proceed while unapproved images are rejected. Binary Authorization complements vulnerability scanning and build provenance rather than replacing them. Together, these controls can strengthen the software supply chain from build through deployment.