共用方式為


Images - Create Or Update

建立或更新映像。

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

URI 參數

名稱 位於 必要 類型 Description
imageName
path True

string

影像的名稱。

resourceGroupName
path True

string

資源群組的名稱。

subscriptionId
path True

string

可唯一識別 Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶識別碼會構成每個服務呼叫 URI 的一部分。

api-version
query True

string

用戶端 API 版本。

要求本文

名稱 必要 類型 Description
location True

string

資源位置

extendedLocation

ExtendedLocation

Image 的擴充位置。

properties.hyperVGeneration

HyperVGenerationTypes

指定從映像建立之 VirtualMachine 的 HyperVGenerationType。 如果映射來源是 Blob,則從 API 版本 2019-03-01 開始,我們需要使用者指定值,如果來源是磁碟或快照集等受控資源,我們可能需要使用者指定 屬性,如果我們無法從來源受控資源推斷它。

properties.sourceVirtualMachine

SubResource

建立映像的來源虛擬機。

properties.storageProfile

ImageStorageProfile

指定虛擬機器磁碟的儲存體設定。

tags

object

資源標籤

回應

名稱 類型 Description
200 OK

Image

確定

201 Created

Image

建立時間

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

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.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-03-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"
      }
    }
  }
}

範例回覆

{
  "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.

範例要求

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

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

範例回覆

{
  "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.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-03-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"
      }
    }
  }
}

範例回覆

{
  "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.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-03-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
    }
  }
}

範例回覆

{
  "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.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-03-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"
      }
    }
  }
}

範例回覆

{
  "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.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-03-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
    }
  }
}

範例回覆

{
  "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.

範例要求

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

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

範例回覆

{
  "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.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-03-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
    }
  }
}

範例回覆

{
  "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.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-03-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
    }
  }
}

範例回覆

{
  "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.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage?api-version=2024-03-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
    }
  }
}

範例回覆

{
  "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"
}

定義

名稱 Description
ApiError

Api 錯誤。

ApiErrorBase

Api 錯誤基底。

CachingTypes

指定快取需求。 可能的值為: None、ReadOnly、ReadWrite。 預設值為: 標準記憶體為 None。進階記憶體的 ReadOnly。

CloudError

計算服務的錯誤回應。

DiskEncryptionSetParameters

描述可針對磁碟指定的客戶受控磁碟加密集資源標識符參數。 注意: 磁碟加密集資源標識碼只能針對受控磁碟指定。 如需詳細資訊,請參閱 https://aka.ms/mdssewithcmkoverview

ExtendedLocation

擴充位置的複雜類型。

ExtendedLocationTypes

擴充位置的類型。

HyperVGenerationTypes

指定從映像建立之 VirtualMachine 的 HyperVGenerationType。 如果映射來源是 Blob,則從 API 版本 2019-03-01 開始,我們需要使用者指定值,如果來源是磁碟或快照集等受控資源,我們可能需要使用者指定 屬性,如果我們無法從來源受控資源推斷它。

Image

來源使用者映像虛擬硬碟。 在連接至虛擬機之前,將會先複製虛擬硬碟。 如果提供SourceImage,目的地虛擬硬碟不得存在。

ImageDataDisk

描述數據磁碟。

ImageOSDisk

描述操作系統磁碟。

ImageStorageProfile

描述記憶體配置檔。

InnerError

內部錯誤詳細數據。

OperatingSystemStateTypes

OS 狀態。 針對受控映像,請使用一般化。

OperatingSystemTypes

此屬性可讓您指定從自定義映像建立 VM 時,磁碟中包含的 OS 類型。 可能的值為: Windows、Linux。

StorageAccountTypes

指定受控磁碟的記憶體帳戶類型。 注意:UltraSSD_LRS只能與數據磁碟搭配使用,它不能與OS磁碟搭配使用。

SubResource

ApiError

Api 錯誤。

名稱 類型 Description
code

string

錯誤碼。

details

ApiErrorBase[]

API 錯誤詳細數據

innererror

InnerError

Api 內部錯誤

message

string

錯誤訊息。

target

string

特定錯誤的目標。

ApiErrorBase

Api 錯誤基底。

名稱 類型 Description
code

string

錯誤碼。

message

string

錯誤訊息。

target

string

特定錯誤的目標。

CachingTypes

指定快取需求。 可能的值為: None、ReadOnly、ReadWrite。 預設值為: 標準記憶體為 None。進階記憶體的 ReadOnly。

名稱 類型 Description
None

string

ReadOnly

string

ReadWrite

string

CloudError

計算服務的錯誤回應。

名稱 類型 Description
error

ApiError

Api 錯誤。

DiskEncryptionSetParameters

描述可針對磁碟指定的客戶受控磁碟加密集資源標識符參數。 注意: 磁碟加密集資源標識碼只能針對受控磁碟指定。 如需詳細資訊,請參閱 https://aka.ms/mdssewithcmkoverview

名稱 類型 Description
id

string

資源標識碼

ExtendedLocation

擴充位置的複雜類型。

名稱 類型 Description
name

string

擴充位置的名稱。

type

ExtendedLocationTypes

擴充位置的類型。

ExtendedLocationTypes

擴充位置的類型。

名稱 類型 Description
EdgeZone

string

HyperVGenerationTypes

指定從映像建立之 VirtualMachine 的 HyperVGenerationType。 如果映射來源是 Blob,則從 API 版本 2019-03-01 開始,我們需要使用者指定值,如果來源是磁碟或快照集等受控資源,我們可能需要使用者指定 屬性,如果我們無法從來源受控資源推斷它。

名稱 類型 Description
V1

string

V2

string

Image

來源使用者映像虛擬硬碟。 在連接至虛擬機之前,將會先複製虛擬硬碟。 如果提供SourceImage,目的地虛擬硬碟不得存在。

名稱 類型 Description
extendedLocation

ExtendedLocation

Image 的擴充位置。

id

string

資源標識碼

location

string

資源位置

name

string

資源名稱

properties.hyperVGeneration

HyperVGenerationTypes

指定從映像建立之 VirtualMachine 的 HyperVGenerationType。 如果映射來源是 Blob,則從 API 版本 2019-03-01 開始,我們需要使用者指定值,如果來源是磁碟或快照集等受控資源,我們可能需要使用者指定 屬性,如果我們無法從來源受控資源推斷它。

properties.provisioningState

string

布建狀態。

properties.sourceVirtualMachine

SubResource

建立映像的來源虛擬機。

properties.storageProfile

ImageStorageProfile

指定虛擬機器磁碟的儲存體設定。

tags

object

資源標籤

type

string

資源類型

ImageDataDisk

描述數據磁碟。

名稱 類型 Description
blobUri

string

虛擬硬碟。

caching

CachingTypes

指定快取需求。 可能的值為: None、ReadOnly、ReadWrite。 預設值為: 標準記憶體為 None。進階記憶體的 ReadOnly。

diskEncryptionSet

DiskEncryptionSetParameters

指定受控映像磁碟的客戶受控磁碟加密集資源標識碼。

diskSizeGB

integer

指定以 GB 為單位的空白資料磁碟大小。 此元素可用來覆寫虛擬機映像中的磁碟名稱。 此值不能大於 1023 GB。

lun

integer

指定數據磁碟的邏輯單位編號。 此值是用來識別 VM 內的數據磁碟,因此對於連結至 VM 的每個數據磁碟而言,都必須是唯一的。

managedDisk

SubResource

managedDisk。

snapshot

SubResource

快照集。

storageAccountType

StorageAccountTypes

指定受控磁碟的記憶體帳戶類型。 注意:UltraSSD_LRS只能與數據磁碟搭配使用,它不能與OS磁碟搭配使用。

ImageOSDisk

描述操作系統磁碟。

名稱 類型 Description
blobUri

string

虛擬硬碟。

caching

CachingTypes

指定快取需求。 可能的值為: None、ReadOnly、ReadWrite。 預設值為: 標準記憶體為 None。進階記憶體的 ReadOnly。

diskEncryptionSet

DiskEncryptionSetParameters

指定受控映像磁碟的客戶受控磁碟加密集資源標識碼。

diskSizeGB

integer

指定以 GB 為單位的空白資料磁碟大小。 此元素可用來覆寫虛擬機映像中的磁碟名稱。 此值不能大於 1023 GB。

managedDisk

SubResource

managedDisk。

osState

OperatingSystemStateTypes

OS 狀態。 針對受控映像,請使用一般化。

osType

OperatingSystemTypes

此屬性可讓您指定從自定義映像建立 VM 時,磁碟中包含的 OS 類型。 可能的值為: Windows、Linux。

snapshot

SubResource

快照集。

storageAccountType

StorageAccountTypes

指定受控磁碟的記憶體帳戶類型。 注意:UltraSSD_LRS只能與數據磁碟搭配使用,它不能與OS磁碟搭配使用。

ImageStorageProfile

描述記憶體配置檔。

名稱 類型 Description
dataDisks

ImageDataDisk[]

指定用來將資料磁碟加入至虛擬機器的參數。

如需磁碟的詳細資訊,請參閱 關於 Azure 虛擬機的磁碟和 VHD

osDisk

ImageOSDisk

指定虛擬機所使用的作業系統磁碟相關信息。

如需磁碟的詳細資訊,請參閱 關於 Azure 虛擬機的磁碟和 VHD

zoneResilient

boolean

指定映像是否具有區域復原性。 預設值為 false。 區域復原映像只能在提供區域備援記憶體 (ZRS) 的區域建立。

InnerError

內部錯誤詳細數據。

名稱 類型 Description
errordetail

string

內部錯誤訊息或例外狀況傾印。

exceptiontype

string

例外狀況型別。

OperatingSystemStateTypes

OS 狀態。 針對受控映像,請使用一般化。

名稱 類型 Description
Generalized

string

一般化映像。 必須在部署期間布建。

Specialized

string

特製化映像。 包含已布建的 OS 磁碟。

OperatingSystemTypes

此屬性可讓您指定從自定義映像建立 VM 時,磁碟中包含的 OS 類型。 可能的值為: Windows、Linux。

名稱 類型 Description
Linux

string

Windows

string

StorageAccountTypes

指定受控磁碟的記憶體帳戶類型。 注意:UltraSSD_LRS只能與數據磁碟搭配使用,它不能與OS磁碟搭配使用。

名稱 類型 Description
PremiumV2_LRS

string

Premium_LRS

string

Premium_ZRS

string

StandardSSD_LRS

string

StandardSSD_ZRS

string

Standard_LRS

string

UltraSSD_LRS

string

SubResource

名稱 類型 Description
id

string

資源標識碼