Table of Contents

Class CloudflareValidationRequirements

Namespace
Cloudflare.NET.Core.Validation
Assembly
Cloudflare.NET.dll

Specifies which properties of CloudflareApiOptions are required for validation. This allows different packages (Core, R2, Analytics) to have different validation requirements.

public sealed class CloudflareValidationRequirements
Inheritance
CloudflareValidationRequirements
Inherited Members

Properties

Default

Default validation requirements: only ApiToken is required. Suitable for the Core API client.

public static CloudflareValidationRequirements Default { get; }

Property Value

CloudflareValidationRequirements

ForAnalytics

Validation requirements for the Analytics client: ApiToken and GraphQlApiUrl are required.

public static CloudflareValidationRequirements ForAnalytics { get; }

Property Value

CloudflareValidationRequirements

ForR2

Validation requirements for the R2 client: AccountId is required. The API token is not required for R2 data plane operations (uses S3 credentials instead).

public static CloudflareValidationRequirements ForR2 { get; }

Property Value

CloudflareValidationRequirements

RequireAccountId

Gets a value indicating whether the AccountId is required. Defaults to false.

public bool RequireAccountId { get; init; }

Property Value

bool

RequireApiBaseUrl

Gets a value indicating whether the ApiBaseUrl is required. Defaults to false.

public bool RequireApiBaseUrl { get; init; }

Property Value

bool

RequireApiToken

Gets a value indicating whether the ApiToken is required. Defaults to true.

public bool RequireApiToken { get; init; }

Property Value

bool

RequireGraphQlApiUrl

Gets a value indicating whether the GraphQlApiUrl is required. Defaults to false.

public bool RequireGraphQlApiUrl { get; init; }

Property Value

bool