Table of Contents

Class CreateAccessRuleRequest

Namespace
Cloudflare.NET.Security.Firewall.Models
Assembly
Cloudflare.NET.dll

Defines the request payload for creating a new IP Access Rule.

public record CreateAccessRuleRequest : IEquatable<CreateAccessRuleRequest>
Inheritance
CreateAccessRuleRequest
Implements
Inherited Members

Constructors

CreateAccessRuleRequest(AccessRuleMode, AccessRuleConfiguration, string?)

Defines the request payload for creating a new IP Access Rule.

public CreateAccessRuleRequest(AccessRuleMode Mode, AccessRuleConfiguration Configuration, string? Notes = null)

Parameters

Mode AccessRuleMode

The action to take (e.g., block, challenge).

Configuration AccessRuleConfiguration

The rule configuration, specifying the target and value.

Notes string

An optional note for the rule.

Properties

Configuration

The rule configuration, specifying the target and value.

[JsonPropertyName("configuration")]
public AccessRuleConfiguration Configuration { get; init; }

Property Value

AccessRuleConfiguration

Mode

The action to take (e.g., block, challenge).

[JsonPropertyName("mode")]
public AccessRuleMode Mode { get; init; }

Property Value

AccessRuleMode

Notes

An optional note for the rule.

[JsonPropertyName("notes")]
public string? Notes { get; init; }

Property Value

string