你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Backend - List By Service

列出指定服务实例中的后端集合。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends?api-version=2022-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends?$filter={$filter}&$top={$top}&$skip={$skip}&api-version=2022-08-01

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

资源组的名称。 此名称不区分大小写。

serviceName
path True

string

API 管理服务的名称。

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

目标订阅的 ID。

api-version
query True

string

要用于此操作的 API 版本。

$filter
query

string

|字段 |用法 |支持的运算符 |支持的函数 |
|-------------|-------------|-------------|-------------|
|name |filter |ge、le、eq、ne、gt、lt |substringof、contains、startswith、endswith |
|title |filter |ge、le、eq、ne、gt、lt |substringof、contains、startswith、endswith |
|url |filter |ge、le、eq、ne、gt、lt |substringof、contains、startswith、endswith |

$skip
query

integer

int32

要跳过的记录数。

$top
query

integer

int32

要返回的记录数。

响应

名称 类型 说明
200 OK

BackendCollection

列出后端实体的集合。

Other Status Codes

ErrorResponse

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

ApiManagementListBackends

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends?api-version=2022-08-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend",
      "type": "Microsoft.ApiManagement/service/backends",
      "name": "proxybackend",
      "properties": {
        "description": "description5308",
        "url": "https://backendname2644/",
        "protocol": "http",
        "credentials": {
          "query": {
            "sv": [
              "xx",
              "bb",
              "cc"
            ]
          },
          "header": {
            "x-my-1": [
              "val1",
              "val2"
            ]
          },
          "authorization": {
            "scheme": "Basic",
            "parameter": "opensesma"
          }
        },
        "proxy": {
          "url": "http://192.168.1.1:8080",
          "username": "Contoso\\admin",
          "password": "<password>"
        },
        "tls": {
          "validateCertificateChain": false,
          "validateCertificateName": false
        }
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend",
      "type": "Microsoft.ApiManagement/service/backends",
      "name": "sfbackend",
      "properties": {
        "description": "Service Fabric Test App 1",
        "url": "fabric:/mytestapp/mytestservice",
        "protocol": "http",
        "properties": {
          "serviceFabricCluster": {
            "managementEndpoints": [
              "https://somecluster.com"
            ],
            "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1",
            "serverX509Names": [
              {
                "name": "ServerCommonName1",
                "issuerCertificateThumbprint": "IssuerCertificateThumbprint1"
              }
            ],
            "maxPartitionResolutionRetries": 5
          }
        }
      }
    }
  ],
  "count": 2,
  "nextLink": ""
}

定义

名称 说明
BackendAuthorizationHeaderCredentials

授权标头信息。

BackendCollection

分页后端列表表示形式。

BackendContract

后端详细信息。

BackendCredentialsContract

用于连接到后端的凭据的详细信息。

BackendProperties

特定于后端类型的属性。

BackendProtocol

后端通信协议。

BackendProxyContract

要用于请求后端的后端 WebProxy 服务器的详细信息。

BackendServiceFabricClusterProperties

Service Fabric 类型后端的属性。

BackendTlsProperties

控制 TLS 证书验证的属性。

ErrorFieldContract

错误字段协定。

ErrorResponse

错误响应。

X509CertificateName

服务器 X509Names 的属性。

BackendAuthorizationHeaderCredentials

授权标头信息。

名称 类型 说明
parameter

string

身份验证参数值。

scheme

string

身份验证方案名称。

BackendCollection

分页后端列表表示形式。

名称 类型 说明
count

integer

所有页面的总记录计数数。

nextLink

string

下一页链接(如果有)。

value

BackendContract[]

后端值。

BackendContract

后端详细信息。

名称 类型 说明
id

string

资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

资源的名称

properties.credentials

BackendCredentialsContract

后端凭据协定属性

properties.description

string

后端说明。

properties.properties

BackendProperties

后端属性协定

properties.protocol

BackendProtocol

后端通信协议。

properties.proxy

BackendProxyContract

后端网关协定属性

properties.resourceId

string

外部系统中资源的管理 URI。 此 URL 可以是逻辑应用、函数应用或 API 应用的 Arm 资源 ID。

properties.title

string

后端标题。

properties.tls

BackendTlsProperties

后端 TLS 属性

properties.url

string

后端的运行时 URL。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

BackendCredentialsContract

用于连接到后端的凭据的详细信息。

名称 类型 说明
authorization

BackendAuthorizationHeaderCredentials

授权标头身份验证

certificate

string[]

客户端证书指纹列表。 如果提供了 certificatesIds,将忽略 。

certificateIds

string[]

客户端证书 ID 列表。

header

object

标头 参数说明。

query

object

查询参数说明。

BackendProperties

特定于后端类型的属性。

名称 类型 说明
serviceFabricCluster

BackendServiceFabricClusterProperties

后端 Service Fabric 群集属性

BackendProtocol

后端通信协议。

名称 类型 说明
http

string

后端是 RESTful 服务。

soap

string

后端是 SOAP 服务。

BackendProxyContract

要用于请求后端的后端 WebProxy 服务器的详细信息。

名称 类型 说明
password

string

用于连接到 WebProxy 服务器的密码

url

string

WebProxy 服务器 AbsoluteUri 属性,其中包括存储在 Uri 实例中的整个 URI,包括所有片段和查询字符串。

username

string

用于连接到 WebProxy 服务器的用户名

BackendServiceFabricClusterProperties

Service Fabric 类型后端的属性。

名称 类型 说明
clientCertificateId

string

管理终结点的客户端证书 ID。

clientCertificatethumbprint

string

管理终结点的客户端证书指纹。 如果提供了 certificatesIds,将忽略

managementEndpoints

string[]

群集管理终结点。

maxPartitionResolutionRetries

integer

尝试解析分区时的最大重试次数。

serverCertificateThumbprints

string[]

群集管理服务用于 tls 通信的证书指纹

serverX509Names

X509CertificateName[]

服务器 X509 证书名称集合

BackendTlsProperties

控制 TLS 证书验证的属性。

名称 类型 默认值 说明
validateCertificateChain

boolean

True

指示对此后端主机使用自签名证书时是否应执行 SSL 证书链验证的标志。

validateCertificateName

boolean

True

指示对此后端主机使用自签名证书时是否应执行 SSL 证书名称验证的标志。

ErrorFieldContract

错误字段协定。

名称 类型 说明
code

string

属性级错误代码。

message

string

属性级错误的可读表示形式。

target

string

属性名称。

ErrorResponse

错误响应。

名称 类型 说明
error.code

string

服务定义的错误代码。 此代码用作响应中指定的 HTTP 错误代码的子状态。

error.details

ErrorFieldContract[]

在发生验证错误时,请求中发送的无效字段列表。

error.message

string

错误的用户可读表示形式。

X509CertificateName

服务器 X509Names 的属性。

名称 类型 说明
issuerCertificateThumbprint

string

证书颁发者的指纹。

name

string

证书的公用名。