Megosztás a következőn keresztül:


Artifact Sources - Create Or Update

Meglévő összetevőforrás létrehozása vagy cseréje.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}?api-version=2018-09-15

URI-paraméterek

Name In Kötelező Típus Description
labName
path True

string

A labor neve.

name
path True

string

Az összetevő forrásának neve.

resourceGroupName
path True

string

Az erőforráscsoport neve.

subscriptionId
path True

string

Az előfizetés azonosítója.

api-version
query True

string

Ügyfél API-verziója.

Kérelem törzse

Name Típus Description
location

string

Az erőforrás helye.

properties.armTemplateFolderPath

string

Az Azure Resource Manager-sablonokat tartalmazó mappa.

properties.branchRef

string

Az összetevő forrásának ághivatkozása.

properties.displayName

string

Az összetevő forrásának megjelenítendő neve.

properties.folderPath

string

Az összetevőket tartalmazó mappa.

properties.securityToken

string

Az összetevő forrásának hitelesítéséhez használt biztonsági jogkivonat.

properties.sourceType

SourceControlType

Az összetevő forrásának típusa.

properties.status

EnableStatus

Azt jelzi, hogy az összetevőforrás engedélyezve van-e (értékek: Engedélyezve, Letiltva).

properties.uri

string

Az összetevő forrásának URI-ja.

tags

object

Az erőforrás címkéi.

Válaszok

Name Típus Description
200 OK

ArtifactSource

OK

201 Created

ArtifactSource

Létrehozva

Other Status Codes

CloudError

BadRequest

Biztonság

azure_auth

OAuth2 implicit támogatás

Típus: oauth2
Folyamat: implicit
Engedélyezési URL: https://login.microsoftonline.com/common/oauth2/authorize

Hatókörök

Name Description
user_impersonation A Microsoft Azure elérése

Példák

ArtifactSources_CreateOrUpdate

Mintakérelem

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"
  }
}

Mintaválasz

{
  "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"
  }
}

Definíciók

Name Description
ArtifactSource

Egy összetevőforrás tulajdonságai.

CloudError

Rest-kérésből származó hiba.

CloudErrorBody

Egy REST-kérelemből származó hiba törzse.

EnableStatus

Az ütemezés állapota (például Engedélyezve, Letiltva)

SourceControlType

Az összetevő forrásának típusa.

ArtifactSource

Egy összetevőforrás tulajdonságai.

Name Típus Description
id

string

Az erőforrás azonosítója.

location

string

Az erőforrás helye.

name

string

Az erőforrás neve.

properties.armTemplateFolderPath

string

Az Azure Resource Manager-sablonokat tartalmazó mappa.

properties.branchRef

string

Az összetevő forrásának ághivatkozása.

properties.createdDate

string

Az összetevőforrás létrehozási dátuma.

properties.displayName

string

Az összetevő forrásának megjelenítendő neve.

properties.folderPath

string

Az összetevőket tartalmazó mappa.

properties.provisioningState

string

Az erőforrás kiépítési állapota.

properties.securityToken

string

Az összetevő forrásának hitelesítéséhez használt biztonsági jogkivonat.

properties.sourceType

SourceControlType

Az összetevő forrásának típusa.

properties.status

EnableStatus

Azt jelzi, hogy az összetevőforrás engedélyezve van-e (értékek: Engedélyezve, Letiltva).

properties.uniqueIdentifier

string

Egy erőforrás egyedi nem módosítható azonosítója (GUID).

properties.uri

string

Az összetevő forrásának URI-ja.

tags

object

Az erőforrás címkéi.

type

string

Az erőforrás típusa.

CloudError

Rest-kérésből származó hiba.

Name Típus Description
error

CloudErrorBody

A felhőben bekövetkezett hiba

CloudErrorBody

Egy REST-kérelemből származó hiba törzse.

Name Típus Description
code

string

A hibakód.

details

CloudErrorBody[]

Belső hibák.

message

string

A hibaüzenet.

target

string

A hibacél.

EnableStatus

Az ütemezés állapota (például Engedélyezve, Letiltva)

Name Típus Description
Disabled

string

Enabled

string

SourceControlType

Az összetevő forrásának típusa.

Name Típus Description
GitHub

string

StorageAccount

string

VsoGit

string