exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 1 question 10 discussion

Actual exam question from Microsoft's AI-102
Question #: 10
Topic #: 1
[All AI-102 Questions]

You successfully run the following HTTP request.
POST https://management.azure.com/subscriptions/18c51a87-3a69-47a8-aedc-a54745f708a1/resourceGroups/RG1/providers/
Microsoft.CognitiveServices/accounts/contoso1/regenerateKey?api-version=2017-04-18
Body{"keyName": "Key2"}
What is the result of the request?

  • A. A key for Azure Cognitive Services was generated in Azure Key Vault.
  • B. A new query key was generated.
  • C. The primary subscription key and the secondary subscription key were rotated.
  • D. The secondary subscription key was reset.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
LKLK10
Highly Voted 3 years, 6 months ago
I’d’ve thought it’s D?
upvoted 45 times
ziizai
3 years, 3 months ago
B is wrong. Query key is for search service. The Rest request of create query key is like POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}?api-version=2021-04-01-preview See in https://docs.microsoft.com/en-us/rest/api/searchmanagement/2021-04-01-preview/query-keys/create
upvoted 9 times
...
sumanshu
2 years, 11 months ago
What is mean by "Reset" ? I think RESET generally means, not re-generating the new-keys, but resetting to previous version probably ? (just guessing by the term reset). I don;t think D is correct here.
upvoted 4 times
Pyguy
1 year, 12 months ago
There is no option a key to resetting a previous version , like you say. Reset = Regenerate same in API keys..
upvoted 1 times
...
...
ovokpus
3 years ago
Yes,D is the answer
upvoted 5 times
...
...
LPreethi
Highly Voted 3 years, 4 months ago
Answer is correct - Sample response will be, { "key1": "KEY1", "key2": "KEY2" } This shows, Key1 is already there and this JSON request will generate Key2.
upvoted 14 times
ghoppa
2 years, 8 months ago
Key2 has always been there. They are automatically created by default when you create a resource. You cannot delete them or add new ones, you can only regenerate/refresh them (poorly worded here as RESET). Still, correct answer is D in my opinion.
upvoted 5 times
...
...
Christian_garcia_martin
Most Recent 1 month, 3 weeks ago
make sense if endpoint is regenerate , the action retorned "was reset"
upvoted 1 times
...
AzureGeek79
2 months, 2 weeks ago
D is the right answer
upvoted 1 times
...
LanGo
3 months, 3 weeks ago
The answer is D. Solution verified in Azure
upvoted 1 times
...
Sylviaaaaaaa
3 months, 3 weeks ago
D is correct. https://learn.microsoft.com/en-us/rest/api/aiservices/accountmanagement/accounts/regenerate-key?view=rest-aiservices-accountmanagement-2023-05-01&tabs=HTTP
upvoted 1 times
...
nabou
5 months, 2 weeks ago
solution is d, The regenerateKey operation is used to regenerate either the primary or the secondary key for an Azure Cognitive Services account. You specify which key to regenerate by providing the key name in the request body. Possible values for the key name are 'Key1' for the primary key and 'Key2' for the secondary key.
upvoted 2 times
...
IMFaisalShah
5 months, 2 weeks ago
D is the correct option. The Api being shared is to regenerate the both primary and secondary keys based on key1 or key2 in the body. Clearly mentioned below: https://learn.microsoft.com/en-us/rest/api/aiservices/accountmanagement/accounts/regenerate-key?view=rest-aiservices-accountmanagement-2023-05-01&tabs=HTTP
upvoted 1 times
...
takaimomoGcup
6 months, 1 week ago
Selected Answer: D
D is right answer.
upvoted 1 times
...
reiwanotora
6 months, 2 weeks ago
Selected Answer: D
D is right.
upvoted 1 times
...
PeteColag
6 months, 2 weeks ago
Selected Answer: D
D. The secondary subscription key was reset. This response is indicated by the "keyName": "Key2" in the request body, specifying that the secondary subscription key (Key2) should be regenerated.
upvoted 1 times
...
TJ001
6 months, 4 weeks ago
indeed this API call will regenerate the secondary key for the Cognitive Service Account..key1 remains same. could have been clear if it is mentioned as 'account' instead of 'subscription'
upvoted 1 times
...
kiina
7 months, 1 week ago
The HTTP POST request you mentioned is specifically for regenerating the key of an Azure Cognitive Services account, not the Azure subscription itself. Here’s a breakdown to clarify: Azure Cognitive Services Key: This is the key you’re regenerating with the request. Cognitive Services keys are used to authenticate API requests for the various cognitive services provided by Azure, like computer vision, language understanding, and more. Azure Subscription Key: This key is different; it’s associated with your Azure subscription and is used to manage billing and service usage across all services within Azure. So, in summary, the request regenerates the secondary key (Key2) for the specified Cognitive Services account (contoso1), allowing continued access to Cognitive Services APIs with the new key. It does not affect the Azure subscription key. This is important for security practices, ensuring that if a key is compromised, you can regenerate it without interrupting services or access.
upvoted 1 times
...
AzureGC
7 months, 1 week ago
B; This is an "account key" for Cognitive Services REST API. The API call will regenerate key2. The references to "subscription" are a distractor, based on the management.azure.com/subscription/..
upvoted 1 times
...
V3rgil
8 months, 3 weeks ago
Selected Answer: D
MS Learn video suggest its D
upvoted 1 times
...
cp2323
9 months ago
I think answer is B. on the answer D - I think because it says subscription, I dont think its resetting subscription key as this is more to do with the resource key
upvoted 1 times
...
evangelist
9 months, 3 weeks ago
Selected Answer: D
D. The secondary subscription key was reset. The request is to the Azure Management API to regenerate a key for an Azure Cognitive Services account (contoso1). The body of the request specifies {"keyName": "Key2"}, which indicates that the operation is targeted at the secondary subscription key (commonly referred to as Key2 in Azure Cognitive Services management). The regenerateKey action causes the specified key to be reset, generating a new key value for it while invalidating the old one.
upvoted 3 times
Ody
8 months, 2 weeks ago
I think your explanation is the most accurate. With respect to Azure Management API the are found under Subscription. This question would have been easier for me if the answer had referred to it as an "account" key. I think the answer is D.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...