次の方法で共有


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 パラメーター

名前 / 必須 説明
automationAccountName
path True

string

Automation アカウントの名前。

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._]+$

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

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 フロー

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
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"
  }
}

定義

名前 説明
createdByType

リソースを作成した ID の種類。

ErrorResponse

操作エラーのエラー応答

SourceControl

ソース管理の定義。

SourceControlSecurityTokenProperties
SourceControlUpdateParameters

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

sourceType

ソースの種類。 VsoGit、VsoTfvc、GitHub のいずれかである必要があります。

systemData

リソースの作成と最後の変更に関連するメタデータ。

tokenType

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

createdByType

リソースを作成した ID の種類。

説明
User
Application
ManagedIdentity
Key

ErrorResponse

操作エラーのエラー応答

名前 説明
code

string

エラー コード

message

string

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

SourceControl

ソース管理の定義。

名前 説明
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

sourceType

ソースの種類。 VsoGit、VsoTfvc、GitHub のいずれかである必要があります。

systemData

systemData

createdBy および modifiedBy 情報を含む Azure Resource Manager メタデータ。

type

string

リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"

SourceControlSecurityTokenProperties

名前 説明
accessToken

string

maxLength: 1024

アクセス トークン。

refreshToken

string

maxLength: 1024

更新トークン。

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 のいずれかである必要があります。

説明
VsoGit
VsoTfvc
GitHub

systemData

リソースの作成と最後の変更に関連するメタデータ。

名前 説明
createdAt

string (date-time)

リソース作成のタイムスタンプ (UTC)。

createdBy

string

リソースを作成した ID。

createdByType

createdByType

リソースを作成した ID の種類。

lastModifiedAt

string (date-time)

リソースの最終変更のタイムスタンプ (UTC)

lastModifiedBy

string

リソースを最後に変更した ID。

lastModifiedByType

createdByType

リソースを最後に変更した ID の種類。

tokenType

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

説明
PersonalAccessToken
Oauth