Discover the outcome of regenerating Azure Cognitive Services keys with HTTP requests. A must-know topic for passing the Microsoft AI-102 certification exam.
Table of Contents
Question
Your organization, Xerigon Inc., utilizes Azure Cognitive Services to enhance its customer experience through various AI-driven features. One of your team members accidentally shared one of the keys to your Azure Cognitive Services account.
You execute the following HTTP request for your Azure Cognitive Services account:
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey?api-version=2023-05-01
Body{“keyName”: “Key2”}
What is the outcome of this HTTP request?
A. Delete the account keys.
B. Update the account keys.
C. Regenerate the keys.
D. List the account keys.
Answer
C. Regenerate the keys.
Explanation
To maintain security, you must regenerate the Azure Cognitive Services account keys. The executed HTTP request in the scenario will regenerate the keys for the Azure Cognitive Services account. Regenerating the keys involves generating a new access keys for the Azure Cognitive Services account. This action ensures that the old keys, which may have been compromised, are no longer valid. You can also regenerate keys using the Azure portal as follows:
- Log in to the Azure portal, and navigate to your resource’s Keys and Endpoint pane.
- Select Regenerate Key1 or Regenerate Key2, whichever key you would like to regenerate.
Listing the account keys is not the outcome of the HTTP request. Listing the account keys refers to retrieving and displaying the current access keys associated with the Azure Cognitive Services account. You would use the request below to list the account keys for the Azure Cognitive Services account:
POST https://management.azure.com/5 subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys?api-version=2023-05-01
Deleting the account keys is not the outcome of the HTTP request in the given scenario. Deleting an account key would involve removing an existing key from the Azure Cognitive Services account. There is no standard API operation for deleting a specific key directly in this context.
Updating the account keys is not the outcome of the HTTP request in the given scenario. Updating an account key might suggest changing the properties or values of an existing key without necessarily regenerating it. You cannot update the account keys directly using an HTTP request operation. You can update an Azure Cognitive Services account key by using the following HTTP operation:
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}?api-version=2023-05-01
Microsoft Azure AI Engineer Associate AI-102 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure AI Engineer Associate AI-102 exam and earn Microsoft Azure AI Engineer Associate AI-102 certification.