Question 77 — Domain 2-Describe Azure architecture and services | AZ-900 Practice Exam | 399 Questions
For each Azure CLI Command listed below the table, drag it to the appropriate boxes in the Correct Match column to match it against its Purpose in the Option column.
| Option | Correct Match |
|---|---|
| Lists all VMs currently running in a resource group | [Gap 1] |
| Retrieves the public IP address of a specific VM | [Gap 2] |
| Displays all network security groups linked to a VM | [Gap 3] |
| Allows inbound HTTP traffic by creating a new NSG rule | [Gap 4] |
| Lists network security group rules associated with a VM | [Gap 5] |
| Verifies if any VMs exist by returning a list of VMs | [Gap 6] |
| Creates a new rule that grants access on port 80 | [Gap 7] |
| Gets the IP address used for remote SSH access | [Gap 8] |
- az vm list
- az vm list-ip-addresses
- az network nsg rule create
- az network nsg list
Correct answers
- Gap 1: az vm list
- Gap 2: az vm list-ip-addresses
- Gap 3: az network nsg list
- Gap 4: az network nsg rule create
- Gap 5: az network nsg list
- Gap 6: az vm list
- Gap 7: az network nsg rule create
- Gap 8: az vm list-ip-addresses
Explanations
Lists all VMs currently running in a resource group: Matches az vm list which retrieves all VMs.
Retrieves the public IP address of a specific VM: Matches az vm list-ip-addresses to obtain the IP.
Displays all network security groups linked to a VM: Matches az network nsg list which lists NSGs.
Allows inbound HTTP traffic by creating a new NSG rule: Matches az network nsg rule create for setting up port 80 access.
Lists network security group rules associated with a VM: Matches az network nsg list as it provides details on associated NSGs.
Verifies if any VMs exist by returning a list of VMs: Matches az vm list which confirms VM existence.
Creates a new rule that grants access on port 80: Matches az network nsg rule create for HTTP access.
Gets the IP address used for remote SSH access: Matches az vm list-ip-addresses which displays the public IP.