Secret

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

Bases: object

The details of the secret. Secret details do not contain the contents of the secret itself.

Attributes:

LIFECYCLE_STATE_ACTIVE

A constant which can be used with the lifecycle_state property of a Secret.

LIFECYCLE_STATE_CANCELLING_DELETION

A constant which can be used with the lifecycle_state property of a Secret.

LIFECYCLE_STATE_CREATING

A constant which can be used with the lifecycle_state property of a Secret.

LIFECYCLE_STATE_DELETED

A constant which can be used with the lifecycle_state property of a Secret.

LIFECYCLE_STATE_DELETING

A constant which can be used with the lifecycle_state property of a Secret.

LIFECYCLE_STATE_FAILED

A constant which can be used with the lifecycle_state property of a Secret.

LIFECYCLE_STATE_PENDING_DELETION

A constant which can be used with the lifecycle_state property of a Secret.

LIFECYCLE_STATE_SCHEDULING_DELETION

A constant which can be used with the lifecycle_state property of a Secret.

LIFECYCLE_STATE_UPDATING

A constant which can be used with the lifecycle_state property of a Secret.

ROTATION_STATUS_CANCELLING

A constant which can be used with the rotation_status property of a Secret.

ROTATION_STATUS_IN_PROGRESS

A constant which can be used with the rotation_status property of a Secret.

ROTATION_STATUS_NOT_ENABLED

A constant which can be used with the rotation_status property of a Secret.

ROTATION_STATUS_SCHEDULED

A constant which can be used with the rotation_status property of a Secret.

compartment_id

[Required] Gets the compartment_id of this Secret.

current_version_number

Gets the current_version_number of this Secret.

defined_tags

Gets the defined_tags of this Secret.

description

Gets the description of this Secret.

freeform_tags

Gets the freeform_tags of this Secret.

id

[Required] Gets the id of this Secret.

is_auto_generation_enabled

Gets the is_auto_generation_enabled of this Secret.

is_replica

Gets the is_replica of this Secret.

key_id

Gets the key_id of this Secret.

last_rotation_time

Gets the last_rotation_time of this Secret.

lifecycle_details

Gets the lifecycle_details of this Secret.

lifecycle_state

[Required] Gets the lifecycle_state of this Secret.

metadata

Gets the metadata of this Secret.

next_rotation_time

Gets the next_rotation_time of this Secret.

replication_config

Gets the replication_config of this Secret.

rotation_config

Gets the rotation_config of this Secret.

rotation_status

Gets the rotation_status of this Secret.

secret_generation_context

Gets the secret_generation_context of this Secret.

secret_name

[Required] Gets the secret_name of this Secret.

secret_rules

Gets the secret_rules of this Secret.

source_region_information

Gets the source_region_information of this Secret.

time_created

[Required] Gets the time_created of this Secret.

time_of_current_version_expiry

Gets the time_of_current_version_expiry of this Secret.

time_of_deletion

Gets the time_of_deletion of this Secret.

vault_id

[Required] Gets the vault_id of this Secret.

Methods:

__init__(**kwargs)

Initializes a new Secret object with values from keyword arguments.

LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

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

LIFECYCLE_STATE_CANCELLING_DELETION = 'CANCELLING_DELETION'

A constant which can be used with the lifecycle_state property of a Secret. 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 Secret. This constant has a value of “CREATING”

LIFECYCLE_STATE_DELETED = 'DELETED'

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

LIFECYCLE_STATE_DELETING = 'DELETING'

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

LIFECYCLE_STATE_FAILED = 'FAILED'

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

LIFECYCLE_STATE_PENDING_DELETION = 'PENDING_DELETION'

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

LIFECYCLE_STATE_SCHEDULING_DELETION = 'SCHEDULING_DELETION'

A constant which can be used with the lifecycle_state property of a Secret. 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 Secret. This constant has a value of “UPDATING”

ROTATION_STATUS_CANCELLING = 'CANCELLING'

A constant which can be used with the rotation_status property of a Secret. This constant has a value of “CANCELLING”

ROTATION_STATUS_IN_PROGRESS = 'IN_PROGRESS'

A constant which can be used with the rotation_status property of a Secret. This constant has a value of “IN_PROGRESS”

ROTATION_STATUS_NOT_ENABLED = 'NOT_ENABLED'

A constant which can be used with the rotation_status property of a Secret. This constant has a value of “NOT_ENABLED”

ROTATION_STATUS_SCHEDULED = 'SCHEDULED'

A constant which can be used with the rotation_status property of a Secret. This constant has a value of “SCHEDULED”

__init__(**kwargs)

Initializes a new Secret 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 Secret.

  • current_version_number (int) – The value to assign to the current_version_number property of this Secret.

  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Secret.

  • description (str) – The value to assign to the description property of this Secret.

  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Secret.

  • id (str) – The value to assign to the id property of this Secret.

  • key_id (str) – The value to assign to the key_id property of this Secret.

  • lifecycle_details (str) – The value to assign to the lifecycle_details property of this Secret.

  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this Secret. Allowed values for this property are: “CREATING”, “ACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “SCHEDULING_DELETION”, “PENDING_DELETION”, “CANCELLING_DELETION”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • metadata (dict(str, object)) – The value to assign to the metadata property of this Secret.

  • replication_config (oci.vault.models.ReplicationConfig) – The value to assign to the replication_config property of this Secret.

  • is_replica (bool) – The value to assign to the is_replica property of this Secret.

  • source_region_information (oci.vault.models.SourceRegionInformation) – The value to assign to the source_region_information property of this Secret.

  • rotation_config (oci.vault.models.RotationConfig) – The value to assign to the rotation_config property of this Secret.

  • rotation_status (str) – The value to assign to the rotation_status property of this Secret. Allowed values for this property are: “IN_PROGRESS”, “SCHEDULED”, “NOT_ENABLED”, “CANCELLING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • last_rotation_time (datetime) – The value to assign to the last_rotation_time property of this Secret.

  • next_rotation_time (datetime) – The value to assign to the next_rotation_time property of this Secret.

  • secret_name (str) – The value to assign to the secret_name property of this Secret.

  • secret_rules (list[oci.vault.models.SecretRule]) – The value to assign to the secret_rules property of this Secret.

  • time_created (datetime) – The value to assign to the time_created property of this Secret.

  • time_of_current_version_expiry (datetime) – The value to assign to the time_of_current_version_expiry property of this Secret.

  • time_of_deletion (datetime) – The value to assign to the time_of_deletion property of this Secret.

  • vault_id (str) – The value to assign to the vault_id property of this Secret.

  • secret_generation_context (oci.vault.models.SecretGenerationContext) – The value to assign to the secret_generation_context property of this Secret.

  • is_auto_generation_enabled (bool) – The value to assign to the is_auto_generation_enabled property of this Secret.

property compartment_id

[Required] Gets the compartment_id of this Secret. The OCID of the compartment where you want to create the secret.

Returns

The compartment_id of this Secret.

Return type

str

property current_version_number

Gets the current_version_number of this Secret. The version number of the secret version that’s currently in use.

Returns

The current_version_number of this Secret.

Return type

int

property defined_tags

Gets the defined_tags of this Secret. 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 Secret.

Return type

dict(str, dict(str, object))

property description

Gets the description of this Secret. A brief description of the secret. Avoid entering confidential information.

Returns

The description of this Secret.

Return type

str

property freeform_tags

Gets the freeform_tags of this Secret. 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 Secret.

Return type

dict(str, str)

property id

[Required] Gets the id of this Secret. The OCID of the secret.

Returns

The id of this Secret.

Return type

str

property is_auto_generation_enabled

Gets the is_auto_generation_enabled of this Secret. The value of this flag determines whether or not secret content will be generated automatically.

Returns

The is_auto_generation_enabled of this Secret.

Return type

bool

property is_replica

Gets the is_replica of this Secret. A Boolean value that indicates whether the secret is a source or replica secret.

Returns

The is_replica of this Secret.

Return type

bool

property key_id

Gets the key_id of this Secret. The OCID of the master encryption key that is used to encrypt the secret. You must specify a symmetric key to encrypt the secret during import to the vault. You cannot encrypt secrets with asymmetric keys. Furthermore, the key must exist in the vault that you specify.

Returns

The key_id of this Secret.

Return type

str

property last_rotation_time

Gets the last_rotation_time of this Secret. A property indicating when the secret was last rotated successfully, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

Returns

The last_rotation_time of this Secret.

Return type

datetime

property lifecycle_details

Gets the lifecycle_details of this Secret. Additional information about the current lifecycle state of the secret.

Returns

The lifecycle_details of this Secret.

Return type

str

property lifecycle_state

[Required] Gets the lifecycle_state of this Secret. The current lifecycle state of the secret.

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

Returns

The lifecycle_state of this Secret.

Return type

str

property metadata

Gets the metadata of this Secret. Additional metadata that you can use to provide context about how to use the secret or during rotation or other administrative tasks. For example, for a secret that you use to connect to a database, the additional metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs.

Returns

The metadata of this Secret.

Return type

dict(str, object)

property next_rotation_time

Gets the next_rotation_time of this Secret. A property indicating when the secret is scheduled to be rotated, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

Returns

The next_rotation_time of this Secret.

Return type

datetime

property replication_config

Gets the replication_config of this Secret.

Returns

The replication_config of this Secret.

Return type

oci.vault.models.ReplicationConfig

property rotation_config

Gets the rotation_config of this Secret.

Returns

The rotation_config of this Secret.

Return type

oci.vault.models.RotationConfig

property rotation_status

Gets the rotation_status of this Secret. Additional information about the status of the secret rotation

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

Returns

The rotation_status of this Secret.

Return type

str

property secret_generation_context

Gets the secret_generation_context of this Secret.

Returns

The secret_generation_context of this Secret.

Return type

oci.vault.models.SecretGenerationContext

property secret_name

[Required] Gets the secret_name of this Secret. The user-friendly name of the secret. Avoid entering confidential information.

Returns

The secret_name of this Secret.

Return type

str

property secret_rules

Gets the secret_rules of this Secret. A list of rules that control how the secret is used and managed.

Returns

The secret_rules of this Secret.

Return type

list[oci.vault.models.SecretRule]

property source_region_information

Gets the source_region_information of this Secret.

Returns

The source_region_information of this Secret.

Return type

oci.vault.models.SourceRegionInformation

property time_created

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

Returns

The time_created of this Secret.

Return type

datetime

property time_of_current_version_expiry

Gets the time_of_current_version_expiry of this Secret. 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 Secret.

Return type

datetime

property time_of_deletion

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

Returns

The time_of_deletion of this Secret.

Return type

datetime

property vault_id

[Required] Gets the vault_id of this Secret. The OCID of the vault where the secret exists.

Returns

The vault_id of this Secret.

Return type

str