Project Catalogs - Patch
部分更新項目目錄。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}?api-version=2024-02-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
catalog
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$ |
目錄的名稱。 |
|
project
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$ |
項目的名稱。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
subscription
|
path | True |
string minLength: 1 |
目標訂用帳戶的標識碼。 |
|
api-version
|
query | True |
string minLength: 1 |
要用於這項作業的 API 版本。 |
要求本文
| 名稱 | 類型 | Description |
|---|---|---|
| properties.adoGit |
Azure DevOps 目錄類型的屬性。 |
|
| properties.gitHub |
GitHub 目錄類型的屬性。 |
|
| properties.syncType |
指出針對目錄設定的同步類型。 |
|
| properties.tags |
object |
資源標籤。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
資源已更新。 |
|
| 202 Accepted |
要求會以異步方式完成。 標題 Location: string |
|
| Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 模擬您的用戶帳戶 |
範例
ProjectCatalogs_Patch
範例要求
PATCH https://management.azure.com/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/catalogs/CentralCatalog?api-version=2024-02-01
{
"properties": {
"gitHub": {
"path": "/environments"
}
}
}
範例回覆
{
"id": "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/catalogs/CentralCatalog",
"name": "CentralCatalog",
"type": "Microsoft.DevCenter/projects/catalogs",
"properties": {
"gitHub": {
"uri": "https://github.com/Contoso/centralrepo-fake.git",
"branch": "main",
"secretIdentifier": "https://contosokv.vault.azure.net/secrets/CentralRepoPat",
"path": "/environments"
},
"lastSyncStats": {
"added": 1,
"updated": 1,
"unchanged": 1,
"removed": 1,
"validationErrors": 1,
"synchronizationErrors": 1
},
"lastConnectionTime": "2020-11-18T18:28:00.314Z",
"lastSyncTime": "2020-11-18T18:28:00.314Z",
"provisioningState": "Succeeded",
"connectionState": "Connected",
"syncState": "Succeeded"
},
"systemData": {
"createdBy": "User1",
"createdByType": "User",
"createdAt": "2020-11-18T18:24:24.818Z",
"lastModifiedBy": "User1",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-11-18T18:24:24.818Z"
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/CENTRALUS/operationStatuses/722e7bc4-60fa-4e6b-864f-d5bf12b9adc4?api-version=2023-10-01-preview
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/CENTRALUS/operationStatuses/722e7bc4-60fa-4e6b-864f-d5bf12b9adc4?api-version=2023-10-01-preview
定義
| 名稱 | Description |
|---|---|
| Catalog |
表示目錄。 |
|
Catalog |
目錄的連接狀態。 |
|
Catalog |
表示目錄項目類型。 |
|
Catalog |
目錄的同步處理狀態。 |
|
Catalog |
指出針對目錄設定的同步類型。 |
|
Catalog |
部分更新的目錄屬性。 更新要求中未提供的屬性將不會變更。 |
|
created |
建立資源的身分識別類型。 |
|
Error |
資源管理錯誤其他資訊。 |
|
Error |
錯誤詳細數據。 |
|
Error |
錯誤回應 |
|
Git |
Git 存放庫目錄的屬性。 |
|
Provisioning |
資源布建狀態。 |
|
Sync |
同步處理的統計數據。 |
|
system |
與建立和上次修改資源相關的元數據。 |
Catalog
表示目錄。
| 名稱 | 類型 | Description |
|---|---|---|
| id |
string (arm-id) |
資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
資源的名稱 |
| properties.adoGit |
Azure DevOps 目錄類型的屬性。 |
|
| properties.connectionState |
目錄的連接狀態。 |
|
| properties.gitHub |
GitHub 目錄類型的屬性。 |
|
| properties.lastConnectionTime |
string (date-time) |
上次連接目錄時。 |
| properties.lastSyncStats |
最新同步處理的統計數據。 |
|
| properties.lastSyncTime |
string (date-time) |
上次同步處理目錄的時間。 |
| properties.provisioningState |
資源的布建狀態。 |
|
| properties.syncState |
目錄的同步處理狀態。 |
|
| properties.syncType |
指出針對目錄設定的同步類型。 |
|
| properties.tags |
object |
資源標籤。 |
| systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。 |
|
| type |
string |
資源的型別。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts” |
CatalogConnectionState
目錄的連接狀態。
| 值 | Description |
|---|---|
| Connected | |
| Disconnected |
CatalogItemType
表示目錄項目類型。
| 值 | Description |
|---|---|
| EnvironmentDefinition |
CatalogSyncState
目錄的同步處理狀態。
| 值 | Description |
|---|---|
| Succeeded | |
| InProgress | |
| Failed | |
| Canceled |
CatalogSyncType
指出針對目錄設定的同步類型。
| 值 | Description |
|---|---|
| Manual | |
| Scheduled |
CatalogUpdate
部分更新的目錄屬性。 更新要求中未提供的屬性將不會變更。
| 名稱 | 類型 | Description |
|---|---|---|
| properties.adoGit |
Azure DevOps 目錄類型的屬性。 |
|
| properties.gitHub |
GitHub 目錄類型的屬性。 |
|
| properties.syncType |
指出針對目錄設定的同步類型。 |
|
| properties.tags |
object |
資源標籤。 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
object |
其他資訊。 |
| type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤其他資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳細數據。 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
| 名稱 | 類型 | Description |
|---|---|---|
| error |
error 物件。 |
GitCatalog
Git 存放庫目錄的屬性。
| 名稱 | 類型 | Description |
|---|---|---|
| branch |
string |
Git 分支。 |
| path |
string |
您可以在存放庫內找到目錄項目的資料夾。 |
| secretIdentifier |
string |
Key Vault 秘密的參考,其中包含要向 Git 存放庫驗證的安全性令牌。 |
| uri |
string |
Git URI。 |
ProvisioningState
資源布建狀態。
| 值 | Description |
|---|---|
| NotSpecified | |
| Accepted | |
| Running | |
| Creating | |
| Created | |
| Updating | |
| Updated | |
| Deleting | |
| Deleted | |
| Succeeded | |
| Failed | |
| Canceled | |
| MovingResources | |
| TransientFailure | |
| RolloutInProgress | |
| StorageProvisioningFailed |
SyncStats
同步處理的統計數據。
| 名稱 | 類型 | Description |
|---|---|---|
| added |
integer (int32) minimum: 0 |
同步處理期間新增的目錄項目計數。 |
| removed |
integer (int32) minimum: 0 |
同步處理期間移除的目錄項目計數。 |
| syncedCatalogItemTypes |
指出已同步的目錄項目類型。 |
|
| synchronizationErrors |
integer (int32) minimum: 0 |
同步處理期間發生的同步處理錯誤計數。 |
| unchanged |
integer (int32) minimum: 0 |
同步處理期間未變更的目錄項目計數。 |
| updated |
integer (int32) minimum: 0 |
同步處理期間更新的目錄項目計數。 |
| validationErrors |
integer (int32) minimum: 0 |
同步處理期間發生驗證錯誤的目錄項目計數。 |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |