public sealed class PrivatePoolV1Config.Types.WorkerConfig : IMessage<PrivatePoolV1Config.Types.WorkerConfig>, IEquatable<PrivatePoolV1Config.Types.WorkerConfig>, IDeepCloneable<PrivatePoolV1Config.Types.WorkerConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Build v1 API class PrivatePoolV1Config.Types.WorkerConfig.
Defines the configuration to be used for creating workers in
the pool.
Size of the disk attached to the worker, in GB.
See Worker pool config
file.
Specify a value of up to 4000. If 0 is specified, Cloud Build will use
a standard disk size.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003ePrivatePoolV1Config.Types.WorkerConfig\u003c/code\u003e class within the Google Cloud Build v1 API for .NET, with the latest version being 2.15.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eWorkerConfig\u003c/code\u003e class defines the configuration used for creating workers in a private pool, and is implemented by the interfaces \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eWorkerConfig\u003c/code\u003e class include \u003ccode\u003eDiskSizeGb\u003c/code\u003e, which specifies the disk size for the worker in GB (up to 2000, or standard if 0), and \u003ccode\u003eMachineType\u003c/code\u003e, which defines the machine type (e.g., "e2-medium") for the worker.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple previous versions of \u003ccode\u003eWorkerConfig\u003c/code\u003e available, ranging from version 1.0.0 to 2.14.0, linked in the document, and this class can be inherited from an object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eWorkerConfig\u003c/code\u003e class has two constructors, one being blank, and the second taking a \u003ccode\u003ePrivatePoolV1Config.Types.WorkerConfig\u003c/code\u003e object as a parameter.\u003c/p\u003e\n"]]],[],null,["# Cloud Build v1 API - Class PrivatePoolV1Config.Types.WorkerConfig (2.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.16.0 (latest)](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.15.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.14.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.13.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.12.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.11.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.10.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.9.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.8.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.7.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.6.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.5.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.4.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.3.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.2.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.1.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.0.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.4.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.3.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.2.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.1.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.0.0/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig) \n\n public sealed class PrivatePoolV1Config.Types.WorkerConfig : IMessage\u003cPrivatePoolV1Config.Types.WorkerConfig\u003e, IEquatable\u003cPrivatePoolV1Config.Types.WorkerConfig\u003e, IDeepCloneable\u003cPrivatePoolV1Config.Types.WorkerConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Build v1 API class PrivatePoolV1Config.Types.WorkerConfig.\n\nDefines the configuration to be used for creating workers in\nthe pool. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PrivatePoolV1Config.Types.WorkerConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PrivatePoolV1Config](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types)[WorkerConfig](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PrivatePoolV1Config](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types)[WorkerConfig](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PrivatePoolV1Config](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types)[WorkerConfig](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.PrivatePoolV1Config.Types.WorkerConfig), [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.CloudBuild.V1](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.CloudBuild.V1.dll\n\nConstructors\n------------\n\n### WorkerConfig()\n\n public WorkerConfig()\n\n### WorkerConfig(WorkerConfig)\n\n public WorkerConfig(PrivatePoolV1Config.Types.WorkerConfig other)\n\nProperties\n----------\n\n### DiskSizeGb\n\n public long DiskSizeGb { get; set; }\n\nSize of the disk attached to the worker, in GB.\nSee [Worker pool config\nfile](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema).\nSpecify a value of up to 4000. If `0` is specified, Cloud Build will use\na standard disk size.\n\n### EnableNestedVirtualization\n\n public bool EnableNestedVirtualization { get; set; }\n\nOptional. Enable nested virtualization on the worker, if supported by the\nmachine type. By default, nested virtualization is disabled.\n\n### HasEnableNestedVirtualization\n\n public bool HasEnableNestedVirtualization { get; }\n\nGets whether the \"enable_nested_virtualization\" field is set\n\n### MachineType\n\n public string MachineType { get; set; }\n\nOptional. Machine type of a worker, such as `e2-medium`.\nSee [Worker pool config\nfile](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema).\nIf left blank, Cloud Build will use a sensible default."]]