Identify Azure AI Services Account via Azure CLI
You have an Azure DevOps pipeline named Pipeline1 that is used to deploy an app. Pipeline1 includes a step that will create an Azure AI services account. You need to add a step to Pipeline1 that will identify the created Azure AI services account. The solution must minimize development effort. Which Azure Command-Line Interface (CLI) command should you run?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The question asks to identify an existing resource with minimal code, which points to a 'show' or 'get' command rather than configuration or listing unrelated accounts.
This question tests the use of Azure CLI commands for managing Azure AI services within a DevOps pipeline. The correct approach minimizes effort by using a command that retrieves account details directly.
Learners might choose az account list, which lists subscriptions rather than specific resource instances, leading to confusion about resource identification.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The correct command isaz cognitiveservices account show. This command is specifically designed to retrieve detailed information about a specified Azure Cognitive Services (now Azure AI Services) account. In a deployment pipeline, after creating the resource, you often need to verify its existence or extract properties (like endpoint or key) for subsequent steps. Using show provides this information directly and efficiently, satisfying the requirement to minimize development effort.Why the Other Options Are Wrong
Option A (az resource link) is not a standard Azure CLI command for identifying resources; it may refer to linking resources in other contexts but is irrelevant here. Option B (az cognitiveservices account network-rule) is used for configuring network access rules, not for identifying or retrieving general account details. Option D (az account list) displays the Azure subscriptions associated with the current login context, not specific resource instances like an AI service account.Community Comment Notes
Community consensus strongly supports option C. Users note thataz cognitiveservices account show is the direct method to fetch account details such as name and resource group. Comments highlight that this is a straightforward retrieval operation suitable for pipeline verification steps. Official Reference
Exam Strategy
When asked to 'identify' or 'retrieve' details of a specific Azure resource in a script or pipeline, look for the corresponding 'show' or 'get' verb in the CLI command syntax. Avoid broad listing commands unless the question explicitly asks for all resources of a type.
Frequently Asked Questions
Why not use az account list?
az account list returns subscription information, not specific resource instance details like an AI service account.
Is az cognitiveservices still valid?
Yes, while Microsoft rebranded to Azure AI Services, the CLI group remains cognitiveservices in many versions.