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

WCF Relays - List Keys

WCF 中继的主连接字符串和辅助连接字符串。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/listKeys?api-version=2021-11-01

URI 参数

名称 必需 类型 说明
authorizationRuleName
path True

string

授权规则名称。

namespaceName
path True

string

命名空间名称

relayName
path True

string

中继名称。

resourceGroupName
path True

string

Azure 订阅中资源组的名称。

subscriptionId
path True

string

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

api-version
query True

string

客户端 API 版本。

响应

名称 类型 说明
200 OK

AccessKeys

成功。

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 模拟用户帐户

示例

RelayAuthorizationRuleListKey.json

Sample Request

POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/wcfRelays/example-Relay-wcf-01/authorizationRules/example-RelayAuthRules-01/listKeys?api-version=2021-11-01

Sample Response

{
  "primaryConnectionString": "Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################",
  "secondaryConnectionString": "Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################",
  "primaryKey": "############################################",
  "secondaryKey": "############################################",
  "keyName": "example-RelayAuthRules-01"
}

定义

名称 说明
AccessKeys

命名空间/中继连接字符串

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

AccessKeys

命名空间/中继连接字符串

名称 类型 说明
keyName

string

描述授权规则的字符串。

primaryConnectionString

string

创建命名空间授权规则的主连接字符串。

primaryKey

string

用于签名和验证 SAS 令牌的 Base64 编码的 256 位主密钥。

secondaryConnectionString

string

创建的命名空间授权规则的辅助连接字符串。

secondaryKey

string

用于签名和验证 SAS 令牌的 Base64 编码的 256 位备用密钥。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。