你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Keys - List By Automation Account

检索帐户的自动化密钥。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/listKeys?api-version=2023-11-01

URI 参数

名称 必需 类型 说明
automationAccountName
path True

string

自动化帐户的名称。

resourceGroupName
path True

string

Azure 资源组的名称。

Regex pattern: ^[-\w\._]+$

subscriptionId
path True

string

获取唯一标识 Microsoft Azure 订阅的订阅凭据。 此订阅 ID 是每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

响应

名称 类型 说明
200 OK

KeyListResult

确定

Other Status Codes

ErrorResponse

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Get lists of an automation account

Sample Request

POST https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyAutomationAccount/listKeys?api-version=2023-11-01

Sample Response

{
  "keys": [
    {
      "KeyName": "Primary",
      "Permissions": "Full",
      "Value": "**************************************************************"
    },
    {
      "KeyName": "Secondary",
      "Permissions": "Full",
      "Value": "**************************************************************"
    }
  ]
}

定义

名称 说明
AutomationKeyName

自动化密钥名称。

AutomationKeyPermissions

自动化密钥权限。

ErrorResponse

操作失败的错误响应

Key

用于注册 DSC 节点的自动化密钥

KeyListResult

AutomationKeyName

自动化密钥名称。

名称 类型 说明
Primary

string

Secondary

string

AutomationKeyPermissions

自动化密钥权限。

名称 类型 说明
Full

string

Read

string

ErrorResponse

操作失败的错误响应

名称 类型 说明
code

string

错误代码

message

string

指示操作失败原因的错误消息。

Key

用于注册 DSC 节点的自动化密钥

名称 类型 说明
KeyName

AutomationKeyName

自动化密钥名称。

Permissions

AutomationKeyPermissions

自动化密钥权限。

Value

string

用于注册的自动化密钥的值。

KeyListResult

名称 类型 说明
keys

Key[]

列出自动化密钥。