Table of Contents

Class EncryptionSpec

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. This data type is not supported in Gemini API.

public record EncryptionSpec : IEquatable<EncryptionSpec>
Inheritance
EncryptionSpec
Implements
Inherited Members

Properties

KmsKeyName

Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

[JsonPropertyName("kmsKeyName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? KmsKeyName { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a EncryptionSpec object.

public static EncryptionSpec? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

EncryptionSpec

The deserialized EncryptionSpec object, or null if deserialization fails.