你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Virtual Machine Scale Set Rolling Upgrades - Get Latest

Gets the status of the latest virtual machine scale set rolling upgrade.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest?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

RollingUpgradeStatusInfo

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

VirtualMachineScaleSetRollingUpgrade_GetLatest_MaximumSet_Gen
VirtualMachineScaleSetRollingUpgrade_GetLatest_MinimumSet_Gen

VirtualMachineScaleSetRollingUpgrade_GetLatest_MaximumSet_Gen

Sample request

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

Sample response

{
  "properties": {
    "policy": {
      "maxBatchInstancePercent": 49,
      "maxUnhealthyInstancePercent": 81,
      "maxUnhealthyUpgradedInstancePercent": 98,
      "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa",
      "enableCrossZoneUpgrade": true,
      "prioritizeUnhealthyInstances": true,
      "rollbackFailedInstancesOnPolicyBreach": true,
      "maxSurge": true
    },
    "runningStatus": {
      "code": "RollingForward",
      "startTime": "2021-11-30T13:06:23.362Z",
      "lastAction": "Start",
      "lastActionTime": "2021-11-30T13:06:23.362Z"
    },
    "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"
    }
  },
  "id": "aaaaaaaaaa",
  "name": "aaaaaaaaaaaaaaaaaaa",
  "type": "aaaaaaaaaaaaaaaaaaaaa",
  "location": "aaaaaa",
  "tags": {
    "key8533": "aaaaaaaaaaaaaaaaaaaaaaaa"
  }
}

VirtualMachineScaleSetRollingUpgrade_GetLatest_MinimumSet_Gen

Sample request

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

Sample response

{
  "location": "aaaaaa",
  "id": "aaaaaaaaaa"
}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

InnerError

Inner error details.

RollingUpgradeActionType

The last action performed on the rolling upgrade.

RollingUpgradePolicy

The configuration parameters used while performing a rolling upgrade.

RollingUpgradeProgressInfo

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

RollingUpgradeRunningStatus

Information about the current running state of the overall upgrade.

RollingUpgradeStatusCode

Code indicating the current status of the upgrade.

RollingUpgradeStatusInfo

The status of the latest virtual machine scale set rolling upgrade.

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.

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

RollingUpgradeActionType

The last action performed on the rolling upgrade.

Name Type Description
Cancel

string

Start

string

RollingUpgradePolicy

The configuration parameters used while performing a rolling upgrade.

Name Type Description
enableCrossZoneUpgrade

boolean

Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.

maxBatchInstancePercent

integer

The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.

maxSurge

boolean

Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch.

maxUnhealthyInstancePercent

integer

The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.

maxUnhealthyUpgradedInstancePercent

integer

The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.

pauseTimeBetweenBatches

string

The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).

prioritizeUnhealthyInstances

boolean

Upgrade all unhealthy instances in a scale set before any healthy instances.

rollbackFailedInstancesOnPolicyBreach

boolean

Rollback failed instances to previous model if the Rolling Upgrade policy is violated.

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.

RollingUpgradeRunningStatus

Information about the current running state of the overall upgrade.

Name Type Description
code

RollingUpgradeStatusCode

Code indicating the current status of the upgrade.

lastAction

RollingUpgradeActionType

The last action performed on the rolling upgrade.

lastActionTime

string

Last action time of the upgrade.

startTime

string

Start time of the upgrade.

RollingUpgradeStatusCode

Code indicating the current status of the upgrade.

Name Type Description
Cancelled

string

Completed

string

Faulted

string

RollingForward

string

RollingUpgradeStatusInfo

The status of the latest virtual machine scale set rolling upgrade.

Name Type Description
id

string

Resource Id

location

string

Resource location

name

string

Resource name

properties.error

ApiError

Error details for this upgrade, if there are any.

properties.policy

RollingUpgradePolicy

The rolling upgrade policies applied for this upgrade.

properties.progress

RollingUpgradeProgressInfo

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

properties.runningStatus

RollingUpgradeRunningStatus

Information about the current running state of the overall upgrade.

tags

object

Resource tags

type

string

Resource type