public sealed class WorkerPoolRevisionTemplate : IMessage<WorkerPoolRevisionTemplate>, IEquatable<WorkerPoolRevisionTemplate>, IDeepCloneable<WorkerPoolRevisionTemplate>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Run Admin v2 API class WorkerPoolRevisionTemplate.
WorkerPoolRevisionTemplate describes the data a worker pool revision should
have when created from a template.
public MapField<string, string> Annotations { get; }
Optional. Unstructured key value map that may be set by external tools to
store and arbitrary metadata. They are not queryable and should be
preserved when modifying objects.
Cloud Run API v2 does not support annotations with run.googleapis.com,
cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev
namespaces, and they will be rejected. All system annotations in v1 now
have a corresponding field in v2 WorkerPoolRevisionTemplate.
This field follows Kubernetes annotations' namespacing, limits, and
rules.
Cloud Run API v2 does not support labels with run.googleapis.com,
cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev
namespaces, and they will be rejected. All system labels in v1 now have a
corresponding field in v2 WorkerPoolRevisionTemplate.
Optional. Email address of the IAM service account associated with the
revision of the service. The service account represents the identity of the
running revision, and determines what permissions the revision has. If not
provided, the revision will use the project's default service account.
[[["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-09-04 UTC."],[],[],null,["# Cloud Run Admin v2 API - Class WorkerPoolRevisionTemplate (2.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.16.0 (latest)](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.15.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.14.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.13.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.12.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.11.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.10.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.9.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.8.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.7.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.6.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.5.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.4.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.3.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.2.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.1.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.0.0/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate)\n- [1.0.0-beta02](/dotnet/docs/reference/Google.Cloud.Run.V2/1.0.0-beta02/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate) \n\n public sealed class WorkerPoolRevisionTemplate : IMessage\u003cWorkerPoolRevisionTemplate\u003e, IEquatable\u003cWorkerPoolRevisionTemplate\u003e, IDeepCloneable\u003cWorkerPoolRevisionTemplate\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Run Admin v2 API class WorkerPoolRevisionTemplate.\n\nWorkerPoolRevisionTemplate describes the data a worker pool revision should\nhave when created from a template. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e WorkerPoolRevisionTemplate \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[WorkerPoolRevisionTemplate](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[WorkerPoolRevisionTemplate](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[WorkerPoolRevisionTemplate](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate), [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.Run.V2](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Run.V2.dll\n\nConstructors\n------------\n\n### WorkerPoolRevisionTemplate()\n\n public WorkerPoolRevisionTemplate()\n\n### WorkerPoolRevisionTemplate(WorkerPoolRevisionTemplate)\n\n public WorkerPoolRevisionTemplate(WorkerPoolRevisionTemplate other)\n\nProperties\n----------\n\n### Annotations\n\n public MapField\u003cstring, string\u003e Annotations { get; }\n\nOptional. Unstructured key value map that may be set by external tools to\nstore and arbitrary metadata. They are not queryable and should be\npreserved when modifying objects.\n\nCloud Run API v2 does not support annotations with `run.googleapis.com`,\n`cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`\nnamespaces, and they will be rejected. All system annotations in v1 now\nhave a corresponding field in v2 WorkerPoolRevisionTemplate.\n\nThis field follows Kubernetes annotations' namespacing, limits, and\nrules.\n\n### Containers\n\n public RepeatedField\u003cContainer\u003e Containers { get; }\n\nHolds list of the containers that defines the unit of execution for this\nRevision.\n\n### EncryptionKey\n\n public string EncryptionKey { get; set; }\n\nA reference to a customer managed encryption key (CMEK) to use to encrypt\nthis container image. For more information, go to\n\u003chttps://cloud.google.com/run/docs/securing/using-cmek\u003e\n\n### EncryptionKeyAsCryptoKeyName\n\n public CryptoKeyName EncryptionKeyAsCryptoKeyName { get; set; }\n\n[CryptoKeyName](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.CryptoKeyName)-typed view over the [EncryptionKey](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate#Google_Cloud_Run_V2_WorkerPoolRevisionTemplate_EncryptionKey) resource name property.\n\n### EncryptionKeyRevocationAction\n\n public EncryptionKeyRevocationAction EncryptionKeyRevocationAction { get; set; }\n\nOptional. The action to take if the encryption key is revoked.\n\n### EncryptionKeyShutdownDuration\n\n public Duration EncryptionKeyShutdownDuration { get; set; }\n\nOptional. If encryption_key_revocation_action is SHUTDOWN, the duration\nbefore shutting down all instances. The minimum increment is 1 hour.\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nOptional. Unstructured key value map that can be used to organize and\ncategorize objects. User-provided labels are shared with Google's billing\nsystem, so they can be used to filter, or break down billing charges by\nteam, component, environment, state, etc. For more information, visit\n\u003chttps://cloud.google.com/resource-manager/docs/creating-managing-labels\u003e or\n\u003chttps://cloud.google.com/run/docs/configuring/labels\u003e.\n\nCloud Run API v2 does not support labels with `run.googleapis.com`,\n`cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`\nnamespaces, and they will be rejected. All system labels in v1 now have a\ncorresponding field in v2 WorkerPoolRevisionTemplate.\n\n### NodeSelector\n\n public NodeSelector NodeSelector { get; set; }\n\nOptional. The node selector for the revision template.\n\n### Revision\n\n public string Revision { get; set; }\n\nOptional. The unique name for the revision. If this field is omitted, it\nwill be automatically generated based on the WorkerPool name.\n\n### RevisionAsRevisionName\n\n public RevisionName RevisionAsRevisionName { get; set; }\n\n[RevisionName](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionName)-typed view over the [Revision](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.WorkerPoolRevisionTemplate#Google_Cloud_Run_V2_WorkerPoolRevisionTemplate_Revision) resource name property.\n\n### ServiceAccount\n\n public string ServiceAccount { get; set; }\n\nOptional. Email address of the IAM service account associated with the\nrevision of the service. The service account represents the identity of the\nrunning revision, and determines what permissions the revision has. If not\nprovided, the revision will use the project's default service account.\n\n### ServiceMesh\n\n public ServiceMesh ServiceMesh { get; set; }\n\nOptional. Enables service mesh connectivity.\n\n### Volumes\n\n public RepeatedField\u003cVolume\u003e Volumes { get; }\n\nOptional. A list of Volumes to make available to containers.\n\n### VpcAccess\n\n public VpcAccess VpcAccess { get; set; }\n\nOptional. VPC Access configuration to use for this Revision. For more\ninformation, visit\n\u003chttps://cloud.google.com/run/docs/configuring/connecting-vpc\u003e."]]