Identify Azure AI Services Account via Azure CLI

Answer Correct answer: C — Run az cognitiveservices account show to retrieve details of the created Azure AI services account.

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?

  1. az resource link
  2. az cognitiveservices account network-rule
  3. az cognitiveservices account show Correct Answer
  4. az account list

Community Votes

C
100%

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)

syupwsh 👍 1 Selected: C
az 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 Selected: C
Pretty simple
a8da4af 👍 2 Selected: C
Correct, 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.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

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.

Related Analysis

← Back to AI-102 Study Guide