다음을 통해 공유


Virtual Machine Scale Sets - Get OS Upgrade History

Gets list of OS upgrades on a VM scale set instance.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory?api-version=2024-07-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

vmScaleSetName
path True

string

The name of the VM scale set.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

VirtualMachineScaleSetListOSUpgradeHistory

OK

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

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 impersonate your user account

Examples

VirtualMachineScaleSet_GetOSUpgradeHistory_MaximumSet_Gen
VirtualMachineScaleSet_GetOSUpgradeHistory_MinimumSet_Gen

VirtualMachineScaleSet_GetOSUpgradeHistory_MaximumSet_Gen

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/aaaaaa/osUpgradeHistory?api-version=2024-07-01

Sample response

{
  "value": [
    {
      "properties": {
        "runningStatus": {
          "code": "RollingForward",
          "startTime": "2021-11-30T13:05:40.442Z",
          "endTime": "2021-11-30T13:05:40.443Z"
        },
        "progress": {
          "successfulInstanceCount": 6,
          "failedInstanceCount": 25,
          "inProgressInstanceCount": 20,
          "pendingInstanceCount": 27
        },
        "error": {
          "details": [
            {
              "code": "aaaaaaaaaaaaaaaaaaaaaaaa",
              "target": "aaaa",
              "message": "aa"
            }
          ],
          "innererror": {
            "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "code": "aaaaaaa",
          "target": "aaaaaaa",
          "message": "aaaaaaaaa"
        },
        "startedBy": "Unknown",
        "targetImageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer",
          "exactVersion": "aaaaaaa",
          "sharedGalleryImageId": "aaaaaa",
          "id": "aaaaaaaaaaaaaaaaaaa"
        },
        "rollbackInfo": {
          "successfullyRolledbackInstanceCount": 12,
          "failedRolledbackInstanceCount": 2,
          "rollbackError": {
            "details": [
              {
                "code": "aaaaaaaaaaaaaaaaaaaaaaaa",
                "target": "aaaa",
                "message": "aa"
              }
            ],
            "innererror": {
              "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
              "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaa"
            },
            "code": "aaaaaaa",
            "target": "aaaaaaa",
            "message": "aaaaaaaaa"
          }
        }
      },
      "type": "aaaaaaaaaaaaaaaaaaa",
      "location": "aaaaaaaaaaaaa"
    }
  ],
  "nextLink": "aaaaaaaaa"
}

VirtualMachineScaleSet_GetOSUpgradeHistory_MinimumSet_Gen

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/aaaaaaaaaaaaaaaaaaaaaaaaaa/osUpgradeHistory?api-version=2024-07-01

Sample response

{
  "value": [
    {}
  ]
}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

ImageReference

Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.

InnerError

Inner error details.

RollbackStatusInfo

Information about rollback on failed VM instances after a OS Upgrade operation.

RollingUpgradeProgressInfo

Information about the number of virtual machine instances in each upgrade state.

UpgradeOperationHistoricalStatusInfo

Virtual Machine Scale Set OS Upgrade History operation response.

UpgradeOperationHistoricalStatusInfoProperties

Describes each OS upgrade on the Virtual Machine Scale Set.

UpgradeOperationHistoryStatus

Information about the current running state of the overall upgrade.

UpgradeOperationInvoker

Invoker of the Upgrade Operation

UpgradeState

Code indicating the current status of the upgrade.

VirtualMachineScaleSetListOSUpgradeHistory

List of Virtual Machine Scale Set OS Upgrade History operation response.

ApiError

Api error.

Name Type Description
code

string

The error code.

details

ApiErrorBase[]

The Api error details

innererror

InnerError

The Api inner error

message

string

The error message.

target

string

The target of the particular error.

ApiErrorBase

Api error base.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The target of the particular error.

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

ImageReference

Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.

Name Type Description
communityGalleryImageId

string

Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.

exactVersion

string

Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.

id

string

Resource Id

offer

string

Specifies the offer of the platform image or marketplace image used to create the virtual machine.

publisher

string

The image publisher.

sharedGalleryImageId

string

Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.

sku

string

The image SKU.

version

string

Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

RollbackStatusInfo

Information about rollback on failed VM instances after a OS Upgrade operation.

Name Type Description
failedRolledbackInstanceCount

integer

The number of instances which failed to rollback.

rollbackError

ApiError

Error details if OS rollback failed.

successfullyRolledbackInstanceCount

integer

The number of instances which have been successfully rolled back.

RollingUpgradeProgressInfo

Information about the number of virtual machine instances in each upgrade state.

Name Type Description
failedInstanceCount

integer

The number of instances that have failed to be upgraded successfully.

inProgressInstanceCount

integer

The number of instances that are currently being upgraded.

pendingInstanceCount

integer

The number of instances that have not yet begun to be upgraded.

successfulInstanceCount

integer

The number of instances that have been successfully upgraded.

UpgradeOperationHistoricalStatusInfo

Virtual Machine Scale Set OS Upgrade History operation response.

Name Type Description
location

string

Resource location

properties

UpgradeOperationHistoricalStatusInfoProperties

Information about the properties of the upgrade operation.

type

string

Resource type

UpgradeOperationHistoricalStatusInfoProperties

Describes each OS upgrade on the Virtual Machine Scale Set.

Name Type Description
error

ApiError

Error Details for this upgrade if there are any.

progress

RollingUpgradeProgressInfo

Counts of the VMs in each state.

rollbackInfo

RollbackStatusInfo

Information about OS rollback if performed

runningStatus

UpgradeOperationHistoryStatus

Information about the overall status of the upgrade operation.

startedBy

UpgradeOperationInvoker

Invoker of the Upgrade Operation

targetImageReference

ImageReference

Image Reference details

UpgradeOperationHistoryStatus

Information about the current running state of the overall upgrade.

Name Type Description
code

UpgradeState

Code indicating the current status of the upgrade.

endTime

string

End time of the upgrade.

startTime

string

Start time of the upgrade.

UpgradeOperationInvoker

Invoker of the Upgrade Operation

Name Type Description
Platform

string

Unknown

string

User

string

UpgradeState

Code indicating the current status of the upgrade.

Name Type Description
Cancelled

string

Completed

string

Faulted

string

RollingForward

string

VirtualMachineScaleSetListOSUpgradeHistory

List of Virtual Machine Scale Set OS Upgrade History operation response.

Name Type Description
nextLink

string

The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades.

value

UpgradeOperationHistoricalStatusInfo[]

The list of OS upgrades performed on the virtual machine scale set.