Source Control - Update
소스 제어를 업데이트합니다.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}?api-version=2024-10-23
URI 매개 변수
| Name | In(다음 안에) | 필수 | 형식 | Description |
|---|---|---|---|---|
|
automation
|
path | True |
string |
자동화 계정의 이름입니다. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._]+$ |
Azure 리소스 그룹의 이름입니다. |
|
source
|
path | True |
string |
소스 제어 이름입니다. |
|
subscription
|
path | True |
string |
Microsoft Azure 구독을 고유하게 식별하는 구독 자격 증명을 가져옵니다. 구독 ID는 모든 서비스 호출에 대한 URI의 파트를 형성합니다. |
|
api-version
|
query | True |
string |
클라이언트 API 버전입니다. |
요청 본문
| Name | 형식 | Description |
|---|---|---|
| properties.autoSync |
boolean |
소스 컨트롤의 자동 동기화입니다. 기본값은 false입니다. |
| properties.branch |
string |
소스 제어의 리포지토리 분기입니다. |
| properties.description |
string |
소스 제어에 대한 사용자 설명입니다. |
| properties.folderPath |
string |
소스 제어의 폴더 경로입니다. 경로는 상대 경로여야 합니다. |
| properties.publishRunbook |
boolean |
소스 제어의 자동 게시입니다. 기본값은 true입니다. |
| properties.securityToken |
소스 제어의 리포지토리에 대한 권한 부여 토큰입니다. |
응답
| Name | 형식 | Description |
|---|---|---|
| 200 OK |
그래 |
|
| Other Status Codes |
작업이 실패한 이유를 설명하는 자동화 오류 응답입니다. |
보안
azure_auth
Azure Active Directory OAuth2 흐름
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
| Name | Description |
|---|---|
| user_impersonation | 사용자 계정 가장 |
예제
Update a source control
샘플 요청
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourceControls/sampleSourceControl?api-version=2024-10-23
{
"properties": {
"branch": "master",
"folderPath": "/folderOne/folderTwo",
"autoSync": true,
"publishRunbook": true,
"securityToken": {
"accessToken": "******",
"tokenType": "PersonalAccessToken"
},
"description": "my description"
}
}
샘플 응답
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl",
"name": "sampleSourceControl",
"properties": {
"creationTime": "2017-03-28T22:59:00.937+00:00",
"lastModifiedTime": "2017-03-28T22:59:00.937+00:00",
"repoUrl": "https://sampleUser.visualstudio.com/myProject/_git/myRepository",
"branch": "master",
"folderPath": "/folderOne/folderTwo",
"autoSync": true,
"publishRunbook": true,
"sourceType": "VsoGit",
"description": "my description"
}
}
정의
| Name | Description |
|---|---|
|
created |
리소스를 만든 ID의 형식입니다. |
|
Error |
작업 실패의 오류 응답 |
|
Source |
소스 제어의 정의입니다. |
|
Source |
|
|
Source |
소스 제어 업데이트 작업에 제공된 매개 변수입니다. |
|
source |
원본 형식입니다. VsoGit, VsoTfvc, GitHub 중 하나여야 합니다. |
|
system |
리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다. |
|
token |
토큰 유형입니다. PersonalAccessToken 또는 Oauth여야 합니다. |
createdByType
리소스를 만든 ID의 형식입니다.
| 값 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorResponse
작업 실패의 오류 응답
| Name | 형식 | Description |
|---|---|---|
| code |
string |
오류 코드 |
| message |
string |
작업이 실패한 이유를 나타내는 오류 메시지입니다. |
SourceControl
소스 제어의 정의입니다.
| Name | 형식 | Description |
|---|---|---|
| id |
string (arm-id) |
리소스에 대한 정규화된 리소스 ID입니다. 예: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
리소스의 이름 |
| properties.autoSync |
boolean |
소스 컨트롤의 자동 동기화입니다. 기본값은 false입니다. |
| properties.branch |
string |
소스 제어의 리포지토리 분기입니다. 분기를 VsoTfvc의 빈 문자열로 포함합니다. |
| properties.creationTime |
string (date-time) |
생성 시간입니다. |
| properties.description |
string |
설명입니다. |
| properties.folderPath |
string |
소스 제어의 폴더 경로입니다. |
| properties.lastModifiedTime |
string (date-time) |
마지막으로 수정한 시간입니다. |
| properties.publishRunbook |
boolean |
소스 제어의 자동 게시입니다. 기본값은 true입니다. |
| properties.repoUrl |
string |
소스 컨트롤의 리포지토리 URL입니다. |
| properties.sourceType |
원본 형식입니다. VsoGit, VsoTfvc, GitHub 중 하나여야 합니다. |
|
| systemData |
createdBy 및 modifiedBy 정보가 포함된 Azure Resource Manager 메타데이터입니다. |
|
| type |
string |
리소스의 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts" |
SourceControlSecurityTokenProperties
| Name | 형식 | Description |
|---|---|---|
| accessToken |
string maxLength: 1024 |
액세스 토큰입니다. |
| refreshToken |
string maxLength: 1024 |
새로 고침 토큰입니다. |
| tokenType |
토큰 유형입니다. PersonalAccessToken 또는 Oauth여야 합니다. |
SourceControlUpdateParameters
소스 제어 업데이트 작업에 제공된 매개 변수입니다.
| Name | 형식 | Description |
|---|---|---|
| properties.autoSync |
boolean |
소스 컨트롤의 자동 동기화입니다. 기본값은 false입니다. |
| properties.branch |
string |
소스 제어의 리포지토리 분기입니다. |
| properties.description |
string |
소스 제어에 대한 사용자 설명입니다. |
| properties.folderPath |
string |
소스 제어의 폴더 경로입니다. 경로는 상대 경로여야 합니다. |
| properties.publishRunbook |
boolean |
소스 제어의 자동 게시입니다. 기본값은 true입니다. |
| properties.securityToken |
소스 제어의 리포지토리에 대한 권한 부여 토큰입니다. |
sourceType
원본 형식입니다. VsoGit, VsoTfvc, GitHub 중 하나여야 합니다.
| 값 | Description |
|---|---|
| VsoGit | |
| VsoTfvc | |
| GitHub |
systemData
리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다.
| Name | 형식 | Description |
|---|---|---|
| createdAt |
string (date-time) |
리소스 만들기의 타임스탬프(UTC)입니다. |
| createdBy |
string |
리소스를 만든 ID입니다. |
| createdByType |
리소스를 만든 ID의 형식입니다. |
|
| lastModifiedAt |
string (date-time) |
리소스 마지막 수정의 타임스탬프(UTC) |
| lastModifiedBy |
string |
리소스를 마지막으로 수정한 ID입니다. |
| lastModifiedByType |
리소스를 마지막으로 수정한 ID의 형식입니다. |
tokenType
토큰 유형입니다. PersonalAccessToken 또는 Oauth여야 합니다.
| 값 | Description |
|---|---|
| PersonalAccessToken | |
| Oauth |