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=2024-01-01

URI 参数

名称 必需 类型 说明
authorizationRuleName
path True

string

minLength: 1

授权规则名称。

namespaceName
path True

string

minLength: 6
maxLength: 50

命名空间名称

relayName
path True

string

minLength: 1

中继名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Azure 订阅中的资源组的名称。

subscriptionId
path True

string

唯一标识 azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

响应

名称 类型 说明
200 OK

AccessKeys

成功的。

Other Status Codes

ErrorResponse

中继错误响应,描述作失败的原因。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

RelayAuthorizationRuleListKey.json

示例请求

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=2024-01-01

示例响应

{
  "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

错误对象。