Class AccessRule
- Namespace
- Cloudflare.NET.Security.Firewall.Models
- Assembly
- Cloudflare.NET.dll
Represents a single IP Access Rule.
public record AccessRule : IEquatable<AccessRule>
- Inheritance
-
AccessRule
- Implements
- Inherited Members
Constructors
AccessRule(string, AccessRuleMode, AccessRuleConfiguration, string?, IReadOnlyList<AccessRuleMode>, Scope, DateTimeOffset?, DateTimeOffset?)
Represents a single IP Access Rule.
public AccessRule(string Id, AccessRuleMode Mode, AccessRuleConfiguration Configuration, string? Notes, IReadOnlyList<AccessRuleMode> AllowedModes, Scope Scope, DateTimeOffset? CreatedOn, DateTimeOffset? ModifiedOn)
Parameters
IdstringThe unique identifier of the rule.
ModeAccessRuleModeThe action to take when the rule matches.
ConfigurationAccessRuleConfigurationThe configuration that defines the rule's target.
NotesstringOptional notes about the rule.
AllowedModesIReadOnlyList<AccessRuleMode>The modes that are allowed for this rule.
ScopeScopeThe scope of the rule (e.g., account, zone).
CreatedOnDateTimeOffset?When the rule was created.
ModifiedOnDateTimeOffset?When the rule was last modified.
Properties
AllowedModes
The modes that are allowed for this rule.
[JsonPropertyName("allowed_modes")]
public IReadOnlyList<AccessRuleMode> AllowedModes { get; init; }
Property Value
Configuration
The configuration that defines the rule's target.
[JsonPropertyName("configuration")]
public AccessRuleConfiguration Configuration { get; init; }
Property Value
CreatedOn
When the rule was created.
[JsonPropertyName("created_on")]
public DateTimeOffset? CreatedOn { get; init; }
Property Value
Id
The unique identifier of the rule.
[JsonPropertyName("id")]
public string Id { get; init; }
Property Value
Mode
The action to take when the rule matches.
[JsonPropertyName("mode")]
public AccessRuleMode Mode { get; init; }
Property Value
ModifiedOn
When the rule was last modified.
[JsonPropertyName("modified_on")]
public DateTimeOffset? ModifiedOn { get; init; }
Property Value
Notes
Optional notes about the rule.
[JsonPropertyName("notes")]
public string? Notes { get; init; }
Property Value
Scope
The scope of the rule (e.g., account, zone).
[JsonPropertyName("scope")]
public Scope Scope { get; init; }