Snapshots - List All
列出指定訂閱中的所有快照。 在回應中使用 nextLink 屬性來取得下一頁快照。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/snapshots?api-version=2026-04-01-preview
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
Azure 運作順利完成。 |
|
| Other Status Codes |
未預期的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 模擬您的用戶帳戶 |
範例
List all snapshots in a subscription
範例要求
GET https://management.azure.com/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/providers/Microsoft.AzureStackHCI/snapshots?api-version=2026-04-01-preview
範例回覆
{
"value": [
{
"name": "test-snapshot-1",
"type": "Microsoft.AzureStackHCI/snapshots",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/snapshots/test-snapshot-1",
"location": "West US2",
"tags": {
"environment": "test"
},
"properties": {
"creationData": {
"createOption": "Copy",
"sourceResourceId": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/virtualHardDisks/source-vhd",
"sourceUniqueId": "b99c94ca-e43d-4282-9c78-84d58e5ce81a"
},
"provisioningState": "Succeeded",
"timeCreated": "2023-11-15T10:30:00Z",
"diskSizeBytes": 68719476736,
"uniqueId": "f9e8d7c6-b5a4-9382-7160-5948372615a3",
"status": {
"provisioningStatus": {
"status": "Succeeded"
}
}
}
},
{
"name": "test-snapshot-2",
"type": "Microsoft.AzureStackHCI/snapshots",
"extendedLocation": {
"name": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
"type": "CustomLocation"
},
"id": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/other-rg/providers/Microsoft.AzureStackHCI/snapshots/test-snapshot-2",
"location": "East US",
"properties": {
"creationData": {
"createOption": "Copy",
"sourceResourceId": "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/other-rg/providers/Microsoft.AzureStackHCI/virtualHardDisks/another-vhd",
"sourceUniqueId": "c11a94ca-e43d-4282-9c78-84d58e5ce81b"
},
"provisioningState": "Succeeded",
"timeCreated": "2023-11-16T08:30:00Z",
"diskSizeBytes": 137438953472,
"uniqueId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"status": {
"provisioningStatus": {
"status": "Succeeded"
}
}
}
}
]
}
定義
| 名稱 | Description |
|---|---|
|
created |
建立資源的身分識別類型。 |
|
Creation |
建立磁碟或快照時所用的資料 |
|
Disk |
磁碟建立選項值 [複製,空] |
|
Error |
資源管理錯誤附加資訊。 |
|
Error |
錯誤詳細資料。 |
|
Error |
錯誤回應 |
|
Extended |
擴充位置的複雜類型。 |
|
Extended |
extendedLocation 的類型。 |
|
Provisioning |
資源布建狀態。 |
| Snapshot |
快照資源定義。 |
|
Snapshot |
快照清單操作的回應。 |
|
Snapshot |
快照資源下的屬性 |
|
Snapshot |
快照的觀察狀態 |
|
Snapshot |
快照狀態配置狀態 |
| Status |
在資源上執行的作業狀態 [Succeeded, Failed, InProgress] |
|
system |
與建立和上次修改資源相關的元數據。 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CreationData
建立磁碟或快照時所用的資料
| 名稱 | 類型 | Description |
|---|---|---|
| createOption |
這枚清單列舉了磁碟可能產生的來源 |
|
| sourceResourceId |
string (arm-id) |
用於磁碟建立的來源資源的 ARM ID。 當 createOption 是複製時,這是必要的 |
| sourceUniqueId |
string |
用於磁碟建立的來源資源的唯一 ID。 唯讀,且磁碟製作時不強制。 |
DiskCreateOption
磁碟建立選項值 [複製,空]
| 值 | Description |
|---|---|
| Copy |
從來源資源複製磁碟 |
| Empty |
建立一個空磁碟 |
ErrorAdditionalInfo
資源管理錯誤附加資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
object |
附加資訊。 |
| type |
string |
其他資訊類型。 |
ErrorDetail
錯誤詳細資料。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤附加資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳情 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤物件。 |
ExtendedLocation
擴充位置的複雜類型。
| 名稱 | 類型 | Description |
|---|---|---|
| name |
string |
擴充位置的名稱。 |
| type |
擴充位置的類型。 |
ExtendedLocationTypes
extendedLocation 的類型。
| 值 | Description |
|---|---|
| CustomLocation |
自定義擴充位置類型 |
ProvisioningStateEnum
資源布建狀態。
| 值 | Description |
|---|---|
| Succeeded |
布建成功 |
| Failed |
布建失敗 |
| InProgress |
布建正在進行中 |
| Accepted |
已接受布建 |
| Deleting |
正在刪除資源 |
| Canceled |
布建已取消 |
Snapshot
快照資源定義。
| 名稱 | 類型 | Description |
|---|---|---|
| extendedLocation |
資源的 extendedLocation。 |
|
| id |
string (arm-id) |
資源的完整資源識別碼。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| location |
string |
資源所在的地理位置 |
| name |
string |
資源的名稱 |
| properties |
此資源的資源特定屬性。 |
|
| systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 中繼資料。 |
|
| tags |
object |
資源標籤。 |
| type |
string |
資源的類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts” |
SnapshotListResult
快照清單操作的回應。
| 名稱 | 類型 | Description |
|---|---|---|
| nextLink |
string (uri) |
專案下一頁的連結 |
| value |
Snapshot[] |
此頁面上的快照項目 |
SnapshotProperties
快照資源下的屬性
| 名稱 | 類型 | Description |
|---|---|---|
| creationData |
建立快照時所用的資料 |
|
| diskSizeBytes |
integer (int64) |
磁碟的大小 (以位元組為單位)。 |
| provisioningState |
快照的配置狀態。 |
|
| status |
快照的觀察狀態 |
|
| timeCreated |
string (date-time) |
建立快照集的時間。 |
| uniqueId |
string |
快照的唯一識別碼。 |
SnapshotStatus
快照的觀察狀態
| 名稱 | 類型 | Description |
|---|---|---|
| errorCode |
string |
快照配置錯誤代碼 |
| errorMessage |
string |
描述性錯誤訊息 |
| provisioningStatus |
快照的配置狀態 |
SnapshotStatusProvisioningStatus
快照狀態配置狀態
| 名稱 | 類型 | Description |
|---|---|---|
| operationId |
string |
快照執行的操作識別碼 |
| status |
快照中執行的操作狀態 [成功、失敗、進行中] |
Status
在資源上執行的作業狀態 [Succeeded, Failed, InProgress]
| 值 | Description |
|---|---|
| Succeeded |
作業成功 |
| Failed |
作業失敗 |
| InProgress |
作業正在進行中 |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
資源上次修改的時間戳記 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |