Topics - Regenerate Key
Regenerate key for a topic.
Regenerate a shared access key for a topic.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey?api-version=2025-02-15
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string |
The name of the resource group within the user's subscription. |
|
subscription
|
path | True |
string |
Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
|
topic
|
path | True |
string |
Name of the topic. |
|
api-version
|
query | True |
string |
Version of the API to be used with the client request. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| keyName | True |
string |
Key name to regenerate key1 or key2 |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| 202 Accepted |
Accepted Headers Location: string |
|
| Other Status Codes |
*** Error Responses: ***
|
Examples
Topics_RegenerateKey
Sample request
POST https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/regenerateKey?api-version=2025-02-15
{
"keyName": "key1"
}
Sample response
{
"key1": "<key1>",
"key2": "<key2>"
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.EventGrid/locations/eastus/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2025-02-15
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.EventGrid/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000/Spring/default?api-version=2025-02-15
Definitions
| Name | Description |
|---|---|
|
Topic |
Topic regenerate share access key request |
|
Topic |
Shared access keys of the Topic |
TopicRegenerateKeyRequest
Topic regenerate share access key request
| Name | Type | Description |
|---|---|---|
| keyName |
string |
Key name to regenerate key1 or key2 |
TopicSharedAccessKeys
Shared access keys of the Topic
| Name | Type | Description |
|---|---|---|
| key1 |
string |
Shared access key1 for the topic. |
| key2 |
string |
Shared access key2 for the topic. |