Struct D1Jurisdiction
- Namespace
- Cloudflare.NET.Accounts.D1.Models
- Assembly
- Cloudflare.NET.dll
Represents a jurisdictional restriction for D1 database data storage.
Jurisdictions provide a guarantee that data stored in the database will remain within a specific geographic or regulatory boundary. Unlike location hints, jurisdictions are enforced constraints.
[JsonConverter(typeof(ExtensibleEnumConverter<D1Jurisdiction>))]
public readonly struct D1Jurisdiction : IExtensibleEnum<D1Jurisdiction>, IEquatable<D1Jurisdiction>
- Implements
- Inherited Members
Remarks
This is an extensible enum that provides IntelliSense for known values while allowing custom values for new jurisdictions that may be added to the Cloudflare API in the future.
When creating a D1 database with a jurisdiction, the primary_location_hint parameter is ignored.
The jurisdiction takes precedence and guarantees data residency within the specified region.
The FedRamp jurisdiction requires Enterprise customer status. Contact your Cloudflare account team for access.
Constructors
D1Jurisdiction(string)
Creates a new D1Jurisdiction with the specified value.
public D1Jurisdiction(string value)
Parameters
valuestringThe string value representing the jurisdiction.
Exceptions
- ArgumentNullException
Thrown when
valueis null.
Properties
EuropeanUnion
European Union jurisdiction.
public static D1Jurisdiction EuropeanUnion { get; }
Property Value
Remarks
Data is guaranteed to be stored within the European Union, helping meet GDPR and other EU data residency requirements.
FedRamp
FedRAMP jurisdiction.
public static D1Jurisdiction FedRamp { get; }
Property Value
Remarks
Data is stored in compliance with FedRAMP (Federal Risk and Authorization Management Program) requirements for U.S. federal government data.
This jurisdiction requires Enterprise customer status. Contact your Cloudflare account team or Cloudflare Support for access.
Value
Gets the underlying string value of this jurisdiction.
public string Value { get; }
Property Value
Methods
Create(string)
Creates a new instance of the extensible enum from the specified string value.
public static D1Jurisdiction Create(string value)
Parameters
valuestringThe string value to wrap.
Returns
- D1Jurisdiction
A new instance of D1Jurisdiction containing the specified value.
Equals(D1Jurisdiction)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(D1Jurisdiction other)
Parameters
otherD1JurisdictionAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(D1Jurisdiction, D1Jurisdiction)
Determines whether two D1Jurisdiction values are equal.
public static bool operator ==(D1Jurisdiction left, D1Jurisdiction right)
Parameters
leftD1JurisdictionrightD1Jurisdiction
Returns
implicit operator string(D1Jurisdiction)
Implicitly converts a D1Jurisdiction to its string value.
public static implicit operator string(D1Jurisdiction jurisdiction)
Parameters
jurisdictionD1JurisdictionThe jurisdiction to convert.
Returns
implicit operator D1Jurisdiction(string)
Implicitly converts a string to a D1Jurisdiction.
public static implicit operator D1Jurisdiction(string value)
Parameters
valuestringThe string value to convert.
Returns
operator !=(D1Jurisdiction, D1Jurisdiction)
Determines whether two D1Jurisdiction values are not equal.
public static bool operator !=(D1Jurisdiction left, D1Jurisdiction right)
Parameters
leftD1JurisdictionrightD1Jurisdiction