ApiKey

class oci.identity.models.ApiKey(**kwargs)

Bases: object

A PEM-format RSA credential for securing requests to the Oracle Cloud Infrastructure REST API. Also known as an API signing key. Specifically, this is the public key from the key pair. The private key remains with the user calling the API. For information about generating a key pair in the required PEM format, see Required Keys and OCIDs.

Important: This is not the SSH key for accessing compute instances.

Each user can have a maximum of three API signing keys.

For more information about user credentials, see User Credentials.

Attributes

LIFECYCLE_STATE_ACTIVE A constant which can be used with the lifecycle_state property of a ApiKey.
LIFECYCLE_STATE_CREATING A constant which can be used with the lifecycle_state property of a ApiKey.
LIFECYCLE_STATE_DELETED A constant which can be used with the lifecycle_state property of a ApiKey.
LIFECYCLE_STATE_DELETING A constant which can be used with the lifecycle_state property of a ApiKey.
LIFECYCLE_STATE_INACTIVE A constant which can be used with the lifecycle_state property of a ApiKey.
fingerprint Gets the fingerprint of this ApiKey.
inactive_status Gets the inactive_status of this ApiKey.
key_id Gets the key_id of this ApiKey.
key_value Gets the key_value of this ApiKey.
lifecycle_state Gets the lifecycle_state of this ApiKey.
time_created Gets the time_created of this ApiKey.
user_id Gets the user_id of this ApiKey.

Methods

__init__(**kwargs) Initializes a new ApiKey object with values from keyword arguments.
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “ACTIVE”

LIFECYCLE_STATE_CREATING = 'CREATING'

A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “CREATING”

LIFECYCLE_STATE_DELETED = 'DELETED'

A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “DELETED”

LIFECYCLE_STATE_DELETING = 'DELETING'

A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “DELETING”

LIFECYCLE_STATE_INACTIVE = 'INACTIVE'

A constant which can be used with the lifecycle_state property of a ApiKey. This constant has a value of “INACTIVE”

__init__(**kwargs)

Initializes a new ApiKey object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • key_id (str) – The value to assign to the key_id property of this ApiKey.
  • key_value (str) – The value to assign to the key_value property of this ApiKey.
  • fingerprint (str) – The value to assign to the fingerprint property of this ApiKey.
  • user_id (str) – The value to assign to the user_id property of this ApiKey.
  • time_created (datetime) – The value to assign to the time_created property of this ApiKey.
  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this ApiKey. Allowed values for this property are: “CREATING”, “ACTIVE”, “INACTIVE”, “DELETING”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • inactive_status (int) – The value to assign to the inactive_status property of this ApiKey.
fingerprint

Gets the fingerprint of this ApiKey. The key’s fingerprint (e.g., 12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef).

Returns:The fingerprint of this ApiKey.
Return type:str
inactive_status

Gets the inactive_status of this ApiKey. The detailed status of INACTIVE lifecycleState.

Returns:The inactive_status of this ApiKey.
Return type:int
key_id

Gets the key_id of this ApiKey. An Oracle-assigned identifier for the key, in this format: TENANCY_OCID/USER_OCID/KEY_FINGERPRINT.

Returns:The key_id of this ApiKey.
Return type:str
key_value

Gets the key_value of this ApiKey. The key’s value.

Returns:The key_value of this ApiKey.
Return type:str
lifecycle_state

Gets the lifecycle_state of this ApiKey. The API key’s current state. After creating an ApiKey object, make sure its lifecycleState changes from CREATING to ACTIVE before using it.

Allowed values for this property are: “CREATING”, “ACTIVE”, “INACTIVE”, “DELETING”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The lifecycle_state of this ApiKey.
Return type:str
time_created

Gets the time_created of this ApiKey. Date and time the ApiKey object was created, in the format defined by RFC3339.

Example: 2016-08-25T21:10:29.600Z

Returns:The time_created of this ApiKey.
Return type:datetime
user_id

Gets the user_id of this ApiKey. The OCID of the user the key belongs to.

Returns:The user_id of this ApiKey.
Return type:str