ResourceLock

class oci.ai_document.models.ResourceLock(**kwargs)

Bases: object

Resource locks prevent certain APIs from being called for the resource. A full lock prevents both updating and deleting the resource. A lock delete prevents deleting the resource.

Attributes

TYPE_DELETE A constant which can be used with the type property of a ResourceLock.
TYPE_FULL A constant which can be used with the type property of a ResourceLock.
compartment_id [Required] Gets the compartment_id of this ResourceLock.
message Gets the message of this ResourceLock.
related_resource_id Gets the related_resource_id of this ResourceLock.
time_created Gets the time_created of this ResourceLock.
type [Required] Gets the type of this ResourceLock.

Methods

__init__(**kwargs) Initializes a new ResourceLock object with values from keyword arguments.
TYPE_DELETE = 'DELETE'

A constant which can be used with the type property of a ResourceLock. This constant has a value of “DELETE”

TYPE_FULL = 'FULL'

A constant which can be used with the type property of a ResourceLock. This constant has a value of “FULL”

__init__(**kwargs)

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

Parameters:
  • type (str) – The value to assign to the type property of this ResourceLock. Allowed values for this property are: “FULL”, “DELETE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • compartment_id (str) – The value to assign to the compartment_id property of this ResourceLock.
  • related_resource_id (str) – The value to assign to the related_resource_id property of this ResourceLock.
  • message (str) – The value to assign to the message property of this ResourceLock.
  • time_created (datetime) – The value to assign to the time_created property of this ResourceLock.
compartment_id

[Required] Gets the compartment_id of this ResourceLock. The lock compartment ID.

Returns:The compartment_id of this ResourceLock.
Return type:str
message

Gets the message of this ResourceLock. A message added by the lock creator. The message typically gives an indication of why the resource is locked.

Returns:The message of this ResourceLock.
Return type:str
related_resource_id

Gets the related_resource_id of this ResourceLock. The resource ID that is locking this resource. Indicates that deleting this resource removes the lock.

Returns:The related_resource_id of this ResourceLock.
Return type:str
time_created

Gets the time_created of this ResourceLock. Indicates when the lock was created, in the format defined by RFC 3339.

Returns:The time_created of this ResourceLock.
Return type:datetime
type

[Required] Gets the type of this ResourceLock. Lock type.

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

Returns:The type of this ResourceLock.
Return type:str