Class BucketLockRule
- Namespace
- Cloudflare.NET.Accounts.Models
- Assembly
- Cloudflare.NET.dll
Represents a single bucket lock rule.
public record BucketLockRule : IEquatable<BucketLockRule>
- Inheritance
-
BucketLockRule
- Implements
- Inherited Members
Constructors
BucketLockRule(string?, bool, string?, BucketLockCondition?)
Represents a single bucket lock rule.
public BucketLockRule(string? Id = null, bool Enabled = true, string? Prefix = null, BucketLockCondition? Condition = null)
Parameters
IdstringA unique identifier for this lock rule.
EnabledboolWhether this rule is currently active.
PrefixstringOptional object key prefix. If specified, only objects with keys starting with this prefix are affected. If not specified (null or empty), the rule applies to all objects in the bucket.
ConditionBucketLockConditionThe condition that determines the retention period.
Properties
Condition
The condition that determines the retention period.
[JsonPropertyName("condition")]
public BucketLockCondition? Condition { get; init; }
Property Value
Enabled
Whether this rule is currently active.
[JsonPropertyName("enabled")]
public bool Enabled { get; init; }
Property Value
Id
A unique identifier for this lock rule.
[JsonPropertyName("id")]
public string? Id { get; init; }
Property Value
Prefix
Optional object key prefix. If specified, only objects with keys starting with this prefix are affected. If not specified (null or empty), the rule applies to all objects in the bucket.
[JsonPropertyName("prefix")]
public string? Prefix { get; init; }