You want to upload files from an on-premises virtual machine to Google Cloud Storage as
part of a data
migration. These files will be consumed by Cloud DataProc Hadoop cluster in a GCP
environment.
Which command should you use?
Explanation:
The gsutil cp command allows you to copy data between your local file. storage. boto files
generated by
running "gsutil config"
Question 12Choose 1
You want to re-architect a monolithic application so that it follows a microservices model.
You want to
accomplish this efficiently while minimizing the impact of this change to the business.
Which approach should you take?
Show answerHide answer
Correct answer: CRefactor the monolithic application with appropriate microservices in a single effort and
deploy it.
Question 13Choose 1
You are developing a Java Web Server that needs to interact with Google Cloud services
via the Google Cloud API on the user's behalf. Users should be able to authenticate to the
Google Cloud API using their Google Cloud identities. Which workflow should you
implement in your web application?
Show answerHide answer
Correct answer: D1) When a user arrives at your application, route them to a Google Cloud consent
screen with a list of requested permissions that prompts the user to sign in with SSO to
their Google Account.
2) After the user signs in and provides consent, your application receives an authorization
code from a Google server.
3) The application requests a Google Server to exchange the authorization code with an
access token.
4) The Google server responds with the access token that is used by the application to call
the Google Cloud API.
Explanation
The Google OAuth 2.0 endpoint supports web server applications that use languages and
frameworks such as PHP, Java, Python, Ruby, and ASP.NET. The authorization sequence
begins when your application redirects a browser to a Google URL; the URL includes query
parameters that indicate the type of access being requested. Google handles the user
authentication, session selection, and user consent. The result is an authorization code,
which the application can exchange for an access token and a refresh token.
Question 14Choose 1
You are a developer at a large organization Your team uses Git for source code
management (SCM). You want to ensure that your team follows Google-recommended
best practices to manage code to drive higher rates of software delivery. Which SCM
process should your team use?
Show answerHide answer
Correct answer: DEach group of developers creates a feature branch from the main branch for their work,
commits their changes to their branch, and merges their code into the main branch after
the change advisory board approves it.
Explanation
Explanation:
Use a centralized repository. A centralized repository is a single location where all of your
team's code is stored. This makes it easy for everyone to access the latest code, and it
also helps to prevent conflicts. Use branches. Branches are a way to create a separate
version of the code for development purposes. This allows developers to work on new
features or bug fixes without affecting the main branch of the code.
Question 15Choose 1
You developed a JavaScript web application that needs to access Google Drive’s API and obtain permission from users to store files in their Google Drives. You need to select an
authorization approach for your application. What should you do?
Show answerHide answer
Correct answer: DCreate an OAuth Client ID.
Question 16Choose 1
You are creating and running containers across different projects in Google Cloud. The
application you are developing needs to access Google Cloud services from within Google
Kubernetes Engine (GKE).
What should you do?
Show answerHide answer
Correct answer: BUse a Google service account to run the Pod with Workload Identity.
Question 17Choose 1
You are developing a new public-facing application that needs to retrieve specific
properties in the metadata of users’ objects in their respective Cloud Storage buckets. Due
to privacy and data residency requirements, you must retrieve only the metadata and not the object data. You want to maximize the performance of the retrieval process. How
should you retrieve the metadata?
Show answerHide answer
Correct answer: DUse the fields request parameter.
Question 18Choose 1
You are supporting a business-critical application in production deployed on Cloud Run.
The application is reporting HTTP 500 errors that are affecting the usability of the
application. You want to be alerted when the number of errors exceeds 15% of the
requests within a specific time window. What should you do?
Show answerHide answer
Correct answer: BCreate a Cloud Function that consumes the Cloud Monitoring API Use Cloud Composer
to trigger the Cloud
Function daily and alert you if the number of errors is above the defined threshold.
Question 19Choose 1
You are running a containerized application on Google Kubernetes Engine. Your container
images are stored in Container Registry. Your team uses CI/CD practices. You need to
prevent the deployment of containers with known critical vulnerabilities. What should you do?
Show answerHide answer
Correct answer: D
Enable the Container Scanning API to perform vulnerability scanning
Programmatically review vulnerability reporting through the Container Scanning API, and
provide an attestation that the container is free of known critical vulnerabilities
Use Binary Authorization to implement a policy that forces the attestation to be provided
before the container is deployed
Question 20Choose 1
You are developing an ecommerce application that stores customer, order, and inventory
data as relational tables inside Cloud Spanner. During a recent load test, you discover that
Spanner performance is not scaling linearly as expected. Which of the following is the
cause?
Show answerHide answer
Correct answer: CThe use of Version 1 UUIDs as primary keys that increase monotonically
Full mock exam
Sit the Professional-Cloud-Developer exam before exam day
Full-length mocks with the same number of questions and the same time limit as the real Professional-Cloud-Developer exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.