Share via


Consoles - List By Virtual Machine

List consoles of the virtual machine.
Get a list of consoles for the provided virtual machine.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles?api-version=2025-02-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

virtualMachineName
path True

string

pattern: ^([a-zA-Z0-9][a-zA-Z0-9]{0,62}[a-zA-Z0-9])$

The name of the virtual machine.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

ConsoleList

The resource list has been successfully retrieved.

Other Status Codes

ErrorResponse

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

List consoles of the virtual machine

Sample request

GET https://management.azure.com/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName/consoles?api-version=2025-02-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/virtualMachines/virtualMachineName/consoles/default",
      "name": "default",
      "systemData": {
        "createdAt": "2021-01-22T13:27:03.008Z",
        "createdBy": "identityA",
        "createdByType": "Application",
        "lastModifiedAt": "2021-01-22T13:29:03.001Z",
        "lastModifiedBy": "identityB",
        "lastModifiedByType": "User"
      },
      "type": "Microsoft.NetworkCloud/virtualMachines/consoles",
      "location": "location",
      "tags": {
        "key1": "myvalue1",
        "key2": "myvalue2"
      },
      "extendedLocation": {
        "type": "CustomLocation",
        "name": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"
      },
      "properties": {
        "sshPublicKey": {
          "keyData": "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"
        },
        "enabled": "True",
        "expiration": "2022-06-01T01:27:03.008Z",
        "provisioningState": "Succeeded",
        "privateLinkServiceId": "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateLinkServices/console-pls",
        "virtualMachineAccessId": "VirtualMachineAccessId",
        "detailedStatus": "Ready",
        "detailedStatusMessage": "Console is ready for use"
      }
    }
  ],
  "nextLink": "https://fully.qualified.hyperlink"
}

Definitions

Name Description
Console

Console represents the console of an on-premises Network Cloud virtual machine.

ConsoleDetailedStatus

The more detailed status of the console.

ConsoleEnabled

The indicator of whether the console access is enabled.

ConsoleList

ConsoleList represents a list of virtual machine consoles.

ConsoleProvisioningState

The provisioning state of the virtual machine console.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.

SshPublicKey

SshPublicKey represents the public key used to authenticate with a resource through SSH.

systemData

Metadata pertaining to creation and last modification of the resource.

Console

Console represents the console of an on-premises Network Cloud virtual machine.

Name Type Description
etag

string

Resource ETag.

extendedLocation

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.
The extended location of the cluster manager associated with the cluster this virtual machine is created on.

id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.detailedStatus

ConsoleDetailedStatus

The more detailed status of the console.

properties.detailedStatusMessage

string

The descriptive message about the current detailed status.

properties.enabled

ConsoleEnabled

The indicator of whether the console access is enabled.

properties.expiration

string (date-time)

The date and time after which the key will be disallowed access.

properties.privateLinkServiceId

string (arm-id)

The resource ID of the private link service that is used to provide virtual machine console access.

properties.provisioningState

ConsoleProvisioningState

The provisioning state of the virtual machine console.

properties.sshPublicKey

SshPublicKey

SshPublicKey represents the public key used to authenticate with a resource through SSH.
The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH private key for logging in.

properties.virtualMachineAccessId

string

The unique identifier for the virtual machine that is used to access the console.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ConsoleDetailedStatus

The more detailed status of the console.

Value Description
Ready
Error

ConsoleEnabled

The indicator of whether the console access is enabled.

Value Description
True
False

ConsoleList

ConsoleList represents a list of virtual machine consoles.

Name Type Description
nextLink

string

The link used to get the next page of operations.

value

Console[]

The list of virtual machine consoles.

ConsoleProvisioningState

The provisioning state of the virtual machine console.

Value Description
Succeeded
Failed
Canceled
Provisioning
Accepted

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ExtendedLocation

ExtendedLocation represents the Azure custom location where the resource will be created.

Name Type Description
name

string

The resource ID of the extended location on which the resource will be created.

type

string

The extended location type, for example, CustomLocation.

SshPublicKey

SshPublicKey represents the public key used to authenticate with a resource through SSH.

Name Type Description
keyData

string

minLength: 1

The SSH public key data.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.