Show / Hide Table of Contents

Class Key

The logical entities that represent one or more key versions, each of which contains cryptographic material.

Inheritance
object
Key
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.KeymanagementService.Models
Assembly: OCI.DotNetSDK.Keymanagement.dll
Syntax
public class Key

Properties

AutoKeyRotationDetails

Declaration
[JsonProperty(PropertyName = "autoKeyRotationDetails")]
public AutoKeyRotationDetails AutoKeyRotationDetails { get; set; }
Property Value
Type Description
AutoKeyRotationDetails

CompartmentId

Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type Description
string

The OCID of the compartment that contains this master encryption key.

Remarks

Required

CurrentKeyVersion

Declaration
[Required(ErrorMessage = "CurrentKeyVersion is required.")]
[JsonProperty(PropertyName = "currentKeyVersion")]
public string CurrentKeyVersion { get; set; }
Property Value
Type Description
string

The OCID of the key version used in cryptographic operations. During key rotation, the service might be in a transitional state where this or a newer key version are used intermittently. The currentKeyVersion property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations.

Remarks

Required

DefinedTags

Declaration
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
Type Description
Dictionary<string, Dictionary<string, object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations": {"CostCenter": "42"}}

DisplayName

Declaration
[Required(ErrorMessage = "DisplayName is required.")]
[JsonProperty(PropertyName = "displayName")]
public string DisplayName { get; set; }
Property Value
Type Description
string

A user-friendly name for the key. It does not have to be unique, and it is changeable. Avoid entering confidential information.

Remarks

Required

ExternalKeyReferenceDetails

Declaration
[JsonProperty(PropertyName = "externalKeyReferenceDetails")]
public ExternalKeyReferenceDetails ExternalKeyReferenceDetails { get; set; }
Property Value
Type Description
ExternalKeyReferenceDetails

FreeformTags

Declaration
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
Type Description
Dictionary<string, string>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id

Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type Description
string

The OCID of the key.

Remarks

Required

IsAutoRotationEnabled

Declaration
[JsonProperty(PropertyName = "isAutoRotationEnabled")]
public bool? IsAutoRotationEnabled { get; set; }
Property Value
Type Description
bool?

A parameter specifying whether the auto key rotation is enabled or not.

IsPrimary

Declaration
[JsonProperty(PropertyName = "isPrimary")]
public bool? IsPrimary { get; set; }
Property Value
Type Description
bool?

A Boolean value that indicates whether the Key belongs to primary Vault or replica vault.

KeyShape

Declaration
[Required(ErrorMessage = "KeyShape is required.")]
[JsonProperty(PropertyName = "keyShape")]
public KeyShape KeyShape { get; set; }
Property Value
Type Description
KeyShape
Remarks

Required

LifecycleState

Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Key.LifecycleStateEnum? LifecycleState { get; set; }
Property Value
Type Description
Key.LifecycleStateEnum?

The key's current lifecycle state.
Example: ENABLED

Remarks

Required

ProtectionMode

Declaration
[JsonProperty(PropertyName = "protectionMode")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Key.ProtectionModeEnum? ProtectionMode { get; set; }
Property Value
Type Description
Key.ProtectionModeEnum?

The key's protection mode indicates how the key persists and where cryptographic operations that use the key are performed. A protection mode of HSM means that the key persists on a hardware security module (HSM) and all cryptographic operations are performed inside the HSM. A protection mode of SOFTWARE means that the key persists on the server, protected by the vault's RSA wrapping key which persists on the HSM. All cryptographic operations that use a key with a protection mode of SOFTWARE are performed on the server. By default, a key's protection mode is set to HSM. You can't change a key's protection mode after the key is created or imported. A protection mode of EXTERNAL mean that the key persists on the customer's external key manager which is hosted externally outside of oracle. Oracle only hold a reference to that key. All cryptographic operations that use a key with a protection mode of EXTERNAL are performed by external key manager.

ReplicaDetails

Declaration
[JsonProperty(PropertyName = "replicaDetails")]
public KeyReplicaDetails ReplicaDetails { get; set; }
Property Value
Type Description
KeyReplicaDetails

RestoredFromKeyId

Declaration
[JsonProperty(PropertyName = "restoredFromKeyId")]
public string RestoredFromKeyId { get; set; }
Property Value
Type Description
string

The OCID of the key from which this key was restored.

TimeCreated

Declaration
[Required(ErrorMessage = "TimeCreated is required.")]
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
Type Description
DateTime?

The date and time the key was created, expressed in RFC 3339 timestamp format.
Example: 2018-04-03T21:10:29.600Z

Remarks

Required

TimeOfDeletion

Declaration
[JsonProperty(PropertyName = "timeOfDeletion")]
public DateTime? TimeOfDeletion { get; set; }
Property Value
Type Description
DateTime?

An optional property indicating when to delete the key, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

VaultId

Declaration
[Required(ErrorMessage = "VaultId is required.")]
[JsonProperty(PropertyName = "vaultId")]
public string VaultId { get; set; }
Property Value
Type Description
string

The OCID of the vault that contains this key.

Remarks

Required

In this article
Back to top