Share via


Source Control - Update

ソース管理を更新します。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}?api-version=2023-11-01

URI パラメーター

名前 / 必須 説明
automationAccountName
path True

string

Automation アカウントの名前。

resourceGroupName
path True

string

Azure リソース グループの名前。

Regex pattern: ^[-\w\._]+$

sourceControlName
path True

string

ソース管理名。

subscriptionId
path True

string

Microsoft Azure サブスクリプションを一意に識別するサブスクリプション資格情報を取得します。 サブスクリプション ID は、全ての修理依頼についてURI の一部を生じさせます。

api-version
query True

string

クライアント API のバージョン。

要求本文

名前 説明
properties.autoSync

boolean

ソース管理の自動同期。 既定値は false です。

properties.branch

string

ソース管理のリポジトリ ブランチ。

properties.description

string

ソース管理のユーザーの説明。

properties.folderPath

string

ソース管理のフォルダー パス。 パスは相対パスである必要があります。

properties.publishRunbook

boolean

ソース管理の自動発行。 既定値は true です。

properties.securityToken

SourceControlSecurityTokenProperties

ソース管理のリポジトリの承認トークン。

応答

名前 説明
200 OK

SourceControl

OK

Other Status Codes

ErrorResponse

操作が失敗した理由を説明するオートメーション エラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名前 説明
user_impersonation ユーザー アカウントの借用

Update a source control

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourceControls/sampleSourceControl?api-version=2023-11-01

{
  "properties": {
    "branch": "master",
    "folderPath": "/folderOne/folderTwo",
    "autoSync": true,
    "publishRunbook": true,
    "securityToken": {
      "accessToken": "******",
      "tokenType": "PersonalAccessToken"
    },
    "description": "my description"
  }
}

Sample Response

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

定義

名前 説明
ErrorResponse

操作エラーのエラー応答

SourceControl

ソース管理の定義。

SourceControlSecurityTokenProperties
SourceControlUpdateParameters

更新元管理操作に指定されたパラメーター。

sourceType

変換元の型です。 VsoGit、VsoTfvc、GitHub のいずれかである必要があります。

tokenType

トークンの型。 PersonalAccessToken または Oauth である必要があります。

ErrorResponse

操作エラーのエラー応答

名前 説明
code

string

エラー コード

message

string

操作が失敗した理由を示すエラー メッセージ。

SourceControl

ソース管理の定義。

名前 説明
id

string

リソースの完全修飾リソース ID

name

string

リソースの名前

properties.autoSync

boolean

ソース管理の自動同期。 既定値は false です。

properties.branch

string

ソース管理のリポジトリ ブランチ。 VsoTfvc の空の文字列としてブランチを含めます。

properties.creationTime

string

作成時刻。

properties.description

string

説明です。

properties.folderPath

string

ソース管理のフォルダー パス。

properties.lastModifiedTime

string

最後に変更された時刻。

properties.publishRunbook

boolean

ソース管理の自動発行。 既定値は true です。

properties.repoUrl

string

ソース管理のリポジトリ URL。

properties.sourceType

sourceType

変換元の型です。 VsoGit、VsoTfvc、GitHub のいずれかである必要があります。

type

string

リソースの型。

SourceControlSecurityTokenProperties

名前 説明
accessToken

string

アクセス トークン。

refreshToken

string

更新トークン。

tokenType

tokenType

トークンの型。 PersonalAccessToken または Oauth である必要があります。

SourceControlUpdateParameters

更新元管理操作に指定されたパラメーター。

名前 説明
properties.autoSync

boolean

ソース管理の自動同期。 既定値は false です。

properties.branch

string

ソース管理のリポジトリ ブランチ。

properties.description

string

ソース管理のユーザーの説明。

properties.folderPath

string

ソース管理のフォルダー パス。 パスは相対パスである必要があります。

properties.publishRunbook

boolean

ソース管理の自動発行。 既定値は true です。

properties.securityToken

SourceControlSecurityTokenProperties

ソース管理のリポジトリの承認トークン。

sourceType

変換元の型です。 VsoGit、VsoTfvc、GitHub のいずれかである必要があります。

名前 説明
GitHub

string

VsoGit

string

VsoTfvc

string

tokenType

トークンの型。 PersonalAccessToken または Oauth である必要があります。

名前 説明
Oauth

string

PersonalAccessToken

string