Media Service - Regenerate Key
Regenerates a primary or secondary key for a Media Service.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/regenerateKey?api-version={api-version}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
subscriptionId
|
path | True |
|
The unique identifier for a Microsoft Azure subscription. |
|
resourceGroupName
|
path | True |
|
Name of the resource group within the Azure subscription. |
|
mediaServiceName
|
path | True |
|
Name of the Media Service. Regex pattern: |
|
api-version
|
query | True |
|
Version of the API to be used with the client request. The current version is 2015-10-01. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| keyType | True |
|
The keyType indicating which key you want to regenerate, Primary or Secondary. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success. The Media Services key specified in the input was regenerated. |
|
| Other Status Codes |
Regenerate Media Service key failed. |
Examples
MediaServiceRegenerateKey
Sample Request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoresources/providers/Microsoft.Media/mediaservices/contosmedia/regenerateKey?api-version=2015-10-01
{
"keyType": "Primary"
}
Sample Response
{
"key": ""
}
Definitions
| ApiError | |
| RegenerateKeyOutput |
| Name | Type | Description |
|---|---|---|
| code |
|
Error code. |
| message |
|
Error message. |
| Name | Type | Description |
|---|---|---|
| key |
|
The new value of either the primary or secondary key. |