public sealed class AllocationPolicy.Types.AttachedDisk : IMessage<AllocationPolicy.Types.AttachedDisk>, IEquatable<AllocationPolicy.Types.AttachedDisk>, IDeepCloneable<AllocationPolicy.Types.AttachedDisk>, IBufferMessage, IMessage
Reference documentation and code samples for the Batch v1alpha API class AllocationPolicy.Types.AttachedDisk.
A new or an existing persistent disk (PD) or a local ssd attached to a VM
instance.
Device name that the guest operating system will see.
It is used by Runnable.volumes field to mount disks. So please specify
the device_name if you want Batch to help mount the disk, and it should
match the device_name field in volumes.
[[["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-07 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eAllocationPolicy.Types.AttachedDisk\u003c/code\u003e class within the Google Cloud Batch v1alpha API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAttachedDisk\u003c/code\u003e represents a persistent disk (PD) or local SSD that can be attached to a VM instance.\u003c/p\u003e\n"],["\u003cp\u003eThe class allows attaching either a new disk using the \u003ccode\u003eNewDisk\u003c/code\u003e property or an existing disk using the \u003ccode\u003eExistingDisk\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDeviceName\u003c/code\u003e property specifies the name of the disk as seen by the guest OS, which is important for mounting the disk via \u003ccode\u003eRunnable.volumes\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAttachedCase\u003c/code\u003e property indicates which type of disk is attached, and the class implements multiple interfaces, such as \u003ccode\u003eIMessage\u003c/code\u003e and \u003ccode\u003eIDeepCloneable\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Batch v1alpha API - Class AllocationPolicy.Types.AttachedDisk (1.0.0-alpha31)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-alpha31 (latest)](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.AttachedDisk)\n- [1.0.0-alpha30](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/1.0.0-alpha30/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.AttachedDisk) \n\n public sealed class AllocationPolicy.Types.AttachedDisk : IMessage\u003cAllocationPolicy.Types.AttachedDisk\u003e, IEquatable\u003cAllocationPolicy.Types.AttachedDisk\u003e, IDeepCloneable\u003cAllocationPolicy.Types.AttachedDisk\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Batch v1alpha API class AllocationPolicy.Types.AttachedDisk.\n\nA new or an existing persistent disk (PD) or a local ssd attached to a VM\ninstance. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AllocationPolicy.Types.AttachedDisk \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AllocationPolicy](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy)[Types](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types)[AttachedDisk](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.AttachedDisk), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AllocationPolicy](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy)[Types](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types)[AttachedDisk](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.AttachedDisk), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AllocationPolicy](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy)[Types](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types)[AttachedDisk](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.AllocationPolicy.Types.AttachedDisk), [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.Batch.V1Alpha](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha)\n\nAssembly\n--------\n\nGoogle.Cloud.Batch.V1Alpha.dll\n\nConstructors\n------------\n\n### AttachedDisk()\n\n public AttachedDisk()\n\n### AttachedDisk(AttachedDisk)\n\n public AttachedDisk(AllocationPolicy.Types.AttachedDisk other)\n\nProperties\n----------\n\n### AttachedCase\n\n public AllocationPolicy.Types.AttachedDisk.AttachedOneofCase AttachedCase { get; }\n\n### DeviceName\n\n public string DeviceName { get; set; }\n\nDevice name that the guest operating system will see.\nIt is used by Runnable.volumes field to mount disks. So please specify\nthe device_name if you want Batch to help mount the disk, and it should\nmatch the device_name field in volumes.\n\n### ExistingDisk\n\n public string ExistingDisk { get; set; }\n\nName of an existing PD.\n\n### HasExistingDisk\n\n public bool HasExistingDisk { get; }\n\nGets whether the \"existing_disk\" field is set\n\n### NewDisk\n\n public AllocationPolicy.Types.Disk NewDisk { get; set; }"]]