# Certificate Authority v1 API - Class CertificateTemplate (3.12.0)

3.12.0 (latest) 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.3.0 2.2.0 2.1.0 2.0.0 1.0.0

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

Reference documentation and code samples for the Certificate Authority v1 API class CertificateTemplate.

A
\[CertificateTemplate\]\[google.cloud.security.privateca.v1.CertificateTemplate\]
refers to a managed template for certificate issuance.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.Security.PrivateCA.V1.dll

## Constructors

### CertificateTemplate()

    public CertificateTemplate()

### CertificateTemplate(CertificateTemplate)

    public CertificateTemplate(CertificateTemplate other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateTemplate` |

## Properties

### CertificateTemplateName

    public CertificateTemplateName CertificateTemplateName { get; set; }

[CertificateTemplateName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateTemplateName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateTemplate#Google_Cloud_Security_PrivateCA_V1_CertificateTemplate_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateTemplateName` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The time at which this
\[CertificateTemplate\]\[google.cloud.security.privateca.v1.CertificateTemplate\]
was created.

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

### Description

    public string Description { get; set; }

Optional. A human-readable description of scenarios this template is
intended for.

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

### IdentityConstraints

    public CertificateIdentityConstraints IdentityConstraints { get; set; }

Optional. Describes constraints on identities that may be appear in
\[Certificates\]\[google.cloud.security.privateca.v1.Certificate\] issued using
this template. If this is omitted, then this template will not add
restrictions on a certificate's identity.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateIdentityConstraints` |   |

### Labels

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

Optional. Labels with user-defined metadata.

| **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` |   |

### MaximumLifetime

    public Duration MaximumLifetime { get; set; }

Optional. The maximum lifetime allowed for issued
\[Certificates\]\[google.cloud.security.privateca.v1.Certificate\] that use
this template. If the issuing
\[CaPool\]\[google.cloud.security.privateca.v1.CaPool\] resource's
\[IssuancePolicy\]\[google.cloud.security.privateca.v1.CaPool.IssuancePolicy\]
specifies a
\[maximum_lifetime\]\[google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime\]
the minimum of the two durations will be the maximum lifetime for issued
\[Certificates\]\[google.cloud.security.privateca.v1.Certificate\]. Note that
if the issuing
\[CertificateAuthority\]\[google.cloud.security.privateca.v1.CertificateAuthority\]
expires before a
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\]'s requested
maximum_lifetime, the effective lifetime will be explicitly truncated
to match it.

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

### Name

    public string Name { get; set; }

Identifier. The resource name for this
\[CertificateTemplate\]\[google.cloud.security.privateca.v1.CertificateTemplate\]
in the format `projects/*/locations/*/certificateTemplates/*`.

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

### PassthroughExtensions

    public CertificateExtensionConstraints PassthroughExtensions { get; set; }

Optional. Describes the set of X.509 extensions that may appear in a
\[Certificate\]\[google.cloud.security.privateca.v1.Certificate\] issued using
this
\[CertificateTemplate\]\[google.cloud.security.privateca.v1.CertificateTemplate\].
If a certificate request sets extensions that don't appear in the
\[passthrough_extensions\]\[google.cloud.security.privateca.v1.CertificateTemplate.passthrough_extensions\],
those extensions will be dropped. If the issuing
\[CaPool\]\[google.cloud.security.privateca.v1.CaPool\]'s
\[IssuancePolicy\]\[google.cloud.security.privateca.v1.CaPool.IssuancePolicy\]
defines
\[baseline_values\]\[google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values\]
that don't appear here, the certificate issuance request will fail. If this
is omitted, then this template will not add restrictions on a certificate's
X.509 extensions. These constraints do not apply to X.509 extensions set in
this
\[CertificateTemplate\]\[google.cloud.security.privateca.v1.CertificateTemplate\]'s
\[predefined_values\]\[google.cloud.security.privateca.v1.CertificateTemplate.predefined_values\].

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateExtensionConstraints` |   |

### PredefinedValues

    public X509Parameters PredefinedValues { get; set; }

Optional. A set of X.509 values that will be applied to all issued
certificates that use this template. If the certificate request includes
conflicting values for the same properties, they will be overwritten by the
values defined here. If the issuing
\[CaPool\]\[google.cloud.security.privateca.v1.CaPool\]'s
\[IssuancePolicy\]\[google.cloud.security.privateca.v1.CaPool.IssuancePolicy\]
defines conflicting
\[baseline_values\]\[google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values\]
for the same properties, the certificate issuance request will fail.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.X509Parameters` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The time at which this
\[CertificateTemplate\]\[google.cloud.security.privateca.v1.CertificateTemplate\]
was updated.

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