Table of Contents

Class CustomDomainResponse

Namespace
Cloudflare.NET.Accounts.Models
Assembly
Cloudflare.NET.dll

Represents the response from attaching or querying a custom domain. The custom converter handles the polymorphic 'status' field. The EdgeHostname may be null in some responses.

[JsonConverter(typeof(CustomDomainResponseConverter))]
public record CustomDomainResponse : IEquatable<CustomDomainResponse>
Inheritance
CustomDomainResponse
Implements
Inherited Members

Constructors

CustomDomainResponse(string, string?, string, string?)

Represents the response from attaching or querying a custom domain. The custom converter handles the polymorphic 'status' field. The EdgeHostname may be null in some responses.

public CustomDomainResponse(string Domain, string? EdgeHostname, string Status, string? SslStatus = null)

Parameters

Domain string

The custom domain hostname (e.g., "files.example.com").

EdgeHostname string

The Cloudflare edge hostname the domain resolves to, when the API reports it.

Status string

The hostname ownership status. When the API returns the nested status object (GET), this is its ownership value; when the API returns a plain string (POST/PUT), this is that string.

SslStatus string

The certificate status of the custom domain, taken from the nested status object's ssl value (documented values: "initializing", "pending", "active", "deactivated", "error", "unknown"). A hostname that no wildcard certificate covers only serves traffic once this is "active", regardless of Status. Null when the API response carried no nested status object, which is the case for the attach (POST) and update (PUT) responses.

Properties

Domain

The custom domain hostname (e.g., "files.example.com").

public string Domain { get; init; }

Property Value

string

EdgeHostname

The Cloudflare edge hostname the domain resolves to, when the API reports it.

public string? EdgeHostname { get; init; }

Property Value

string

SslStatus

The certificate status of the custom domain, taken from the nested status object's ssl value (documented values: "initializing", "pending", "active", "deactivated", "error", "unknown"). A hostname that no wildcard certificate covers only serves traffic once this is "active", regardless of Status. Null when the API response carried no nested status object, which is the case for the attach (POST) and update (PUT) responses.

public string? SslStatus { get; init; }

Property Value

string

Status

The hostname ownership status. When the API returns the nested status object (GET), this is its ownership value; when the API returns a plain string (POST/PUT), this is that string.

public string Status { get; init; }

Property Value

string