@@ -876,6 +876,9 @@ type DatabaseNewParams struct {
876876 AccountID param.Field [string ] `path:"account_id,required"`
877877 // D1 database name.
878878 Name param.Field [string ] `json:"name,required"`
879+ // Specify the location to restrict the D1 database to run and store data. If this
880+ // option is present, the location hint is ignored.
881+ Jurisdiction param.Field [DatabaseNewParamsJurisdiction ] `json:"jurisdiction"`
879882 // Specify the region to create the D1 primary, if available. If this option is
880883 // omitted, the D1 will be created as close as possible to the current user.
881884 PrimaryLocationHint param.Field [DatabaseNewParamsPrimaryLocationHint ] `json:"primary_location_hint"`
@@ -885,6 +888,23 @@ func (r DatabaseNewParams) MarshalJSON() (data []byte, err error) {
885888 return apijson .MarshalRoot (r )
886889}
887890
891+ // Specify the location to restrict the D1 database to run and store data. If this
892+ // option is present, the location hint is ignored.
893+ type DatabaseNewParamsJurisdiction string
894+
895+ const (
896+ DatabaseNewParamsJurisdictionEu DatabaseNewParamsJurisdiction = "eu"
897+ DatabaseNewParamsJurisdictionFedramp DatabaseNewParamsJurisdiction = "fedramp"
898+ )
899+
900+ func (r DatabaseNewParamsJurisdiction ) IsKnown () bool {
901+ switch r {
902+ case DatabaseNewParamsJurisdictionEu , DatabaseNewParamsJurisdictionFedramp :
903+ return true
904+ }
905+ return false
906+ }
907+
888908// Specify the region to create the D1 primary, if available. If this option is
889909// omitted, the D1 will be created as close as possible to the current user.
890910type DatabaseNewParamsPrimaryLocationHint string
0 commit comments