Changed folder structure, added explicit nullable for extensions.
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Cache.InternalRequests
|
||||
{
|
||||
internal class PurgeRequest
|
||||
{
|
||||
[JsonProperty("purge_everything")]
|
||||
public bool? PurgeEverything { get; set; }
|
||||
|
||||
[JsonProperty("tags")]
|
||||
public IList<string> Tags { get; set; }
|
||||
|
||||
[JsonProperty("hosts")]
|
||||
public IList<string> Hostnames { get; set; }
|
||||
|
||||
[JsonProperty("prefixes")]
|
||||
public IList<string> Prefixes { get; set; }
|
||||
|
||||
[JsonProperty("files")]
|
||||
public IList<string> Urls { get; set; }
|
||||
|
||||
[JsonProperty("files")]
|
||||
public IList<UrlWithHeaders> UrlsWithHeaders { get; set; }
|
||||
}
|
||||
}
|
||||
42
Extensions/Cloudflare.Zones/Enums/NameserverType.cs
Normal file
42
Extensions/Cloudflare.Zones/Enums/NameserverType.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// The nameserver type.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NameserverType
|
||||
{
|
||||
/// <summary>
|
||||
/// Cloudflare standard.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "cloudflare.standard")]
|
||||
CloudflareStandard = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Cloudflare random.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "cloudflare.standard.random")]
|
||||
CloudflareRandom = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Custom specified by account.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "custom.account")]
|
||||
CustomAccount = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Custom specified by tenant.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "custom.tenant")]
|
||||
CustomTenant = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Custom specified by zone.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "custom.zone")]
|
||||
CustomZone = 5,
|
||||
}
|
||||
}
|
||||
30
Extensions/Cloudflare.Zones/Enums/ZoneMode.cs
Normal file
30
Extensions/Cloudflare.Zones/Enums/ZoneMode.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// Zone modes.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum ZoneMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Standard.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "standard")]
|
||||
Standard = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Only as CDN.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "cdn_only")]
|
||||
CdnOnly = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Only as DNS.
|
||||
/// </summary>
|
||||
[EnumMember(Value = "dns_only")]
|
||||
DnsOnly = 3,
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using Newtonsoft.Json.Converters;
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// Field to order zones by.
|
||||
/// Possible fields to order zones by.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum ZonesOrderBy
|
||||
@@ -12,7 +12,7 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// An account ID.
|
||||
/// </summary>
|
||||
/// <value>account.id</value>
|
||||
public string AccountId { get; set; }
|
||||
public string? AccountId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// An account Name.
|
||||
@@ -33,19 +33,19 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// <example>Dev Account</example>
|
||||
/// <example>contains:Test</example>
|
||||
/// <value>account.name</value>
|
||||
public string AccountName { get; set; }
|
||||
public string? AccountName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Direction to order zones.
|
||||
/// </summary>
|
||||
/// <value>direction</value>
|
||||
public SortDirection? OrderDirection { get; set; }
|
||||
public SortDirection? Direction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to match all search requirements or at least one (any).
|
||||
/// </summary>
|
||||
/// <value>match</value>
|
||||
public FilterMatchType? MatchType { get; set; }
|
||||
public FilterMatchType? Match { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A domain name.
|
||||
@@ -68,7 +68,7 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// <example>ends_with:arpa</example>
|
||||
/// <example>starts_with:dev</example>
|
||||
/// <value>name</value>
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Field to order zones by.
|
||||
@@ -99,17 +99,19 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
var dict = new Dictionary<string, string>();
|
||||
|
||||
#pragma warning disable CS8602, CS8604 // There will be no null value below.
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(AccountId))
|
||||
dict.Add("account.id", AccountId);
|
||||
dict.Add("account.id", AccountId.Trim());
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(AccountName))
|
||||
dict.Add("account.name", AccountName);
|
||||
dict.Add("account.name", AccountName.Trim());
|
||||
|
||||
if (OrderDirection.HasValue && Enum.IsDefined(typeof(SortDirection), OrderDirection.Value))
|
||||
dict.Add("direction", OrderDirection.Value.GetEnumMemberValue());
|
||||
if (Direction.HasValue && Enum.IsDefined(typeof(SortDirection), Direction.Value))
|
||||
dict.Add("direction", Direction.Value.GetEnumMemberValue());
|
||||
|
||||
if (MatchType.HasValue && Enum.IsDefined(typeof(FilterMatchType), MatchType.Value))
|
||||
dict.Add("match", MatchType.Value.GetEnumMemberValue());
|
||||
if (Match.HasValue && Enum.IsDefined(typeof(FilterMatchType), Match.Value))
|
||||
dict.Add("match", Match.Value.GetEnumMemberValue());
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(Name))
|
||||
dict.Add("name", Name);
|
||||
@@ -126,6 +128,8 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
if (Status.HasValue && Enum.IsDefined(typeof(ZoneStatus), Status.Value))
|
||||
dict.Add("status", Status.Value.GetEnumMemberValue());
|
||||
|
||||
#pragma warning restore CS8602, CS8604
|
||||
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Filters
|
||||
{
|
||||
internal class CreateZoneHoldFilter : IQueryParameterFilter
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Filters
|
||||
{
|
||||
internal class DeleteZoneHoldFilter : IQueryParameterFilter
|
||||
{
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class InternalCreateZoneRequest
|
||||
{
|
||||
public InternalCreateZoneRequest(AccountBase account, string name)
|
||||
{
|
||||
Account = account;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
[JsonProperty("account")]
|
||||
public AccountBase Account { get; set; }
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public ZoneType? Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class InternalEditZoneRequest
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
public ZoneType? Type { get; set; }
|
||||
|
||||
[JsonProperty("vanity_name_servers")]
|
||||
public IList<string>? VanityNameServers { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class InternalPurgeCacheRequest
|
||||
{
|
||||
[JsonProperty("purge_everything")]
|
||||
public bool? PurgeEverything { get; set; }
|
||||
|
||||
[JsonProperty("tags")]
|
||||
public IList<string>? Tags { get; set; }
|
||||
|
||||
[JsonProperty("hosts")]
|
||||
public IList<string>? Hostnames { get; set; }
|
||||
|
||||
[JsonProperty("prefixes")]
|
||||
public IList<string>? Prefixes { get; set; }
|
||||
|
||||
[JsonProperty("files")]
|
||||
public IList<string>? Urls { get; set; }
|
||||
|
||||
[JsonProperty("files")]
|
||||
public IList<PurgeUrlWithHeaders>? UrlsWithHeaders { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class InternalUpdateDnsSettingsRequest
|
||||
{
|
||||
[JsonProperty("flatten_all_cnames")]
|
||||
public bool? FlattenAllCnames { get; set; }
|
||||
|
||||
[JsonProperty("foundation_dns")]
|
||||
public bool? FoundationDns { get; set; }
|
||||
|
||||
[JsonProperty("multi_provider")]
|
||||
public bool? MultiProvider { get; set; }
|
||||
|
||||
[JsonProperty("nameservers")]
|
||||
public Nameserver? Nameservers { get; set; }
|
||||
|
||||
[JsonProperty("ns_ttl")]
|
||||
public int? NameserverTtl { get; set; }
|
||||
|
||||
[JsonProperty("secondary_overrides")]
|
||||
public bool? SecondaryOverrides { get; set; }
|
||||
|
||||
[JsonProperty("soa")]
|
||||
public StartOfAuthority? Soa { get; set; }
|
||||
|
||||
[JsonProperty("zone_mode")]
|
||||
public ZoneMode? Mode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Cache.InternalRequests
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class UrlWithHeaders
|
||||
internal class PurgeUrlWithHeaders
|
||||
{
|
||||
[JsonProperty("headers")]
|
||||
public Dictionary<string, string> Headers { get; set; } = [];
|
||||
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
public string? Url { get; set; }
|
||||
}
|
||||
}
|
||||
22
Extensions/Cloudflare.Zones/Models/Nameserver.cs
Normal file
22
Extensions/Cloudflare.Zones/Models/Nameserver.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// A nameserver.
|
||||
/// </summary>
|
||||
public class Nameserver
|
||||
{
|
||||
/// <summary>
|
||||
/// The nameserver type.
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public virtual NameserverType Type { get; set; }
|
||||
|
||||
// TODO: DEPRECATED? - not available on API request.
|
||||
///// <summary>
|
||||
///// Configured nameserver set to be used for this zone.
|
||||
///// </summary>
|
||||
///// <value>Range: <c>1 <=</c> X <c><= 5</c></value>
|
||||
//[JsonProperty("ns_set")]
|
||||
//public virtual int NameserverSet { get; set; }
|
||||
}
|
||||
}
|
||||
83
Extensions/Cloudflare.Zones/Models/StartOfAuthority.cs
Normal file
83
Extensions/Cloudflare.Zones/Models/StartOfAuthority.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// The SOA (Start of Authority) record.
|
||||
/// </summary>
|
||||
public class StartOfAuthority
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StartOfAuthority"/> class.
|
||||
/// </summary>
|
||||
/// <param name="primaryNameserver">The primary nameserver.</param>
|
||||
/// <param name="zoneAdministrator">The zone administrator. First dot will be interpreted as @-sign.</param>
|
||||
/// <param name="ttl">The time to live of the SOA record.</param>
|
||||
/// <param name="refresh">Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.</param>
|
||||
/// <param name="retry">Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.</param>
|
||||
/// <param name="expire">Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.</param>
|
||||
/// <param name="minimumTtl">The time to live (TTL) for negative caching of records within the zone.</param>
|
||||
public StartOfAuthority(string primaryNameserver, string zoneAdministrator, int ttl, int refresh, int retry, int expire, int minimumTtl)
|
||||
{
|
||||
PrimaryNameserver = primaryNameserver;
|
||||
ZoneAdministrator = zoneAdministrator;
|
||||
Ttl = ttl;
|
||||
Refresh = refresh;
|
||||
Retry = retry;
|
||||
Expire = expire;
|
||||
MinimumTtl = minimumTtl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.
|
||||
/// </summary>
|
||||
/// <value>Unit: seconds. Range: <c>86400 <=</c> X <c><= 2419200</c></value>
|
||||
[JsonProperty("expire")]
|
||||
public virtual int Expire { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The time to live (TTL) for negative caching of records within the zone.
|
||||
/// </summary>
|
||||
/// <value>Unit: seconds. Range: <c>60 <=</c> X <c><= 86400</c></value>
|
||||
[JsonProperty("min_ttl")]
|
||||
public virtual int MinimumTtl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The primary nameserver, which may be used for outbound zone transfers.
|
||||
/// </summary>
|
||||
[JsonProperty("mname", NullValueHandling = NullValueHandling.Include)]
|
||||
public virtual string PrimaryNameserver { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.
|
||||
/// </summary>
|
||||
/// <value>Unit: seconds. Range: <c>600 <=</c> X <c><= 86400</c></value>
|
||||
[JsonProperty("refresh")]
|
||||
public virtual int Refresh { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.
|
||||
/// </summary>
|
||||
/// <value>Unit: seconds. Range: <c>600 <=</c> X <c><= 86400</c></value>
|
||||
[JsonProperty("retry")]
|
||||
public virtual int Retry { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The email address of the zone administrator, with the first label representing the local part of the email address.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The first dot is interpreted as @ sign.
|
||||
/// <br/>
|
||||
/// admin.example.com => admin@example.com
|
||||
/// <br/>
|
||||
/// test\.user.example.org => test.user@example.org
|
||||
/// </remarks>
|
||||
[JsonProperty("rname", NullValueHandling = NullValueHandling.Include)]
|
||||
public virtual string ZoneAdministrator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The time to live (TTL) of the SOA record itself.
|
||||
/// </summary>
|
||||
/// <value>Unit: seconds. Range: <c>300 <=</c> X <c><= 86400</c></value>
|
||||
[JsonProperty("ttl")]
|
||||
public virtual int Ttl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,13 +13,13 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// </summary>
|
||||
// <= 32 characters
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
public string? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The account the zone belongs to.
|
||||
/// </summary>
|
||||
[JsonProperty("account")]
|
||||
public AccountBase Account { get; set; }
|
||||
public AccountBase? Account { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The last time proof of ownership was detected and the zone was made active.
|
||||
@@ -45,7 +45,7 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// Metadata about the zone.
|
||||
/// </summary>
|
||||
[JsonProperty("meta")]
|
||||
public ZoneMetaData Meta { get; set; }
|
||||
public ZoneMetaData? Meta { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When the zone was last modified.
|
||||
@@ -58,37 +58,37 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// </summary>
|
||||
// <= 253 characters
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The name servers Cloudflare assigns to a zone.
|
||||
/// </summary>
|
||||
[JsonProperty("name_servers")]
|
||||
public IReadOnlyList<string> NameServers { get; set; }
|
||||
public IReadOnlyList<string>? NameServers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// DNS host at the time of switching to Cloudflare.
|
||||
/// </summary>
|
||||
[JsonProperty("original_dnshost")]
|
||||
public string OriginalDnshost { get; set; }
|
||||
public string? OriginalDnshost { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Original name servers before moving to Cloudflare.
|
||||
/// </summary>
|
||||
[JsonProperty("original_name_servers")]
|
||||
public IReadOnlyList<string> OriginalNameServers { get; set; }
|
||||
public IReadOnlyList<string>? OriginalNameServers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Registrar for the domain at the time of switching to Cloudflare.
|
||||
/// </summary>
|
||||
[JsonProperty("original_registrar")]
|
||||
public string OriginalRegistrar { get; set; }
|
||||
public string? OriginalRegistrar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The owner of the zone.
|
||||
/// </summary>
|
||||
[JsonProperty("owner")]
|
||||
public OwnerBase Owner { get; set; }
|
||||
public OwnerBase? Owner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the zone is only using Cloudflare DNS services.
|
||||
@@ -115,6 +115,6 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// <em>This is only available for Business and Enterprise plans.</em>
|
||||
/// </summary>
|
||||
[JsonProperty("vanity_name_servers")]
|
||||
public IReadOnlyList<string> VanityNameServers { get; set; }
|
||||
public IReadOnlyList<string>? VanityNameServers { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
59
Extensions/Cloudflare.Zones/Models/ZoneDnsSetting.cs
Normal file
59
Extensions/Cloudflare.Zones/Models/ZoneDnsSetting.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// The DNS settings.
|
||||
/// </summary>
|
||||
public class ZoneDnsSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations,
|
||||
/// a CNAME record at the zone apex will always be flattened.
|
||||
/// </summary>
|
||||
[JsonProperty("flatten_all_cnames")]
|
||||
public bool FlattenAllCnames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable Foundation DNS Advanced Nameservers on the zone.
|
||||
/// </summary>
|
||||
[JsonProperty("foundation_dns")]
|
||||
public bool FoundationDns { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist,
|
||||
/// and to respect NS records at the zone apex during outbound zone transfers.
|
||||
/// </summary>
|
||||
[JsonProperty("multi_provider")]
|
||||
public bool MultiProvider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Settings determining the nameservers through which the zone should be available.
|
||||
/// </summary>
|
||||
[JsonProperty("nameservers")]
|
||||
public Nameserver? Nameservers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The time to live (TTL) of the zone's nameserver (NS) records.
|
||||
/// </summary>
|
||||
// 30 <= X <= 86400
|
||||
[JsonProperty("ns_ttl")]
|
||||
public int NameserverTtl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.
|
||||
/// </summary>
|
||||
[JsonProperty("secondary_overrides")]
|
||||
public bool SecondaryOverrides { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Components of the zone's SOA record.
|
||||
/// </summary>
|
||||
[JsonProperty("soa")]
|
||||
public StartOfAuthority? SOA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the zone mode is a regular or CDN/DNS only zone.
|
||||
/// </summary>
|
||||
[JsonProperty("zone_mode")]
|
||||
public ZoneMode Mode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// Gets or sets an information whether subdomains are included in the hold.
|
||||
/// </summary>
|
||||
[JsonProperty("include_subdomains")]
|
||||
public string IncludeSubdomains { get; set; }
|
||||
public string? IncludeSubdomains { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time after which the zone is no longer on hold.
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
/// </summary>
|
||||
// <= 32 characters
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
public string? Id { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
37
Extensions/Cloudflare.Zones/Requests/CreateZoneRequest.cs
Normal file
37
Extensions/Cloudflare.Zones/Requests/CreateZoneRequest.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// Request to create a new zone.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Request to create a new zone.
|
||||
/// </remarks>
|
||||
/// <param name="accountId">The account identifier.</param>
|
||||
/// <param name="name">The domain name.</param>
|
||||
public class CreateZoneRequest(string accountId, string name)
|
||||
{
|
||||
/// <summary>
|
||||
/// The account identifier.
|
||||
/// </summary>
|
||||
public string AccountId { get; set; } = accountId;
|
||||
|
||||
/// <summary>
|
||||
/// The domain name.
|
||||
/// </summary>
|
||||
public string Name { get; set; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// The zone type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// A full zone implies that DNS is hosted with Cloudflare.
|
||||
/// A partial zone is typically a partner-hosted zone or a CNAME setup.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If not set, Cloudflare will use <see cref="ZoneType.Full"/> as default.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public ZoneType? Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,17 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// <summary>
|
||||
/// A request to edit a zone.
|
||||
/// </summary>
|
||||
public class EditZoneRequest
|
||||
/// <remarks>
|
||||
/// Initializes a new instance of the <see cref="EditZoneRequest"/> class.
|
||||
/// </remarks>
|
||||
/// <param name="id">The zone identifier.</param>
|
||||
public class EditZoneRequest(string id)
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Identifier.
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; } = id;
|
||||
|
||||
/// <summary>
|
||||
/// A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup.
|
||||
@@ -24,6 +29,6 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// <br/>
|
||||
/// <em>This is only available for Business and Enterprise plans.</em>
|
||||
/// </summary>
|
||||
public IList<string> VanityNameServers { get; set; }
|
||||
public IList<string>? VanityNameServers { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// Update DNS settings request.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Initializes a new instance of the <see cref="UpdateDnsSettingsRequest"/> class.
|
||||
/// </remarks>
|
||||
/// <param name="id">The zone identifier.</param>
|
||||
public class UpdateDnsSettingsRequest(string id)
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The zone identifier.
|
||||
/// </summary>
|
||||
public string Id { get; set; } = id;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations,
|
||||
/// a CNAME record at the zone apex will always be flattened.
|
||||
/// </summary>
|
||||
public bool? FlattenAllCnames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable Foundation DNS Advanced Nameservers on the zone.
|
||||
/// </summary>
|
||||
public bool? FoundationDns { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist,
|
||||
/// and to respect NS records at the zone apex during outbound zone transfers.
|
||||
/// </summary>
|
||||
public bool? MultiProvider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Settings determining the nameservers through which the zone should be available.
|
||||
/// </summary>
|
||||
public Nameserver? Nameservers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The time to live (TTL) of the zone's nameserver (NS) records.
|
||||
/// </summary>
|
||||
/// <value>Unit: seconds. Range: <c>30 <=</c> X <c><= 86400</c></value>
|
||||
public int? NameserverTtl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.
|
||||
/// </summary>
|
||||
public bool? SecondaryOverrides { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Components of the zone's SOA record.
|
||||
/// </summary>
|
||||
public StartOfAuthority? SOA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the zone mode is a regular or CDN/DNS only zone.
|
||||
/// </summary>
|
||||
public ZoneMode? Mode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,11 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// <summary>
|
||||
/// Url with headers to purge.
|
||||
/// </summary>
|
||||
public class ZonePurgeCachedUrlRequest
|
||||
/// <remarks>
|
||||
/// Initializes a new instance of the <see cref="ZonePurgeCachedUrlRequest"/> class.
|
||||
/// </remarks>
|
||||
/// <param name="url">The url to purge.</param>
|
||||
public class ZonePurgeCachedUrlRequest(string url)
|
||||
{
|
||||
/// <summary>
|
||||
/// Defined headers to specifiy the purge request.
|
||||
@@ -15,6 +19,6 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// <summary>
|
||||
/// The file url to purge.
|
||||
/// </summary>
|
||||
public string Url { get; set; }
|
||||
public string Url { get; set; } = url;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Zones.InternalRequests
|
||||
{
|
||||
internal class CreateRequest
|
||||
{
|
||||
[JsonProperty("account")]
|
||||
public AccountBase Account { get; set; }
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public ZoneType Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Zones.InternalRequests
|
||||
{
|
||||
internal class EditRequest
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
public ZoneType? Type { get; set; }
|
||||
|
||||
[JsonProperty("vanity_name_servers")]
|
||||
public IList<string> VanityNameServers { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// Request to create a new zone.
|
||||
/// </summary>
|
||||
public class CreateZoneRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// The account identifier.
|
||||
/// </summary>
|
||||
public string AccountId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The domain name.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The zone type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A full zone implies that DNS is hosted with Cloudflare.
|
||||
/// A partial zone is typically a partner-hosted zone or a CNAME setup.
|
||||
/// </remarks>
|
||||
public ZoneType Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AMWD.Net.Api.Cloudflare.Zones.Cache.InternalRequests;
|
||||
using AMWD.Net.Api.Cloudflare.Zones.Internals.Requests;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
@@ -24,11 +24,11 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
public static Task<CloudflareResponse<ZoneIdResponse>> PurgeCachedContent(this ICloudflareClient client, string zoneId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
zoneId.ValidateCloudflareId();
|
||||
var req = new PurgeRequest
|
||||
var req = new InternalPurgeCacheRequest
|
||||
{
|
||||
PurgeEverything = true
|
||||
};
|
||||
return client.PostAsync<ZoneIdResponse, PurgeRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
return client.PostAsync<ZoneIdResponse, InternalPurgeCacheRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -60,15 +60,12 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
zoneId.ValidateCloudflareId();
|
||||
|
||||
if (urls == null)
|
||||
throw new ArgumentNullException(nameof(urls));
|
||||
|
||||
var req = new PurgeRequest();
|
||||
var req = new InternalPurgeCacheRequest();
|
||||
|
||||
if (urls.Any(u => u.Headers.Count > 0))
|
||||
{
|
||||
req.UrlsWithHeaders = urls.Where(u => !string.IsNullOrWhiteSpace(u.Url))
|
||||
.Select(u => new UrlWithHeaders
|
||||
.Select(u => new PurgeUrlWithHeaders
|
||||
{
|
||||
Url = u.Url,
|
||||
Headers = u.Headers
|
||||
@@ -81,7 +78,7 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
req.Urls = urls.Where(u => !string.IsNullOrWhiteSpace(u.Url)).Select(u => u.Url).ToList();
|
||||
}
|
||||
|
||||
return client.PostAsync<ZoneIdResponse, PurgeRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
return client.PostAsync<ZoneIdResponse, InternalPurgeCacheRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -111,11 +108,11 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
if (tags == null)
|
||||
throw new ArgumentNullException(nameof(tags));
|
||||
|
||||
var req = new PurgeRequest
|
||||
var req = new InternalPurgeCacheRequest
|
||||
{
|
||||
Tags = tags.Where(t => !string.IsNullOrWhiteSpace(t)).ToList()
|
||||
};
|
||||
return client.PostAsync<ZoneIdResponse, PurgeRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
return client.PostAsync<ZoneIdResponse, InternalPurgeCacheRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -145,11 +142,11 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
if (hosts == null)
|
||||
throw new ArgumentNullException(nameof(hosts));
|
||||
|
||||
var req = new PurgeRequest
|
||||
var req = new InternalPurgeCacheRequest
|
||||
{
|
||||
Hostnames = hosts.Where(h => !string.IsNullOrWhiteSpace(h)).ToList()
|
||||
};
|
||||
return client.PostAsync<ZoneIdResponse, PurgeRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
return client.PostAsync<ZoneIdResponse, InternalPurgeCacheRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -179,11 +176,11 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
if (prefixes == null)
|
||||
throw new ArgumentNullException(nameof(prefixes));
|
||||
|
||||
var req = new PurgeRequest
|
||||
var req = new InternalPurgeCacheRequest
|
||||
{
|
||||
Prefixes = prefixes.Where(h => !string.IsNullOrWhiteSpace(h)).ToList()
|
||||
};
|
||||
return client.PostAsync<ZoneIdResponse, PurgeRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
return client.PostAsync<ZoneIdResponse, InternalPurgeCacheRequest>($"zones/{zoneId}/purge_cache", req, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
96
Extensions/Cloudflare.Zones/ZoneDnsSettingsExtensions.cs
Normal file
96
Extensions/Cloudflare.Zones/ZoneDnsSettingsExtensions.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AMWD.Net.Api.Cloudflare.Zones.Internals.Requests;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// Extends the <see cref="ICloudflareClient"/> with methods for working with zones.
|
||||
/// </summary>
|
||||
public static class ZoneDnsSettingsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Show DNS settings for a zone.
|
||||
/// </summary>
|
||||
/// <param name="client">The <see cref="ICloudflareClient"/>.</param>
|
||||
/// <param name="zoneId">The zone ID.</param>
|
||||
/// <param name="cancellationToken">A cancellation token used to propagate notification that this operation should be canceled.</param>
|
||||
public static Task<CloudflareResponse<ZoneDnsSetting>> ShowZoneDnsSettings(this ICloudflareClient client, string zoneId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
zoneId.ValidateCloudflareId();
|
||||
return client.GetAsync<ZoneDnsSetting>($"zones/{zoneId}/dns_settings", cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update DNS settings for a zone.
|
||||
/// </summary>
|
||||
/// <param name="client">The <see cref="ICloudflareClient"/>.</param>
|
||||
/// <param name="request">The update request.</param>
|
||||
/// <param name="cancellationToken">A cancellation token used to propagate notification that this operation should be canceled.</param>
|
||||
public static Task<CloudflareResponse<ZoneDnsSetting>> UpdateZoneDnsSettings(this ICloudflareClient client, UpdateDnsSettingsRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
request.Id.ValidateCloudflareId();
|
||||
|
||||
if (request.Mode.HasValue && !Enum.IsDefined(typeof(ZoneMode), request.Mode))
|
||||
throw new ArgumentOutOfRangeException(nameof(request.Mode), request.Mode, "Value must be one of the ZoneMode enum values.");
|
||||
|
||||
if (request.Nameservers != null && !Enum.IsDefined(typeof(NameserverType), request.Nameservers.Type))
|
||||
throw new ArgumentOutOfRangeException(nameof(request.Nameservers.Type), request.Nameservers.Type, "Value must be one of the NameserverType enum values.");
|
||||
|
||||
if (request.NameserverTtl.HasValue && (request.NameserverTtl < 30 || 86400 < request.NameserverTtl))
|
||||
throw new ArgumentOutOfRangeException(nameof(request.NameserverTtl), request.NameserverTtl, "Value must be between 30 and 86400.");
|
||||
|
||||
if (request.SOA != null)
|
||||
{
|
||||
if (request.SOA.Expire < 86400 || 2419200 < request.SOA.Expire)
|
||||
throw new ArgumentOutOfRangeException(nameof(request.SOA.Expire), request.SOA.Expire, "Value must be between 86400 and 2419200.");
|
||||
|
||||
if (request.SOA.MinimumTtl < 60 || 86400 < request.SOA.MinimumTtl)
|
||||
throw new ArgumentOutOfRangeException(nameof(request.SOA.MinimumTtl), request.SOA.MinimumTtl, "Value must be between 60 and 86400.");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(request.SOA.PrimaryNameserver))
|
||||
throw new ArgumentNullException(nameof(request.SOA.PrimaryNameserver));
|
||||
|
||||
if (request.SOA.Refresh < 600 || 86400 < request.SOA.Refresh)
|
||||
throw new ArgumentOutOfRangeException(nameof(request.SOA.Refresh), request.SOA.Refresh, "Value must be between 600 and 86400.");
|
||||
|
||||
if (request.SOA.Retry < 600 || 86400 < request.SOA.Retry)
|
||||
throw new ArgumentOutOfRangeException(nameof(request.SOA.Retry), request.SOA.Retry, "Value must be between 600 and 86400.");
|
||||
|
||||
if (request.SOA.Ttl < 300 || 86400 < request.SOA.Ttl)
|
||||
throw new ArgumentOutOfRangeException(nameof(request.SOA.Ttl), request.SOA.Ttl, "Value must be between 300 and 86400.");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(request.SOA.ZoneAdministrator))
|
||||
throw new ArgumentNullException(nameof(request.SOA.ZoneAdministrator));
|
||||
}
|
||||
|
||||
var req = new InternalUpdateDnsSettingsRequest
|
||||
{
|
||||
FlattenAllCnames = request.FlattenAllCnames,
|
||||
FoundationDns = request.FoundationDns,
|
||||
Mode = request.Mode,
|
||||
MultiProvider = request.MultiProvider,
|
||||
Nameservers = request.Nameservers,
|
||||
NameserverTtl = request.NameserverTtl,
|
||||
SecondaryOverrides = request.SecondaryOverrides,
|
||||
};
|
||||
|
||||
if (request.SOA != null)
|
||||
{
|
||||
req.Soa = new StartOfAuthority
|
||||
(
|
||||
expire: request.SOA.Expire,
|
||||
minimumTtl: request.SOA.MinimumTtl,
|
||||
primaryNameserver: request.SOA.PrimaryNameserver,
|
||||
refresh: request.SOA.Refresh,
|
||||
retry: request.SOA.Retry,
|
||||
ttl: request.SOA.Ttl,
|
||||
zoneAdministrator: request.SOA.ZoneAdministrator
|
||||
);
|
||||
}
|
||||
|
||||
return client.PatchAsync<ZoneDnsSetting, InternalUpdateDnsSettingsRequest>($"zones/{request.Id}/dns_settings", req, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AMWD.Net.Api.Cloudflare.Zones.Zones.InternalRequests;
|
||||
using AMWD.Net.Api.Cloudflare.Zones.Internals.Requests;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
@@ -18,7 +18,7 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
/// <param name="client">The <see cref="ICloudflareClient"/>.</param>
|
||||
/// <param name="options">Filter options (optional).</param>
|
||||
/// <param name="cancellationToken">A cancellation token used to propagate notification that this operation should be canceled.</param>
|
||||
public static Task<CloudflareResponse<IReadOnlyList<Zone>>> ListZones(this ICloudflareClient client, ListZonesFilter options = null, CancellationToken cancellationToken = default)
|
||||
public static Task<CloudflareResponse<IReadOnlyList<Zone>>> ListZones(this ICloudflareClient client, ListZonesFilter? options = null, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return client.GetAsync<IReadOnlyList<Zone>>("zones", options, cancellationToken);
|
||||
}
|
||||
@@ -52,17 +52,15 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
if (!RegexPatterns.ZoneName.IsMatch(request.Name))
|
||||
throw new ArgumentException("Does not match the zone name pattern", nameof(request.Name));
|
||||
|
||||
if (!Enum.IsDefined(typeof(ZoneType), request.Type))
|
||||
if (request.Type.HasValue && !Enum.IsDefined(typeof(ZoneType), request.Type))
|
||||
throw new ArgumentOutOfRangeException(nameof(request.Type));
|
||||
|
||||
var req = new CreateRequest
|
||||
var req = new InternalCreateZoneRequest(account: new AccountBase { Id = request.AccountId }, name: request.Name)
|
||||
{
|
||||
Account = new AccountBase { Id = request.AccountId },
|
||||
Name = request.Name,
|
||||
Type = request.Type
|
||||
};
|
||||
|
||||
return client.PostAsync<Zone, CreateRequest>("zones", req, cancellationToken: cancellationToken);
|
||||
return client.PostAsync<Zone, InternalCreateZoneRequest>("zones", req, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -96,7 +94,7 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
if (request.Type.HasValue && !Enum.IsDefined(typeof(ZoneType), request.Type.Value))
|
||||
throw new ArgumentOutOfRangeException(nameof(request.Type));
|
||||
|
||||
var req = new EditRequest();
|
||||
var req = new InternalEditZoneRequest();
|
||||
|
||||
if (request.Type.HasValue)
|
||||
req.Type = request.Type.Value;
|
||||
@@ -104,7 +102,7 @@ namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
if (request.VanityNameServers != null)
|
||||
req.VanityNameServers = request.VanityNameServers.Where(s => !string.IsNullOrWhiteSpace(s)).ToList();
|
||||
|
||||
return client.PatchAsync<Zone, EditRequest>($"zones/{request.Id}", req, cancellationToken);
|
||||
return client.PatchAsync<Zone, InternalEditZoneRequest>($"zones/{request.Id}", req, cancellationToken);
|
||||
}
|
||||
|
||||
// Triggeres a new activation check for a PENDING Zone. This can be triggered every 5 min for paygo/ent customers, every hour for FREE Zones.
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AMWD.Net.Api.Cloudflare.Zones.Internals.Filters;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
Reference in New Issue
Block a user