你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Services - List Test Keys
列出服务的测试密钥。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys?api-version=2023-12-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
resource
|
path | True |
string |
包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。 |
service
|
path | True |
string pattern: ^[a-z][a-z0-9-]*[a-z0-9]$ |
服务资源的名称。 |
subscription
|
path | True |
string |
获取唯一标识 Microsoft Azure 订阅的订阅 ID。 此订阅 ID 是每个服务调用的 URI 的一部分。 |
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功。 响应描述测试密钥。 |
|
Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Services_ListTestKeys
示例请求
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/listTestKeys?api-version=2023-12-01
示例响应
{
"primaryKey": "<primaryKey>",
"secondaryKey": "<secondaryKey>",
"primaryTestEndpoint": "<primaryTestEndpoint>",
"secondaryTestEndpoint": "<secondaryTestEndpoint>",
"enabled": true
}
定义
名称 | 说明 |
---|---|
Cloud |
来自服务的错误响应。 |
Cloud |
来自服务的错误响应。 |
Test |
测试密钥有效负载 |
CloudError
来自服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
来自服务的错误响应。 |
CloudErrorBody
来自服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
details |
有关错误的其他详细信息的列表。 |
|
message |
string |
描述错误的消息,该消息适用于在用户界面中显示。 |
target |
string |
特定错误的目标。 例如,属性的名称出错。 |
TestKeys
测试密钥有效负载
名称 | 类型 | 说明 |
---|---|---|
enabled |
boolean |
指示是否启用测试终结点功能 |
primaryKey |
string |
主密钥 |
primaryTestEndpoint |
string |
主测试终结点 |
secondaryKey |
string |
辅助密钥 |
secondaryTestEndpoint |
string |
辅助测试终结点 |