ExamGecko
Home Home / Microsoft / AZ-400

Microsoft AZ-400 Practice Test - Questions Answers, Page 36

Question list
Search
Search

List of questions

Search

Related questions











You have an Azure subscription that contains the resources shown in the following table.

DepPipeline1 and ADFPipeline1 use a single credential that is stored in Vault'.

You need to configure ADFPipeline1 to retrieve the credential from Vault1.

Which type of activity should you use?

A.
Web
A.
Web
Answers
B.
Copy
B.
Copy
Answers
C.
Lookup
C.
Lookup
Answers
D.
Get Metadata
D.
Get Metadata
Answers
Suggested answer: A

You use GitHub for source control of .NET applications.

You need to deploy a documentation solution that meets the following requirements:

Documents will be written in Markdown as developers make code changes

Changes to the documents will trigger the recompilation of a static website.

Users will access the documents from the static websites

Documents will be stored in a GitHub repository

Which two tools can you use to compile the website? Each correct answer presents a complete solution.

A.
JekyII
A.
JekyII
Answers
B.
Medium
B.
Medium
Answers
C.
caret
C.
caret
Answers
D.
WordPress
D.
WordPress
Answers
E.
DocFX
E.
DocFX
Answers
Suggested answer: A, D

Explanation:


You have an Azure subscription that contains four Azure virtual machines

You need to configure the virtual machines to use a single identity. The solution must meet the following requirements:

- Ensure that the credentials for the identity are managed automatically.

- Support granting privileges to the identity.

Which type of identity should you use?

A.
a service principal
A.
a service principal
Answers
B.
a user-assigned managed identity
B.
a user-assigned managed identity
Answers
C.
a system-assigned managed identity
C.
a system-assigned managed identity
Answers
D.
a user account
D.
a user account
Answers
Suggested answer: B

Explanation:


You use GitHub for source control and Azure Boards for project management. GitHub and Azure Boards are integrated. You plan to create a pull request in GitHub.

You need to automatically link the request to an existing Azure Boards work item by using the text of AB#<WORKITEMNUMBER>.

To which two elements can you add the text? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

A.
milestone
A.
milestone
Answers
B.
comment
B.
comment
Answers
C.
title
C.
title
Answers
D.
description
D.
description
Answers
E.
label
E.
label
Answers
Suggested answer: C, D

Explanation:

You can add the text "AB#<WORKITEMNUMBER>" to the title or description of the pull request in GitHub, which will automatically link the request to an existing Azure Boards work item with that number.

Reference:

Azure DevOps Docs: Link a work item to a pull request https://docs.microsoft.com/enus/azure/devops/repos/git/pull-requests?view=azure-devops#link-a-work-item-to-a-pull-request GitHub Docs: Creating a pull request https://docs.github.com/en-us/github/collaborating-withissues-and-pull-requests/creating-a-pull-request

You have an Azure subscription that contains the resources shown in the following table.

Project1 produces npm packages that are published to Feed1. Feed1 is consumed by multiple projects. You need to ensure that only tested packages are available for consumption. The solution must minimize development effort. What should you do?

A.
Create a feed view named @default. After the npm packages test successfully, configure a release pipeline that tags the packages as release.
A.
Create a feed view named @default. After the npm packages test successfully, configure a release pipeline that tags the packages as release.
Answers
B.
Create a feed view named @release and set @release as the default view. After the npm packages test successfully, configure a release pipeline that tags the packages as release.
B.
Create a feed view named @release and set @release as the default view. After the npm packages test successfully, configure a release pipeline that tags the packages as release.
Answers
C.
Create a feed view named @release and set @release as the default view After the npm packages test successfully, configure a release pipeline that promotes a package to the @release view.
C.
Create a feed view named @release and set @release as the default view After the npm packages test successfully, configure a release pipeline that promotes a package to the @release view.
Answers
D.
Create a feed view named @default. After the npm packages test successfully, configure a release pipeline that promotes a package to the @default view.
D.
Create a feed view named @default. After the npm packages test successfully, configure a release pipeline that promotes a package to the @default view.
Answers
Suggested answer: C

Explanation:

By creating a feed view named "release" and setting it as the default view, packages that are published to the feed will not be immediately available for consumption. After the npm packages are tested successfully, you can configure a release pipeline that promotes a package to the @release view. This ensures that only tested packages are available for consumption and minimizes development effort as it doesn't require any additional steps to be taken by the consumer of the feed.

Reference:

Azure DevOps Docs: Create a feed and views https://docs.microsoft.com/enus/azure/devops/artifacts/feeds/create-feed?view=azure-devops Azure

DevOps Docs: Promote a package https://docs.microsoft.com/enus/azure/devops/artifacts/feeds/promote-package?view=azure-devops

You have a GitHub repository that contains workflows. The workflows contain steps that execute predefined actions. Each action has one or more versions. You need to request the specific version of an action to execute.

Which three attributes can you use to identify the version? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A.
the SHA-based hashes
A.
the SHA-based hashes
Answers
B.
the tag
B.
the tag
Answers
C.
the runner
C.
the runner
Answers
D.
the branch
D.
the branch
Answers
E.
the serial
E.
the serial
Answers
Suggested answer: A, B, D

Explanation:

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions "We strongly recommend that you include the version of the action you are using by specifying a get ref, SHA, or Docker tag. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update. Using the commit SHA of a released action version is the safest for stability and security. If the action publishes major version tags, you should expect to receive critical fixes and security patches while still retaining compatibility. Note that this behavior is at the discretion of the action's author. Using the default branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break."

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You use Azure Pipelines to build and test a React.js application.

You have a pipeline that has a single job.

You discover that installing JavaScript packages from npm takes approximately five minutes each time you run the pipeline. You need to recommend a solution to reduce the pipeline execution time.

Solution: You recommend using pipeline artifacts.

Does this meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
Suggested answer: B

Explanation:

Pipeline artifacts are a way to persist build outputs, test results, and other files generated during a pipeline run. They allow you to share data between stages, jobs, and pipelines, and to persist data for longer than the lifetime of a pipeline run. While artifacts can be useful for sharing data between pipeline runs and reducing the time required to download dependencies, they are not a solution for reducing the time required to install JavaScript packages from npm during a pipeline run.

The solution of reducing the pipeline execution time could be achieved by using package caching, which allows you to store and reuse npm packages from previous pipeline runs. There are several package caching options available for Azure Pipelines, including the npm task, the npm cache task, and the npm ci task. All of these options allow you to configure caching for your npm packages, which can significantly reduce the time required to install packages during subsequent pipeline runs. Another solution could be using a dedicated agent that has those packages already installed, this way the pipeline doesn't have to install them again. You can find more information on package caching by following this link

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/npm-cache?view=azuredevops

You have an on-premises app named App1 that accesses Azure resources by using credentials stored in a configuration file. You plan to upgrade App1 to use an Azure service principal.

What is required for App1 to programmatically sign in to Azure Active Directory (Azure AD)?

A.
the application ID, a client secret, and the object ID
A.
the application ID, a client secret, and the object ID
Answers
B.
a client secret, the object ID, and the tenant ID
B.
a client secret, the object ID, and the tenant ID
Answers
C.
the application ID, a client secret, and the tenant ID
C.
the application ID, a client secret, and the tenant ID
Answers
D.
the application ID, a client secret, and the subscription ID
D.
the application ID, a client secret, and the subscription ID
Answers
Suggested answer: C

Explanation:

https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-serviceprincipals "When you've completed the app registration, you've a globally unique instance of the app (the application object) which lives within your home tenant or directory. You also have a globally unique ID for your app (the app or client ID). In the portal, you can then add secrets or certificates and scopes to make your app work, customize the branding of your app in the sign-in dialog, and more."

You have a project in Azure DevOps named Project1.

You implement a Continuous Integration/Continuous Deployment (CI/CD) pipeline that uses PowerShell Desired State Configuration (DSC) to configure the application infrastructure. You need to perform a unit test and an integration test of the configuration before Project1 is deployed. What should you use?

A.
the PSScriptAnalyzer tool
A.
the PSScriptAnalyzer tool
Answers
B.
the Pester test framework
B.
the Pester test framework
Answers
C.
the PSCodeHealth module
C.
the PSCodeHealth module
Answers
D.
the Test-DscConfiguration cmdlet
D.
the Test-DscConfiguration cmdlet
Answers
Suggested answer: B

Explanation:

You should use the Pester test framework to perform a unit test and an integration test of the configuration before Project1 is deployed. The Pester test framework is a PowerShell testing framework that can be used to validate PowerShell DSC configurations.

You use Azure DevOps processes to build and deploy code.

You need to compare how much time is spent troubleshooting issues found during development and how much time is spent troubleshooting issues found in released code. Which KPI should you use?

A.
defect escape rate
A.
defect escape rate
Answers
B.
unplanned work rate
B.
unplanned work rate
Answers
C.
defect rate
C.
defect rate
Answers
D.
rework rate
D.
rework rate
Answers
Suggested answer: A

Explanation:


Total 482 questions
Go to page: of 49