SecretVersion

class oci.vault.models.SecretVersion(**kwargs)

Bases: object

The details of the secret version, excluding the contents of the secret.

Attributes

CONTENT_TYPE_BASE64 A constant which can be used with the content_type property of a SecretVersion.
STAGES_CURRENT A constant which can be used with the stages property of a SecretVersion.
STAGES_DEPRECATED A constant which can be used with the stages property of a SecretVersion.
STAGES_LATEST A constant which can be used with the stages property of a SecretVersion.
STAGES_PENDING A constant which can be used with the stages property of a SecretVersion.
STAGES_PREVIOUS A constant which can be used with the stages property of a SecretVersion.
content_type Gets the content_type of this SecretVersion.
is_content_auto_generated Gets the is_content_auto_generated of this SecretVersion.
name Gets the name of this SecretVersion.
secret_id Gets the secret_id of this SecretVersion.
stages Gets the stages of this SecretVersion.
time_created Gets the time_created of this SecretVersion.
time_of_current_version_expiry Gets the time_of_current_version_expiry of this SecretVersion.
time_of_deletion Gets the time_of_deletion of this SecretVersion.
version_number Gets the version_number of this SecretVersion.

Methods

__init__(**kwargs) Initializes a new SecretVersion object with values from keyword arguments.
CONTENT_TYPE_BASE64 = 'BASE64'

A constant which can be used with the content_type property of a SecretVersion. This constant has a value of “BASE64”

STAGES_CURRENT = 'CURRENT'

A constant which can be used with the stages property of a SecretVersion. This constant has a value of “CURRENT”

STAGES_DEPRECATED = 'DEPRECATED'

A constant which can be used with the stages property of a SecretVersion. This constant has a value of “DEPRECATED”

STAGES_LATEST = 'LATEST'

A constant which can be used with the stages property of a SecretVersion. This constant has a value of “LATEST”

STAGES_PENDING = 'PENDING'

A constant which can be used with the stages property of a SecretVersion. This constant has a value of “PENDING”

STAGES_PREVIOUS = 'PREVIOUS'

A constant which can be used with the stages property of a SecretVersion. This constant has a value of “PREVIOUS”

__init__(**kwargs)

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

Parameters:
  • content_type (str) – The value to assign to the content_type property of this SecretVersion. Allowed values for this property are: “BASE64”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • name (str) – The value to assign to the name property of this SecretVersion.
  • secret_id (str) – The value to assign to the secret_id property of this SecretVersion.
  • stages (list[str]) – The value to assign to the stages property of this SecretVersion. Allowed values for items in this list are: “CURRENT”, “PENDING”, “LATEST”, “PREVIOUS”, “DEPRECATED”, ‘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 SecretVersion.
  • time_of_deletion (datetime) – The value to assign to the time_of_deletion property of this SecretVersion.
  • time_of_current_version_expiry (datetime) – The value to assign to the time_of_current_version_expiry property of this SecretVersion.
  • version_number (int) – The value to assign to the version_number property of this SecretVersion.
  • is_content_auto_generated (bool) – The value to assign to the is_content_auto_generated property of this SecretVersion.
content_type

Gets the content_type of this SecretVersion. The content type of the secret version’s secret contents.

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

Returns:The content_type of this SecretVersion.
Return type:str
is_content_auto_generated

Gets the is_content_auto_generated of this SecretVersion. Boolean flag indicating whether secret content for this secret version was auto-generated or not.

Returns:The is_content_auto_generated of this SecretVersion.
Return type:bool
name

Gets the name of this SecretVersion. The name of the secret version. A name is unique across versions of a secret.

Returns:The name of this SecretVersion.
Return type:str
secret_id

Gets the secret_id of this SecretVersion. The OCID of the secret.

Returns:The secret_id of this SecretVersion.
Return type:str
stages

Gets the stages of this SecretVersion. A list of possible rotation states for the secret version. A secret version marked CURRENT is currently in use. A secret version marked PENDING is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated into current, active use. The secret most recently uploaded to a vault is always marked LATEST. (The first version of a secret is always marked as both CURRENT and LATEST.) A secret version marked PREVIOUS is the secret version that was most recently marked CURRENT, before the last secret version rotation. A secret version marked DEPRECATED is neither current, pending, nor the previous one in use. Only secret versions marked DEPRECATED can be scheduled for deletion.

Allowed values for items in this list are: “CURRENT”, “PENDING”, “LATEST”, “PREVIOUS”, “DEPRECATED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The stages of this SecretVersion.
Return type:list[str]
time_created

Gets the time_created of this SecretVersion. A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

Returns:The time_created of this SecretVersion.
Return type:datetime
time_of_current_version_expiry

Gets the time_of_current_version_expiry of this SecretVersion. An optional property indicating when the current secret version will expire, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

Returns:The time_of_current_version_expiry of this SecretVersion.
Return type:datetime
time_of_deletion

Gets the time_of_deletion of this SecretVersion. An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

Returns:The time_of_deletion of this SecretVersion.
Return type:datetime
version_number

Gets the version_number of this SecretVersion. The version number of the secret.

Returns:The version_number of this SecretVersion.
Return type:int