Agent Registration Information - Regenerate Key
Regenerate a primary or secondary agent registration key
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation/regenerateKey?api-version=2019-06-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
automation
|
path | True |
string |
The name of the automation account. |
resource
|
path | True |
string |
Name of an Azure Resource group. Regex pattern: |
subscription
|
path | True |
string |
Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api Version. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
keyName | True |
Gets or sets the agent registration key name - primary or secondary. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK Media Types: "application/json", "text/plain" |
|
Other Status Codes |
Automation error response describing why the operation failed. Media Types: "application/json", "text/plain" |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Regenerate registration key
Sample Request
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/agentRegistrationInformation/regenerateKey?api-version=2019-06-01
{
"keyName": "primary"
}
Sample Response
{
"id": null,
"keys": {
"primary": "5ci0000000000000000000000000000000000000000000000000000000000000000000000000000Y5H/8wFg==",
"secondary": "rVp0000000000000000000000000000000000000000000000000000000000000000000000000000f8cbmrOA=="
},
"endpoint": "https://eus2-agentservice-prod-1.azure-automation.net/accounts/bd8fac9e-0000-0000-0000-0000f474fbf6",
"dscMetaConfiguration": null
}
Definitions
Name | Description |
---|---|
Agent |
Definition of the agent registration information type. |
Agent |
Gets or sets the agent registration key name - primary or secondary. |
Agent |
Definition of the agent registration keys. |
Agent |
The parameters supplied to the regenerate keys operation. |
Error |
Error response of an operation failure |
AgentRegistration
Definition of the agent registration information type.
Name | Type | Description |
---|---|---|
dscMetaConfiguration |
string |
Gets or sets the dsc meta configuration. |
endpoint |
string |
Gets or sets the dsc server endpoint. |
id |
string |
Gets or sets the id. |
keys |
Gets or sets the agent registration keys. |
AgentRegistrationKeyName
Gets or sets the agent registration key name - primary or secondary.
Name | Type | Description |
---|---|---|
primary |
string |
|
secondary |
string |
AgentRegistrationKeys
Definition of the agent registration keys.
Name | Type | Description |
---|---|---|
primary |
string |
Gets or sets the primary key. |
secondary |
string |
Gets or sets the secondary key. |
AgentRegistrationRegenerateKeyParameter
The parameters supplied to the regenerate keys operation.
Name | Type | Description |
---|---|---|
keyName |
Gets or sets the agent registration key name - primary or secondary. |
ErrorResponse
Error response of an operation failure
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |