# Cloud Run Admin v2 API - Class RevisionTemplate (2.19.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.19.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionTemplate)
- [2.18.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.18.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.17.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.17.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.16.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.16.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.15.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.14.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.13.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.12.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.11.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.10.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.9.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.8.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.7.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.6.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.5.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.4.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.3.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.2.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.1.0/Google.Cloud.Run.V2.RevisionTemplate)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/2.0.0/Google.Cloud.Run.V2.RevisionTemplate)
- [1.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/1.0.0-beta02/Google.Cloud.Run.V2.RevisionTemplate)

    public sealed class RevisionTemplate : IMessage<RevisionTemplate>, IEquatable<RevisionTemplate>, IDeepCloneable<RevisionTemplate>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Run Admin v2 API class RevisionTemplate.

RevisionTemplate describes the data a revision should have when created from
a template.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> RevisionTemplate

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RevisionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionTemplate), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RevisionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionTemplate), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RevisionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionTemplate), [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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Run.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2)

## Assembly

Google.Cloud.Run.V2.dll

## Constructors

### RevisionTemplate()

    public RevisionTemplate()

### RevisionTemplate(RevisionTemplate)

    public RevisionTemplate(RevisionTemplate other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionTemplate` |

## Properties

### Annotations

    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.

\<p\>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 RevisionTemplate.

\<p\>This field follows Kubernetes annotations' namespacing, limits, and
rules.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### Containers

    public RepeatedField<Container> Containers { get; }

Holds the single container that defines the unit of execution for this
Revision.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Container` |   |

### EncryptionKey

    public string EncryptionKey { get; set; }

A reference to a customer managed encryption key (CMEK) to use to encrypt
this container image. For more information, go to
<https://cloud.google.com/run/docs/securing/using-cmek>

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### EncryptionKeyAsCryptoKeyName

    public CryptoKeyName EncryptionKeyAsCryptoKeyName { get; set; }

[CryptoKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.CryptoKeyName)-typed view over the [EncryptionKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionTemplate#Google_Cloud_Run_V2_RevisionTemplate_EncryptionKey) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.CryptoKeyName` |   |

### EncryptionKeyRevocationAction

    public EncryptionKeyRevocationAction EncryptionKeyRevocationAction { get; set; }

Optional. The action to take if the encryption key is revoked.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.EncryptionKeyRevocationAction` |   |

### EncryptionKeyShutdownDuration

    public Duration EncryptionKeyShutdownDuration { get; set; }

Optional. If encryption_key_revocation_action is SHUTDOWN, the duration
before shutting down all instances. The minimum increment is 1 hour.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### ExecutionEnvironment

    public ExecutionEnvironment ExecutionEnvironment { get; set; }

Optional. The sandbox environment to host this Revision.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ExecutionEnvironment` |   |

### GpuZonalRedundancyDisabled

    public bool GpuZonalRedundancyDisabled { get; set; }

Optional. True if GPU zonal redundancy is disabled on this revision.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasGpuZonalRedundancyDisabled

    public bool HasGpuZonalRedundancyDisabled { get; }

Gets whether the "gpu_zonal_redundancy_disabled" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HealthCheckDisabled

    public bool HealthCheckDisabled { get; set; }

Optional. Disables health checking containers during deployment.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Labels

    public MapField<string, string> Labels { get; }

Optional. Unstructured key value map that can be used to organize and
categorize objects. User-provided labels are shared with Google's billing
system, so they can be used to filter, or break down billing charges by
team, component, environment, state, etc. For more information, visit
<https://cloud.google.com/resource-manager/docs/creating-managing-labels> or
<https://cloud.google.com/run/docs/configuring/labels>.

\<p\>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 RevisionTemplate.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### MaxInstanceRequestConcurrency

    public int MaxInstanceRequestConcurrency { get; set; }

Optional. Sets the maximum number of requests that each serving instance
can receive. If not specified or 0, concurrency defaults to 80 when
requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### NodeSelector

    public NodeSelector NodeSelector { get; set; }

Optional. The node selector for the revision template.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.NodeSelector` |   |

### Revision

    public string Revision { get; set; }

Optional. The unique name for the revision. If this field is omitted, it
will be automatically generated based on the Service name.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RevisionAsRevisionName

    public RevisionName RevisionAsRevisionName { get; set; }

[RevisionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionName)-typed view over the [Revision](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionTemplate#Google_Cloud_Run_V2_RevisionTemplate_Revision) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionName` |   |

### Scaling

    public RevisionScaling Scaling { get; set; }

Optional. Scaling settings for this Revision.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.RevisionScaling` |   |

### ServiceAccount

    public string ServiceAccount { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ServiceMesh

    public ServiceMesh ServiceMesh { get; set; }

Optional. Enables service mesh connectivity.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.ServiceMesh` |   |

### SessionAffinity

    public bool SessionAffinity { get; set; }

Optional. Enable session affinity.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Timeout

    public Duration Timeout { get; set; }

Optional. Max allowed time for an instance to respond to a request.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### Volumes

    public RepeatedField<Volume> Volumes { get; }

Optional. A list of Volumes to make available to containers.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.Volume` |   |

### VpcAccess

    public VpcAccess VpcAccess { get; set; }

Optional. VPC Access configuration to use for this Revision. For more
information, visit
<https://cloud.google.com/run/docs/configuring/connecting-vpc>.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.VpcAccess` |   |