共用方式為


Tenant Configuration - Validate

此作業會驗證指定 Git 分支中的變更。 這是長時間執行的作業,可能需要幾分鐘的時間才能完成。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/validate?api-version=2024-05-01

URI 參數

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

configurationIdName

Git 組態作業的標識碼。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

API 管理服務的名稱。

subscriptionId
path True

string (uuid)

目標訂用帳戶的標識碼。 此值必須是 UUID。

api-version
query True

string

minLength: 1

要用於這項作業的 API 版本。

要求本文

名稱 必要 類型 Description
properties.branch True

string

要從中部署組態至組態資料庫的 Git 分支名稱。

properties.force

boolean

強制執行刪除此更新中所刪除產品訂閱的值。

回應

名稱 類型 Description
200 OK

OperationResultContract

驗證指定 Git 分支中變更的結果。

202 Accepted

已接受:位置標頭包含可以檢查長時間執行作業狀態的URL。

標題

location: string

Other Status Codes

ErrorResponse

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

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

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

範例

ApiManagementTenantConfigurationValidate

範例要求

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/configuration/validate?api-version=2024-05-01

{
  "properties": {
    "branch": "master"
  }
}

範例回覆

location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af64e2a6d2e0b688d751e?api-version=2024-05-01
{
  "id": "6074ec02093a9d0dac3d7345",
  "type": "Microsoft.ApiManagement/service/tenant/operationResults",
  "name": "6074ec02093a9d0dac3d7345",
  "properties": {
    "status": "Succeeded",
    "started": "2021-04-13T00:55:30.62Z",
    "updated": "2021-04-13T00:55:39.857Z",
    "resultInfo": "Validation is successfull",
    "actionLog": []
  }
}

定義

名稱 Description
AsyncOperationStatus

異步操作的狀態。

configurationIdName

Git 組態作業的標識碼。

DeployConfigurationParameters

部署租用戶設定合約。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorFieldContract

錯誤欄位合約。

ErrorResponse

錯誤回應

ErrorResponseBody

錯誤本文合約。

OperationResultContract

長時間執行的 Git 作業結果。

OperationResultLogItemContract

正在建立、更新或刪除之實體的記錄。

AsyncOperationStatus

異步操作的狀態。

Description
Failed
InProgress
Started
Succeeded

configurationIdName

Git 組態作業的標識碼。

Description
configuration

DeployConfigurationParameters

部署租用戶設定合約。

名稱 類型 Description
properties.branch

string

要從中部署組態至組態資料庫的 Git 分支名稱。

properties.force

boolean

強制執行刪除此更新中所刪除產品訂閱的值。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorFieldContract

錯誤欄位合約。

名稱 類型 Description
code

string

屬性層級錯誤碼。

message

string

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

target

string

屬性名稱。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

ErrorResponseBody

錯誤本文合約。

名稱 類型 Description
code

string

服務定義的錯誤碼。 此程式代碼可作為回應中所指定 HTTP 錯誤碼的子狀態。

details

ErrorFieldContract[]

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

message

string

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

OperationResultContract

長時間執行的 Git 作業結果。

名稱 類型 Description
id

string

資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

資源的名稱

properties.actionLog

OperationResultLogItemContract[]

只有在TenantConfiguration_Validate作業中提供時,這個屬性才會提供。 其中包含將在TenantConfiguration_Deploy作業中更新/建立/刪除的實體記錄。

properties.error

ErrorResponseBody

錯誤本文合約

properties.id

string

作業結果標識碼。

properties.resultInfo

string

選擇性的結果資訊。

properties.started

string (date-time)

異步操作的開始時間。 日期符合下列格式:yyyy-MM-ddTHH:mm:ssZ ISO 8601 標準所指定。

properties.status

AsyncOperationStatus

異步操作的狀態。

properties.updated

string (date-time)

異步作業的上次更新時間。 日期符合下列格式:yyyy-MM-ddTHH:mm:ssZ ISO 8601 標準所指定。

type

string

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

OperationResultLogItemContract

正在建立、更新或刪除之實體的記錄。

名稱 類型 Description
action

string

建立/更新/刪除之類的動作。

objectKey

string

正在建立/更新/刪除之實體的標識符。

objectType

string

實體合約的類型。