Tenant Configuration - Deploy

此作業會將指定 Git 分支的變更套用至組態資料庫。 這是長時間執行的作業,可能需要幾分鐘的時間才能完成。

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

URI 參數

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

configurationIdName

Git 組態作業的標識碼。

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
properties.branch True

string

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

properties.force

boolean

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

回應

名稱 類型 Description
200 OK

OperationResultContract

將變更從 Git 分支套用至資料庫的結果。

202 Accepted

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

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 模擬您的用戶帳戶

範例

ApiManagementTenantConfigurationDeploy

Sample Request

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

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

Sample Response

location: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af4ae2a6d2e0b688d7517?api-version=2022-08-01
{
  "id": "6074e652093a9d0dac3d733c",
  "type": "Microsoft.ApiManagement/service/tenant/operationResults",
  "name": "6074e652093a9d0dac3d733c",
  "properties": {
    "status": "Failed",
    "started": "2017-11-26T17:06:54.303Z",
    "updated": "2017-11-26T17:07:21.777Z",
    "error": {
      "code": "ValidationError",
      "message": "File not found: 'api-management/configuration.json'"
    }
  }
}

定義

名稱 Description
AsyncOperationStatus

異步操作的狀態。

configurationIdName

Git 組態作業的標識碼。

DeployConfigurationParameters

部署租用戶設定合約。

ErrorFieldContract

錯誤欄位合約。

ErrorResponse

錯誤回應。

ErrorResponseBody

錯誤本文合約。

OperationResultContract

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

OperationResultLogItemContract

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

AsyncOperationStatus

異步操作的狀態。

名稱 類型 Description
Failed

string

InProgress

string

Started

string

Succeeded

string

configurationIdName

Git 組態作業的標識碼。

名稱 類型 Description
configuration

string

DeployConfigurationParameters

部署租用戶設定合約。

名稱 類型 Description
properties.branch

string

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

properties.force

boolean

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

ErrorFieldContract

錯誤欄位合約。

名稱 類型 Description
code

string

屬性層級錯誤碼。

message

string

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

target

string

屬性名稱。

ErrorResponse

錯誤回應。

名稱 類型 Description
error.code

string

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

error.details

ErrorFieldContract[]

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

error.message

string

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

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

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

properties.status

AsyncOperationStatus

異步操作的狀態。

properties.updated

string

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

type

string

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

OperationResultLogItemContract

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

名稱 類型 Description
action

string

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

objectKey

string

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

objectType

string

實體合約的類型。