Freigeben über


Virtual Machine Images - Get

Gets a virtual machine image.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}?api-version=2024-07-01

URI Parameters

Name In Required Type Description
location
path True

string

The name of a supported Azure region.

offer
path True

string

A valid image publisher offer.

publisherName
path True

string

A valid image publisher.

skus
path True

string

A valid image SKU.

subscriptionId
path True

string

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

version
path True

string

A valid image SKU version.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

VirtualMachineImage

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

VirtualMachineImage_Get_MaximumSet_Gen
VirtualMachineImage_Get_MinimumSet_Gen

VirtualMachineImage_Get_MaximumSet_Gen

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/aaaaaa/publishers/aaa/artifacttypes/vmimage/offers/aaaaaaaaaaaaaaaaaaaaaaaaaaaaa/skus/aaaaaaaaaaaaaaaaaaaaaaaaaaa/versions/aaaaaaaaaaaaaaaaaaa?api-version=2024-07-01

Sample response

{
  "properties": {
    "plan": {
      "publisher": "aaaaaaaaaaaaaaaaaaa",
      "name": "aaaaaaaaa",
      "product": "aaaaaaaaaaaaaa"
    },
    "osDiskImage": {
      "operatingSystem": "Windows"
    },
    "dataDiskImages": [
      {
        "lun": 17
      }
    ],
    "automaticOSUpgradeProperties": {
      "automaticOSUpgradeSupported": true
    },
    "hyperVGeneration": "V1",
    "disallowed": {
      "vmDiskType": "None"
    },
    "features": [
      {
        "name": "aaaaaaaaaaaaaaaaaaaaa",
        "value": "aaaaaaaaaaaaaaaaaaaa"
      }
    ],
    "imageDeprecationStatus": {
      "imageState": "ScheduledForDeprecation",
      "scheduledDeprecationTime": "2023-01-13T00:00:00+00:00",
      "alternativeOption": {
        "type": "Offer",
        "value": "aaaaaaa"
      }
    }
  },
  "name": "aaaaaaaaa",
  "location": "aaaaa",
  "tags": {
    "key6817": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  },
  "extendedLocation": {
    "name": "aaaaaaaaaaaaaaaaaaaaa",
    "type": "EdgeZone"
  },
  "id": "aaaaaaaaaaa"
}

VirtualMachineImage_Get_MinimumSet_Gen

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/aaaaaaaaaaaa/publishers/aaaaaaaaaaa/artifacttypes/vmimage/offers/aa/skus/aaaaaaaaa/versions/aaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2024-07-01

Sample response

{
  "name": "aaaaaaaaa",
  "location": "aaaaa",
  "id": "aaaaaaaaaaa"
}

Definitions

Name Description
AlternativeOption

Describes the alternative option specified by the Publisher for this image when this image is deprecated.

AlternativeType

Describes the type of the alternative option.

ApiError

Api error.

ApiErrorBase

Api error base.

ArchitectureTypes

Specifies the Architecture Type

AutomaticOSUpgradeProperties

Describes automatic OS upgrade properties on the image.

CloudError

An error response from the Compute service.

DataDiskImage

Contains the data disk images information.

DisallowedConfiguration

Specifies the disallowed configuration for a virtual machine image.

ExtendedLocation

The complex type of the extended location.

ExtendedLocationTypes

The type of the extended location.

HyperVGenerationTypes

Specifies the HyperVGeneration Type

ImageDeprecationStatus

Describes image deprecation status properties on the image.

ImageState

Describes the state of the image.

InnerError

Inner error details.

OperatingSystemTypes

The operating system of the osDiskImage.

OSDiskImage

Contains the os disk image information.

PurchasePlan

Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.

VirtualMachineImage

Describes a Virtual Machine Image.

VirtualMachineImageFeature

Specifies additional capabilities supported by the image

VmDiskTypes

VM disk types which are disallowed.

AlternativeOption

Describes the alternative option specified by the Publisher for this image when this image is deprecated.

Name Type Description
type

AlternativeType

Describes the type of the alternative option.

value

string

Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan.

AlternativeType

Describes the type of the alternative option.

Name Type Description
None

string

Offer

string

Plan

string

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.

ArchitectureTypes

Specifies the Architecture Type

Name Type Description
Arm64

string

x64

string

AutomaticOSUpgradeProperties

Describes automatic OS upgrade properties on the image.

Name Type Description
automaticOSUpgradeSupported

boolean

Specifies whether automatic OS upgrade is supported on the image.

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

DataDiskImage

Contains the data disk images information.

Name Type Description
lun

integer

Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.

DisallowedConfiguration

Specifies the disallowed configuration for a virtual machine image.

Name Type Description
vmDiskType

VmDiskTypes

VM disk types which are disallowed.

ExtendedLocation

The complex type of the extended location.

Name Type Description
name

string

The name of the extended location.

type

ExtendedLocationTypes

The type of the extended location.

ExtendedLocationTypes

The type of the extended location.

Name Type Description
EdgeZone

string

HyperVGenerationTypes

Specifies the HyperVGeneration Type

Name Type Description
V1

string

V2

string

ImageDeprecationStatus

Describes image deprecation status properties on the image.

Name Type Description
alternativeOption

AlternativeOption

Describes the alternative option specified by the Publisher for this image when this image is deprecated.

imageState

ImageState

Describes the state of the image.

scheduledDeprecationTime

string

The time, in future, at which this image will be marked as deprecated. This scheduled time is chosen by the Publisher.

ImageState

Describes the state of the image.

Name Type Description
Active

string

Deprecated

string

ScheduledForDeprecation

string

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

OperatingSystemTypes

The operating system of the osDiskImage.

Name Type Description
Linux

string

Windows

string

OSDiskImage

Contains the os disk image information.

Name Type Description
operatingSystem

OperatingSystemTypes

The operating system of the osDiskImage.

PurchasePlan

Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.

Name Type Description
name

string

The plan ID.

product

string

Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

publisher

string

The publisher ID.

VirtualMachineImage

Describes a Virtual Machine Image.

Name Type Description
extendedLocation

ExtendedLocation

The extended location of the Virtual Machine.

id

string

Resource Id

location

string

The supported Azure location of the resource.

name

string

The name of the resource.

properties.architecture

ArchitectureTypes

Specifies the Architecture Type

properties.automaticOSUpgradeProperties

AutomaticOSUpgradeProperties

Describes automatic OS upgrade properties on the image.

properties.dataDiskImages

DataDiskImage[]

Contains the data disk images information.

properties.disallowed

DisallowedConfiguration

Specifies disallowed configuration for the VirtualMachine created from the image

properties.features

VirtualMachineImageFeature[]

Specifies additional capabilities supported by the image

properties.hyperVGeneration

HyperVGenerationTypes

Specifies the HyperVGeneration Type

properties.imageDeprecationStatus

ImageDeprecationStatus

Describes image deprecation status properties on the image.

properties.osDiskImage

OSDiskImage

Contains the os disk image information.

properties.plan

PurchasePlan

Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.

tags

object

Specifies the tags that are assigned to the virtual machine. For more information about using tags, see Using tags to organize your Azure resources.

VirtualMachineImageFeature

Specifies additional capabilities supported by the image

Name Type Description
name

string

The name of the feature.

value

string

The corresponding value for the feature.

VmDiskTypes

VM disk types which are disallowed.

Name Type Description
None

string

Unmanaged

string