你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Gateway - List Debug Credentials
为网关创建新的调试凭据。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listDebugCredentials?api-version=2023-05-01-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
gateway
|
path | True |
string |
网关实体标识符。 在当前API 管理服务实例中必须是唯一的。 不得具有值“managed” |
resource
|
path | True |
string |
资源组的名称。 此名称不区分大小写。 |
service
|
path | True |
string |
API 管理服务的名称。 Regex pattern: |
subscription
|
path | True |
string uuid |
目标订阅的 ID。 该值必须是 UUID。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
apiId | True |
string |
API 的完整资源 ID。 |
purposes | True |
调试凭据的用途。 |
|
credentialsExpireAfter |
string |
ISO8601格式的凭据过期。 凭据的最大持续时间为 PT1H。 如果未指定属性,则使用值 PT1H。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
响应正文包含要用于网关的调试凭据。 |
|
Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流。
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
ApiManagementGatewayListDebugCredentials
Sample Request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/listDebugCredentials?api-version=2023-05-01-preview
{
"credentialsExpireAfter": "PT1H",
"apiId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1",
"purposes": [
"tracing"
]
}
Sample Response
{
"token": "p=tracing&aid=a1&ex=20230504000000&sn=ZdfxSJoCsOJE0/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/8LchGl7gu/Q=="
}
定义
名称 | 说明 |
---|---|
Error |
错误字段协定。 |
Error |
错误响应。 |
Gateway |
网关调试凭据。 |
Gateway |
列出调试凭据属性。 |
Gateway |
调试凭据的用途。 |
ErrorFieldContract
错误字段协定。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
属性级错误代码。 |
message |
string |
属性级错误的可读表示形式。 |
target |
string |
属性名称。 |
ErrorResponse
错误响应。
名称 | 类型 | 说明 |
---|---|---|
error.code |
string |
服务定义的错误代码。 此代码用作响应中指定的 HTTP 错误代码的子状态。 |
error.details |
在发生验证错误时,请求中发送的无效字段列表。 |
|
error.message |
string |
错误的用户可读表示形式。 |
GatewayDebugCredentialsContract
网关调试凭据。
名称 | 类型 | 说明 |
---|---|---|
token |
string |
网关调试令牌。 |
GatewayListDebugCredentialsContract
列出调试凭据属性。
名称 | 类型 | 说明 |
---|---|---|
apiId |
string |
API 的完整资源 ID。 |
credentialsExpireAfter |
string |
ISO8601格式的凭据过期。 凭据的最大持续时间为 PT1H。 如果未指定属性,则使用值 PT1H。 |
purposes |
调试凭据的用途。 |
GatewayListDebugCredentialsContractPurpose
调试凭据的用途。
名称 | 类型 | 说明 |
---|---|---|
tracing |
string |
跟踪目的。 |