SecretExpiryRule¶
- class oci.vault.models.SecretExpiryRule(**kwargs)¶
Bases:
SecretRuleA rule that helps enforce the expiration of a secret’s contents.
Attributes:
A constant which can be used with the rule_type property of a SecretRule.
A constant which can be used with the rule_type property of a SecretRule.
Gets the is_secret_content_retrieval_blocked_on_expiry of this SecretExpiryRule.
[Required] Gets the rule_type of this SecretRule.
Gets the secret_version_expiry_interval of this SecretExpiryRule.
Gets the time_of_absolute_expiry of this SecretExpiryRule.
Methods:
__init__(**kwargs)Initializes a new SecretExpiryRule object with values from keyword arguments.
get_subtype(object_dictionary)Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- RULE_TYPE_SECRET_EXPIRY_RULE = 'SECRET_EXPIRY_RULE'¶
A constant which can be used with the rule_type property of a SecretRule. This constant has a value of “SECRET_EXPIRY_RULE”
- RULE_TYPE_SECRET_REUSE_RULE = 'SECRET_REUSE_RULE'¶
A constant which can be used with the rule_type property of a SecretRule. This constant has a value of “SECRET_REUSE_RULE”
- __init__(**kwargs)¶
Initializes a new SecretExpiryRule object with values from keyword arguments. The default value of the
rule_typeattribute of this class isSECRET_EXPIRY_RULEand it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):- Parameters
rule_type (str) – The value to assign to the rule_type property of this SecretExpiryRule. Allowed values for this property are: “SECRET_EXPIRY_RULE”, “SECRET_REUSE_RULE”
secret_version_expiry_interval (str) – The value to assign to the secret_version_expiry_interval property of this SecretExpiryRule.
time_of_absolute_expiry (datetime) – The value to assign to the time_of_absolute_expiry property of this SecretExpiryRule.
is_secret_content_retrieval_blocked_on_expiry (bool) – The value to assign to the is_secret_content_retrieval_blocked_on_expiry property of this SecretExpiryRule.
- static get_subtype(object_dictionary)¶
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- property is_secret_content_retrieval_blocked_on_expiry¶
Gets the is_secret_content_retrieval_blocked_on_expiry of this SecretExpiryRule. A property indicating whether to block retrieval of the secret content, on expiry. The default is false. If the secret has already expired and you would like to retrieve the secret contents, you need to edit the secret rule to disable this property, to allow reading the secret content.
- Returns
The is_secret_content_retrieval_blocked_on_expiry of this SecretExpiryRule.
- Return type
bool
- property rule_type¶
[Required] Gets the rule_type of this SecretRule. The type of rule, which either controls when the secret contents expire or whether they can be reused.
Allowed values for this property are: “SECRET_EXPIRY_RULE”, “SECRET_REUSE_RULE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The rule_type of this SecretRule.
- Return type
str
- property secret_version_expiry_interval¶
Gets the secret_version_expiry_interval of this SecretExpiryRule. A property indicating how long the secret contents will be considered valid, expressed in ISO 8601 format. The secret needs to be updated when the secret content expires. The timer resets after you update the secret contents. The minimum value is 1 day and the maximum value is 90 days for this property. Currently, only intervals expressed in days are supported. For example, pass P3D to have the secret version expire every 3 days.
- Returns
The secret_version_expiry_interval of this SecretExpiryRule.
- Return type
str
- property time_of_absolute_expiry¶
Gets the time_of_absolute_expiry of this SecretExpiryRule. An optional property indicating the absolute time when this secret will expire, expressed in RFC 3339 timestamp format. The minimum number of days from current time is 1 day and the maximum number of days from current time is 365 days. Example: 2019-04-03T21:10:29.600Z
- Returns
The time_of_absolute_expiry of this SecretExpiryRule.
- Return type
datetime