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=2024-10-23

URI Parameters

Name In Required Type Description
automationAccountName
path True

string

The name of the automation account.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
keyName True

AgentRegistrationKeyName

Gets or sets the agent registration key name - primary or secondary.

Responses

Name Type Description
200 OK

AgentRegistration

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected error response.

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/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/agentRegistrationInformation/regenerateKey?api-version=2024-10-23

{
  "keyName": "primary"
}

Sample response

{
  "dscMetaConfiguration": null,
  "endpoint": "https://eus2-agentservice-prod-1.azure-automation.net/accounts/bd8fac9e-0000-0000-0000-0000f474fbf6",
  "id": null,
  "keys": {
    "primary": "5ci0000000000000000000000000000000000000000000000000000000000000000000000000000Y5H/8wFg==",
    "secondary": "rVp0000000000000000000000000000000000000000000000000000000000000000000000000000f8cbmrOA=="
  }
}

Definitions

Name Description
AgentRegistration

Definition of the agent registration information type.

AgentRegistrationKeyName

Gets or sets the agent registration key name - primary or secondary.

AgentRegistrationKeys

Definition of the agent registration keys.

AgentRegistrationRegenerateKeyParameter

The parameters supplied to the regenerate keys operation.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

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

AgentRegistrationKeys

Gets or sets the agent registration keys.

AgentRegistrationKeyName

Gets or sets the agent registration key name - primary or secondary.

Value Description
primary

primary

secondary

secondary

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

AgentRegistrationKeyName

Gets or sets the agent registration key name - primary or secondary.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.