Authorization - Get
获取由其标识符指定的授权的详细信息。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}?api-version=2024-05-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
authorization
|
path | True |
string minLength: 1maxLength: 256 pattern: ^[^*#&+:<>?]+$ |
授权的标识符。 |
|
authorization
|
path | True |
string minLength: 1maxLength: 256 pattern: ^[^*#&+:<>?]+$ |
授权提供程序的标识符。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
|
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
API 管理服务的名称。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
响应正文包含指定的授权实体。 未包含机密 标头 ETag: string |
|
| Other Status Codes |
描述作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
ApiManagementGetAuthorization
示例请求
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1?api-version=2024-05-01
示例响应
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1",
"type": "Microsoft.ApiManagement/service/authorizationProviders/authorizations",
"name": "authz1",
"properties": {
"authorizationType": "OAuth2",
"oauth2grantType": "AuthorizationCode",
"status": "Connected"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Authorization |
授权协定。 |
|
Authorization |
授权错误详细信息。 |
|
Authorization |
授权类型选项 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
OAuth2Grant |
OAuth2 授予类型选项 |
AuthorizationContract
授权协定。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
资源的名称 |
| properties.authorizationType |
授权类型选项 |
|
| properties.error | ||
| properties.oauth2grantType |
OAuth2 授予类型选项 |
|
| properties.parameters |
object |
授权参数 |
| properties.status |
string |
授权状态 |
| type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
AuthorizationError
授权错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误代码 |
| message |
string |
错误信息 |
AuthorizationType
授权类型选项
| 值 | 说明 |
|---|---|
| OAuth2 |
OAuth2 授权类型 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
OAuth2GrantType
OAuth2 授予类型选项
| 值 | 说明 |
|---|---|
| AuthorizationCode |
授权代码授予 |
| ClientCredentials |
客户端凭据授予 |