スナップショットを作成または更新します。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}?api-version=2026-03-02
URI パラメーター
| Name |
/ |
必須 |
型 |
説明 |
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
リソース グループの名前。 名前は大文字と小文字を区別しません。
|
|
snapshotName
|
path |
True
|
string
|
作成されるスナップショットの名前。 スナップショットの作成後に名前を変更することはできません。 名前でサポートされている文字は、a~z、A~Z、0~9、_ および -です。 名前の最大長は 80 文字です。
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
ターゲット サブスクリプションの ID。
|
|
api-version
|
query |
True
|
string
minLength: 1
|
この操作に使用する API バージョン。
|
要求本文
| Name |
必須 |
型 |
説明 |
|
location
|
True
|
string
|
リソースが存在する地理的な場所
|
|
properties.creationData
|
True
|
CreationData
|
ディスク ソース情報。 ディスクの作成後に CreationData 情報を変更することはできません。
|
|
extendedLocation
|
|
ExtendedLocation
|
スナップショットが作成される拡張された場所。 拡張された場所は変更できません。
|
|
properties.completionPercent
|
|
number
(float)
|
CopyStart 操作を使用してリソースが作成されたときのバックグラウンド コピーの完了率。
|
|
properties.copyCompletionError
|
|
CopyCompletionError
|
CopyStart 操作を使用して作成されたリソースのバックグラウンド コピーが失敗した場合に、エラーの詳細を示します。
|
|
properties.dataAccessAuthMode
|
|
DataAccessAuthMode
|
ディスクまたはスナップショットにエクスポートまたはアップロードするときの追加の認証要件。
|
|
properties.diskAccessId
|
|
string
|
ディスクでプライベート エンドポイントを使用するための DiskAccess リソースの ARM ID。
|
|
properties.diskSizeGB
|
|
integer
(int32)
|
creationData.createOption が空の場合、このフィールドは必須であり、作成するディスクのサイズを示します。 このフィールドが他のオプションを使用して更新または作成するために存在する場合は、サイズ変更を示します。 サイズ変更は、ディスクが実行中の VM に接続されていない場合にのみ許可され、ディスクのサイズのみを増やすことができます。
|
|
properties.encryption
|
|
Encryption
|
Encryption プロパティを使用すると、保存データをカスタマー マネージド キーまたはプラットフォーム マネージド キーで暗号化できます。
|
|
properties.encryptionSettingsCollection
|
|
EncryptionSettingsCollection
|
使用される暗号化設定コレクションは Azure Disk Encryption で、ディスクまたはスナップショットごとに複数の暗号化設定を含めることができます。
|
|
properties.hyperVGeneration
|
|
HyperVGeneration
|
仮想マシンのハイパーバイザー生成。 OS ディスクにのみ適用されます。
|
|
properties.incremental
|
|
boolean
|
スナップショットが増分であるかどうか。 同じディスク上の増分スナップショットは、完全なスナップショットよりも少ない領域を占有し、差分できます。
|
|
properties.networkAccessPolicy
|
|
NetworkAccessPolicy
|
ネットワーク経由でディスクにアクセスするためのポリシー。
|
|
properties.osType
|
|
OperatingSystemTypes
|
オペレーティング システムの種類。
|
|
properties.publicNetworkAccess
|
|
PublicNetworkAccess
|
ディスク上のエクスポートを制御するためのポリシー。
|
|
properties.purchasePlan
|
|
DiskPurchasePlan
|
スナップショットのソース ディスクが最初に作成されたイメージの購入プラン情報。
|
|
properties.securityProfile
|
|
DiskSecurityProfile
|
リソースのセキュリティ関連情報を格納します。
|
|
properties.supportedCapabilities
|
|
SupportedCapabilities
|
スナップショットのソース ディスクが最初に作成されたイメージでサポートされている機能の一覧。
|
|
properties.supportsHibernation
|
|
boolean
|
スナップショット上の OS が休止状態をサポートしているかどうかを示します。
|
|
sku
|
|
SnapshotSku
|
スナップショット SKU 名。 Standard_LRS、Premium_LRS、またはStandard_ZRSできます。 これは増分スナップショットの省略可能なパラメーターであり、既定の動作では、SKU は前のスナップショットと同じ SKU に設定されます
|
|
tags
|
|
object
|
リソース タグ。
|
応答
| Name |
型 |
説明 |
|
200 OK
|
Snapshot
|
リソース 'スナップショット' 更新操作が成功しました
|
|
202 Accepted
|
Snapshot
|
要求は処理のために受け入れ済みですが、処理はまだ完了していません。
ヘッダー
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
CloudError
|
予期しないエラー応答。
|
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
| Name |
説明 |
|
user_impersonation
|
あなたのユーザー アカウントになりすます
|
例
Create a snapshot by importing an unmanaged blob from a different subscription.
要求のサンプル
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1?api-version=2026-03-02
{
"location": "West US",
"properties": {
"creationData": {
"createOption": "Import",
"storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
"sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
}
}
}
import com.azure.resourcemanager.compute.fluent.models.SnapshotInner;
import com.azure.resourcemanager.compute.models.CreationData;
import com.azure.resourcemanager.compute.models.DiskCreateOption;
/**
* Samples for Snapshots CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file:
* 2026-03-02/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromADifferentSubscription.json
*/
/**
* Sample code: Create a snapshot by importing an unmanaged blob from a different subscription.
*
* @param manager Entry point to ComputeManager.
*/
public static void createASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription(
com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getSnapshots().createOrUpdate("myResourceGroup", "mySnapshot1", new SnapshotInner()
.withLocation("West US")
.withCreationData(new CreationData().withCreateOption(DiskCreateOption.IMPORT).withStorageAccountId(
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount")
.withSourceUri("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd")),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python snapshot_create_by_importing_an_unmanaged_blob_from_adifferent_subscription.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.snapshots.begin_create_or_update(
resource_group_name="myResourceGroup",
snapshot_name="mySnapshot1",
snapshot={
"location": "West US",
"properties": {
"creationData": {
"createOption": "Import",
"sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
"storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
}
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromADifferentSubscription.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v9"
)
// Generated from example definition: 2026-03-02/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromADifferentSubscription.json
func ExampleSnapshotsClient_BeginCreateOrUpdate_createASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSnapshotsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySnapshot1", armcompute.Snapshot{
Location: to.Ptr("West US"),
Properties: &armcompute.SnapshotProperties{
CreationData: &armcompute.CreationData{
CreateOption: to.Ptr(armcompute.DiskCreateOptionImport),
StorageAccountID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
SourceURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.SnapshotsClientCreateOrUpdateResponse{
// Snapshot: armcompute.Snapshot{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
// Properties: &armcompute.SnapshotProperties{
// CreationData: &armcompute.CreationData{
// CreateOption: to.Ptr(armcompute.DiskCreateOptionImport),
// StorageAccountID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"),
// SourceURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
// },
// ProvisioningState: to.Ptr("Updating"),
// },
// Location: to.Ptr("West US"),
// Name: to.Ptr("mySnapshot1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a snapshot.
*
* @summary creates or updates a snapshot.
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromADifferentSubscription.json
*/
async function createASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.snapshots.createOrUpdate("myResourceGroup", "mySnapshot1", {
location: "West US",
creationData: {
createOption: "Import",
storageAccountId:
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
sourceUri: "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
"properties": {
"creationData": {
"createOption": "Import",
"storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
"sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
},
"provisioningState": "Updating"
},
"location": "West US",
"name": "mySnapshot1"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
"properties": {
"creationData": {
"createOption": "Import",
"storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
"sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
},
"provisioningState": "Updating"
},
"location": "West US",
"name": "mySnapshot1"
}
Create a snapshot by importing an unmanaged blob from the same subscription.
要求のサンプル
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1?api-version=2026-03-02
{
"location": "West US",
"properties": {
"creationData": {
"createOption": "Import",
"sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
}
}
}
import com.azure.resourcemanager.compute.fluent.models.SnapshotInner;
import com.azure.resourcemanager.compute.models.CreationData;
import com.azure.resourcemanager.compute.models.DiskCreateOption;
/**
* Samples for Snapshots CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file:
* 2026-03-02/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromTheSameSubscription.json
*/
/**
* Sample code: Create a snapshot by importing an unmanaged blob from the same subscription.
*
* @param manager Entry point to ComputeManager.
*/
public static void createASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription(
com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getSnapshots().createOrUpdate("myResourceGroup", "mySnapshot1",
new SnapshotInner().withLocation("West US")
.withCreationData(new CreationData().withCreateOption(DiskCreateOption.IMPORT)
.withSourceUri("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd")),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python snapshot_create_by_importing_an_unmanaged_blob_from_the_same_subscription.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.snapshots.begin_create_or_update(
resource_group_name="myResourceGroup",
snapshot_name="mySnapshot1",
snapshot={
"location": "West US",
"properties": {
"creationData": {
"createOption": "Import",
"sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
}
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromTheSameSubscription.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v9"
)
// Generated from example definition: 2026-03-02/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromTheSameSubscription.json
func ExampleSnapshotsClient_BeginCreateOrUpdate_createASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSnapshotsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySnapshot1", armcompute.Snapshot{
Location: to.Ptr("West US"),
Properties: &armcompute.SnapshotProperties{
CreationData: &armcompute.CreationData{
CreateOption: to.Ptr(armcompute.DiskCreateOptionImport),
SourceURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.SnapshotsClientCreateOrUpdateResponse{
// Snapshot: armcompute.Snapshot{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
// Properties: &armcompute.SnapshotProperties{
// CreationData: &armcompute.CreationData{
// CreateOption: to.Ptr(armcompute.DiskCreateOptionImport),
// SourceURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
// },
// ProvisioningState: to.Ptr("Updating"),
// },
// Location: to.Ptr("West US"),
// Name: to.Ptr("mySnapshot1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a snapshot.
*
* @summary creates or updates a snapshot.
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_ByImportingAnUnmanagedBlobFromTheSameSubscription.json
*/
async function createASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.snapshots.createOrUpdate("myResourceGroup", "mySnapshot1", {
location: "West US",
creationData: {
createOption: "Import",
sourceUri: "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
"properties": {
"creationData": {
"createOption": "Import",
"sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
},
"provisioningState": "Updating"
},
"location": "West US",
"name": "mySnapshot1"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
"properties": {
"creationData": {
"createOption": "Import",
"sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
},
"provisioningState": "Updating"
},
"location": "West US",
"name": "mySnapshot1"
}
Create a snapshot from an elastic san volume snapshot.
要求のサンプル
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot?api-version=2026-03-02
{
"location": "West US",
"properties": {
"creationData": {
"createOption": "CopyFromSanSnapshot",
"elasticSanResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot"
}
}
}
import com.azure.resourcemanager.compute.fluent.models.SnapshotInner;
import com.azure.resourcemanager.compute.models.CreationData;
import com.azure.resourcemanager.compute.models.DiskCreateOption;
/**
* Samples for Snapshots CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnElasticSanVolumeSnapshot.json
*/
/**
* Sample code: Create a snapshot from an elastic san volume snapshot.
*
* @param manager Entry point to ComputeManager.
*/
public static void
createASnapshotFromAnElasticSanVolumeSnapshot(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getSnapshots().createOrUpdate("myResourceGroup", "mySnapshot",
new SnapshotInner().withLocation("West US").withCreationData(
new CreationData().withCreateOption(DiskCreateOption.COPY_FROM_SAN_SNAPSHOT).withElasticSanResourceId(
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot")),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python snapshot_create_from_an_elastic_san_volume_snapshot.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.snapshots.begin_create_or_update(
resource_group_name="myResourceGroup",
snapshot_name="mySnapshot",
snapshot={
"location": "West US",
"properties": {
"creationData": {
"createOption": "CopyFromSanSnapshot",
"elasticSanResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot",
}
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnElasticSanVolumeSnapshot.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v9"
)
// Generated from example definition: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnElasticSanVolumeSnapshot.json
func ExampleSnapshotsClient_BeginCreateOrUpdate_createASnapshotFromAnElasticSanVolumeSnapshot() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSnapshotsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySnapshot", armcompute.Snapshot{
Location: to.Ptr("West US"),
Properties: &armcompute.SnapshotProperties{
CreationData: &armcompute.CreationData{
CreateOption: to.Ptr(armcompute.DiskCreateOptionCopyFromSanSnapshot),
ElasticSanResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.SnapshotsClientCreateOrUpdateResponse{
// Snapshot: armcompute.Snapshot{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
// Name: to.Ptr("mySnapshot"),
// Location: to.Ptr("West US"),
// Properties: &armcompute.SnapshotProperties{
// ProvisioningState: to.Ptr("Updating"),
// CreationData: &armcompute.CreationData{
// CreateOption: to.Ptr(armcompute.DiskCreateOptionCopyFromSanSnapshot),
// ElasticSanResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot"),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a snapshot.
*
* @summary creates or updates a snapshot.
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnElasticSanVolumeSnapshot.json
*/
async function createASnapshotFromAnElasticSanVolumeSnapshot() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.snapshots.createOrUpdate("myResourceGroup", "mySnapshot", {
location: "West US",
creationData: {
createOption: "CopyFromSanSnapshot",
elasticSanResourceId:
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot",
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
"name": "mySnapshot",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "CopyFromSanSnapshot",
"elasticSanResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot"
}
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
"name": "mySnapshot",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "CopyFromSanSnapshot",
"elasticSanResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot"
}
}
}
Create a snapshot from an existing snapshot in the same or a different subscription in a different region with quicker copy speed.
要求のサンプル
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2?api-version=2026-03-02
{
"location": "West US",
"properties": {
"creationData": {
"createOption": "CopyStart",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
"provisionedBandwidthCopySpeed": "Enhanced"
}
}
}
import com.azure.resourcemanager.compute.fluent.models.SnapshotInner;
import com.azure.resourcemanager.compute.models.CreationData;
import com.azure.resourcemanager.compute.models.DiskCreateOption;
import com.azure.resourcemanager.compute.models.ProvisionedBandwidthCopyOption;
/**
* Samples for Snapshots CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_EnhancedProvisionedBandwidthCopySpeed.json
*/
/**
* Sample code: Create a snapshot from an existing snapshot in the same or a different subscription in a different
* region with quicker copy speed.
*
* @param manager Entry point to ComputeManager.
*/
public static void
createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegionWithQuickerCopySpeed(
com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getSnapshots().createOrUpdate("myResourceGroup", "mySnapshot2", new SnapshotInner()
.withLocation("West US")
.withCreationData(new CreationData().withCreateOption(DiskCreateOption.COPY_START).withSourceResourceId(
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1")
.withProvisionedBandwidthCopySpeed(ProvisionedBandwidthCopyOption.ENHANCED)),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python snapshot_create_enhanced_provisioned_bandwidth_copy_speed.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.snapshots.begin_create_or_update(
resource_group_name="myResourceGroup",
snapshot_name="mySnapshot2",
snapshot={
"location": "West US",
"properties": {
"creationData": {
"createOption": "CopyStart",
"provisionedBandwidthCopySpeed": "Enhanced",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
}
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_EnhancedProvisionedBandwidthCopySpeed.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v9"
)
// Generated from example definition: 2026-03-02/snapshotExamples/Snapshot_Create_EnhancedProvisionedBandwidthCopySpeed.json
func ExampleSnapshotsClient_BeginCreateOrUpdate_createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegionWithQuickerCopySpeed() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSnapshotsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySnapshot2", armcompute.Snapshot{
Location: to.Ptr("West US"),
Properties: &armcompute.SnapshotProperties{
CreationData: &armcompute.CreationData{
CreateOption: to.Ptr(armcompute.DiskCreateOptionCopyStart),
SourceResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"),
ProvisionedBandwidthCopySpeed: to.Ptr(armcompute.ProvisionedBandwidthCopyOptionEnhanced),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.SnapshotsClientCreateOrUpdateResponse{
// Snapshot: armcompute.Snapshot{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"),
// Name: to.Ptr("mySnapshot2"),
// Location: to.Ptr("West US"),
// Properties: &armcompute.SnapshotProperties{
// ProvisioningState: to.Ptr("Updating"),
// CreationData: &armcompute.CreationData{
// CreateOption: to.Ptr(armcompute.DiskCreateOptionCopyStart),
// SourceResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"),
// ProvisionedBandwidthCopySpeed: to.Ptr(armcompute.ProvisionedBandwidthCopyOptionEnhanced),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a snapshot.
*
* @summary creates or updates a snapshot.
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_EnhancedProvisionedBandwidthCopySpeed.json
*/
async function createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegionWithQuickerCopySpeed() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.snapshots.createOrUpdate("myResourceGroup", "mySnapshot2", {
location: "West US",
creationData: {
createOption: "CopyStart",
sourceResourceId:
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
provisionedBandwidthCopySpeed: "Enhanced",
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
"name": "mySnapshot2",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "CopyStart",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
"provisionedBandwidthCopySpeed": "Enhanced"
}
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
"name": "mySnapshot2",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "CopyStart",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
"provisionedBandwidthCopySpeed": "Enhanced"
}
}
}
Create a snapshot from an existing snapshot in the same or a different subscription in a different region.
要求のサンプル
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2?api-version=2026-03-02
{
"location": "West US",
"properties": {
"creationData": {
"createOption": "CopyStart",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
}
}
}
import com.azure.resourcemanager.compute.fluent.models.SnapshotInner;
import com.azure.resourcemanager.compute.models.CreationData;
import com.azure.resourcemanager.compute.models.DiskCreateOption;
/**
* Samples for Snapshots CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnExistingSnapshotInDifferentRegion.json
*/
/**
* Sample code: Create a snapshot from an existing snapshot in the same or a different subscription in a different
* region.
*
* @param manager Entry point to ComputeManager.
*/
public static void createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion(
com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getSnapshots().createOrUpdate("myResourceGroup", "mySnapshot2", new SnapshotInner()
.withLocation("West US")
.withCreationData(new CreationData().withCreateOption(DiskCreateOption.COPY_START).withSourceResourceId(
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1")),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python snapshot_create_from_an_existing_snapshot_in_different_region.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.snapshots.begin_create_or_update(
resource_group_name="myResourceGroup",
snapshot_name="mySnapshot2",
snapshot={
"location": "West US",
"properties": {
"creationData": {
"createOption": "CopyStart",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
}
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnExistingSnapshotInDifferentRegion.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v9"
)
// Generated from example definition: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnExistingSnapshotInDifferentRegion.json
func ExampleSnapshotsClient_BeginCreateOrUpdate_createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSnapshotsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySnapshot2", armcompute.Snapshot{
Location: to.Ptr("West US"),
Properties: &armcompute.SnapshotProperties{
CreationData: &armcompute.CreationData{
CreateOption: to.Ptr(armcompute.DiskCreateOptionCopyStart),
SourceResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.SnapshotsClientCreateOrUpdateResponse{
// Snapshot: armcompute.Snapshot{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"),
// Name: to.Ptr("mySnapshot2"),
// Location: to.Ptr("West US"),
// Properties: &armcompute.SnapshotProperties{
// ProvisioningState: to.Ptr("Updating"),
// CreationData: &armcompute.CreationData{
// CreateOption: to.Ptr(armcompute.DiskCreateOptionCopyStart),
// SourceResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a snapshot.
*
* @summary creates or updates a snapshot.
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnExistingSnapshotInDifferentRegion.json
*/
async function createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.snapshots.createOrUpdate("myResourceGroup", "mySnapshot2", {
location: "West US",
creationData: {
createOption: "CopyStart",
sourceResourceId:
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
"name": "mySnapshot2",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "CopyStart",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
}
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
"name": "mySnapshot2",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "CopyStart",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
}
}
}
Create a snapshot from an existing snapshot in the same or a different subscription.
要求のサンプル
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2?api-version=2026-03-02
{
"location": "West US",
"properties": {
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
}
}
}
import com.azure.resourcemanager.compute.fluent.models.SnapshotInner;
import com.azure.resourcemanager.compute.models.CreationData;
import com.azure.resourcemanager.compute.models.DiskCreateOption;
/**
* Samples for Snapshots CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnExistingSnapshot.json
*/
/**
* Sample code: Create a snapshot from an existing snapshot in the same or a different subscription.
*
* @param manager Entry point to ComputeManager.
*/
public static void createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription(
com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getSnapshots().createOrUpdate("myResourceGroup", "mySnapshot2", new SnapshotInner()
.withLocation("West US")
.withCreationData(new CreationData().withCreateOption(DiskCreateOption.COPY).withSourceResourceId(
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1")),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python snapshot_create_from_an_existing_snapshot.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.snapshots.begin_create_or_update(
resource_group_name="myResourceGroup",
snapshot_name="mySnapshot2",
snapshot={
"location": "West US",
"properties": {
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
}
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnExistingSnapshot.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v9"
)
// Generated from example definition: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnExistingSnapshot.json
func ExampleSnapshotsClient_BeginCreateOrUpdate_createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSnapshotsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySnapshot2", armcompute.Snapshot{
Location: to.Ptr("West US"),
Properties: &armcompute.SnapshotProperties{
CreationData: &armcompute.CreationData{
CreateOption: to.Ptr(armcompute.DiskCreateOptionCopy),
SourceResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.SnapshotsClientCreateOrUpdateResponse{
// Snapshot: armcompute.Snapshot{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"),
// Name: to.Ptr("mySnapshot2"),
// Location: to.Ptr("West US"),
// Properties: &armcompute.SnapshotProperties{
// ProvisioningState: to.Ptr("Updating"),
// CreationData: &armcompute.CreationData{
// CreateOption: to.Ptr(armcompute.DiskCreateOptionCopy),
// SourceResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a snapshot.
*
* @summary creates or updates a snapshot.
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_FromAnExistingSnapshot.json
*/
async function createASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.snapshots.createOrUpdate("myResourceGroup", "mySnapshot2", {
location: "West US",
creationData: {
createOption: "Copy",
sourceResourceId:
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1",
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
"name": "mySnapshot2",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
}
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
"name": "mySnapshot2",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
}
}
}
create a snapshot which can be instantly accessable.
要求のサンプル
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2?api-version=2026-03-02
{
"location": "West US",
"properties": {
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1",
"instantAccessDurationMinutes": 120
}
}
}
import com.azure.resourcemanager.compute.fluent.models.SnapshotInner;
import com.azure.resourcemanager.compute.models.CreationData;
import com.azure.resourcemanager.compute.models.DiskCreateOption;
/**
* Samples for Snapshots CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_InstantAccessSnapshot.json
*/
/**
* Sample code: create a snapshot which can be instantly accessable.
*
* @param manager Entry point to ComputeManager.
*/
public static void
createASnapshotWhichCanBeInstantlyAccessable(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getSnapshots().createOrUpdate("myResourceGroup", "mySnapshot2", new SnapshotInner()
.withLocation("West US")
.withCreationData(new CreationData().withCreateOption(DiskCreateOption.COPY).withSourceResourceId(
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1")
.withInstantAccessDurationMinutes(120L)),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python snapshot_create_instant_access_snapshot.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.snapshots.begin_create_or_update(
resource_group_name="myResourceGroup",
snapshot_name="mySnapshot2",
snapshot={
"location": "West US",
"properties": {
"creationData": {
"createOption": "Copy",
"instantAccessDurationMinutes": 120,
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1",
}
},
},
).result()
print(response)
# x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_InstantAccessSnapshot.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v9"
)
// Generated from example definition: 2026-03-02/snapshotExamples/Snapshot_Create_InstantAccessSnapshot.json
func ExampleSnapshotsClient_BeginCreateOrUpdate_createASnapshotWhichCanBeInstantlyAccessable() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSnapshotsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "mySnapshot2", armcompute.Snapshot{
Location: to.Ptr("West US"),
Properties: &armcompute.SnapshotProperties{
CreationData: &armcompute.CreationData{
CreateOption: to.Ptr(armcompute.DiskCreateOptionCopy),
SourceResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1"),
InstantAccessDurationMinutes: to.Ptr[int64](120),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.SnapshotsClientCreateOrUpdateResponse{
// Snapshot: armcompute.Snapshot{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"),
// Name: to.Ptr("mySnapshot2"),
// Location: to.Ptr("West US"),
// Properties: &armcompute.SnapshotProperties{
// ProvisioningState: to.Ptr("Updating"),
// CreationData: &armcompute.CreationData{
// CreateOption: to.Ptr(armcompute.DiskCreateOptionCopy),
// SourceResourceID: to.Ptr("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1"),
// InstantAccessDurationMinutes: to.Ptr[int64](120),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates or updates a snapshot.
*
* @summary creates or updates a snapshot.
* x-ms-original-file: 2026-03-02/snapshotExamples/Snapshot_Create_InstantAccessSnapshot.json
*/
async function createASnapshotWhichCanBeInstantlyAccessable() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.snapshots.createOrUpdate("myResourceGroup", "mySnapshot2", {
location: "West US",
creationData: {
createOption: "Copy",
sourceResourceId:
"subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1",
instantAccessDurationMinutes: 120,
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
"name": "mySnapshot2",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1",
"instantAccessDurationMinutes": 120
}
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
"name": "mySnapshot2",
"location": "West US",
"properties": {
"provisioningState": "Updating",
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1",
"instantAccessDurationMinutes": 120
}
}
}
定義
ApiError
Object
API エラー。
| Name |
型 |
説明 |
|
code
|
string
|
エラー コード。
|
|
details
|
ApiErrorBase[]
|
Api エラーの詳細
|
|
innererror
|
InnerError
|
Api 内部エラー
|
|
message
|
string
|
エラー メッセージ。
|
|
target
|
string
|
特定のエラーのターゲット。
|
ApiErrorBase
Object
API エラーベース。
| Name |
型 |
説明 |
|
code
|
string
|
エラー コード。
|
|
message
|
string
|
エラー メッセージ。
|
|
target
|
string
|
特定のエラーのターゲット。
|
Architecture
列挙
OS ディスクでサポートされている CPU アーキテクチャ。
CloudError
Object
コンピューティング サービスからのエラー応答。
ConfidentialVMVersion
列挙
リソースの機密VMのバージョンを示します。
| 値 |
説明 |
|
V1
|
V1はリソースに仮想マシンのメタデータが伴わないことを示します。
|
|
V2
|
V2はリソースに仮想マシンのメタデータが関連付けられていることを示します。
|
CopyCompletionError
Object
CopyStart 操作を使用して作成されたリソースのバックグラウンド コピーが失敗した場合に、エラーの詳細を示します。
| Name |
型 |
説明 |
|
errorCode
|
CopyCompletionErrorReason
|
CopyStart 操作を使用して作成されたリソースのバックグラウンド コピーが失敗した場合にエラー コードを示します。
|
|
errorMessage
|
string
|
CopyStart 操作を使用して作成されたリソースのバックグラウンド コピーが失敗した場合のエラー メッセージを示します。
|
CopyCompletionErrorReason
列挙
CopyStart 操作を使用して作成されたリソースのバックグラウンド コピーが失敗した場合にエラー コードを示します。
| 値 |
説明 |
|
CopySourceNotFound
|
CopyStart 操作によって作成されたリソースのバックグラウンド コピーが進行中に、ソース スナップショットが削除されたことを示します。
|
createdByType
列挙
リソースを作成した ID の種類。
| 値 |
説明 |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
CreationData
Object
ディスクの作成時に使用されるデータ。
| Name |
型 |
説明 |
|
createOption
|
DiskCreateOption
|
これにより、ディスクの作成に使用できるソースが列挙されます。
|
|
elasticSanResourceId
|
string
|
createOption が CopyFromSanSnapshot の場合は必須。 これは、ソースエラスティック SAN ボリューム スナップショットの ARM ID です。
|
|
galleryImageReference
|
ImageDiskReference
|
ギャラリー イメージから作成する場合に必要です。 ImageDiskReference の id/sharedGalleryImageId/communityGalleryImageId は、ディスクの作成元となる共有ギャラリー イメージ バージョンの ARM ID になります。
|
|
imageReference
|
ImageDiskReference
|
PIR またはユーザー イメージのディスク ソース情報。
|
|
instantAccessDurationMinutes
|
integer
(int64)
minimum: 1
|
Premium SSD v2 または Ultra Disk から作成されたスナップショットの場合、このプロパティは、スナップショットが即時アクセスのために保持される時間を分単位で決定し、より高速な復元を可能にします。
|
|
logicalSectorSize
|
integer
(int32)
|
Ultra ディスクの論理セクター サイズ (バイト単位)。 サポートされている値は 512 ad 4096 です。 4096 が既定値です。
|
|
performancePlus
|
boolean
|
このフラグを true に設定すると、デプロイされたディスクのパフォーマンス ターゲットが向上します。それぞれのパフォーマンス ターゲットについては、こちらを参照してください。 このフラグは、ディスク作成時にのみ設定でき、有効にした後は無効にできません。
|
|
provisionedBandwidthCopySpeed
|
ProvisionedBandwidthCopyOption
|
このフィールドがスナップショットに設定され、createOption が CopyStart の場合、スナップショットはより迅速にコピーされます。
|
|
securityDataUri
|
string
|
createOption が ImportSecure の場合、これは VM ゲスト状態にインポートされる BLOB の URI です。
|
|
securityMetadataUri
|
string
(uri)
|
createOption が ImportSecure の場合、これは Confidential VM の VM メタデータにインポートされる BLOB の URI です。
|
|
sourceResourceId
|
string
|
createOption が Copy の場合、これはソース スナップショットまたはディスクの ARM ID です。
|
|
sourceUniqueId
|
string
|
このフィールドが設定されている場合、これはこのリソースのソースを識別する一意の ID です。
|
|
sourceUri
|
string
|
createOption が Import の場合、これはマネージド ディスクにインポートされる BLOB の URI です。
|
|
storageAccountId
|
string
|
createOption が Import の場合は必須。 ディスクとしてインポートする BLOB を含むストレージ アカウントの Azure Resource Manager 識別子。
|
|
uploadSizeBytes
|
integer
(int64)
|
createOption が Upload の場合、これは VHD フッターを含むアップロードの内容のサイズです。 この値は、20972032 (VHD フッターの場合は 20 MiB + 512 バイト) と35183298347520 バイト (VHD フッターの場合は 32 TiB + 512 バイト) の間である必要があります。
|
DataAccessAuthMode
列挙
ディスクまたはスナップショットにエクスポートまたはアップロードするときの追加の認証要件。
| 値 |
説明 |
|
AzureActiveDirectory
|
エクスポート/アップロード URL を使用すると、ユーザーがAzure Active Directoryに ID を持ち、データのエクスポート/アップロードに必要なアクセス許可を持っているかどうかがシステムによって確認されます。 aka.ms/DisksAzureADAuth を参照してください。
|
|
None
|
エクスポート/アップロード URL にアクセスするときに、追加の認証は実行されません。
|
DiskCreateOption
列挙
これにより、ディスクの作成に使用できるソースが列挙されます。
| 値 |
説明 |
|
Empty
|
diskSizeGB によって指定されたサイズの空のデータ ディスクを作成します。
|
|
Attach
|
ディスクは VM に接続されます。
|
|
FromImage
|
指定された imageReference または galleryImageReference で指定されたプラットフォーム イメージから新しいディスクを作成します。
|
|
Import
|
storageAccountId で指定されたストレージ アカウント内の sourceUri で指定された BLOB からインポートして、ディスクを作成します。
|
|
Copy
|
指定された sourceResourceId で指定されたディスクまたはスナップショットからコピーして、新しいディスクまたはスナップショットを作成します。
|
|
Restore
|
バックアップ回復ポイントからコピーして、新しいディスクを作成します。
|
|
Upload
|
書き込みトークンを取得し、それを使用してディスクの内容を直接アップロードすることで、新しいディスクを作成します。
|
|
CopyStart
|
ディープ コピー プロセスを使用して新しいディスクを作成します。リソースの作成は、ソースからすべてのデータがコピーされた後でのみ完了と見なされます。
|
|
ImportSecure
|
[作成のインポート] オプションに似ています。 securityDataUri で指定された VM ゲスト状態と securityMetadataUri で指定された VM メタデータの追加の BLOB を、storageAccountId で指定されたストレージ アカウントにインポートして、新しいトラステッド起動 VM または機密 VM でサポートされているディスクを作成します。 VM メタデータはオプションであり、特定の機密 VM 構成にのみ必要であり、トラステッド起動 VM には必要ありません。
|
|
UploadPreparedSecure
|
[作成のアップロード] オプションに似ています。 新しいトラステッド起動 VM または機密 VM でサポートされているディスクを作成し、ディスク、VM ゲストの状態、および VM メタデータの書き込みトークンを使用してアップロードします。 VM メタデータはオプションであり、特定の機密 VM 構成にのみ必要であり、トラステッド起動 VM には必要ありません。
|
|
CopyFromSanSnapshot
|
エラスティック SAN ボリューム スナップショットからエクスポートして新しいディスクを作成する
|
DiskPurchasePlan
Object
MarketPlace を通じてサード パーティの成果物の購入コンテキストを確立するために使用されます。
| Name |
型 |
説明 |
|
name
|
string
|
プラン ID。
|
|
product
|
string
|
マーケットプレースからのイメージの製品を指定します。 これは、imageReference 要素の下の Offer と同じ値です。
|
|
promotionCode
|
string
|
オファープロモーションコード。
|
|
publisher
|
string
|
発行元 ID。
|
DiskSecurityProfile
Object
リソースのセキュリティ関連情報を格納します。
| Name |
型 |
説明 |
|
confidentialVMVersion
|
ConfidentialVMVersion
|
リソースの機密VMのバージョンを示します。
|
|
secureVMDiskEncryptionSetId
|
string
|
機密 VM に関連付けられているディスク暗号化セットの ResourceId は、カスタマー マネージド キーで暗号化されています
|
|
securityType
|
DiskSecurityTypes
|
VM の SecurityType を指定します。 OS ディスクにのみ適用されます。
|
DiskSecurityTypes
列挙
VM の SecurityType を指定します。 OS ディスクにのみ適用されます。
| 値 |
説明 |
|
TrustedLaunch
|
トラステッド起動では、セキュア ブートや仮想トラステッド プラットフォーム モジュール (vTPM) などのセキュリティ機能が提供されます
|
|
ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey
|
VM ゲスト状態のみが暗号化された機密 VM ディスクを示します
|
|
ConfidentialVM_DiskEncryptedWithPlatformKey
|
OS ディスクと VM ゲスト状態の両方がプラットフォーム マネージド キーで暗号化された機密 VM ディスクを示します
|
|
ConfidentialVM_DiskEncryptedWithCustomerKey
|
OS ディスクと VM ゲスト状態の両方がカスタマー マネージド キーで暗号化された機密 VM ディスクを示します
|
|
ConfidentialVM_NonPersistedTPM
|
一時的な vTPM を持つ機密 VM ディスクを示します。 vTPM 状態は、VM の再起動後も保持されません。
|
DiskState
列挙
これにより、ディスクの可能な状態が列挙されます。
| 値 |
説明 |
|
Unattached
|
ディスクが使用されていないため、VM に接続できます。
|
|
Attached
|
ディスクは現在、実行中の VM に接続されています。
|
|
Reserved
|
ディスクは、停止して割り当て解除された VM に接続されます。
|
|
Frozen
|
ディスクは、休止状態の VM に接続されています。
|
|
ActiveSAS
|
現在、ディスクにはアクティブな SAS URI が関連付けられています。
|
|
ActiveSASFrozen
|
ディスクは休止状態の VM に接続され、アクティブな SAS URI が関連付けられています。
|
|
ReadyToUpload
|
書き込みトークンを要求することで、ディスクをアップロードして作成する準備ができました。
|
|
ActiveUpload
|
アップロード用のディスクが作成され、アップロード用の書き込みトークンが発行されました。
|
Encryption
Object
ディスクまたはスナップショットの保存時の暗号化設定
| Name |
型 |
説明 |
|
diskEncryptionSetId
|
string
|
保存時の暗号化を有効にするために使用するディスク暗号化セットの ResourceId。
|
|
type
|
EncryptionType
|
ディスクのデータを暗号化するために使用されるキーの種類。
|
EncryptionSettingsCollection
Object
ディスクまたはスナップショットの暗号化設定
| Name |
型 |
説明 |
|
enabled
|
boolean
|
このフラグを true に設定し、DiskEncryptionKey とオプションの KeyEncryptionKey を指定して暗号化を有効にします。 このフラグを false に設定し、DiskEncryptionKey と KeyEncryptionKey を削除して暗号化を無効にします。 要求オブジェクトで EncryptionSettings が null の場合、既存の設定は変更されません。
|
|
encryptionSettings
|
EncryptionSettingsElement[]
|
暗号化設定のコレクション。ディスク ボリュームごとに 1 つ。
|
|
encryptionSettingsVersion
|
string
|
ディスクに使用される暗号化の種類について説明します。 このフィールドを設定すると、上書きできません。 '1.0' は、AAD アプリを使用した Azure Disk Encryption に対応しています。'1.1' は Azure Disk Encryption に対応しています。
|
EncryptionSettingsElement
Object
1 つのディスク ボリュームの暗号化設定。
EncryptionType
列挙
ディスクのデータを暗号化するために使用されるキーの種類。
| 値 |
説明 |
|
EncryptionAtRestWithPlatformKey
|
ディスクは、プラットフォーム マネージド キーを使用して保存時に暗号化されます。 既定の暗号化の種類です。 これは、ディスク暗号化セットの有効な暗号化の種類ではありません。
|
|
EncryptionAtRestWithCustomerKey
|
ディスクは、顧客が変更および取り消すことができるカスタマー マネージド キーを使用して保存時に暗号化されます。
|
|
EncryptionAtRestWithPlatformAndCustomerKeys
|
ディスクは保存時に 2 層の暗号化で暗号化されます。 キーの 1 つはカスタマー マネージドで、もう 1 つのキーはプラットフォーム管理です。
|
ExtendedLocation
Object
拡張された場所の複合型。
ExtendedLocationTypes
列挙
拡張された場所の種類。
HyperVGeneration
列挙
仮想マシンのハイパーバイザー生成。 OS ディスクにのみ適用されます。
ImageDiskReference
Object
ディスクの作成に使用されるソース イメージ。
| Name |
型 |
説明 |
|
communityGalleryImageId
|
string
|
コミュニティの Azure コンピューティング ギャラリー イメージ参照を含む相対 URI。
|
|
id
|
string
|
プラットフォーム イメージ リポジトリ、ユーザー イメージ、または Azure コンピューティング ギャラリー イメージ参照を含む相対 URI。
|
|
lun
|
integer
(int32)
|
ディスクがイメージのデータ ディスクから作成された場合、これはイメージ内のどのデータ ディスクを使用するかを示すインデックスです。 OS ディスクの場合、このフィールドは null です。
|
|
sharedGalleryImageId
|
string
|
直接共有 Azure コンピューティング ギャラリー イメージ参照を含む相対 URI。
|
ImmutabilityPolicy
Object
不変性ポリシーは現在スナップショットに適用されています。
| Name |
型 |
説明 |
|
immutabilityDurationDays
|
integer
(int32)
|
スナップショットの不変性の持続時間(日数)です。
|
|
isPolicyExpired
|
boolean
|
不変性ポリシーが失効したかどうかを示します。
|
|
policyExpirationTime
|
string
(date-time)
|
不変性ポリシーがスナップショットで期限切れになる時間。
|
|
policyStartTime
|
string
(date-time)
|
スナップショット上で不変性ポリシーが設定された時刻。
|
|
type
|
ImmutabilityPolicyType
|
不変性ポリシーの種類。
|
ImmutabilityPolicyType
列挙
不変性ポリシーの種類。 「アンロック」は特権ユーザーがポリシーを変更できるようにします。「ロック」は不変性の持続時間を短縮できませんが、ロック期間の延長を可能にします。
| 値 |
説明 |
|
Unlocked
|
特権ユーザーは、スナップショットの不変性ポリシーをアンロック型であれば変更できます。
|
|
Locked
|
スナップショットの不変性ポリシーの期間は短縮できませんが、延長は可能です。 ロック期間が終了するまでは保険の解除はできません。
|
InnerError
Object
内部エラーの詳細。
| Name |
型 |
説明 |
|
errordetail
|
string
|
内部エラー メッセージまたは例外ダンプ。
|
|
exceptiontype
|
string
|
例外の種類。
|
KeyVaultAndKeyReference
Object
Key Vault Key Url と KeK のコンテナー ID は省略可能であり、指定されている場合は encryptionKey のラップを解除するために使用されます
| Name |
型 |
説明 |
|
keyUrl
|
string
|
KeyVault のキーまたはシークレットを指す URL
|
|
sourceVault
|
SourceVault
|
キーまたはシークレットを含む KeyVault のリソース ID
|
KeyVaultAndSecretReference
Object
暗号化キーの Key Vault シークレット URL とコンテナー ID
| Name |
型 |
説明 |
|
secretUrl
|
string
|
KeyVault のキーまたはシークレットを指す URL
|
|
sourceVault
|
SourceVault
|
キーまたはシークレットを含む KeyVault のリソース ID
|
NetworkAccessPolicy
列挙
ネットワーク経由でディスクにアクセスするためのポリシー。
| 値 |
説明 |
|
AllowAll
|
ディスクは、任意のネットワークからエクスポートまたはアップロードできます。
|
|
AllowPrivate
|
ディスクは、DiskAccess リソースのプライベート エンドポイントを使用してエクスポートまたはアップロードできます。
|
|
DenyAll
|
ディスクをエクスポートできません。
|
OperatingSystemTypes
列挙
オペレーティング システムの種類。
ProvisionedBandwidthCopyOption
列挙
このフィールドがスナップショットに設定され、createOption が CopyStart の場合、スナップショットはより迅速にコピーされます。
PublicNetworkAccess
列挙
ディスク上のエクスポートを制御するためのポリシー。
| 値 |
説明 |
|
Enabled
|
NetworkAccessPolicy が AllowAll に設定されている場合は、SAS URI を生成して、インターネット上のディスクの基になるデータにパブリックにアクセスできます。 NetworkAccessPolicy が AllowPrivate に設定されている場合は、信頼された Azure VNET からのみ SAS URI を介してデータにアクセスできます。
|
|
Disabled
|
NetworkAccessPolicy が AllowAll に設定されている場合でも、インターネット上のディスクの基になるデータにパブリックにアクセスすることはできません。 NetworkAccessPolicy が AllowPrivate に設定されている場合は、信頼された Azure VNET からのみ SAS URI を介してデータにアクセスできます。
|
Snapshot
Object
スナップショット リソース。
| Name |
型 |
説明 |
|
extendedLocation
|
ExtendedLocation
|
スナップショットが作成される拡張された場所。 拡張された場所は変更できません。
|
|
id
|
string
|
リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
location
|
string
|
リソースが存在する地理的な場所
|
|
managedBy
|
string
|
未使用。 常に Null。
|
|
name
|
string
|
リソースの名前
|
|
properties.completionPercent
|
number
(float)
|
CopyStart 操作を使用してリソースが作成されたときのバックグラウンド コピーの完了率。
|
|
properties.copyCompletionError
|
CopyCompletionError
|
CopyStart 操作を使用して作成されたリソースのバックグラウンド コピーが失敗した場合に、エラーの詳細を示します。
|
|
properties.creationData
|
CreationData
|
ディスク ソース情報。 ディスクの作成後に CreationData 情報を変更することはできません。
|
|
properties.dataAccessAuthMode
|
DataAccessAuthMode
|
ディスクまたはスナップショットにエクスポートまたはアップロードするときの追加の認証要件。
|
|
properties.diskAccessId
|
string
|
ディスクでプライベート エンドポイントを使用するための DiskAccess リソースの ARM ID。
|
|
properties.diskSizeBytes
|
integer
(int64)
|
ディスクのサイズ (バイト単位)。 このフィールドは読み取り専用です。
|
|
properties.diskSizeGB
|
integer
(int32)
|
creationData.createOption が空の場合、このフィールドは必須であり、作成するディスクのサイズを示します。 このフィールドが他のオプションを使用して更新または作成するために存在する場合は、サイズ変更を示します。 サイズ変更は、ディスクが実行中の VM に接続されていない場合にのみ許可され、ディスクのサイズのみを増やすことができます。
|
|
properties.diskState
|
DiskState
|
スナップショットの状態。
|
|
properties.encryption
|
Encryption
|
Encryption プロパティを使用すると、保存データをカスタマー マネージド キーまたはプラットフォーム マネージド キーで暗号化できます。
|
|
properties.encryptionSettingsCollection
|
EncryptionSettingsCollection
|
使用される暗号化設定コレクションは Azure Disk Encryption で、ディスクまたはスナップショットごとに複数の暗号化設定を含めることができます。
|
|
properties.hyperVGeneration
|
HyperVGeneration
|
仮想マシンのハイパーバイザー生成。 OS ディスクにのみ適用されます。
|
|
properties.immutabilityPolicy
|
ImmutabilityPolicy
|
このスナップショットには現在適用されている不変性ポリシーです。 不変性ポリシーが設定されている場合にのみ存在します。
|
|
properties.incremental
|
boolean
|
スナップショットが増分であるかどうか。 同じディスク上の増分スナップショットは、完全なスナップショットよりも少ない領域を占有し、差分できます。
|
|
properties.incrementalSnapshotFamilyId
|
string
|
ディスクの増分スナップショットは、増分スナップショット ファミリ ID を共有します。Get Page Range Diff API は、同じファミリ ID を持つ増分スナップショットでのみ呼び出すことができます。
|
|
properties.networkAccessPolicy
|
NetworkAccessPolicy
|
ネットワーク経由でディスクにアクセスするためのポリシー。
|
|
properties.osType
|
OperatingSystemTypes
|
オペレーティング システムの種類。
|
|
properties.provisioningState
|
string
|
ディスク のプロビジョニング状態。
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
ディスク上のエクスポートを制御するためのポリシー。
|
|
properties.purchasePlan
|
DiskPurchasePlan
|
スナップショットのソース ディスクが最初に作成されたイメージの購入プラン情報。
|
|
properties.securityProfile
|
DiskSecurityProfile
|
リソースのセキュリティ関連情報を格納します。
|
|
properties.snapshotAccessState
|
SnapshotAccessState
|
スナップショットのアクセス可用性を決定するスナップショットの状態。
|
|
properties.supportedCapabilities
|
SupportedCapabilities
|
スナップショットのソース ディスクが最初に作成されたイメージでサポートされている機能の一覧。
|
|
properties.supportsHibernation
|
boolean
|
スナップショット上の OS が休止状態をサポートしているかどうかを示します。
|
|
properties.timeCreated
|
string
(date-time)
|
スナップショットが作成された時刻。
|
|
properties.uniqueId
|
string
|
リソースを識別する一意の Guid。
|
|
sku
|
SnapshotSku
|
スナップショット SKU 名。 Standard_LRS、Premium_LRS、またはStandard_ZRSできます。 これは増分スナップショットの省略可能なパラメーターであり、既定の動作では、SKU は前のスナップショットと同じ SKU に設定されます
|
|
systemData
|
systemData
|
createdBy および modifiedBy 情報を含む Azure Resource Manager メタデータ。
|
|
tags
|
object
|
リソース タグ。
|
|
type
|
string
|
リソースの種類。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"
|
SnapshotAccessState
列挙
スナップショットのアクセス可用性を決定するスナップショットの状態。
| 値 |
説明 |
|
Unknown
|
既定値。
|
|
Pending
|
スナップショットは、復元、コピー、またはオフラインへのダウンロードには使用できません。
|
|
Available
|
スナップショットは、復元、別のリージョンへのコピー、オフラインへのダウンロードに使用できます。
|
|
InstantAccess
|
スナップショットは、高速なパフォーマンスでディスクを復元するために使用できますが、コピーやダウンロードはできません。
|
|
AvailableWithInstantAccess
|
スナップショットは、高速なパフォーマンスでディスクを復元し、コピーおよびダウンロードするために使用できます。
|
SnapshotSku
Object
スナップショット SKU 名。 Standard_LRS、Premium_LRS、またはStandard_ZRSできます。 これは増分スナップショットの省略可能なパラメーターであり、既定の動作では、SKU は前のスナップショットと同じ SKU に設定されます
SnapshotStorageAccountTypes
列挙
SKU 名。
| 値 |
説明 |
|
Standard_LRS
|
Standard HDD のローカル冗長ストレージ
|
|
Premium_LRS
|
Premium SSD のローカル冗長ストレージ
|
|
Standard_ZRS
|
Standard ゾーン冗長ストレージ
|
SourceVault
Object
コンテナー ID は、/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} という形式の Azure Resource Manager リソース ID です。
| Name |
型 |
説明 |
|
id
|
string
|
リソース ID
|
SupportedCapabilities
Object
VM で使用するためにディスク リソースに保持されるサポートされている機能の一覧。
| Name |
型 |
説明 |
|
acceleratedNetwork
|
boolean
|
TRUE の 場合は、OS ディスクの作成元のイメージが高速ネットワークをサポートしています。
|
|
architecture
|
Architecture
|
OS ディスクでサポートされている CPU アーキテクチャ。
|
|
diskControllerTypes
|
string
|
OS ディスクがサポートするディスク コントローラー。 設定する場合は、SCSI、SCSI、NVME、NVME、SCSI を使用できます。
|
|
supportedSecurityOption
|
SupportedSecurityOption
|
トラステッド起動またはコンフィデンシャル VM の作成にサポートされているディスクのセキュリティ機能を指します
|
SupportedSecurityOption
列挙
トラステッド起動またはコンフィデンシャル VM の作成にサポートされているディスクのセキュリティ機能を指します
| 値 |
説明 |
|
TrustedLaunchSupported
|
ディスクは、トラステッド起動 VM の作成をサポートしています。
|
|
TrustedLaunchAndConfidentialVMSupported
|
このディスクは、トラステッド起動と機密の両方の VM の作成をサポートしています。
|
systemData
Object
リソースの作成と最後の変更に関連するメタデータ。
| Name |
型 |
説明 |
|
createdAt
|
string
(date-time)
|
リソース作成のタイムスタンプ (UTC)。
|
|
createdBy
|
string
|
リソースを作成した ID。
|
|
createdByType
|
createdByType
|
リソースを作成した ID の種類。
|
|
lastModifiedAt
|
string
(date-time)
|
リソースの最終変更のタイムスタンプ (UTC)
|
|
lastModifiedBy
|
string
|
リソースを最後に変更した ID。
|
|
lastModifiedByType
|
createdByType
|
リソースを最後に変更した ID の種類。
|