Virtual Machines - Install Patches

VM에 패치를 설치합니다.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches?api-version=2024-03-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
resourceGroupName
path True

string

리소스 그룹의 이름.

subscriptionId
path True

string

Microsoft Azure 구독을 고유하게 식별하는 구독 자격 증명 구독 ID는 모든 서비스 호출에 대한 URI의 파트를 형성합니다.

vmName
path True

string

가상 머신의 이름입니다.

api-version
query True

string

클라이언트 API 버전.

요청 본문

Name 형식 Description
installPatchesInput

VirtualMachineInstallPatchesParameters

API에서 직접 수신한 InstallPatches에 대한 입력

응답

Name 형식 Description
200 OK

VirtualMachineInstallPatchesResult

정상

202 Accepted

수락됨

Other Status Codes

CloudError

작업이 실패한 이유를 설명하는 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

Name Description
user_impersonation 사용자 계정 가장

예제

Install patch state of a virtual machine.

Sample Request

POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/installPatches?api-version=2024-03-01

{
  "maximumDuration": "PT4H",
  "rebootSetting": "IfRequired",
  "windowsParameters": {
    "classificationsToInclude": [
      "Critical",
      "Security"
    ],
    "maxPatchPublishDate": "2020-11-19T02:36:43.0539904+00:00"
  }
}

Sample Response

{
  "status": "Succeeded",
  "installationActivityId": "68f8b292-dfc2-4646-9781-33cc88631968",
  "rebootStatus": "Completed",
  "maintenanceWindowExceeded": false,
  "excludedPatchCount": 0,
  "notSelectedPatchCount": 0,
  "pendingPatchCount": 2,
  "installedPatchCount": 3,
  "failedPatchCount": 0,
  "startDateTime": "2020-04-24T21:02:04.2556154Z",
  "patches": [
    {
      "patchId": "35428702-5784-4ba4-a6e0-5222258b5411",
      "name": "Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.279.1373.0)",
      "version": "",
      "kbId": "2267602",
      "classifications": [
        "Definition Updates"
      ],
      "installationState": "Installed"
    },
    {
      "patchId": "39f9cdd1-795c-4d0e-8c0a-73ab3f31746d",
      "name": "Windows Malicious Software Removal Tool x64 - October 2018 (KB890830)",
      "version": "",
      "kbId": "890830",
      "classifications": [
        "Update Rollups"
      ],
      "installationState": "Pending"
    }
  ],
  "error": null
}
Location: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2024-03-01

정의

Name Description
ApiError

API 오류입니다.

ApiErrorBase

API 오류 기준입니다.

CloudError

Compute 서비스의 오류 응답입니다.

InnerError

내부 오류 세부 정보입니다.

LinuxParameters

API에서 직접 수신한 Linux VM의 InstallPatches 입력

PatchInstallationDetail

작업 중에 설치된 패치입니다.

PatchInstallationState

설치 작업이 완료된 후 패치의 상태입니다.

PatchOperationStatus

작업의 전체 성공 또는 실패 상태. 작업이 완료될 때까지 "InProgress"로 유지됩니다. 이 시점에서 "실패", "성공", "알 수 없음" 또는 "CompletedWithWarnings"가 됩니다.

VirtualMachineInstallPatchesParameters

API에서 직접 수신한 InstallPatches에 대한 입력

VirtualMachineInstallPatchesResult

설치 작업의 결과 요약입니다.

VMGuestPatchClassification_Linux

Linux용 패치를 설치할 때 선택할 업데이트 분류입니다.

VMGuestPatchClassification_Windows

Windows용 패치를 설치할 때 선택할 업데이트 분류입니다.

VMGuestPatchRebootSetting

소프트웨어 업데이트 작업 중에 VM을 다시 부팅할 수 있는 시기를 정의합니다.

VMGuestPatchRebootStatus

작업이 완료된 후 VM의 다시 부팅 상태입니다.

WindowsParameters

API에서 직접 수신한 Windows VM의 InstallPatches 입력

ApiError

API 오류입니다.

Name 형식 Description
code

string

오류 코드입니다.

details

ApiErrorBase[]

API 오류 세부 정보

innererror

InnerError

API 내부 오류

message

string

오류 메시지입니다.

target

string

특정 오류의 대상입니다.

ApiErrorBase

API 오류 기준입니다.

Name 형식 Description
code

string

오류 코드입니다.

message

string

오류 메시지입니다.

target

string

특정 오류의 대상입니다.

CloudError

Compute 서비스의 오류 응답입니다.

Name 형식 Description
error

ApiError

API 오류입니다.

InnerError

내부 오류 세부 정보입니다.

Name 형식 Description
errordetail

string

내부 오류 메시지 또는 예외 덤프입니다.

exceptiontype

string

예외 형식입니다.

LinuxParameters

API에서 직접 수신한 Linux VM의 InstallPatches 입력

Name 형식 Description
classificationsToInclude

VMGuestPatchClassification_Linux[]

Linux용 패치를 설치할 때 선택할 업데이트 분류입니다.

maintenanceRunId

string

이는 Linux에서 자동 VM 게스트 패치에 대한 유지 관리 실행 식별자로 사용됩니다.

packageNameMasksToExclude

string[]

패치 작업에서 제외할 패키지입니다. 형식: packageName_packageVersion

packageNameMasksToInclude

string[]

패치 작업에 포함할 패키지입니다. 형식: packageName_packageVersion

PatchInstallationDetail

작업 중에 설치된 패치입니다.

Name 형식 Description
classifications

string[]

패치 게시자가 제공한 패치의 분류입니다.

installationState

PatchInstallationState

설치 작업이 완료된 후 패치의 상태입니다.

kbId

string

패치의 KBID입니다. Windows 패치에만 적용됩니다.

name

string

패치의 이름입니다.

patchId

string

패치의 고유 식별자입니다.

version

string

패키지의 버전 문자열입니다. 의미 체계 버전 관리를 준수할 수 있습니다. Linux에만 적용됩니다.

PatchInstallationState

설치 작업이 완료된 후 패치의 상태입니다.

Name 형식 Description
Excluded

string

Failed

string

Installed

string

NotSelected

string

Pending

string

Unknown

string

PatchOperationStatus

작업의 전체 성공 또는 실패 상태. 작업이 완료될 때까지 "InProgress"로 유지됩니다. 이 시점에서 "실패", "성공", "알 수 없음" 또는 "CompletedWithWarnings"가 됩니다.

Name 형식 Description
CompletedWithWarnings

string

Failed

string

InProgress

string

Succeeded

string

Unknown

string

VirtualMachineInstallPatchesParameters

API에서 직접 수신한 InstallPatches에 대한 입력

Name 형식 Description
linuxParameters

LinuxParameters

API에서 직접 수신한 Linux VM의 InstallPatches 입력

maximumDuration

string

작업이 실행될 최대 시간을 지정합니다. PT4H(4시간)와 같은 ISO 8601 규격 기간 문자열이어야 합니다.

rebootSetting

VMGuestPatchRebootSetting

소프트웨어 업데이트 작업 중에 VM을 다시 부팅할 수 있는 시기를 정의합니다.

windowsParameters

WindowsParameters

API에서 직접 수신한 Windows VM의 InstallPatches 입력

VirtualMachineInstallPatchesResult

설치 작업의 결과 요약입니다.

Name 형식 Description
error

ApiError

작업을 실행하는 동안 발생한 오류입니다. 세부 정보 배열에는 해당 목록이 포함됩니다.

excludedPatchCount

integer

설치를 차단하는 사용자로 인해 설치되지 않은 패치의 수입니다.

failedPatchCount

integer

일부 문제로 인해 설치할 수 없는 패치 수입니다. 자세한 내용은 오류를 참조하세요.

installationActivityId

string

이 결과를 생성한 작업의 활동 ID입니다. CRP 및 확장 로그 간에 상관 관계를 지정하는 데 사용됩니다.

installedPatchCount

integer

성공적으로 설치된 패치 수입니다.

maintenanceWindowExceeded

boolean

작업이 의도한 모든 작업을 완료하기 전에 시간이 부족했는지 여부입니다.

notSelectedPatchCount

integer

설치에 사용할 수 있는 것으로 검색되었지만 작업의 기준을 충족하지 못한 패치의 수입니다.

patches

PatchInstallationDetail[]

작업 중에 설치된 패치입니다.

pendingPatchCount

integer

설치 조건을 충족하는 것으로 식별되었지만 설치할 수 없는 패치 수입니다. 일반적으로 이 문제는 maintenanceWindowExceeded == true일 때 발생합니다.

rebootStatus

VMGuestPatchRebootStatus

작업이 완료된 후 VM의 다시 부팅 상태입니다.

startDateTime

string

작업이 시작된 UTC 타임스탬프입니다.

status

PatchOperationStatus

작업의 전체 성공 또는 실패 상태. 작업이 완료될 때까지 "InProgress"로 유지됩니다. 이 시점에서 "실패", "성공", "알 수 없음" 또는 "CompletedWithWarnings"가 됩니다.

VMGuestPatchClassification_Linux

Linux용 패치를 설치할 때 선택할 업데이트 분류입니다.

Name 형식 Description
Critical

string

Other

string

Security

string

VMGuestPatchClassification_Windows

Windows용 패치를 설치할 때 선택할 업데이트 분류입니다.

Name 형식 Description
Critical

string

Definition

string

FeaturePack

string

Security

string

ServicePack

string

Tools

string

UpdateRollUp

string

Updates

string

VMGuestPatchRebootSetting

소프트웨어 업데이트 작업 중에 VM을 다시 부팅할 수 있는 시기를 정의합니다.

Name 형식 Description
Always

string

IfRequired

string

Never

string

VMGuestPatchRebootStatus

작업이 완료된 후 VM의 다시 부팅 상태입니다.

Name 형식 Description
Completed

string

Failed

string

NotNeeded

string

Required

string

Started

string

Unknown

string

WindowsParameters

API에서 직접 수신한 Windows VM의 InstallPatches 입력

Name 형식 Description
classificationsToInclude

VMGuestPatchClassification_Windows[]

Windows용 패치를 설치할 때 선택할 업데이트 분류입니다.

excludeKbsRequiringReboot

boolean

True로 설정된 경우 'NeverReboots'의 InstallationRebootBehavior가 없는 Kbs를 필터링합니다.

kbNumbersToExclude

string[]

패치 작업에서 제외할 KB

kbNumbersToInclude

string[]

패치 작업에 포함할 KB

maxPatchPublishDate

string

이는 지정된 최대 게시 날짜 또는 그 이전에 게시된 패치를 설치하는 데 사용됩니다.