Artifact Sources - Create Or Update
Utwórz lub zastąp istniejące źródło artefaktu.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}?api-version=2018-09-15
Parametry identyfikatora URI
Nazwa | W | Wymagane | Typ | Opis |
---|---|---|---|---|
lab
|
path | True |
string |
Nazwa laboratorium. |
name
|
path | True |
string |
Nazwa źródła artefaktu. |
resource
|
path | True |
string |
Nazwa grupy zasobów. |
subscription
|
path | True |
string |
Identyfikator subskrypcji. |
api-version
|
query | True |
string |
Wersja interfejsu API klienta. |
Treść żądania
Nazwa | Typ | Opis |
---|---|---|
location |
string |
Lokalizacja zasobu. |
properties.armTemplateFolderPath |
string |
Folder zawierający szablony usługi Azure Resource Manager. |
properties.branchRef |
string |
Odwołanie do gałęzi źródła artefaktu. |
properties.displayName |
string |
Nazwa wyświetlana źródła artefaktu. |
properties.folderPath |
string |
Folder zawierający artefakty. |
properties.securityToken |
string |
Token zabezpieczający do uwierzytelniania w źródle artefaktu. |
properties.sourceType |
Typ źródła artefaktu. |
|
properties.status |
Wskazuje, czy źródło artefaktu jest włączone (wartości: Włączone, Wyłączone). |
|
properties.uri |
string |
Identyfikator URI źródła artefaktu. |
tags |
object |
Tagi zasobu. |
Odpowiedzi
Nazwa | Typ | Opis |
---|---|---|
200 OK |
OK |
|
201 Created |
Utworzone |
|
Other Status Codes |
BadRequest |
Zabezpieczenia
azure_auth
Przyznawanie niejawne OAuth2
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
Nazwa | Opis |
---|---|
user_impersonation | Uzyskiwanie dostępu do platformy Microsoft Azure |
Przykłady
ArtifactSources_CreateOrUpdate
Przykładowe żądanie
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"
}
}
Przykładowa odpowiedź
{
"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"
}
}
Definicje
Nazwa | Opis |
---|---|
Artifact |
Właściwości źródła artefaktu. |
Cloud |
Błąd żądania REST. |
Cloud |
Treść błędu z żądania REST. |
Enable |
Stan harmonogramu (tj. Włączone, Wyłączone) |
Source |
Typ źródła artefaktu. |
ArtifactSource
Właściwości źródła artefaktu.
Nazwa | Typ | Opis |
---|---|---|
id |
string |
Identyfikator zasobu. |
location |
string |
Lokalizacja zasobu. |
name |
string |
Nazwa zasobu. |
properties.armTemplateFolderPath |
string |
Folder zawierający szablony usługi Azure Resource Manager. |
properties.branchRef |
string |
Odwołanie do gałęzi źródła artefaktu. |
properties.createdDate |
string |
Data utworzenia źródła artefaktu. |
properties.displayName |
string |
Nazwa wyświetlana źródła artefaktu. |
properties.folderPath |
string |
Folder zawierający artefakty. |
properties.provisioningState |
string |
Stan aprowizacji zasobu. |
properties.securityToken |
string |
Token zabezpieczający do uwierzytelniania w źródle artefaktu. |
properties.sourceType |
Typ źródła artefaktu. |
|
properties.status |
Wskazuje, czy źródło artefaktu jest włączone (wartości: Włączone, Wyłączone). |
|
properties.uniqueIdentifier |
string |
Unikatowy niezmienny identyfikator zasobu (Guid). |
properties.uri |
string |
Identyfikator URI źródła artefaktu. |
tags |
object |
Tagi zasobu. |
type |
string |
Typ zasobu. |
CloudError
Błąd żądania REST.
Nazwa | Typ | Opis |
---|---|---|
error |
Błąd chmury, który wystąpił |
CloudErrorBody
Treść błędu z żądania REST.
Nazwa | Typ | Opis |
---|---|---|
code |
string |
Kod błędu. |
details |
Błędy wewnętrzne. |
|
message |
string |
Komunikat o błędzie. |
target |
string |
Element docelowy błędu. |
EnableStatus
Stan harmonogramu (tj. Włączone, Wyłączone)
Nazwa | Typ | Opis |
---|---|---|
Disabled |
string |
|
Enabled |
string |
SourceControlType
Typ źródła artefaktu.
Nazwa | Typ | Opis |
---|---|---|
GitHub |
string |
|
StorageAccount |
string |
|
VsoGit |
string |