Table of Contents

Class CreateCustomHostnameRequest

Namespace
Cloudflare.NET.Zones.CustomHostnames.Models
Assembly
Cloudflare.NET.dll

Represents the request payload for creating a new custom hostname.

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

Constructors

CreateCustomHostnameRequest(string, SslConfiguration, JsonElement?, string?, string?)

Represents the request payload for creating a new custom hostname.

public CreateCustomHostnameRequest(string Hostname, SslConfiguration Ssl, JsonElement? CustomMetadata = null, string? CustomOriginServer = null, string? CustomOriginSni = null)

Parameters

Hostname string

The custom hostname to create (e.g., "app.customer.com").

Ssl SslConfiguration

The SSL configuration for the custom hostname.

CustomMetadata JsonElement?

Optional arbitrary JSON metadata to associate with this hostname.

CustomOriginServer string

Optional custom origin server hostname.

CustomOriginSni string

Optional SNI value for the origin TLS handshake. Use UseRequestHostHeader to use the request's Host header.

Properties

CustomMetadata

Optional arbitrary JSON metadata to associate with this hostname.

[JsonPropertyName("custom_metadata")]
public JsonElement? CustomMetadata { get; init; }

Property Value

JsonElement?

CustomOriginServer

Optional custom origin server hostname.

[JsonPropertyName("custom_origin_server")]
public string? CustomOriginServer { get; init; }

Property Value

string

CustomOriginSni

Optional SNI value for the origin TLS handshake. Use UseRequestHostHeader to use the request's Host header.

[JsonPropertyName("custom_origin_sni")]
public string? CustomOriginSni { get; init; }

Property Value

string

Hostname

The custom hostname to create (e.g., "app.customer.com").

[JsonPropertyName("hostname")]
public string Hostname { get; init; }

Property Value

string

Ssl

The SSL configuration for the custom hostname.

[JsonPropertyName("ssl")]
public SslConfiguration Ssl { get; init; }

Property Value

SslConfiguration