Table of Contents

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

Id string

A unique identifier for this lock rule.

Enabled bool

Whether this rule is currently active.

Prefix string

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.

Condition BucketLockCondition

The condition that determines the retention period.

Properties

Condition

The condition that determines the retention period.

[JsonPropertyName("condition")]
public BucketLockCondition? Condition { get; init; }

Property Value

BucketLockCondition

Enabled

Whether this rule is currently active.

[JsonPropertyName("enabled")]
public bool Enabled { get; init; }

Property Value

bool

Id

A unique identifier for this lock rule.

[JsonPropertyName("id")]
public string? Id { get; init; }

Property Value

string

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; }

Property Value

string