Microsoft.Compute snapshots 2023-04-02
Bicep 資源定義
快照集資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄。
資源格式
若要建立 Microsoft.Compute/snapshots 資源,請將下列 Bicep 新增至您的範本。
resource symbolicname 'Microsoft.Compute/snapshots@2023-04-02' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
sku: {
name: 'string'
}
extendedLocation: {
name: 'string'
type: 'EdgeZone'
}
properties: {
completionPercent: int
copyCompletionError: {
errorCode: 'CopySourceNotFound'
errorMessage: 'string'
}
creationData: {
createOption: 'string'
elasticSanResourceId: 'string'
galleryImageReference: {
communityGalleryImageId: 'string'
id: 'string'
lun: int
sharedGalleryImageId: 'string'
}
imageReference: {
communityGalleryImageId: 'string'
id: 'string'
lun: int
sharedGalleryImageId: 'string'
}
logicalSectorSize: int
performancePlus: bool
securityDataUri: 'string'
sourceResourceId: 'string'
sourceUri: 'string'
storageAccountId: 'string'
uploadSizeBytes: int
}
dataAccessAuthMode: 'string'
diskAccessId: 'string'
diskSizeGB: int
encryption: {
diskEncryptionSetId: 'string'
type: 'string'
}
encryptionSettingsCollection: {
enabled: bool
encryptionSettings: [
{
diskEncryptionKey: {
secretUrl: 'string'
sourceVault: {
id: 'string'
}
}
keyEncryptionKey: {
keyUrl: 'string'
sourceVault: {
id: 'string'
}
}
}
]
encryptionSettingsVersion: 'string'
}
hyperVGeneration: 'string'
incremental: bool
networkAccessPolicy: 'string'
osType: 'string'
publicNetworkAccess: 'string'
purchasePlan: {
name: 'string'
product: 'string'
promotionCode: 'string'
publisher: 'string'
}
securityProfile: {
secureVMDiskEncryptionSetId: 'string'
securityType: 'string'
}
supportedCapabilities: {
acceleratedNetwork: bool
architecture: 'string'
diskControllerTypes: 'string'
}
supportsHibernation: bool
}
}
屬性值
snapshots
名稱 | 描述 | 值 |
---|---|---|
NAME | 資源名稱 | 字串 (必要) 字元限制:1-80 合法字元: 英數字元、底線、句號和連字號。 以英數字元開頭。 以英數字元或底線結尾。 |
location | 資源位置 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 請參閱 範本中的標記 |
sku | 快照集 SKU 名稱。 可以是Standard_LRS、Premium_LRS或Standard_ZRS。 這是增量快照集的選擇性參數,默認行為是SKU會設定為與先前快照集相同的SKU | SnapshotSku |
extendedLocation | 將建立快照集的擴充位置。 無法變更擴充位置。 | ExtendedLocation |
properties | 快照集資源屬性。 | SnapshotProperties |
ExtendedLocation
名稱 | 描述 | 值 |
---|---|---|
NAME | 擴充位置的名稱。 | 字串 |
type | 擴充位置的類型。 | 'EdgeZone' |
SnapshotProperties
名稱 | 描述 | 值 |
---|---|---|
completionPercent | 透過 CopyStart 作業建立資源時,背景複本完成的百分比。 | int |
copyCompletionError | 如果透過 CopyStart 作業建立的資源背景複本失敗,則指出錯誤詳細數據。 | CopyCompletionError |
creationData | 磁碟來源資訊。 建立磁碟之後,無法變更 CreationData 資訊。 | CreationData (必要) |
dataAccessAuthMode | 匯出或上傳至磁碟或快照集時的其他驗證需求。 | 'AzureActiveDirectory' 'None' |
diskAccessId | 在磁碟上使用私人端點的 DiskAccess 資源的 ARM 識別碼。 | 字串 |
diskSizeGB | 如果 creationData.createOption 是空的,則此欄位是必要欄位,而且會指出要建立的磁碟大小。 如果此欄位存在以使用其他選項進行更新或建立,則表示重設大小。 只有在磁碟未連結至執行中的 VM 時,才允許重設大小,而且只能增加磁碟的大小。 | int |
加密 | 加密屬性可用來使用客戶管理的密鑰或平臺受控金鑰來加密待用數據。 | 加密 |
encryptionSettingsCollection | 用來進行 Azure 磁碟加密的加密設定集合,可以包含每個磁碟或快照集的多個加密設定。 | EncryptionSettingsCollection |
hyperVGeneration | 虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。 | 'V1' 'V2' |
累加 | 快照集是否為累加式。 相同磁碟上的增量快照集佔用的空間小於完整快照集,而且可以差異。 | bool |
networkAccessPolicy | 透過網路存取磁碟的原則。 | 'AllowAll' 'AllowPrivate' 'DenyAll' |
osType | 操作系統類型。 | 'Linux' 'Windows' |
publicNetworkAccess | 控制磁碟上導出的原則。 | 'Disabled' 'Enabled' |
purchasePlan | 最初建立快照集來源磁碟之映像的購買方案資訊。 | PurchasePlan |
securityProfile | 包含資源的安全性相關信息。 | DiskSecurityProfile |
supportedCapabilities | 最初從快照集建立來源磁碟之映像的支援功能清單。 | SupportedCapabilities |
supportsHibernation | 指出快照集上的OS支援休眠。 | bool |
CopyCompletionError
名稱 | 描述 | 值 |
---|---|---|
errorCode | 指出如果透過 CopyStart 作業建立之資源的背景複本失敗,就會指出錯誤碼。 | 需要 『CopySourceNotFound』 () |
errorMessage | 指出如果透過 CopyStart 作業建立之資源的背景複本失敗,則指出錯誤訊息。 | 需要字串 () |
CreationData
名稱 | 描述 | 值 |
---|---|---|
createOption | 這會列舉磁碟建立的可能來源。 | 'Attach' 'Copy' 'CopyFromSanSnapshot' 'CopyStart' 'Empty' 'FromImage' 'Import' 'ImportSecure' 'Restore' 'Upload' 'UploadPreparedSecure' (必要) |
elasticSanResourceId | 如果 createOption 為 CopyFromSanSnapshot,則為必要專案。 這是來源彈性 san 磁碟區快照集的 ARM 識別碼。 | 字串 |
galleryImageReference | 如果從資源庫映射建立,則為必要專案。 ImageDiskReference 的 id/sharedGalleryImageId/communityGalleryImageId 將會是用來建立磁碟之共用 galley 映射版本的 ARM 標識符。 | ImageDiskReference |
imageReference | PIR 或使用者映像的磁碟來源資訊。 | ImageDiskReference |
logicalSectorSize | Ultra 磁碟的邏輯扇區大小,以位元組為單位。 支援的值為 512 和 4096。 預設為 4096。 | int |
performancePlus | 將此旗標設定為 true,以提升所部署磁碟的效能目標,請參閱這裡的個別效能目標。 此旗標只能在磁碟建立時間上設定,且無法在啟用之後停用。 | bool |
securityDataUri | 如果 createOption 為 ImportSecure,這是要匯入至 VM 客體狀態之 Blob 的 URI。 | 字串 |
sourceResourceId | 如果 createOption 是 Copy,這是來源快照集或磁碟的 ARM 識別碼。 | 字串 |
sourceUri | 如果 createOption 為 Import,這是要匯入至受控磁碟之 Blob 的 URI。 | 字串 |
storageAccountId | 如果 createOption 為 Import,則為必要項。 記憶體帳戶的 Azure Resource Manager 識別符,其中包含要匯入為磁碟的 Blob。 | 字串 |
uploadSizeBytes | 如果 createOption 為 Upload,這是上傳內容的大小,包括 VHD 頁尾。 此值應該介於 VHD 頁尾) 20972032 (20 MiB + 512 個字節 35183298347520之間, (VHD 頁尾 (32 TiB + 512 個字節的 VHD 頁尾) 。 | int |
ImageDiskReference
名稱 | 描述 | 值 |
---|---|---|
communityGalleryImageId | 包含社群 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
id | 包含平臺映像存放庫、使用者映像或 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
lun | 如果磁碟是從映射的數據磁碟建立的,這是一個索引,指出要使用的映射中的數據磁碟。 針對OS磁碟,此欄位為 Null。 | int |
sharedGalleryImageId | 包含直接共用 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
加密
名稱 | 描述 | 值 |
---|---|---|
diskEncryptionSetId | 要用於啟用待用加密的磁碟加密集 ResourceId。 | 字串 |
type | 用來加密磁碟數據的金鑰類型。 | 'EncryptionAtRestWithCustomerKey' 'EncryptionAtRestWithPlatformAndCustomerKeys' 'EncryptionAtRestWithPlatformKey' |
EncryptionSettingsCollection
名稱 | 描述 | 值 |
---|---|---|
已啟用 | 將此旗標設定為 true,並提供 DiskEncryptionKey 和選擇性 KeyEncryptionKey 以啟用加密。 將此旗標設定為 false,並移除 DiskEncryptionKey 和 KeyEncryptionKey 以停用加密。 如果 Request 物件中的 EncryptionSettings 為 null,則現有的設定會保持不變。 | bool (必要) |
encryptionSettings | 加密設定的集合,每個磁碟區各一個。 | EncryptionSettingsElement[] |
encryptionSettingsVersion | 描述磁碟所使用的加密類型。 設定此欄位之後,就無法覆寫。 '1.0' 對應至 AAD 應用程式的 Azure 磁碟加密。'1.1' 對應至 Azure 磁碟加密。 | 字串 |
EncryptionSettingsElement
名稱 | 描述 | 值 |
---|---|---|
diskEncryptionKey | 金鑰保存庫 磁碟加密密鑰的秘密 URL 和保存庫識別碼 | KeyVaultAndSecretReference |
keyEncryptionKey | 金鑰保存庫 金鑰加密金鑰的金鑰 URL 和保存庫識別碼。 KeyEncryptionKey 是選擇性的,當提供 時會用來解除包裝磁碟加密密鑰。 | KeyVaultAndKeyReference |
KeyVaultAndSecretReference
名稱 | 描述 | 值 |
---|---|---|
secretUrl | 指向 KeyVault 中金鑰或秘密的 URL | 需要字串 () |
sourceVault | 包含金鑰或秘密的 KeyVault 資源識別碼 | 需要 SourceVault () |
SourceVault
名稱 | 描述 | 值 |
---|---|---|
id | 資源標識碼 | 字串 |
KeyVaultAndKeyReference
名稱 | 描述 | 值 |
---|---|---|
keyUrl | 指向 KeyVault 中金鑰或秘密的 URL | 需要字串 () |
sourceVault | 包含金鑰或秘密的 KeyVault 資源識別碼 | 需要 SourceVault () |
PurchasePlan
名稱 | 描述 | 值 |
---|---|---|
NAME | 方案標識碼。 | 需要字串 () |
產品 | 指定市集中映像的產品。 這與 imageReference 元素下的 Offer 值相同。 | 需要字串 () |
promotionCode | 供應項目促銷碼。 | 字串 |
publisher | 發行者標識碼。 | 需要字串 () |
DiskSecurityProfile
名稱 | 描述 | 值 |
---|---|---|
secureVMDiskEncryptionSetId | 與使用客戶管理金鑰加密的機密 VM 支援磁碟相關聯的磁碟加密集 ResourceId | 字串 |
securityType | 指定 VM 的 SecurityType。 僅適用於OS磁碟。 | 'ConfidentialVM_DiskEncryptedWithCustomerKey' 'ConfidentialVM_DiskEncryptedWithPlatformKey' 'ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey' 'TrustedLaunch' |
SupportedCapabilities
名稱 | 描述 | 值 |
---|---|---|
acceleratedNetwork | 如果建立OS磁碟的映像支援加速網路,則為True。 | bool |
架構 | OS 磁碟支援的CPU架構。 | 'Arm64' 'x64' |
diskControllerTypes | OS 磁碟支援的磁碟控制器。 如果設定它可以是 SCSI 或 SCSI、NVME 或 NVME、SCSI。 | 字串 |
SnapshotSku
名稱 | 描述 | 值 |
---|---|---|
NAME | SKU 名稱。 | 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
ARM 範本資源定義
快照集資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄。
資源格式
若要建立 Microsoft.Compute/snapshots 資源,請將下列 JSON 新增至您的範本。
{
"type": "Microsoft.Compute/snapshots",
"apiVersion": "2023-04-02",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"sku": {
"name": "string"
},
"extendedLocation": {
"name": "string",
"type": "EdgeZone"
},
"properties": {
"completionPercent": "int",
"copyCompletionError": {
"errorCode": "CopySourceNotFound",
"errorMessage": "string"
},
"creationData": {
"createOption": "string",
"elasticSanResourceId": "string",
"galleryImageReference": {
"communityGalleryImageId": "string",
"id": "string",
"lun": "int",
"sharedGalleryImageId": "string"
},
"imageReference": {
"communityGalleryImageId": "string",
"id": "string",
"lun": "int",
"sharedGalleryImageId": "string"
},
"logicalSectorSize": "int",
"performancePlus": "bool",
"securityDataUri": "string",
"sourceResourceId": "string",
"sourceUri": "string",
"storageAccountId": "string",
"uploadSizeBytes": "int"
},
"dataAccessAuthMode": "string",
"diskAccessId": "string",
"diskSizeGB": "int",
"encryption": {
"diskEncryptionSetId": "string",
"type": "string"
},
"encryptionSettingsCollection": {
"enabled": "bool",
"encryptionSettings": [
{
"diskEncryptionKey": {
"secretUrl": "string",
"sourceVault": {
"id": "string"
}
},
"keyEncryptionKey": {
"keyUrl": "string",
"sourceVault": {
"id": "string"
}
}
}
],
"encryptionSettingsVersion": "string"
},
"hyperVGeneration": "string",
"incremental": "bool",
"networkAccessPolicy": "string",
"osType": "string",
"publicNetworkAccess": "string",
"purchasePlan": {
"name": "string",
"product": "string",
"promotionCode": "string",
"publisher": "string"
},
"securityProfile": {
"secureVMDiskEncryptionSetId": "string",
"securityType": "string"
},
"supportedCapabilities": {
"acceleratedNetwork": "bool",
"architecture": "string",
"diskControllerTypes": "string"
},
"supportsHibernation": "bool"
}
}
屬性值
snapshots
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | 'Microsoft.Compute/snapshots' |
apiVersion | 資源 API 版本 | '2023-04-02' |
NAME | 資源名稱 | 字串 (必要) 字元限制:1-80 合法字元: 英數字元、底線、句號和連字號。 以英數字元開頭。 以英數字元或底線結尾。 |
location | 資源位置 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 請參閱 範本中的標記 |
sku | 快照集 SKU 名稱。 可以是Standard_LRS、Premium_LRS或Standard_ZRS。 這是增量快照集的選擇性參數,默認行為是SKU會設定為與先前快照集相同的SKU | SnapshotSku |
extendedLocation | 將建立快照集的擴充位置。 無法變更擴充位置。 | ExtendedLocation |
properties | 快照集資源屬性。 | SnapshotProperties |
ExtendedLocation
名稱 | 描述 | 值 |
---|---|---|
NAME | 擴充位置的名稱。 | 字串 |
type | 擴充位置的類型。 | 'EdgeZone' |
SnapshotProperties
名稱 | 描述 | 值 |
---|---|---|
completionPercent | 透過 CopyStart 作業建立資源時,背景複本完成的百分比。 | int |
copyCompletionError | 如果透過 CopyStart 作業建立的資源背景複本失敗,則指出錯誤詳細數據。 | CopyCompletionError |
creationData | 磁碟來源資訊。 建立磁碟之後,無法變更 CreationData 資訊。 | CreationData (必要) |
dataAccessAuthMode | 匯出或上傳至磁碟或快照集時的其他驗證需求。 | 'AzureActiveDirectory' 'None' |
diskAccessId | DiskAccess 資源的 ARM 識別碼,用於在磁碟上使用私人端點。 | 字串 |
diskSizeGB | 如果 creationData.createOption 是空的,則此欄位為必要欄位,並指出要建立的磁碟大小。 如果此欄位存在以其他選項進行更新或建立,表示重設大小。 只有在磁碟未連結至執行中的 VM 時,才允許重設大小,而且只能增加磁碟的大小。 | int |
加密 | 加密屬性可用來使用客戶管理的密鑰或平臺管理金鑰來加密待用數據。 | 加密 |
encryptionSettingsCollection | 使用加密設定集合做為 Azure 磁碟加密,可以包含每個磁碟或快照集的多個加密設定。 | EncryptionSettingsCollection |
hyperVGeneration | 虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。 | 'V1' 'V2' |
累加 | 快照集是否為累加式。 相同磁碟上的增量快照集佔用的空間小於完整快照集,而且可以差異。 | bool |
networkAccessPolicy | 透過網路存取磁碟的原則。 | 'AllowAll' 'AllowPrivate' 'DenyAll' |
osType | 操作系統類型。 | 'Linux' 'Windows' |
publicNetworkAccess | 控制磁碟上導出的原則。 | 'Disabled' 'Enabled' |
purchasePlan | 最初建立快照集來源磁碟之映像的購買方案資訊。 | PurchasePlan |
securityProfile | 包含資源的安全性相關信息。 | DiskSecurityProfile |
supportedCapabilities | 最初從快照集建立來源磁碟之映像的支援功能清單。 | SupportedCapabilities |
supportsHibernation | 指出快照集上的OS支援休眠。 | bool |
CopyCompletionError
名稱 | 描述 | 值 |
---|---|---|
errorCode | 指出如果透過 CopyStart 作業建立之資源的背景複本失敗,就會指出錯誤碼。 | 需要 『CopySourceNotFound』 () |
errorMessage | 指出如果透過 CopyStart 作業建立之資源的背景複本失敗,則指出錯誤訊息。 | 需要字串 () |
CreationData
名稱 | 描述 | 值 |
---|---|---|
createOption | 這會列舉磁碟建立的可能來源。 | 'Attach' 'Copy' 'CopyFromSanSnapshot' 'CopyStart' 'Empty' 'FromImage' 'Import' 'ImportSecure' 'Restore' 'Upload' 'UploadPreparedSecure' (必要) |
elasticSanResourceId | 如果 createOption 為 CopyFromSanSnapshot,則為必要專案。 這是來源彈性 san 磁碟區快照集的 ARM 識別碼。 | 字串 |
galleryImageReference | 如果從資源庫映射建立,則為必要專案。 ImageDiskReference 的 id/sharedGalleryImageId/communityGalleryImageId 將會是用來建立磁碟之共用 galley 映射版本的 ARM 標識符。 | ImageDiskReference |
imageReference | PIR 或使用者映像的磁碟來源資訊。 | ImageDiskReference |
logicalSectorSize | Ultra 磁碟的邏輯扇區大小,以位元組為單位。 支援的值為 512 和 4096。 預設為 4096。 | int |
performancePlus | 將此旗標設定為 true,以提升所部署磁碟的效能目標,請參閱這裡的個別效能目標。 此旗標只能在磁碟建立時間上設定,且無法在啟用之後停用。 | bool |
securityDataUri | 如果 createOption 為 ImportSecure,這是要匯入至 VM 客體狀態之 Blob 的 URI。 | 字串 |
sourceResourceId | 如果 createOption 是 Copy,這是來源快照集或磁碟的 ARM 識別碼。 | 字串 |
sourceUri | 如果 createOption 是匯入,這是要匯入受控磁碟之 Blob 的 URI。 | 字串 |
storageAccountId | 如果 createOption 為 Import,則為必要專案。 記憶體帳戶的 Azure Resource Manager 識別符,其中包含要匯入為磁碟的 Blob。 | 字串 |
uploadSizeBytes | 如果 createOption 是 Upload,則這是上傳內容的大小,包括 VHD 頁尾。 此值應該介於 VHD 頁尾) 20972032 (20 MiB + 512 個字節之間 35183298347520,而 VHD 頁尾 (32 TiB + 512 個字節) 。 | int |
ImageDiskReference
名稱 | 描述 | 值 |
---|---|---|
communityGalleryImageId | 包含社群 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
id | 包含平臺映像存放庫、使用者映像或 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
lun | 如果磁碟是從映射的數據磁碟建立,這是一個索引,指出要使用的映射中的數據磁碟。 針對OS磁碟,此欄位為 Null。 | int |
sharedGalleryImageId | 包含直接共用 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
加密
名稱 | 描述 | 值 |
---|---|---|
diskEncryptionSetId | 要用於啟用待用加密的磁碟加密集 ResourceId。 | 字串 |
type | 用來加密磁碟數據的金鑰類型。 | 'EncryptionAtRestWithCustomerKey' 'EncryptionAtRestWithPlatformAndCustomerKeys' 'EncryptionAtRestWithPlatformKey' |
EncryptionSettingsCollection
名稱 | 描述 | 值 |
---|---|---|
已啟用 | 將此旗標設定為 true,並提供 DiskEncryptionKey 和選擇性 KeyEncryptionKey 以啟用加密。 將此旗標設定為 false,然後移除 DiskEncryptionKey 和 KeyEncryptionKey 以停用加密。 如果 Request 物件中的 EncryptionSettings 為 Null,則現有的設定會保持不變。 | bool (必要) |
encryptionSettings | 加密設定的集合,每個磁碟區各有一個。 | EncryptionSettingsElement[] |
encryptionSettingsVersion | 描述磁碟使用的加密類型。 設定此欄位之後,就無法覆寫。 '1.0' 對應至具有 AAD 應用程式的 Azure 磁碟加密。'1.1' 對應至 Azure 磁碟加密。 | 字串 |
EncryptionSettingsElement
名稱 | 描述 | 值 |
---|---|---|
diskEncryptionKey | 金鑰保存庫 磁碟加密密鑰的秘密 URL 和保存庫識別碼 | KeyVaultAndSecretReference |
keyEncryptionKey | 金鑰保存庫 金鑰加密金鑰的金鑰 URL 和保存庫識別碼。 KeyEncryptionKey 是選擇性的,而且當提供用來解除包裝磁碟加密密鑰時。 | KeyVaultAndKeyReference |
KeyVaultAndSecretReference
名稱 | 描述 | 值 |
---|---|---|
secretUrl | 指向 KeyVault 中金鑰或秘密的 URL | 字串 (必要) |
sourceVault | 包含金鑰或秘密的 KeyVault 資源識別碼 | SourceVault (必要) |
SourceVault
名稱 | 描述 | 值 |
---|---|---|
id | 資源標識碼 | 字串 |
KeyVaultAndKeyReference
名稱 | 描述 | 值 |
---|---|---|
keyUrl | 指向 KeyVault 中金鑰或秘密的 URL | 字串 (必要) |
sourceVault | 包含金鑰或秘密的 KeyVault 資源識別碼 | SourceVault (必要) |
PurchasePlan
名稱 | 描述 | 值 |
---|---|---|
NAME | 方案標識碼。 | 字串 (必要) |
產品 | 指定市集中映像的產品。 這個值與 imageReference 元素下的 Offer 相同。 | 字串 (必要) |
promotionCode | 供應項目促銷碼。 | 字串 |
publisher | 發行者標識碼。 | 字串 (必要) |
DiskSecurityProfile
名稱 | 描述 | 值 |
---|---|---|
secureVMDiskEncryptionSetId | 與使用客戶管理金鑰加密的機密 VM 支援磁碟相關聯的磁碟加密集 ResourceId | 字串 |
securityType | 指定 VM 的 SecurityType。 僅適用於OS磁碟。 | 'ConfidentialVM_DiskEncryptedWithCustomerKey' 'ConfidentialVM_DiskEncryptedWithPlatformKey' 'ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey' 'TrustedLaunch' |
SupportedCapabilities
名稱 | 描述 | 值 |
---|---|---|
acceleratedNetwork | 如果建立OS磁碟的映像支援加速網路,則為True。 | bool |
架構 | OS 磁碟支援的CPU架構。 | 'Arm64' 'x64' |
diskControllerTypes | OS 磁碟支援的磁碟控制器。 如果設定它可以是 SCSI 或 SCSI、NVME 或 NVME、SCSI。 | 字串 |
SnapshotSku
名稱 | 描述 | 值 |
---|---|---|
NAME | SKU 名稱。 | 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
Terraform (AzAPI 提供者) 資源定義
快照集資源類型可以使用目標作業來部署:
- 資源群組
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄。
資源格式
若要建立 Microsoft.Compute/snapshots 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Compute/snapshots@2023-04-02"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
body = jsonencode({
properties = {
completionPercent = int
copyCompletionError = {
errorCode = "CopySourceNotFound"
errorMessage = "string"
}
creationData = {
createOption = "string"
elasticSanResourceId = "string"
galleryImageReference = {
communityGalleryImageId = "string"
id = "string"
lun = int
sharedGalleryImageId = "string"
}
imageReference = {
communityGalleryImageId = "string"
id = "string"
lun = int
sharedGalleryImageId = "string"
}
logicalSectorSize = int
performancePlus = bool
securityDataUri = "string"
sourceResourceId = "string"
sourceUri = "string"
storageAccountId = "string"
uploadSizeBytes = int
}
dataAccessAuthMode = "string"
diskAccessId = "string"
diskSizeGB = int
encryption = {
diskEncryptionSetId = "string"
type = "string"
}
encryptionSettingsCollection = {
enabled = bool
encryptionSettings = [
{
diskEncryptionKey = {
secretUrl = "string"
sourceVault = {
id = "string"
}
}
keyEncryptionKey = {
keyUrl = "string"
sourceVault = {
id = "string"
}
}
}
]
encryptionSettingsVersion = "string"
}
hyperVGeneration = "string"
incremental = bool
networkAccessPolicy = "string"
osType = "string"
publicNetworkAccess = "string"
purchasePlan = {
name = "string"
product = "string"
promotionCode = "string"
publisher = "string"
}
securityProfile = {
secureVMDiskEncryptionSetId = "string"
securityType = "string"
}
supportedCapabilities = {
acceleratedNetwork = bool
architecture = "string"
diskControllerTypes = "string"
}
supportsHibernation = bool
}
sku = {
name = "string"
}
extendedLocation = {
name = "string"
type = "EdgeZone"
}
})
}
屬性值
snapshots
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | “Microsoft.Compute/snapshots@2023-04-02” |
NAME | 資源名稱 | 字串 (必要) 字元限制:1-80 合法字元: 英數字元、底線、句號和連字號。 以英數字元開頭。 以英數字元或底線結尾。 |
location | 資源位置 | 字串 (必要) |
parent_id | 若要部署至資源群組,請使用該資源群組的標識碼。 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 |
sku | 快照集 SKU 名稱。 可以是Standard_LRS、Premium_LRS或Standard_ZRS。 這是增量快照集的選擇性參數,默認行為是SKU會設定為與先前快照集相同的SKU | SnapshotSku |
extendedLocation | 將建立快照集的擴充位置。 無法變更擴充位置。 | ExtendedLocation |
properties | 快照集資源屬性。 | SnapshotProperties |
ExtendedLocation
名稱 | 描述 | 值 |
---|---|---|
NAME | 擴充位置的名稱。 | 字串 |
type | 擴充位置的類型。 | “EdgeZone” |
SnapshotProperties
名稱 | 描述 | 值 |
---|---|---|
completionPercent | 透過 CopyStart 作業建立資源時,背景複本完成的百分比。 | int |
copyCompletionError | 如果透過 CopyStart 作業建立的資源背景複本失敗,則指出錯誤詳細數據。 | CopyCompletionError |
creationData | 磁碟來源資訊。 建立磁碟之後,無法變更 CreationData 資訊。 | CreationData (必要) |
dataAccessAuthMode | 匯出或上傳至磁碟或快照集時的其他驗證需求。 | “AzureActiveDirectory” "None" |
diskAccessId | DiskAccess 資源的 ARM 識別碼,用於在磁碟上使用私人端點。 | 字串 |
diskSizeGB | 如果 creationData.createOption 是空的,則此欄位為必要欄位,並指出要建立的磁碟大小。 如果此欄位存在以其他選項進行更新或建立,表示重設大小。 只有在磁碟未連結至執行中的 VM 時,才允許重設大小,而且只能增加磁碟的大小。 | int |
加密 | 加密屬性可用來使用客戶管理的密鑰或平臺管理金鑰來加密待用數據。 | 加密 |
encryptionSettingsCollection | 使用加密設定集合做為 Azure 磁碟加密,可以包含每個磁碟或快照集的多個加密設定。 | EncryptionSettingsCollection |
hyperVGeneration | 虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。 | “V1” “V2” |
累加 | 快照集是否為累加式。 相同磁碟上的增量快照集佔用的空間小於完整快照集,而且可以差異。 | bool |
networkAccessPolicy | 透過網路存取磁碟的原則。 | “AllowAll” “AllowPrivate” “DenyAll” |
osType | 操作系統類型。 | "Linux" "Windows" |
publicNetworkAccess | 控制磁碟上導出的原則。 | “Disabled” “Enabled” |
purchasePlan | 最初建立快照集來源磁碟之映像的購買方案資訊。 | PurchasePlan |
securityProfile | 包含資源的安全性相關信息。 | DiskSecurityProfile |
supportedCapabilities | 最初從快照集建立來源磁碟之映像的支援功能清單。 | SupportedCapabilities |
supportsHibernation | 指出快照集上的OS支援休眠。 | bool |
CopyCompletionError
名稱 | 描述 | 值 |
---|---|---|
errorCode | 指出如果透過 CopyStart 作業建立之資源的背景複本失敗,就會指出錯誤碼。 | “CopySourceNotFound” (必要) |
errorMessage | 指出如果透過 CopyStart 作業建立之資源的背景複本失敗,則指出錯誤訊息。 | 需要字串 () |
CreationData
名稱 | 描述 | 值 |
---|---|---|
createOption | 這會列舉磁碟建立的可能來源。 | “附加” "Copy" “CopyFromSanSnapshot” “CopyStart” "Empty" “FromImage” “匯入” “ImportSecure” “還原” “上傳” “UploadPreparedSecure” (必要) |
elasticSanResourceId | 如果 createOption 是 CopyFromSanSnapshot,則為必要專案。 這是來源彈性 san 磁碟區快照集的 ARM 識別碼。 | 字串 |
galleryImageReference | 如果從資源庫映射建立,則為必要專案。 ImageDiskReference 的 id/sharedGalleryImageId/communityGalleryImageId 會是用來建立磁碟之共用 galley 映射版本的 ARM 標識符。 | ImageDiskReference |
imageReference | PIR 或使用者映像的磁碟來源資訊。 | ImageDiskReference |
logicalSectorSize | Ultra 磁碟的邏輯扇區大小以位元組為單位。 支援的值為 512 和 4096。 預設為 4096。 | int |
performancePlus | 將此旗標設定為 true,以提升所部署磁碟的效能目標,請參閱這裡的個別效能目標。 此旗標只能在磁碟建立時間設定,且無法在啟用之後停用。 | bool |
securityDataUri | 如果 createOption 為 ImportSecure,這是要匯入 VM 客體狀態之 Blob 的 URI。 | 字串 |
sourceResourceId | 如果 createOption 是 Copy,這是來源快照集或磁碟的 ARM 識別碼。 | 字串 |
sourceUri | 如果 createOption 是匯入,這是要匯入受控磁碟之 Blob 的 URI。 | 字串 |
storageAccountId | 如果 createOption 為 Import,則為必要專案。 記憶體帳戶的 Azure Resource Manager 識別符,其中包含要匯入為磁碟的 Blob。 | 字串 |
uploadSizeBytes | 如果 createOption 是 Upload,則這是上傳內容的大小,包括 VHD 頁尾。 此值應該介於 VHD 頁尾) 20972032 (20 MiB + 512 個字節之間 35183298347520,而 VHD 頁尾 (32 TiB + 512 個字節) 。 | int |
ImageDiskReference
名稱 | 描述 | 值 |
---|---|---|
communityGalleryImageId | 包含社群 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
id | 包含平臺映像存放庫、使用者映像或 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
lun | 如果磁碟是從映射的數據磁碟建立,這是一個索引,指出要使用的映射中的數據磁碟。 針對OS磁碟,此欄位為 Null。 | int |
sharedGalleryImageId | 包含直接共用 Azure 計算資源庫映像參考的相對 URI。 | 字串 |
加密
名稱 | 描述 | 值 |
---|---|---|
diskEncryptionSetId | 要用於啟用待用加密的磁碟加密集 ResourceId。 | 字串 |
type | 用來加密磁碟數據的金鑰類型。 | “EncryptionAtRestWithCustomerKey” “EncryptionAtRestWithPlatformAndCustomerKeys” “EncryptionAtRestWithPlatformKey” |
EncryptionSettingsCollection
名稱 | 描述 | 值 |
---|---|---|
已啟用 | 將此旗標設定為 true,並提供 DiskEncryptionKey 和選擇性 KeyEncryptionKey 以啟用加密。 將此旗標設定為 false,然後移除 DiskEncryptionKey 和 KeyEncryptionKey 以停用加密。 如果 Request 物件中的 EncryptionSettings 為 Null,則現有的設定會保持不變。 | bool (必要) |
encryptionSettings | 加密設定的集合,每個磁碟區各有一個。 | EncryptionSettingsElement[] |
encryptionSettingsVersion | 描述磁碟使用的加密類型。 設定此欄位之後,就無法覆寫。 '1.0' 對應至具有 AAD 應用程式的 Azure 磁碟加密。'1.1' 對應至 Azure 磁碟加密。 | 字串 |
EncryptionSettingsElement
名稱 | 描述 | 值 |
---|---|---|
diskEncryptionKey | 金鑰保存庫 磁碟加密密鑰的秘密 URL 和保存庫識別碼 | KeyVaultAndSecretReference |
keyEncryptionKey | 金鑰保存庫 金鑰加密金鑰的金鑰 URL 和保存庫識別碼。 KeyEncryptionKey 是選擇性的,而且當提供用來解除包裝磁碟加密密鑰時。 | KeyVaultAndKeyReference |
KeyVaultAndSecretReference
名稱 | 描述 | 值 |
---|---|---|
secretUrl | 指向 KeyVault 中金鑰或秘密的 URL | 字串 (必要) |
sourceVault | 包含金鑰或秘密的 KeyVault 資源識別碼 | SourceVault (必要) |
SourceVault
名稱 | 描述 | 值 |
---|---|---|
id | 資源標識碼 | 字串 |
KeyVaultAndKeyReference
名稱 | 描述 | 值 |
---|---|---|
keyUrl | 指向 KeyVault 中金鑰或秘密的 URL | 字串 (必要) |
sourceVault | 包含金鑰或秘密的 KeyVault 資源識別碼 | SourceVault (必要) |
PurchasePlan
名稱 | 描述 | 值 |
---|---|---|
NAME | 方案標識碼。 | 字串 (必要) |
產品 | 指定市集中映像的產品。 這個值與 imageReference 元素下的 Offer 相同。 | 字串 (必要) |
promotionCode | 供應項目促銷碼。 | 字串 |
publisher | 發行者標識碼。 | 字串 (必要) |
DiskSecurityProfile
名稱 | 描述 | 值 |
---|---|---|
secureVMDiskEncryptionSetId | 與使用客戶管理金鑰加密的機密 VM 支援磁碟相關聯的磁碟加密集 ResourceId | 字串 |
securityType | 指定 VM 的 SecurityType。 僅適用於OS磁碟。 | “ConfidentialVM_DiskEncryptedWithCustomerKey” “ConfidentialVM_DiskEncryptedWithPlatformKey” “ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey” “TrustedLaunch” |
SupportedCapabilities
名稱 | 描述 | 值 |
---|---|---|
acceleratedNetwork | 如果建立OS磁碟的映像支援加速網路,則為True。 | bool |
架構 | OS 磁碟支援的CPU架構。 | “Arm64” “x64” |
diskControllerTypes | OS 磁碟支援的磁碟控制器。 如果設定它可以是 SCSI 或 SCSI、NVME 或 NVME、SCSI。 | 字串 |
SnapshotSku
名稱 | 描述 | 值 |
---|---|---|
NAME | SKU 名稱。 | "Premium_LRS" "Standard_LRS" "Standard_ZRS" |
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應