RetentionDuration

class oci.core.models.RetentionDuration(**kwargs)

Bases: object

This field is used to define the retention period for backups. This is an optional field. If it is not specified, it is set to null, no retention period will be applied to the backups.

Attributes

RETENTION_TIME_UNIT_DAYS A constant which can be used with the retention_time_unit property of a RetentionDuration.
RETENTION_TIME_UNIT_YEARS A constant which can be used with the retention_time_unit property of a RetentionDuration.
retention_time_amount [Required] Gets the retention_time_amount of this RetentionDuration.
retention_time_unit [Required] Gets the retention_time_unit of this RetentionDuration.

Methods

__init__(**kwargs) Initializes a new RetentionDuration object with values from keyword arguments.
RETENTION_TIME_UNIT_DAYS = 'DAYS'

A constant which can be used with the retention_time_unit property of a RetentionDuration. This constant has a value of “DAYS”

RETENTION_TIME_UNIT_YEARS = 'YEARS'

A constant which can be used with the retention_time_unit property of a RetentionDuration. This constant has a value of “YEARS”

__init__(**kwargs)

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

Parameters:
  • retention_time_unit (str) – The value to assign to the retention_time_unit property of this RetentionDuration. Allowed values for this property are: “YEARS”, “DAYS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • retention_time_amount (int) – The value to assign to the retention_time_amount property of this RetentionDuration.
retention_time_amount

[Required] Gets the retention_time_amount of this RetentionDuration. The value to enter for the amount of retention time should be a numerical figure (such as 1, 7, 30, etc.) that corresponds to the period specified in the retention time unit property (such as YEARS, DAYS). The combination of these two properties determines the total length of the retention period.

Returns:The retention_time_amount of this RetentionDuration.
Return type:int
retention_time_unit

[Required] Gets the retention_time_unit of this RetentionDuration. The value you can assign to the Time Unit property for this Duration may be either “YEARS” or “DAYS”.

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

Returns:The retention_time_unit of this RetentionDuration.
Return type:str