public sealed class DiskInstantiationConfig : IMessage<DiskInstantiationConfig>, IEquatable<DiskInstantiationConfig>, IDeepCloneable<DiskInstantiationConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Compute Engine v1 API class DiskInstantiationConfig.
A specification of the desired way to instantiate a disk in the instance template when its created from a source instance.
Specifies whether to include the disk and what image to use. Possible values are: - source-image: to use the same image that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - source-image-family: to use the same image family that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - custom-image: to use a user-provided image url for disk creation. Applicable to the boot disk and additional read-write disks. - attach-read-only: to attach a read-only disk. Applicable to read-only disks. - do-not-include: to exclude a disk from the template. Applicable to additional read-write disks, local SSDs, and read-only disks.
Check the InstantiateFrom enum for the list of possible values.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-08 UTC."],[[["\u003cp\u003eThis webpage provides reference documentation for the \u003ccode\u003eDiskInstantiationConfig\u003c/code\u003e class within the Google Compute Engine v1 API, specifically for .NET developers.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDiskInstantiationConfig\u003c/code\u003e is a class used to specify how a disk should be instantiated when creating an instance template from a source instance, which allows for customization of disk behavior.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation lists various versions of the Google.Cloud.Compute.V1 library, ranging from version 1.0.0 up to the latest version, 3.6.0, with each version's page detailing the \u003ccode\u003eDiskInstantiationConfig\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDiskInstantiationConfig\u003c/code\u003e class allows setting properties such as \u003ccode\u003eAutoDelete\u003c/code\u003e, \u003ccode\u003eCustomImage\u003c/code\u003e, \u003ccode\u003eDeviceName\u003c/code\u003e, and \u003ccode\u003eInstantiateFrom\u003c/code\u003e to control the disk's behavior when used in instance templates.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits members from the base \u003ccode\u003eobject\u003c/code\u003e class, which it includes in the reference.\u003c/p\u003e\n"]]],[],null,["# Compute Engine v1 API - Class DiskInstantiationConfig (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.12.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.11.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.10.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.9.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.8.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.7.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.6.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.5.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.4.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.3.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.2.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.1.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.0.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.17.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.17.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.16.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.15.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.14.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.13.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.12.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.11.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.10.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.9.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.8.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.7.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.6.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.5.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.4.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.3.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.2.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.1.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.0.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.4.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.3.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.2.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.1.0/Google.Cloud.Compute.V1.DiskInstantiationConfig)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.0.0/Google.Cloud.Compute.V1.DiskInstantiationConfig) \n\n public sealed class DiskInstantiationConfig : IMessage\u003cDiskInstantiationConfig\u003e, IEquatable\u003cDiskInstantiationConfig\u003e, IDeepCloneable\u003cDiskInstantiationConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Compute Engine v1 API class DiskInstantiationConfig.\n\nA specification of the desired way to instantiate a disk in the instance template when its created from a source instance. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DiskInstantiationConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DiskInstantiationConfig](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DiskInstantiationConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DiskInstantiationConfig](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DiskInstantiationConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DiskInstantiationConfig](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DiskInstantiationConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Compute.V1](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Compute.V1.dll\n\nConstructors\n------------\n\n### DiskInstantiationConfig()\n\n public DiskInstantiationConfig()\n\n### DiskInstantiationConfig(DiskInstantiationConfig)\n\n public DiskInstantiationConfig(DiskInstantiationConfig other)\n\nProperties\n----------\n\n### AutoDelete\n\n public bool AutoDelete { get; set; }\n\nSpecifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).\n\n### CustomImage\n\n public string CustomImage { get; set; }\n\nThe custom source image to be used to restore this disk when instantiating this instance template.\n\n### DeviceName\n\n public string DeviceName { get; set; }\n\nSpecifies the device name of the disk to which the configurations apply to.\n\n### HasAutoDelete\n\n public bool HasAutoDelete { get; }\n\nGets whether the \"auto_delete\" field is set\n\n### HasCustomImage\n\n public bool HasCustomImage { get; }\n\nGets whether the \"custom_image\" field is set\n\n### HasDeviceName\n\n public bool HasDeviceName { get; }\n\nGets whether the \"device_name\" field is set\n\n### HasInstantiateFrom\n\n public bool HasInstantiateFrom { get; }\n\nGets whether the \"instantiate_from\" field is set\n\n### InstantiateFrom\n\n public string InstantiateFrom { get; set; }\n\nSpecifies whether to include the disk and what image to use. Possible values are: - source-image: to use the same image that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - source-image-family: to use the same image family that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - custom-image: to use a user-provided image url for disk creation. Applicable to the boot disk and additional read-write disks. - attach-read-only: to attach a read-only disk. Applicable to read-only disks. - do-not-include: to exclude a disk from the template. Applicable to additional read-write disks, local SSDs, and read-only disks.\nCheck the InstantiateFrom enum for the list of possible values."]]