Key¶
- 
class oci.key_management.models.Key(**kwargs)¶
- Bases: - object- The logical entities that represent one or more key versions, each of which contains cryptographic material. - Attributes - LIFECYCLE_STATE_BACKUP_IN_PROGRESS- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_CANCELLING_DELETION- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_CREATING- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_DELETED- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_DELETING- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_DISABLED- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_DISABLING- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_ENABLED- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_ENABLING- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_PENDING_DELETION- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_RESTORING- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_SCHEDULING_DELETION- A constant which can be used with the lifecycle_state property of a Key. - LIFECYCLE_STATE_UPDATING- A constant which can be used with the lifecycle_state property of a Key. - PROTECTION_MODE_EXTERNAL- A constant which can be used with the protection_mode property of a Key. - PROTECTION_MODE_HSM- A constant which can be used with the protection_mode property of a Key. - PROTECTION_MODE_SOFTWARE- A constant which can be used with the protection_mode property of a Key. - auto_key_rotation_details- Gets the auto_key_rotation_details of this Key. - compartment_id- [Required] Gets the compartment_id of this Key. - current_key_version- [Required] Gets the current_key_version of this Key. - defined_tags- Gets the defined_tags of this Key. - display_name- [Required] Gets the display_name of this Key. - external_key_reference_details- Gets the external_key_reference_details of this Key. - freeform_tags- Gets the freeform_tags of this Key. - id- [Required] Gets the id of this Key. - is_auto_rotation_enabled- Gets the is_auto_rotation_enabled of this Key. - is_primary- Gets the is_primary of this Key. - key_shape- [Required] Gets the key_shape of this Key. - lifecycle_state- [Required] Gets the lifecycle_state of this Key. - protection_mode- Gets the protection_mode of this Key. - replica_details- Gets the replica_details of this Key. - restored_from_key_id- Gets the restored_from_key_id of this Key. - time_created- [Required] Gets the time_created of this Key. - time_of_deletion- Gets the time_of_deletion of this Key. - vault_id- [Required] Gets the vault_id of this Key. - Methods - __init__(**kwargs)- Initializes a new Key object with values from keyword arguments. - 
LIFECYCLE_STATE_BACKUP_IN_PROGRESS= 'BACKUP_IN_PROGRESS'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “BACKUP_IN_PROGRESS” 
 - 
LIFECYCLE_STATE_CANCELLING_DELETION= 'CANCELLING_DELETION'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “CANCELLING_DELETION” 
 - 
LIFECYCLE_STATE_CREATING= 'CREATING'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “CREATING” 
 - 
LIFECYCLE_STATE_DELETED= 'DELETED'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “DELETED” 
 - 
LIFECYCLE_STATE_DELETING= 'DELETING'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “DELETING” 
 - 
LIFECYCLE_STATE_DISABLED= 'DISABLED'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “DISABLED” 
 - 
LIFECYCLE_STATE_DISABLING= 'DISABLING'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “DISABLING” 
 - 
LIFECYCLE_STATE_ENABLED= 'ENABLED'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “ENABLED” 
 - 
LIFECYCLE_STATE_ENABLING= 'ENABLING'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “ENABLING” 
 - 
LIFECYCLE_STATE_PENDING_DELETION= 'PENDING_DELETION'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “PENDING_DELETION” 
 - 
LIFECYCLE_STATE_RESTORING= 'RESTORING'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “RESTORING” 
 - 
LIFECYCLE_STATE_SCHEDULING_DELETION= 'SCHEDULING_DELETION'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “SCHEDULING_DELETION” 
 - 
LIFECYCLE_STATE_UPDATING= 'UPDATING'¶
- A constant which can be used with the lifecycle_state property of a Key. This constant has a value of “UPDATING” 
 - 
PROTECTION_MODE_EXTERNAL= 'EXTERNAL'¶
- A constant which can be used with the protection_mode property of a Key. This constant has a value of “EXTERNAL” 
 - 
PROTECTION_MODE_HSM= 'HSM'¶
- A constant which can be used with the protection_mode property of a Key. This constant has a value of “HSM” 
 - 
PROTECTION_MODE_SOFTWARE= 'SOFTWARE'¶
- A constant which can be used with the protection_mode property of a Key. This constant has a value of “SOFTWARE” 
 - 
__init__(**kwargs)¶
- Initializes a new Key object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): - Parameters: - compartment_id (str) – The value to assign to the compartment_id property of this Key.
- current_key_version (str) – The value to assign to the current_key_version property of this Key.
- defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Key.
- display_name (str) – The value to assign to the display_name property of this Key.
- freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Key.
- id (str) – The value to assign to the id property of this Key.
- key_shape (oci.key_management.models.KeyShape) – The value to assign to the key_shape property of this Key.
- protection_mode (str) – The value to assign to the protection_mode property of this Key. Allowed values for this property are: “HSM”, “SOFTWARE”, “EXTERNAL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- lifecycle_state (str) – The value to assign to the lifecycle_state property of this Key. Allowed values for this property are: “CREATING”, “ENABLING”, “ENABLED”, “DISABLING”, “DISABLED”, “DELETING”, “DELETED”, “PENDING_DELETION”, “SCHEDULING_DELETION”, “CANCELLING_DELETION”, “UPDATING”, “BACKUP_IN_PROGRESS”, “RESTORING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- time_created (datetime) – The value to assign to the time_created property of this Key.
- time_of_deletion (datetime) – The value to assign to the time_of_deletion property of this Key.
- vault_id (str) – The value to assign to the vault_id property of this Key.
- restored_from_key_id (str) – The value to assign to the restored_from_key_id property of this Key.
- replica_details (oci.key_management.models.KeyReplicaDetails) – The value to assign to the replica_details property of this Key.
- is_primary (bool) – The value to assign to the is_primary property of this Key.
- is_auto_rotation_enabled (bool) – The value to assign to the is_auto_rotation_enabled property of this Key.
- auto_key_rotation_details (oci.key_management.models.AutoKeyRotationDetails) – The value to assign to the auto_key_rotation_details property of this Key.
- external_key_reference_details (oci.key_management.models.ExternalKeyReferenceDetails) – The value to assign to the external_key_reference_details property of this Key.
 
 - 
auto_key_rotation_details¶
- Gets the auto_key_rotation_details of this Key. - Returns: - The auto_key_rotation_details of this Key. - Return type: - oci.key_management.models.AutoKeyRotationDetails 
 - 
compartment_id¶
- [Required] Gets the compartment_id of this Key. The OCID of the compartment that contains this master encryption key. - Returns: - The compartment_id of this Key. - Return type: - str 
 - 
current_key_version¶
- [Required] Gets the current_key_version of this Key. 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. - Returns: - The current_key_version of this Key. - Return type: - str 
 - Gets the defined_tags of this Key. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {“Operations”: {“CostCenter”: “42”}} - Returns: - The defined_tags of this Key. - Return type: - dict(str, dict(str, object)) 
 - 
display_name¶
- [Required] Gets the display_name of this Key. A user-friendly name for the key. It does not have to be unique, and it is changeable. Avoid entering confidential information. - Returns: - The display_name of this Key. - Return type: - str 
 - 
external_key_reference_details¶
- Gets the external_key_reference_details of this Key. - Returns: - The external_key_reference_details of this Key. - Return type: - oci.key_management.models.ExternalKeyReferenceDetails 
 - Gets the freeform_tags of this Key. 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”} - Returns: - The freeform_tags of this Key. - Return type: - dict(str, str) 
 - 
id¶
- [Required] Gets the id of this Key. The OCID of the key. - Returns: - The id of this Key. - Return type: - str 
 - 
is_auto_rotation_enabled¶
- Gets the is_auto_rotation_enabled of this Key. A parameter specifying whether the auto key rotation is enabled or not. - Returns: - The is_auto_rotation_enabled of this Key. - Return type: - bool 
 - 
is_primary¶
- Gets the is_primary of this Key. A Boolean value that indicates whether the Key belongs to primary Vault or replica vault. - Returns: - The is_primary of this Key. - Return type: - bool 
 - 
key_shape¶
- [Required] Gets the key_shape of this Key. - Returns: - The key_shape of this Key. - Return type: - oci.key_management.models.KeyShape 
 - 
lifecycle_state¶
- [Required] Gets the lifecycle_state of this Key. The key’s current lifecycle state. - Example: ENABLED - Allowed values for this property are: “CREATING”, “ENABLING”, “ENABLED”, “DISABLING”, “DISABLED”, “DELETING”, “DELETED”, “PENDING_DELETION”, “SCHEDULING_DELETION”, “CANCELLING_DELETION”, “UPDATING”, “BACKUP_IN_PROGRESS”, “RESTORING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’. - Returns: - The lifecycle_state of this Key. - Return type: - str 
 - 
protection_mode¶
- Gets the protection_mode of this Key. 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. - Allowed values for this property are: “HSM”, “SOFTWARE”, “EXTERNAL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’. - Returns: - The protection_mode of this Key. - Return type: - str 
 - 
replica_details¶
- Gets the replica_details of this Key. - Returns: - The replica_details of this Key. - Return type: - oci.key_management.models.KeyReplicaDetails 
 - 
restored_from_key_id¶
- Gets the restored_from_key_id of this Key. The OCID of the key from which this key was restored. - Returns: - The restored_from_key_id of this Key. - Return type: - str 
 - 
time_created¶
- [Required] Gets the time_created of this Key. The date and time the key was created, expressed in RFC 3339 timestamp format. - Example: 2018-04-03T21:10:29.600Z - Returns: - The time_created of this Key. - Return type: - datetime 
 - 
time_of_deletion¶
- Gets the time_of_deletion of this Key. An optional property indicating when to delete the key, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z - Returns: - The time_of_deletion of this Key. - Return type: - datetime 
 - 
vault_id¶
- [Required] Gets the vault_id of this Key. The OCID of the vault that contains this key. - Returns: - The vault_id of this Key. - Return type: - str 
 
-