Backend - Update

匯報 現有的後端。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}?api-version=2022-08-01

URI 參數

名稱 位於 必要 類型 Description
backendId
path True

string

後端實體的標識碼。 目前 API 管理 服務實例中必須是唯一的。

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

目標訂用帳戶的標識碼。

api-version
query True

string

用於此作業的 API 版本。

要求標頭

名稱 必要 類型 Description
If-Match True

string

實體的 ETag。 ETag 應該符合 GET 要求標頭回應的目前實體狀態,否則應該為 * 進行無條件更新。

要求本文

名稱 類型 Description
properties.credentials

BackendCredentialsContract

後端認證合約屬性

properties.description

string

後端描述。

properties.properties

BackendProperties

後端屬性合約

properties.protocol

BackendProtocol

後端通訊協定。

properties.proxy

BackendProxyContract

後端閘道合約屬性

properties.resourceId

string

外部系統中資源的管理 URI。 此 URL 可以是 Logic Apps、函式應用程式或 API 應用程式的 Arm 資源識別碼。

properties.title

string

後端標題。

properties.tls

BackendTlsProperties

後端 TLS 屬性

properties.url

string

後端的運行時間 URL。

回應

名稱 類型 Description
200 OK

BackendContract

已成功更新現有的後端。

Headers

ETag: string

Other Status Codes

ErrorResponse

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

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

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

ApiManagementUpdateBackend

Sample Request

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


{
  "properties": {
    "description": "description5308",
    "tls": {
      "validateCertificateChain": false,
      "validateCertificateName": true
    }
  }
}

Sample Response

{
  "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": true
    }
  }
}

定義

名稱 Description
BackendAuthorizationHeaderCredentials

授權標頭資訊。

BackendContract

後端詳細數據。

BackendCredentialsContract

用來連線到後端的認證詳細數據。

BackendProperties

後端類型特有的屬性。

BackendProtocol

後端通訊協定。

BackendProxyContract

在要求後端中使用的後端 WebProxy 伺服器詳細數據。

BackendServiceFabricClusterProperties

Service Fabric 類型後端的屬性。

BackendTlsProperties

控制 TLS 憑證驗證的屬性。

BackendUpdateParameters

後端更新參數。

ErrorFieldContract

錯誤欄位合約。

ErrorResponse

錯誤回應。

X509CertificateName

伺服器 X509Names 的屬性。

BackendAuthorizationHeaderCredentials

授權標頭資訊。

名稱 類型 Description
parameter

string

驗證參數值。

scheme

string

驗證配置名稱。

BackendContract

後端詳細數據。

名稱 類型 Description
id

string

資源的完整資源識別碼。 例如 - /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 可以是 Logic Apps、函式應用程式或 API 應用程式的 Arm 資源識別碼。

properties.title

string

後端標題。

properties.tls

BackendTlsProperties

後端 TLS 屬性

properties.url

string

後端的運行時間 URL。

type

string

資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

BackendCredentialsContract

用來連線到後端的認證詳細數據。

名稱 類型 Description
authorization

BackendAuthorizationHeaderCredentials

授權標頭驗證

certificate

string[]

用戶端憑證指紋的清單。 如果提供 certificatesIds,將會忽略。

certificateIds

string[]

用戶端憑證標識碼的清單。

header

object

標頭參數描述。

query

object

查詢參數描述。

BackendProperties

後端類型特有的屬性。

名稱 類型 Description
serviceFabricCluster

BackendServiceFabricClusterProperties

後端 Service Fabric 叢集屬性

BackendProtocol

後端通訊協定。

名稱 類型 Description
http

string

後端是 RESTful 服務。

soap

string

後端是SOAP服務。

BackendProxyContract

在要求後端中使用的後端 WebProxy 伺服器詳細數據。

名稱 類型 Description
password

string

線上到 WebProxy 伺服器的密碼

url

string

WebProxy Server AbsoluteUri 屬性,其中包含儲存在 Uri 實例中的整個 URI,包括所有片段和查詢字串。

username

string

線上到 WebProxy 伺服器的使用者名稱

BackendServiceFabricClusterProperties

Service Fabric 類型後端的屬性。

名稱 類型 Description
clientCertificateId

string

管理端點的客戶端憑證標識碼。

clientCertificatethumbprint

string

管理端點的客戶端憑證指紋。 如果提供 certificatesIds,將會忽略

managementEndpoints

string[]

叢集管理端點。

maxPartitionResolutionRetries

integer

嘗試解析數據分割時重試次數上限。

serverCertificateThumbprints

string[]

憑證叢集管理服務用於 TLS 通訊的指紋

serverX509Names

X509CertificateName[]

伺服器 X509 憑證名稱集合

BackendTlsProperties

控制 TLS 憑證驗證的屬性。

名稱 類型 預設值 Description
validateCertificateChain

boolean

True

旗標,指出使用此後端主機的自我簽署憑證時,是否應該完成 SSL 憑證鏈結驗證。

validateCertificateName

boolean

True

旗標,指出使用此後端主機的自我簽署憑證時,是否應該完成SSL憑證名稱驗證。

BackendUpdateParameters

後端更新參數。

名稱 類型 Description
properties.credentials

BackendCredentialsContract

後端認證合約屬性

properties.description

string

後端描述。

properties.properties

BackendProperties

後端屬性合約

properties.protocol

BackendProtocol

後端通訊協定。

properties.proxy

BackendProxyContract

後端閘道合約屬性

properties.resourceId

string

外部系統中資源的管理 URI。 此 URL 可以是 Logic Apps、函式應用程式或 API 應用程式的 Arm 資源識別碼。

properties.title

string

後端標題。

properties.tls

BackendTlsProperties

後端 TLS 屬性

properties.url

string

後端的運行時間 URL。

ErrorFieldContract

錯誤欄位合約。

名稱 類型 Description
code

string

屬性層級錯誤碼。

message

string

人類可讀取的屬性層級錯誤表示法。

target

string

屬性名稱。

ErrorResponse

錯誤回應。

名稱 類型 Description
error.code

string

服務定義的錯誤碼。 此代碼會作為回應中指定之 HTTP 錯誤碼的子狀態。

error.details

ErrorFieldContract[]

在驗證錯誤時,要求中傳送的無效欄位清單。

error.message

string

人類可閱讀的錯誤表示法。

X509CertificateName

伺服器 X509Names 的屬性。

名稱 類型 Description
issuerCertificateThumbprint

string

憑證簽發者的指紋。

name

string

憑證的一般名稱。