ExamGecko
Home Home / Microsoft / AZ-400

Microsoft AZ-400 Practice Test - Questions Answers

Question list
Search
Search

List of questions

Search

Related questions











Your company has an on-premises Bitbucket Server that is used for Git-based source control. The server is protected by a firewall that blocks inbound Internet traffic. You plan to use Azure DevOps to manage the build and release processes.

Which two components are required to integrate Azure DevOps and Bitbucket? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A.
a deployment group
A.
a deployment group
Answers
B.
a Microsoft-hosted agent
B.
a Microsoft-hosted agent
Answers
C.
service hooks
C.
service hooks
Answers
D.
a self-hosted agent
D.
a self-hosted agent
Answers
E.
an External get service connection
E.
an External get service connection
Answers
Suggested answer: D, E

Explanation:

E: GitLab CI/CD can be used with GitHub or any other get server such as BitBucket. Instead of moving your entire project to GitLab, you can connect your external repository to get the benefits of GitLab CI/CD. Note: When a pipeline uses a remote, 3rd-party repository host such as Bitbucket Cloud, the repository is configured with webhooks that notify Azure Pipelines Server or TFS when code has changed and a build should be triggered. Since on-premises installations are normally protected behind a firewall, 3rd-party webhooks are unable to reach the on-premises server. As a workaround, you can use the External get repository type which uses polling instead of webhooks to trigger a build when code has changed.

Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git

Your company uses Azure Artifacts for package management.

You need to configure an upstream source in Azure Artifacts for Python packages.

Which repository type should you use as an upstream source?

A.
npmjs.org
A.
npmjs.org
Answers
B.
PyPI
B.
PyPI
Answers
C.
Maven Central
C.
Maven Central
Answers
D.
third-party trusted Python
D.
third-party trusted Python
Answers
Suggested answer: B

Explanation:

Get started with Python packages in Azure Artifacts

Create a feed

1. Select Artifacts (in the left navigation of your Azure DevOps project).

2. On the Artifacts page, select Create Feed.

3. In the Create new feed dialog box:

4. In the Name field, give the feed a name.

PyPI is the default repository name for twine, which is a tool for publishing Python packages.

Reference:

https://docs.microsoft.com/en-us/azure/devops/artifacts/quickstarts/python-packages

SIMULATION

You plan to deploy a template named D:\Deploy.json to a resource group named Deploy-lod9940427.

You need to modify the template to meet the following requirements, and then to deploy the template:

The address space must be reduced to support only 256 total IP addresses.

The subnet address space must be reduced to support only 64 total IP addresses.

To complete this task, sign in to the Microsoft Azure portal.

A.
See solution below.
A.
See solution below.
Answers
Suggested answer: A

Explanation:

1. Sign in to the portal.

2. Choose template Deploy-lod9940427

3. Select Edit template, and then paste your JSON template code into the code window.

4. Change the ASddressPrefixes to 10.0.0.0/24 in order to support only 256 total IP addresses.

addressSpace":{"addressPrefixes": ["10.0.0.0/24"]},

5. Change the firstSubnet addressprefix to 10.0.0.0/26 to support only 64 total IP addresses.

"subnets":[

{

"name":"firstSubnet",

"properties":{

"addressPrefix":"10.0.0.0/24"

}

6. Select Save.

7. Select Edit parameters, provide values for the parameters that are shown, and then select OK.

8. Select Subscription. Choose the subscription you want to use, and then select OK.

9. Select Resource group. Choose an existing resource group or create a new one, and then select OK.

10. Select Create. A new tile on the dashboard tracks the progress of your template deployment.

Reference:

https://docs.microsoft.com/en-us/azure-stack/user/azure-stack-deploy-template-portal?view=azs-1908

https://docs.microsoft.com/en-us/azure/architecture/building-blocks/extending-templates/update-resource

SIMULATION

You need to configure an Azure web app named az400-9940427-main to contain an environmental variable named "MAX_ITEMS". The environmental variable must have a value of 50. To complete this task, sign in to the Microsoft Azure portal.

A.
See solution below.
A.
See solution below.
Answers
Suggested answer: A

Explanation:

1. In the Azure portal, navigate to the az400-9940427-main app's management page. In the app's left menu, click Configuration > Application settings.

2. Click New Application settings

3. Enter the following:

Name: MAX_ITEMS

Value: 50

Reference:

https://docs.microsoft.com/en-us/azure/app-service/configure-common

Your company builds a multi-tier web application.

You use Azure DevOps and host the production application on Azure virtual machines.

Your team prepares an Azure Resource Manager template of the virtual machine that you will use to test new features.

You need to create a staging environment in Azure that meets the following requirements:

Minimizes the cost of Azure hosting

Provisions the virtual machines automatically

Uses the custom Azure Resource Manager template to provision the virtual machines

What should you do?

A.
In Azure Cloud Shell, run Azure CLI commands to create and delete the new virtual machines in a staging resource group.
A.
In Azure Cloud Shell, run Azure CLI commands to create and delete the new virtual machines in a staging resource group.
Answers
B.
In Azure DevOps, configure new tasks in the release pipeline to deploy to Azure Cloud Services.
B.
In Azure DevOps, configure new tasks in the release pipeline to deploy to Azure Cloud Services.
Answers
C.
From Azure Cloud Shell, run Azure PowerShell commands to create and delete the new virtual machines in a staging resource group.
C.
From Azure Cloud Shell, run Azure PowerShell commands to create and delete the new virtual machines in a staging resource group.
Answers
D.
In Azure DevOps, configure new tasks in the release pipeline to create and delete the virtual machines in Azure DevTest Labs.
D.
In Azure DevOps, configure new tasks in the release pipeline to create and delete the virtual machines in Azure DevTest Labs.
Answers
Suggested answer: D

Explanation:

You can use the Azure DevTest Labs Tasks extension that's installed in Azure DevOps to easily integrate your CI/CD build-and-release pipeline with Azure DevTest Labs. The extension installs three tasks:

Create a VM

Create a custom image from a VM

Delete a VM

The process makes it easy to, for example, quickly deploy a "golden image" for a specific test task and then delete it when the test is finished.

Reference:

https://docs.microsoft.com/en-us/azure/lab-services/devtest-lab-integrate-ci-cd-vsts

SIMULATION

You need to ensure that the https://contoso.com/statushook webhook is called every time a repository named az40010480345acr1 receives a new version of an image named dotnetapp.

To complete this task, sign in to the Microsoft Azure portal.

A.
See solution below.
A.
See solution below.
Answers
Suggested answer: A

Explanation:

1. Sign in to the Azure portal.

2. Navigate to the container registry az40010480345acr1.

3. Under Services, select Webhooks.

4. Select the existing webhook https://contoso.com/statushook, and double-click on it to get its properties. 5. For Trigger actions select image push

Example web hook:

Reference:

https://docs.microsoft.com/en-us/azure/container-registry/container-registry-webhook

Your company uses Azure DevOps to manage the build and release processes for applications.

You use a get repository for applications source control.

You plan to create a new branch from an existing pull request. Later, you plan to merge the new branch and the target branch of the pull request. You need to use a pull request action to create the new branch. The solution must ensure that the branch uses only a portion of the code in the pull request. Which pull request action should you use?

A.
Set as default branch
A.
Set as default branch
Answers
B.
Approve with suggestions
B.
Approve with suggestions
Answers
C.
Cherry-pick
C.
Cherry-pick
Answers
D.
Reactivate
D.
Reactivate
Answers
E.
Revert
E.
Revert
Answers
Suggested answer: C

Explanation:

Cherry-pick a pull request

To copy changes made in a pull request to another branch in your repo, follow these steps:

1. In a completed pull request, select Cherry-pick, or for an active pull request, select Cherry-pick from the ... menu. Cherry-picking a pull request in this way creates a new branch with the copied changes. Merge into a target branch in a second pull request.

2. In Target branch, enter the branch you want to merge the copied changes.

3. In Topic branch name, enter a new branch to contain the copied changes, then select Cherry-pick. 4. Select Create pull request to merge the topic branch into the target branch to complete the cherry-pick.

Reference:

https://docs.microsoft.com/en-us/azure/devops/repos/git/pull-requests

You are designing a build pipeline in Azure Pipelines.

The pipeline requires a self-hosted agent. The build pipeline will run once daily and will take 30 minutes to complete.

You need to recommend a compute type for the agent. The solution must minimize costs.

What should you recommend?

A.
an Azure Kubernetes Service (AKS) cluster
A.
an Azure Kubernetes Service (AKS) cluster
Answers
B.
Azure Container Instances
B.
Azure Container Instances
Answers
C.
an Azure virtual machine scale set
C.
an Azure virtual machine scale set
Answers
D.
Azure virtual machines
D.
Azure virtual machines
Answers
Suggested answer: B

Explanation:

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure- devops&tabs=browser#faq

You have a project in Azure DevOps. You have an Azure Resource Group deployment project in Microsoft Visual Studio that is checked in to the Azure DevOps project. You need to create a release pipeline that will deploy resources by using Azure Resource Manager templates. The solution must minimize administrative effort. Which task type should you include in the solution?

A.
Azure Cloud Service Deployment
A.
Azure Cloud Service Deployment
Answers
B.
Azure RM Web App Deployment
B.
Azure RM Web App Deployment
Answers
C.
Azure PowerShell
C.
Azure PowerShell
Answers
D.
Azure App Service Manage
D.
Azure App Service Manage
Answers
Suggested answer: C

Explanation:

There are two different ways to deploy templates to Azure DevOps Services. Both methods provide the same results, so choose the one that best fits your workflow. 1. Add a single step to your build pipeline that runs the PowerShell script that’s included in the Azure Resource Group deployment project (Deploy-AzureResourceGroup.ps1). The script copies artifacts and then deploys the template. 2. Add multiple Azure DevOps Services build steps, each one performing a stage task.

The first option has the advantage of using the same script used by developers in Visual Studio and providing consistency throughout the lifecycle.

Reference:

https://docs.microsoft.com/en-us/azure/vs-azure-tools-resource-groups-ci-in-vsts

You have an Azure DevOps project that contains a release pipeline and a get repository.

When a new code revision is committed to the repository, a build and release is triggered.

You need to ensure that release information for the pipeline is added automatically to the work items associated to the Get commit. What should you do?

A.
Modify the Integrations options for the pipeline.
A.
Modify the Integrations options for the pipeline.
Answers
B.
Modify the post-deployment conditions for the last stage of the pipeline.
B.
Modify the post-deployment conditions for the last stage of the pipeline.
Answers
C.
Add an agentless job to the pipeline.
C.
Add an agentless job to the pipeline.
Answers
D.
Modify the service hooks for the project.
D.
Modify the service hooks for the project.
Answers
Suggested answer: A

Explanation:


Total 482 questions
Go to page: of 49