Images - Create Or Update

Create or update an image.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}?api-version=2024-07-01

URI Parameters

Name In Required Type Description
imageName
path True

string

The name of the image.

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.

api-version
query True

string

Client Api Version.

Request Body

Name Required Type Description
location True

string

Resource location

extendedLocation

ExtendedLocation

The extended location of the Image.

properties.hyperVGeneration

HyperVGenerationTypes

Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.

properties.sourceVirtualMachine

SubResource

The source virtual machine from which Image is created.

properties.storageProfile

ImageStorageProfile

Specifies the storage settings for the virtual machine disks.

tags

object

Resource tags

Responses

Name Type Description
200 OK

Image

OK

201 Created

Image

Created

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

Create a virtual machine image from a blob with DiskEncryptionSet resource.
Create a virtual machine image from a blob.
Create a virtual machine image from a managed disk with DiskEncryptionSet resource.
Create a virtual machine image from a managed disk.
Create a virtual machine image from a snapshot with DiskEncryptionSet resource.
Create a virtual machine image from a snapshot.
Create a virtual machine image from an existing virtual machine.
Create a virtual machine image that includes a data disk from a blob.
Create a virtual machine image that includes a data disk from a managed disk.
Create a virtual machine image that includes a data disk from a snapshot.

Create a virtual machine image from a blob with DiskEncryptionSet resource.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "osState": "Generalized"
      }
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "osState": "Generalized",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "caching": "ReadWrite"
      },
      "dataDisks": []
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "osState": "Generalized",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "caching": "ReadWrite"
      },
      "dataDisks": []
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image from a blob.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "osState": "Generalized"
      },
      "zoneResilient": true
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "osState": "Generalized",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "caching": "ReadWrite"
      },
      "dataDisks": [],
      "zoneResilient": true
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "osState": "Generalized",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "caching": "ReadWrite"
      },
      "dataDisks": [],
      "zoneResilient": true
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image from a managed disk with DiskEncryptionSet resource.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "osState": "Generalized"
      }
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": []
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": []
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image from a managed disk.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "osState": "Generalized"
      },
      "zoneResilient": true
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": [],
      "zoneResilient": true
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": [],
      "zoneResilient": true
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image from a snapshot with DiskEncryptionSet resource.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "osState": "Generalized"
      }
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": []
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "diskEncryptionSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": []
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image from a snapshot.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "osState": "Generalized"
      },
      "zoneResilient": false
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": [],
      "zoneResilient": false
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": [],
      "zoneResilient": false
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image from an existing virtual machine.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "sourceVirtualMachine": {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"
    }
  }
}

Sample response

{
  "properties": {
    "sourceVirtualMachine": {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"
    },
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "osState": "Generalized",
        "managedDisk": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myVM_OsDisk_1_6dc293b7d811433196903acf92665022"
        },
        "caching": "ReadWrite"
      },
      "dataDisks": [],
      "zoneResilient": false
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "sourceVirtualMachine": {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"
    },
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "osState": "Generalized",
        "managedDisk": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myVM_OsDisk_1_6dc293b7d811433196903acf92665022"
        },
        "caching": "ReadWrite"
      },
      "dataDisks": [],
      "zoneResilient": false
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image that includes a data disk from a blob.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "osState": "Generalized"
      },
      "dataDisks": [
        {
          "lun": 1,
          "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd"
        }
      ],
      "zoneResilient": false
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "osState": "Generalized",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "caching": "ReadWrite"
      },
      "dataDisks": [
        {
          "lun": 1,
          "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd"
        }
      ],
      "zoneResilient": false
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "osState": "Generalized",
        "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
        "caching": "ReadWrite"
      },
      "dataDisks": [
        {
          "lun": 1,
          "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd"
        }
      ],
      "zoneResilient": false
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image that includes a data disk from a managed disk.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "osState": "Generalized"
      },
      "dataDisks": [
        {
          "lun": 1,
          "managedDisk": {
            "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2"
          }
        }
      ],
      "zoneResilient": false
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": [
        {
          "lun": 1,
          "managedDisk": {
            "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2"
          }
        }
      ],
      "zoneResilient": false
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "managedDisk": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": [
        {
          "lun": 1,
          "managedDisk": {
            "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2"
          }
        }
      ],
      "zoneResilient": false
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Create a virtual machine image that includes a data disk from a snapshot.

Sample request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-07-01

{
  "location": "West US",
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "osState": "Generalized"
      },
      "dataDisks": [
        {
          "lun": 1,
          "snapshot": {
            "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"
          }
        }
      ],
      "zoneResilient": true
    }
  }
}

Sample response

{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": [
        {
          "lun": 1,
          "snapshot": {
            "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"
          }
        }
      ],
      "zoneResilient": true
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}
{
  "properties": {
    "storageProfile": {
      "osDisk": {
        "osType": "Linux",
        "snapshot": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
        },
        "osState": "Generalized",
        "caching": "ReadWrite"
      },
      "dataDisks": [
        {
          "lun": 1,
          "snapshot": {
            "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"
          }
        }
      ],
      "zoneResilient": true
    },
    "provisioningState": "Creating"
  },
  "type": "Microsoft.Compute/images",
  "location": "westus",
  "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
  "name": "myImage"
}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CachingTypes

Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.

CloudError

An error response from the Compute service.

DiskEncryptionSetParameters

Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.

ExtendedLocation

The complex type of the extended location.

ExtendedLocationTypes

The type of the extended location.

HyperVGenerationTypes

Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.

Image

The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

ImageDataDisk

Describes a data disk.

ImageOSDisk

Describes an Operating System disk.

ImageStorageProfile

Describes a storage profile.

InnerError

Inner error details.

OperatingSystemStateTypes

The OS State. For managed images, use Generalized.

OperatingSystemTypes

This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.

StorageAccountTypes

Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.

SubResource

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.

CachingTypes

Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.

Name Type Description
None

string

ReadOnly

string

ReadWrite

string

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

DiskEncryptionSetParameters

Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.

Name Type Description
id

string

Resource Id

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 HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.

Name Type Description
V1

string

V2

string

Image

The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

Name Type Description
extendedLocation

ExtendedLocation

The extended location of the Image.

id

string

Resource Id

location

string

Resource location

name

string

Resource name

properties.hyperVGeneration

HyperVGenerationTypes

Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.

properties.provisioningState

string

The provisioning state.

properties.sourceVirtualMachine

SubResource

The source virtual machine from which Image is created.

properties.storageProfile

ImageStorageProfile

Specifies the storage settings for the virtual machine disks.

tags

object

Resource tags

type

string

Resource type

ImageDataDisk

Describes a data disk.

Name Type Description
blobUri

string

The Virtual Hard Disk.

caching

CachingTypes

Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.

diskEncryptionSet

DiskEncryptionSetParameters

Specifies the customer managed disk encryption set resource id for the managed image disk.

diskSizeGB

integer

Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.

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.

managedDisk

SubResource

The managedDisk.

snapshot

SubResource

The snapshot.

storageAccountType

StorageAccountTypes

Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.

ImageOSDisk

Describes an Operating System disk.

Name Type Description
blobUri

string

The Virtual Hard Disk.

caching

CachingTypes

Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.

diskEncryptionSet

DiskEncryptionSetParameters

Specifies the customer managed disk encryption set resource id for the managed image disk.

diskSizeGB

integer

Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.

managedDisk

SubResource

The managedDisk.

osState

OperatingSystemStateTypes

The OS State. For managed images, use Generalized.

osType

OperatingSystemTypes

This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.

snapshot

SubResource

The snapshot.

storageAccountType

StorageAccountTypes

Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.

ImageStorageProfile

Describes a storage profile.

Name Type Description
dataDisks

ImageDataDisk[]

Specifies the parameters that are used to add a data disk to a virtual machine.

For more information about disks, see About disks and VHDs for Azure virtual machines.

osDisk

ImageOSDisk

Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see About disks and VHDs for Azure virtual machines.

zoneResilient

boolean

Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

OperatingSystemStateTypes

The OS State. For managed images, use Generalized.

Name Type Description
Generalized

string

Generalized image. Needs to be provisioned during deployment time.

Specialized

string

Specialized image. Contains already provisioned OS Disk.

OperatingSystemTypes

This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.

Name Type Description
Linux

string

Windows

string

StorageAccountTypes

Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.

Name Type Description
PremiumV2_LRS

string

Premium_LRS

string

Premium_ZRS

string

StandardSSD_LRS

string

StandardSSD_ZRS

string

Standard_LRS

string

UltraSSD_LRS

string

SubResource

Name Type Description
id

string

Resource Id