Identify Azure AI Services Account via Azure CLI
Short answer
C Run az cognitiveservices account show to retrieve details of the created Azure AI services account.
Question
Key Takeaways
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.
Common mistake: Learners might choose az account list, which lists subscriptions rather than specific resource instances, leading to confusion about resource identification.
Expert Analysis
Why the Answer Is Correct
The correct command is az 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 that az 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
This link opens the official vendor documentation in a new tab.
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?
Is az cognitiveservices still valid?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
a8da4af 👍 2 Answered CCorrect, answer is C, here the chatGPT explanation -> The correct answer is C. az cognitiveservices account show. Explanation: The az cognitiveservices account show command retrieves details about a specified Azure Cognitive Services account, including its properties and settings. By using this command in the Azure DevOps pipeline, you can identify and confirm the details of the Azure AI services account that was created in a previous step.
-
syupwsh 👍 1 Answered Caz cognitiveservices account show is CORRECT because it retrieves detailed information about an Azure Cognitive Services account, including its name, resource group, and configuration. This command identifies the created Azure AI services account in the pipeline efficiently, minimizing development effort by providing a direct solution to fetch the required details. C is correct
-
9cc71b6 👍 1 Answered CPretty simple
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.