Class ObjectLifecycleRule
To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see Getting Started with Policies.
Inherited Members
Namespace: Oci.ObjectstorageService.Models
Assembly: OCI.DotNetSDK.Objectstorage.dll
Syntax
public class ObjectLifecycleRule
Properties
Action
Declaration
[Required(ErrorMessage = "Action is required.")]
[JsonProperty(PropertyName = "action")]
public string Action { get; set; }
Property Value
Type | Description |
---|---|
string | The action of the object lifecycle policy rule. Rules using the action 'ARCHIVE' move objects from Standard and InfrequentAccess storage tiers into the Archive storage tier. Rules using the action 'INFREQUENT_ACCESS' move objects from Standard storage tier into the Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive tier are left untouched. Rules using the action 'DELETE' permanently delete objects from buckets. Rules using 'ABORT' abort the uncommitted multipart-uploads and permanently delete their parts from buckets. |
Remarks
Required
IsEnabled
Declaration
[Required(ErrorMessage = "IsEnabled is required.")]
[JsonProperty(PropertyName = "isEnabled")]
public bool? IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool? | A Boolean that determines whether this rule is currently enabled. |
Remarks
Required
Name
Declaration
[Required(ErrorMessage = "Name is required.")]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the lifecycle rule to be applied. |
Remarks
Required
ObjectNameFilter
Declaration
[JsonProperty(PropertyName = "objectNameFilter")]
public ObjectNameFilter ObjectNameFilter { get; set; }
Property Value
Type | Description |
---|---|
ObjectNameFilter |
Target
Declaration
[JsonProperty(PropertyName = "target")]
public string Target { get; set; }
Property Value
Type | Description |
---|---|
string | The target of the object lifecycle policy rule. The values of target can be either "objects", "multipart-uploads" or "previous-object-versions". This field when declared as "objects" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for objects. This field when declared as "previous-object-versions" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. This field when declared as "multipart-uploads" is used to specify the ABORT (only) rule for uncommitted multipart-uploads. |
TimeAmount
Declaration
[Required(ErrorMessage = "TimeAmount is required.")]
[JsonProperty(PropertyName = "timeAmount")]
public long? TimeAmount { get; set; }
Property Value
Type | Description |
---|---|
long? | Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified time. |
Remarks
Required
TimeUnit
Declaration
[Required(ErrorMessage = "TimeUnit is required.")]
[JsonProperty(PropertyName = "timeUnit")]
[JsonConverter(typeof(ResponseEnumConverter))]
public ObjectLifecycleRule.TimeUnitEnum? TimeUnit { get; set; }
Property Value
Type | Description |
---|---|
ObjectLifecycleRule.TimeUnitEnum? | The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. Years are defined as 365.2425 days long and likewise round up to the next midnight UTC. |
Remarks
Required