Artifact Sources - Create Or Update
建立或取代現有的成品來源。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}?api-version=2018-09-15
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
lab
|
path | True |
string |
實驗室的名稱。 |
name
|
path | True |
string |
成品來源的名稱。 |
resource
|
path | True |
string |
資源群組的名稱。 |
subscription
|
path | True |
string |
訂閱識別碼。 |
api-version
|
query | True |
string |
用戶端 API 版本。 |
要求本文
名稱 | 類型 | Description |
---|---|---|
location |
string |
資源的位置。 |
properties.armTemplateFolderPath |
string |
包含 Azure Resource Manager 樣本的資料夾。 |
properties.branchRef |
string |
成品來源的分支參考。 |
properties.displayName |
string |
成品來源的顯示名稱。 |
properties.folderPath |
string |
包含成品的資料夾。 |
properties.securityToken |
string |
要向成品來源驗證的安全性令牌。 |
properties.sourceType |
成品來源的類型。 |
|
properties.status |
指出成品來源是否已啟用 (值:已啟用、停用) 。 |
|
properties.uri |
string |
成品來源的 URI。 |
tags |
object |
資源的標記。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
確定 |
|
201 Created |
建立時間 |
|
Other Status Codes |
BadRequest |
安全性
azure_auth
OAuth2 隱含授與
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 存取 Microsoft Azure |
範例
ArtifactSources_CreateOrUpdate
範例要求
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}?api-version=2018-09-15
{
"properties": {
"displayName": "{displayName}",
"uri": "{artifactSourceUri}",
"sourceType": "{VsoGit|GitHub|StorageAccount}",
"folderPath": "{folderPath}",
"armTemplateFolderPath": "{armTemplateFolderPath}",
"branchRef": "{branchRef}",
"securityToken": "{securityToken}",
"status": "{Enabled|Disabled}"
},
"tags": {
"tagName1": "tagValue1"
}
}
範例回覆
{
"properties": {
"displayName": "{displayName}",
"uri": "{artifactSourceUri}",
"sourceType": "{VsoGit|GitHub|StorageAccount}",
"folderPath": "{folderPath}",
"armTemplateFolderPath": "{armTemplateFolderPath}",
"branchRef": "{branchRef}",
"securityToken": "{securityToken}",
"status": "{Enabled|Disabled}",
"createdDate": "2020-12-16T16:53:02.4830866-07:00",
"provisioningState": "Succeeded",
"uniqueIdentifier": "{uniqueIdentifier}"
},
"id": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}",
"name": "{artifactSourceName}",
"type": "Microsoft.DevTestLab/labs/artifactsources",
"location": "{location}",
"tags": {
"tagName1": "tagValue1"
}
}
{
"properties": {
"displayName": "{displayName}",
"uri": "{artifactSourceUri}",
"sourceType": "{VsoGit|GitHub|StorageAccount}",
"folderPath": "{folderPath}",
"armTemplateFolderPath": "{armTemplateFolderPath}",
"branchRef": "{branchRef}",
"securityToken": "{securityToken}",
"status": "{Enabled|Disabled}",
"createdDate": "2020-12-16T16:53:02.4830866-07:00",
"provisioningState": "Created",
"uniqueIdentifier": "{uniqueIdentifier}"
},
"id": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}",
"name": "{artifactSourceName}",
"type": "Microsoft.DevTestLab/labs/artifactsources",
"location": "{location}",
"tags": {
"tagName1": "tagValue1"
}
}
定義
名稱 | Description |
---|---|
Artifact |
成品來源的屬性。 |
Cloud |
REST 要求發生錯誤。 |
Cloud |
REST 要求的錯誤本文。 |
Enable |
排程 (的狀態,也就是已啟用、停用) |
Source |
成品來源的類型。 |
ArtifactSource
成品來源的屬性。
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源的標識碼。 |
location |
string |
資源的位置。 |
name |
string |
資源名稱。 |
properties.armTemplateFolderPath |
string |
包含 Azure Resource Manager 樣本的資料夾。 |
properties.branchRef |
string |
成品來源的分支參考。 |
properties.createdDate |
string |
成品來源的建立日期。 |
properties.displayName |
string |
成品來源的顯示名稱。 |
properties.folderPath |
string |
包含成品的資料夾。 |
properties.provisioningState |
string |
資源的布建狀態。 |
properties.securityToken |
string |
要向成品來源驗證的安全性令牌。 |
properties.sourceType |
成品來源的類型。 |
|
properties.status |
指出成品來源是否已啟用 (值:已啟用、停用) 。 |
|
properties.uniqueIdentifier |
string |
資源的唯一不可變標識碼 (Guid) 。 |
properties.uri |
string |
成品來源的 URI。 |
tags |
object |
資源的標記。 |
type |
string |
資源類型。 |
CloudError
REST 要求發生錯誤。
名稱 | 類型 | Description |
---|---|---|
error |
發生的雲端錯誤 |
CloudErrorBody
REST 要求的錯誤本文。
名稱 | 類型 | Description |
---|---|---|
code |
string |
錯誤碼。 |
details |
內部錯誤。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
EnableStatus
排程 (的狀態,也就是已啟用、停用)
名稱 | 類型 | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
SourceControlType
成品來源的類型。
名稱 | 類型 | Description |
---|---|---|
GitHub |
string |
|
StorageAccount |
string |
|
VsoGit |
string |