你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Api Portals - Get
获取 API 门户及其属性。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}?api-version=2023-12-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
api
|
path | True |
string |
API 门户的名称。 |
resource
|
path | True |
string |
包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。 |
service
|
path | True |
string |
服务资源的名称。 Regex pattern: |
subscription
|
path | True |
string |
获取唯一标识 Microsoft Azure 订阅的订阅 ID。 此订阅 ID 是每个服务调用的 URI 的一部分。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功。 响应描述相应的 API 门户。 |
|
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 | 模拟用户帐户 |
示例
ApiPortals_Get
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apiPortals/default?api-version=2023-12-01
Sample Response
{
"properties": {
"provisioningState": "Succeeded",
"public": true,
"url": "test-url",
"gatewayIds": [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default"
],
"resourceRequests": {
"cpu": "1",
"memory": "1G"
},
"instances": [
{
"name": "instance1",
"status": "Running"
},
{
"name": "instance2",
"status": "Running"
}
],
"apiTryOutEnabledState": "Enabled"
},
"sku": {
"name": "E0",
"tier": "Enterprise",
"capacity": 2
},
"systemData": {
"createdBy": "sample-user",
"createdByType": "User",
"createdAt": "2021-08-11T03:16:03.944Z",
"lastModifiedBy": "sample-user",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-11T03:17:03.944Z"
},
"type": "Microsoft.AppPlatform/Spring/apiPortals",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apiPortals/default",
"name": "default"
}
定义
名称 | 说明 |
---|---|
Api |
指示是启用还是禁用 API 试用功能。 启用后,用户可以通过发送请求并在 API 门户中查看响应来试用 API。 禁用后,用户无法试用 API。 |
Api |
属于 API 门户的实例集合 |
Api |
API 门户属性有效负载 |
Api |
API 门户的状态。 |
Api |
API 门户资源 |
Api |
API 门户的资源请求 |
Cloud |
来自服务的错误响应。 |
Cloud |
来自服务的错误响应。 |
created |
创建资源的标识类型。 |
last |
上次修改资源的标识类型。 |
Sku |
Azure Spring Apps 的 SKU |
Sso |
单一登录相关配置 |
System |
与资源的创建和上次修改相关的元数据。 |
ApiPortalApiTryOutEnabledState
指示是启用还是禁用 API 试用功能。 启用后,用户可以通过发送请求并在 API 门户中查看响应来试用 API。 禁用后,用户无法试用 API。
名称 | 类型 | 说明 |
---|---|---|
Disabled |
string |
|
Enabled |
string |
ApiPortalInstance
属于 API 门户的实例集合
名称 | 类型 | 说明 |
---|---|---|
name |
string |
API 门户实例的名称 |
status |
string |
API 门户实例的状态 |
ApiPortalProperties
API 门户属性有效负载
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
apiTryOutEnabledState | Enabled |
指示是启用还是禁用 API 试用功能。 启用后,用户可以通过发送请求并在 API 门户中查看响应来试用 API。 禁用后,用户无法试用 API。 |
|
gatewayIds |
string[] |
要与 API 门户集成的网关的资源 ID 数组。 |
|
httpsOnly |
boolean |
False |
指示是否只允许 https。 |
instances |
实例集合属于 API 门户。 |
||
provisioningState |
API 门户的状态。 |
||
public |
boolean |
False |
指示 API 门户是否公开终结点。 |
resourceRequests |
所需 CPU 和内存的请求资源数量。 |
||
sourceUrls |
string[] |
OpenAPI 源 URL 位置的集合。 |
|
ssoProperties |
单一登录相关配置 |
||
url |
string |
API 门户的 URL,在“public”为 true 时公开。 |
ApiPortalProvisioningState
API 门户的状态。
名称 | 类型 | 说明 |
---|---|---|
Creating |
string |
|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Updating |
string |
ApiPortalResource
API 门户资源
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源的完全限定资源 ID。 |
name |
string |
资源的名称。 |
properties |
API 门户属性有效负载 |
|
sku |
API 门户资源的 SKU |
|
systemData |
与资源的创建和上次修改相关的元数据。 |
|
type |
string |
资源类型。 |
ApiPortalResourceRequests
API 门户的资源请求
名称 | 类型 | 说明 |
---|---|---|
cpu |
string |
分配给每个 API 门户实例的 CPU |
memory |
string |
分配给每个 API 门户实例的内存 |
CloudError
来自服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
来自服务的错误响应。 |
CloudErrorBody
来自服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
details |
有关错误的其他详细信息的列表。 |
|
message |
string |
描述错误的消息,该消息适用于在用户界面中显示。 |
target |
string |
特定错误的目标。 例如,属性的名称出错。 |
createdByType
创建资源的标识类型。
名称 | 类型 | 说明 |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
lastModifiedByType
上次修改资源的标识类型。
名称 | 类型 | 说明 |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
Sku
Azure Spring Apps 的 SKU
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
capacity |
integer |
目标资源的当前容量 |
|
name |
string |
S0 |
SKU 的名称 |
tier |
string |
Standard |
SKU 的层 |
SsoProperties
单一登录相关配置
名称 | 类型 | 说明 |
---|---|---|
clientId |
string |
应用程序的公共标识符 |
clientSecret |
string |
只有应用程序和授权服务器知道的机密 |
issuerUri |
string |
颁发者标识符的 URI |
scope |
string[] |
它定义允许应用程序代表用户执行的特定操作 |
SystemData
与资源的创建和上次修改相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string |
资源创建时间戳 (UTC) 。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识类型。 |
|
lastModifiedAt |
string |
资源修改的时间戳 (UTC) 。 |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识类型。 |