Retrieve information about the run-time state of a VM.
Inputs
フィールド
種類
説明
resourceGroupName [required]
string
subscriptionId [required]
string
virtualMachineName [required]
string
Outputs
Expand All
フィールド
種類
説明
virtualMachineInstanceView [required]
object
currentProvisioningState [required]
string,null
currentPowerState [required]
string,null
platformUpdateDomain
number
Specifies the update domain of the virtual machine.
platformFaultDomain
number
Specifies the fault domain of the virtual machine.
computerName
string
The computer name assigned to the virtual machine.
osName
string
The Operating System running on the virtual machine.
osVersion
string
The version of Operating System running on the virtual machine.
hyperVGeneration
string
Specifies the HyperVGeneration Type associated with a resource
rdpThumbPrint
string
The Remote desktop certificate thumbprint.
vmAgent
object
The VM Agent running on the virtual machine.
vmAgentVersion
string
The VM Agent full version.
extensionHandlers
[object]
The virtual machine extension handler instance view.
type
string
Specifies the type of the extension; an example is "CustomScriptExtension".
typeHandlerVersion
string
Specifies the version of the script handler.
status
object
The extension handler status.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.
time
date-time
The time of the status.
statuses
[object]
The resource status information.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.
time
date-time
The time of the status.
maintenanceRedeployStatus
object
The Maintenance Operation status on the virtual machine.
isCustomerInitiatedMaintenanceAllowed
boolean
True, if customer is allowed to perform Maintenance.
preMaintenanceWindowStartTime
date-time
Start Time for the Pre Maintenance Window.
preMaintenanceWindowEndTime
date-time
End Time for the Pre Maintenance Window.
maintenanceWindowStartTime
date-time
Start Time for the Maintenance Window.
maintenanceWindowEndTime
date-time
End Time for the Maintenance Window.
lastOperationResultCode
enum
The Last Maintenance Operation Result Code.
Allowed enum values: None,RetryLater,MaintenanceAborted,MaintenanceCompleted
lastOperationMessage
string
Message returned for the last Maintenance Operation.
disks
[object]
The virtual machine disk information.
name
string
The disk name.
encryptionSettings
[object]
Specifies the encryption settings for the OS Disk.
Minimum api-version: 2015-06-15
diskEncryptionKey
object
Specifies the location of the disk encryption key, which is a Key Vault Secret.
secretUrl [required]
string
The URL referencing a secret in a Key Vault.
sourceVault [required]
object
The relative URL of the Key Vault containing the secret.
id
string
Resource Id
keyEncryptionKey
object
Specifies the location of the key encryption key in Key Vault.
keyUrl [required]
string
The URL referencing a key encryption key in Key Vault.
sourceVault [required]
object
The relative URL of the Key Vault containing the key.
id
string
Resource Id
enabled
boolean
Specifies whether disk encryption should be enabled on the virtual machine.
statuses
[object]
The resource status information.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.
time
date-time
The time of the status.
extensions
[object]
The extensions information.
name
string
The virtual machine extension name.
type
string
Specifies the type of the extension; an example is "CustomScriptExtension".
typeHandlerVersion
string
Specifies the version of the script handler.
substatuses
[object]
The resource status information.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.
time
date-time
The time of the status.
statuses
[object]
The resource status information.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.
time
date-time
The time of the status.
vmHealth
object
The health status for the VM. NOTE: This property will not be serialized. It can only be populated by the server.
status
object
The health status information for the VM. NOTE: This property will not be serialized. It can only be populated by the server.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.
time
date-time
The time of the status.
bootDiagnostics
object
Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
consoleScreenshotBlobUri
string
The console screenshot blob URI. Note: This will not be set if boot diagnostics is currently enabled with managed storage. NOTE: This property will not be serialized. It can only be populated by the server.
serialConsoleLogBlobUri
string
The serial console log blob Uri. Note: This will not be set if boot diagnostics is currently enabled with managed storage. NOTE: This property will not be serialized. It can only be populated by the server.
status
object
The boot diagnostics status information for the VM. Note: It will be set only if there are errors encountered in enabling boot diagnostics. NOTE: This property will not be serialized. It can only be populated by the server.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.
time
date-time
The time of the status.
assignedHost
string
Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. NOTE: This property will not be serialized. It can only be populated by the server.
statuses
[object]
The resource status information.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.
time
date-time
The time of the status.
patchStatus
object
[Preview Feature] The status of virtual machine patch operations.
availablePatchSummary
object
The available patch summary of the latest assessment operation for the virtual machine.
status
string
The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." NOTE: This property will not be serialized. It can only be populated by the server.
assessmentActivityId
string
The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. NOTE: This property will not be serialized. It can only be populated by the server.
rebootPending
boolean
The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. NOTE: This property will not be serialized. It can only be populated by the server.
criticalAndSecurityPatchCount
number
The number of critical or security patches that have been detected as available and not yet installed. NOTE: This property will not be serialized. It can only be populated by the server.
otherPatchCount
number
The number of all available patches excluding critical and security. NOTE: This property will not be serialized. It can only be populated by the server.
startTime
date-time
The UTC timestamp when the operation began. NOTE: This property will not be serialized. It can only be populated by the server.
lastModifiedTime
date-time
The UTC timestamp when the operation began. NOTE: This property will not be serialized. It can only be populated by the server.
error
object
The errors that were encountered during execution of the operation. The details array contains the list of them. NOTE: This property will not be serialized. It can only be populated by the server.
details
[object]
The Api error details
code
string
The error code.
target
string
The target of the particular error.
message
string
The error message.
innererror
object
The Api inner error
exceptiontype
string
The exception type.
errordetail
string
The internal error message or exception dump.
code
string
The error code.
target
string
The target of the particular error.
message
string
The error message.
lastPatchInstallationSummary
object
The installation summary of the latest installation operation for the virtual machine.
status
string
The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." NOTE: This property will not be serialized. It can only be populated by the server.
installationActivityId
string
The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. NOTE: This property will not be serialized. It can only be populated by the server.
maintenanceWindowExceeded
boolean
Describes whether the operation ran out of time before it completed all its intended actions NOTE: This property will not be serialized. It can only be populated by the server.
notSelectedPatchCount
number
The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry. NOTE: This property will not be serialized. It can only be populated by the server.
excludedPatchCount
number
The number of all available patches but excluded explicitly by a customer-specified exclusion list match. NOTE: This property will not be serialized. It can only be populated by the server.
pendingPatchCount
number
The number of all available patches expected to be installed over the course of the patch installation operation. NOTE: This property will not be serialized. It can only be populated by the server.
installedPatchCount
number
The count of patches that successfully installed. NOTE: This property will not be serialized. It can only be populated by the server.
failedPatchCount
number
The count of patches that failed installation. NOTE: This property will not be serialized. It can only be populated by the server.
startTime
date-time
The UTC timestamp when the operation began. NOTE: This property will not be serialized. It can only be populated by the server.
lastModifiedTime
date-time
The UTC timestamp when the operation began. NOTE: This property will not be serialized. It can only be populated by the server.
error
object
The errors that were encountered during execution of the operation. The details array contains the list of them. NOTE: This property will not be serialized. It can only be populated by the server.
details
[object]
The Api error details
code
string
The error code.
target
string
The target of the particular error.
message
string
The error message.
innererror
object
The Api inner error
exceptiontype
string
The exception type.
errordetail
string
The internal error message or exception dump.
code
string
The error code.
target
string
The target of the particular error.
message
string
The error message.
configurationStatuses
[object]
The enablement status of the specified patchMode NOTE: This property will not be serialized. It can only be populated by the server.
code
string
The status code.
level
enum
The level code.
Allowed enum values: Info,Warning,Error
displayStatus
string
The short localizable label for the status.
message
string
The detailed status message, including for alerts and error messages.