python3-core-api-client 4.0__py3-none-any.whl → 6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cyberfusion/CoreApiClient/connector.py +35 -0
- cyberfusion/CoreApiClient/http.py +18 -10
- cyberfusion/CoreApiClient/models.py +284 -11
- cyberfusion/CoreApiClient/resources/basic_authentication_realms.py +8 -14
- cyberfusion/CoreApiClient/resources/borg_archives.py +9 -15
- cyberfusion/CoreApiClient/resources/borg_repositories.py +12 -16
- cyberfusion/CoreApiClient/resources/certificate_managers.py +9 -15
- cyberfusion/CoreApiClient/resources/certificates.py +6 -12
- cyberfusion/CoreApiClient/resources/clusters.py +142 -256
- cyberfusion/CoreApiClient/resources/cmses.py +20 -26
- cyberfusion/CoreApiClient/resources/crons.py +7 -13
- cyberfusion/CoreApiClient/resources/custom_config_snippets.py +8 -14
- cyberfusion/CoreApiClient/resources/custom_configs.py +7 -13
- cyberfusion/CoreApiClient/resources/customers.py +8 -14
- cyberfusion/CoreApiClient/resources/daemons.py +10 -18
- cyberfusion/CoreApiClient/resources/database_user_grants.py +6 -12
- cyberfusion/CoreApiClient/resources/database_users.py +7 -13
- cyberfusion/CoreApiClient/resources/databases.py +10 -16
- cyberfusion/CoreApiClient/resources/domain_routers.py +4 -10
- cyberfusion/CoreApiClient/resources/firewall_groups.py +7 -13
- cyberfusion/CoreApiClient/resources/firewall_rules.py +6 -12
- cyberfusion/CoreApiClient/resources/fpm_pools.py +12 -18
- cyberfusion/CoreApiClient/resources/ftp_users.py +8 -14
- cyberfusion/CoreApiClient/resources/haproxy_listens.py +6 -12
- cyberfusion/CoreApiClient/resources/haproxy_listens_to_nodes.py +7 -13
- cyberfusion/CoreApiClient/resources/health.py +1 -1
- cyberfusion/CoreApiClient/resources/hosts_entries.py +6 -12
- cyberfusion/CoreApiClient/resources/htpasswd_files.py +6 -12
- cyberfusion/CoreApiClient/resources/htpasswd_users.py +7 -13
- cyberfusion/CoreApiClient/resources/login.py +2 -2
- cyberfusion/CoreApiClient/resources/logs.py +6 -18
- cyberfusion/CoreApiClient/resources/mail_accounts.py +8 -14
- cyberfusion/CoreApiClient/resources/mail_aliases.py +7 -13
- cyberfusion/CoreApiClient/resources/mail_domains.py +7 -13
- cyberfusion/CoreApiClient/resources/mail_hostnames.py +7 -13
- cyberfusion/CoreApiClient/resources/malwares.py +3 -9
- cyberfusion/CoreApiClient/resources/mariadb_encryption_keys.py +6 -12
- cyberfusion/CoreApiClient/resources/n8n_instances.py +7 -13
- cyberfusion/CoreApiClient/resources/node_add_ons.py +7 -13
- cyberfusion/CoreApiClient/resources/nodes.py +10 -16
- cyberfusion/CoreApiClient/resources/passenger_apps.py +8 -14
- cyberfusion/CoreApiClient/resources/redis_instances.py +7 -13
- cyberfusion/CoreApiClient/resources/regions.py +3 -9
- cyberfusion/CoreApiClient/resources/root_ssh_keys.py +7 -13
- cyberfusion/CoreApiClient/resources/security_txt_policies.py +8 -14
- cyberfusion/CoreApiClient/resources/ssh_keys.py +7 -13
- cyberfusion/CoreApiClient/resources/task_collections.py +2 -2
- cyberfusion/CoreApiClient/resources/unix_users.py +9 -15
- cyberfusion/CoreApiClient/resources/url_redirects.py +7 -13
- cyberfusion/CoreApiClient/resources/virtual_hosts.py +17 -25
- {python3_core_api_client-4.0.dist-info → python3_core_api_client-6.0.dist-info}/METADATA +3 -3
- python3_core_api_client-6.0.dist-info/RECORD +60 -0
- python3_core_api_client-4.0.dist-info/RECORD +0 -60
- {python3_core_api_client-4.0.dist-info → python3_core_api_client-6.0.dist-info}/WHEEL +0 -0
- {python3_core_api_client-4.0.dist-info → python3_core_api_client-6.0.dist-info}/top_level.txt +0 -0
|
@@ -15,6 +15,8 @@ import datetime
|
|
|
15
15
|
import importlib.metadata
|
|
16
16
|
from cyberfusion.CoreApiClient.http import Response
|
|
17
17
|
|
|
18
|
+
DEFAULT_PER_PAGE = 50
|
|
19
|
+
|
|
18
20
|
|
|
19
21
|
class CoreApiClient:
|
|
20
22
|
def __init__(
|
|
@@ -154,6 +156,39 @@ class CoreApiClient:
|
|
|
154
156
|
|
|
155
157
|
return local_response
|
|
156
158
|
|
|
159
|
+
def send_or_fail_with_auto_pagination(
|
|
160
|
+
self,
|
|
161
|
+
method: str,
|
|
162
|
+
path: str,
|
|
163
|
+
data: Optional[dict] = None,
|
|
164
|
+
query_parameters: Optional[dict] = None,
|
|
165
|
+
*,
|
|
166
|
+
per_page: int = DEFAULT_PER_PAGE,
|
|
167
|
+
content_type: str = "application/json",
|
|
168
|
+
) -> list[Response]:
|
|
169
|
+
query_parameters = dict(query_parameters) if query_parameters else {}
|
|
170
|
+
|
|
171
|
+
query_parameters["per_page"] = per_page
|
|
172
|
+
|
|
173
|
+
responses: list[Response] = []
|
|
174
|
+
page = 1
|
|
175
|
+
|
|
176
|
+
while True:
|
|
177
|
+
query_parameters["page"] = page
|
|
178
|
+
|
|
179
|
+
response = self.send_or_fail(
|
|
180
|
+
method, path, data, query_parameters, content_type=content_type
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
responses.append(response)
|
|
184
|
+
|
|
185
|
+
if "next" not in response.requests_response.links:
|
|
186
|
+
break
|
|
187
|
+
|
|
188
|
+
page += 1
|
|
189
|
+
|
|
190
|
+
return responses
|
|
191
|
+
|
|
157
192
|
def get_default_requests_session(self) -> requests.sessions.Session:
|
|
158
193
|
session = requests.Session()
|
|
159
194
|
|
|
@@ -32,20 +32,28 @@ class Response:
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
@dataclass
|
|
35
|
-
class DtoResponse(Generic[DtoType]
|
|
35
|
+
class DtoResponse(Generic[DtoType]):
|
|
36
|
+
requests_responses: list[RequestsResponse]
|
|
36
37
|
dto: DtoType
|
|
37
38
|
|
|
38
39
|
@classmethod
|
|
39
|
-
def
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
def from_responses(
|
|
41
|
+
cls, responses: Response | list[Response], model: type[ModelType]
|
|
42
|
+
) -> "DtoResponse":
|
|
43
|
+
if isinstance(responses, Response):
|
|
44
|
+
responses = [responses]
|
|
45
|
+
|
|
46
|
+
dto: list = []
|
|
47
|
+
|
|
48
|
+
for response in responses:
|
|
49
|
+
items = response.json
|
|
50
|
+
|
|
51
|
+
if isinstance(items, list):
|
|
52
|
+
dto.extend(model.model_validate(object_) for object_ in items)
|
|
53
|
+
else:
|
|
54
|
+
dto.append(model.model_validate(items))
|
|
44
55
|
|
|
45
56
|
return cls(
|
|
46
|
-
|
|
47
|
-
body=response.body,
|
|
48
|
-
headers=response.headers,
|
|
49
|
-
requests_response=response.requests_response,
|
|
57
|
+
requests_responses=[r.requests_response for r in responses],
|
|
50
58
|
dto=dto,
|
|
51
59
|
)
|
|
@@ -287,7 +287,7 @@ class CronCreateRequest(BaseCoreApiModel):
|
|
|
287
287
|
node_id: Optional[int]
|
|
288
288
|
name: constr(pattern=r"^[a-z0-9-_]+$", min_length=1, max_length=64)
|
|
289
289
|
unix_user_id: int
|
|
290
|
-
command: constr(pattern=r"^[ -~]
|
|
290
|
+
command: constr(pattern=r"^[!-~](?:[ -~]*[!-~])?$", min_length=1, max_length=65535)
|
|
291
291
|
email_address: Optional[EmailStr]
|
|
292
292
|
schedule: str
|
|
293
293
|
error_count: int = 1
|
|
@@ -300,9 +300,9 @@ class CronCreateRequest(BaseCoreApiModel):
|
|
|
300
300
|
|
|
301
301
|
|
|
302
302
|
class CronUpdateRequest(BaseCoreApiModel):
|
|
303
|
-
command: Optional[
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
command: Optional[
|
|
304
|
+
constr(pattern=r"^[!-~](?:[ -~]*[!-~])?$", min_length=1, max_length=65535)
|
|
305
|
+
] = None
|
|
306
306
|
email_address: Optional[EmailStr] = None
|
|
307
307
|
schedule: Optional[str] = None
|
|
308
308
|
error_count: Optional[int] = None
|
|
@@ -322,6 +322,9 @@ class CustomConfigServerSoftwareNameEnum(StrEnum):
|
|
|
322
322
|
class CustomConfigSnippetTemplateNameEnum(StrEnum):
|
|
323
323
|
LARAVEL = "Laravel"
|
|
324
324
|
COMPRESSION = "Compression"
|
|
325
|
+
BLITZ = "Blitz"
|
|
326
|
+
WORDPRESS = "WordPress"
|
|
327
|
+
CRAFT = "Craft"
|
|
325
328
|
|
|
326
329
|
|
|
327
330
|
class CustomConfigSnippetUpdateRequest(BaseCoreApiModel):
|
|
@@ -364,16 +367,16 @@ class CustomerResource(BaseCoreApiModel):
|
|
|
364
367
|
class DaemonCreateRequest(BaseCoreApiModel):
|
|
365
368
|
name: constr(pattern=r"^[a-z0-9-_]+$", min_length=1, max_length=64)
|
|
366
369
|
unix_user_id: int
|
|
367
|
-
command: constr(pattern=r"^[ -~]
|
|
370
|
+
command: constr(pattern=r"^[!-~](?:[ -~]*[!-~])?$", min_length=1, max_length=65535)
|
|
368
371
|
nodes_ids: List[int]
|
|
369
372
|
memory_limit: Optional[conint(ge=256)] = None
|
|
370
373
|
cpu_limit: Optional[int] = None
|
|
371
374
|
|
|
372
375
|
|
|
373
376
|
class DaemonUpdateRequest(BaseCoreApiModel):
|
|
374
|
-
command: Optional[
|
|
375
|
-
|
|
376
|
-
|
|
377
|
+
command: Optional[
|
|
378
|
+
constr(pattern=r"^[!-~](?:[ -~]*[!-~])?$", min_length=1, max_length=65535)
|
|
379
|
+
] = None
|
|
377
380
|
nodes_ids: Optional[List[int]] = None
|
|
378
381
|
memory_limit: Optional[conint(ge=256)] = None
|
|
379
382
|
cpu_limit: Optional[int] = None
|
|
@@ -557,6 +560,258 @@ class HttpRetryProperties(BaseCoreApiModel):
|
|
|
557
560
|
conditions: List[HttpRetryConditionEnum]
|
|
558
561
|
|
|
559
562
|
|
|
563
|
+
class Iso3166Alpha2CountryCodeEnum(StrEnum):
|
|
564
|
+
AF = "AF"
|
|
565
|
+
AX = "AX"
|
|
566
|
+
AL = "AL"
|
|
567
|
+
DZ = "DZ"
|
|
568
|
+
AS = "AS"
|
|
569
|
+
AD = "AD"
|
|
570
|
+
AO = "AO"
|
|
571
|
+
AI = "AI"
|
|
572
|
+
AQ = "AQ"
|
|
573
|
+
AG = "AG"
|
|
574
|
+
AR = "AR"
|
|
575
|
+
AM = "AM"
|
|
576
|
+
AW = "AW"
|
|
577
|
+
AU = "AU"
|
|
578
|
+
AT = "AT"
|
|
579
|
+
AZ = "AZ"
|
|
580
|
+
BS = "BS"
|
|
581
|
+
BH = "BH"
|
|
582
|
+
BD = "BD"
|
|
583
|
+
BB = "BB"
|
|
584
|
+
BY = "BY"
|
|
585
|
+
BE = "BE"
|
|
586
|
+
BZ = "BZ"
|
|
587
|
+
BJ = "BJ"
|
|
588
|
+
BM = "BM"
|
|
589
|
+
BT = "BT"
|
|
590
|
+
BO = "BO"
|
|
591
|
+
BQ = "BQ"
|
|
592
|
+
BA = "BA"
|
|
593
|
+
BW = "BW"
|
|
594
|
+
BV = "BV"
|
|
595
|
+
BR = "BR"
|
|
596
|
+
IO = "IO"
|
|
597
|
+
BN = "BN"
|
|
598
|
+
BG = "BG"
|
|
599
|
+
BF = "BF"
|
|
600
|
+
BI = "BI"
|
|
601
|
+
CV = "CV"
|
|
602
|
+
KH = "KH"
|
|
603
|
+
CM = "CM"
|
|
604
|
+
CA = "CA"
|
|
605
|
+
KY = "KY"
|
|
606
|
+
CF = "CF"
|
|
607
|
+
TD = "TD"
|
|
608
|
+
CL = "CL"
|
|
609
|
+
CN = "CN"
|
|
610
|
+
CX = "CX"
|
|
611
|
+
CC = "CC"
|
|
612
|
+
CO = "CO"
|
|
613
|
+
KM = "KM"
|
|
614
|
+
CG = "CG"
|
|
615
|
+
CD = "CD"
|
|
616
|
+
CK = "CK"
|
|
617
|
+
CR = "CR"
|
|
618
|
+
CI = "CI"
|
|
619
|
+
HR = "HR"
|
|
620
|
+
CU = "CU"
|
|
621
|
+
CW = "CW"
|
|
622
|
+
CY = "CY"
|
|
623
|
+
CZ = "CZ"
|
|
624
|
+
DK = "DK"
|
|
625
|
+
DJ = "DJ"
|
|
626
|
+
DM = "DM"
|
|
627
|
+
DO = "DO"
|
|
628
|
+
EC = "EC"
|
|
629
|
+
EG = "EG"
|
|
630
|
+
SV = "SV"
|
|
631
|
+
GQ = "GQ"
|
|
632
|
+
ER = "ER"
|
|
633
|
+
EE = "EE"
|
|
634
|
+
SZ = "SZ"
|
|
635
|
+
ET = "ET"
|
|
636
|
+
FK = "FK"
|
|
637
|
+
FO = "FO"
|
|
638
|
+
FJ = "FJ"
|
|
639
|
+
FI = "FI"
|
|
640
|
+
FR = "FR"
|
|
641
|
+
GF = "GF"
|
|
642
|
+
PF = "PF"
|
|
643
|
+
TF = "TF"
|
|
644
|
+
GA = "GA"
|
|
645
|
+
GM = "GM"
|
|
646
|
+
GE = "GE"
|
|
647
|
+
DE = "DE"
|
|
648
|
+
GH = "GH"
|
|
649
|
+
GI = "GI"
|
|
650
|
+
GR = "GR"
|
|
651
|
+
GL = "GL"
|
|
652
|
+
GD = "GD"
|
|
653
|
+
GP = "GP"
|
|
654
|
+
GU = "GU"
|
|
655
|
+
GT = "GT"
|
|
656
|
+
GG = "GG"
|
|
657
|
+
GN = "GN"
|
|
658
|
+
GW = "GW"
|
|
659
|
+
GY = "GY"
|
|
660
|
+
HT = "HT"
|
|
661
|
+
HM = "HM"
|
|
662
|
+
VA = "VA"
|
|
663
|
+
HN = "HN"
|
|
664
|
+
HK = "HK"
|
|
665
|
+
HU = "HU"
|
|
666
|
+
IS = "IS"
|
|
667
|
+
IN = "IN"
|
|
668
|
+
ID = "ID"
|
|
669
|
+
IR = "IR"
|
|
670
|
+
IQ = "IQ"
|
|
671
|
+
IE = "IE"
|
|
672
|
+
IM = "IM"
|
|
673
|
+
IL = "IL"
|
|
674
|
+
IT = "IT"
|
|
675
|
+
JM = "JM"
|
|
676
|
+
JP = "JP"
|
|
677
|
+
JE = "JE"
|
|
678
|
+
JO = "JO"
|
|
679
|
+
KZ = "KZ"
|
|
680
|
+
KE = "KE"
|
|
681
|
+
KI = "KI"
|
|
682
|
+
KP = "KP"
|
|
683
|
+
KR = "KR"
|
|
684
|
+
KW = "KW"
|
|
685
|
+
KG = "KG"
|
|
686
|
+
LA = "LA"
|
|
687
|
+
LV = "LV"
|
|
688
|
+
LB = "LB"
|
|
689
|
+
LS = "LS"
|
|
690
|
+
LR = "LR"
|
|
691
|
+
LY = "LY"
|
|
692
|
+
LI = "LI"
|
|
693
|
+
LT = "LT"
|
|
694
|
+
LU = "LU"
|
|
695
|
+
MO = "MO"
|
|
696
|
+
MG = "MG"
|
|
697
|
+
MW = "MW"
|
|
698
|
+
MY = "MY"
|
|
699
|
+
MV = "MV"
|
|
700
|
+
ML = "ML"
|
|
701
|
+
MT = "MT"
|
|
702
|
+
MH = "MH"
|
|
703
|
+
MQ = "MQ"
|
|
704
|
+
MR = "MR"
|
|
705
|
+
MU = "MU"
|
|
706
|
+
YT = "YT"
|
|
707
|
+
MX = "MX"
|
|
708
|
+
FM = "FM"
|
|
709
|
+
MD = "MD"
|
|
710
|
+
MC = "MC"
|
|
711
|
+
MN = "MN"
|
|
712
|
+
ME = "ME"
|
|
713
|
+
MS = "MS"
|
|
714
|
+
MA = "MA"
|
|
715
|
+
MZ = "MZ"
|
|
716
|
+
MM = "MM"
|
|
717
|
+
NA = "NA"
|
|
718
|
+
NR = "NR"
|
|
719
|
+
NP = "NP"
|
|
720
|
+
NL = "NL"
|
|
721
|
+
NC = "NC"
|
|
722
|
+
NZ = "NZ"
|
|
723
|
+
NI = "NI"
|
|
724
|
+
NE = "NE"
|
|
725
|
+
NG = "NG"
|
|
726
|
+
NU = "NU"
|
|
727
|
+
NF = "NF"
|
|
728
|
+
MK = "MK"
|
|
729
|
+
MP = "MP"
|
|
730
|
+
NO = "NO"
|
|
731
|
+
OM = "OM"
|
|
732
|
+
PK = "PK"
|
|
733
|
+
PW = "PW"
|
|
734
|
+
PS = "PS"
|
|
735
|
+
PA = "PA"
|
|
736
|
+
PG = "PG"
|
|
737
|
+
PY = "PY"
|
|
738
|
+
PE = "PE"
|
|
739
|
+
PH = "PH"
|
|
740
|
+
PN = "PN"
|
|
741
|
+
PL = "PL"
|
|
742
|
+
PT = "PT"
|
|
743
|
+
PR = "PR"
|
|
744
|
+
QA = "QA"
|
|
745
|
+
RE = "RE"
|
|
746
|
+
RO = "RO"
|
|
747
|
+
RU = "RU"
|
|
748
|
+
RW = "RW"
|
|
749
|
+
BL = "BL"
|
|
750
|
+
SH = "SH"
|
|
751
|
+
KN = "KN"
|
|
752
|
+
LC = "LC"
|
|
753
|
+
MF = "MF"
|
|
754
|
+
PM = "PM"
|
|
755
|
+
VC = "VC"
|
|
756
|
+
WS = "WS"
|
|
757
|
+
SM = "SM"
|
|
758
|
+
ST = "ST"
|
|
759
|
+
SA = "SA"
|
|
760
|
+
SN = "SN"
|
|
761
|
+
RS = "RS"
|
|
762
|
+
SC = "SC"
|
|
763
|
+
SL = "SL"
|
|
764
|
+
SG = "SG"
|
|
765
|
+
SX = "SX"
|
|
766
|
+
SK = "SK"
|
|
767
|
+
SI = "SI"
|
|
768
|
+
SB = "SB"
|
|
769
|
+
SO = "SO"
|
|
770
|
+
ZA = "ZA"
|
|
771
|
+
GS = "GS"
|
|
772
|
+
SS = "SS"
|
|
773
|
+
ES = "ES"
|
|
774
|
+
LK = "LK"
|
|
775
|
+
SD = "SD"
|
|
776
|
+
SR = "SR"
|
|
777
|
+
SJ = "SJ"
|
|
778
|
+
SE = "SE"
|
|
779
|
+
CH = "CH"
|
|
780
|
+
SY = "SY"
|
|
781
|
+
TW = "TW"
|
|
782
|
+
TJ = "TJ"
|
|
783
|
+
TZ = "TZ"
|
|
784
|
+
TH = "TH"
|
|
785
|
+
TL = "TL"
|
|
786
|
+
TG = "TG"
|
|
787
|
+
TK = "TK"
|
|
788
|
+
TO = "TO"
|
|
789
|
+
TT = "TT"
|
|
790
|
+
TN = "TN"
|
|
791
|
+
TR = "TR"
|
|
792
|
+
TM = "TM"
|
|
793
|
+
TC = "TC"
|
|
794
|
+
TV = "TV"
|
|
795
|
+
UG = "UG"
|
|
796
|
+
UA = "UA"
|
|
797
|
+
AE = "AE"
|
|
798
|
+
GB = "GB"
|
|
799
|
+
US = "US"
|
|
800
|
+
UM = "UM"
|
|
801
|
+
UY = "UY"
|
|
802
|
+
UZ = "UZ"
|
|
803
|
+
VU = "VU"
|
|
804
|
+
VE = "VE"
|
|
805
|
+
VN = "VN"
|
|
806
|
+
VG = "VG"
|
|
807
|
+
VI = "VI"
|
|
808
|
+
WF = "WF"
|
|
809
|
+
EH = "EH"
|
|
810
|
+
YE = "YE"
|
|
811
|
+
ZM = "ZM"
|
|
812
|
+
ZW = "ZW"
|
|
813
|
+
|
|
814
|
+
|
|
560
815
|
class HealthStatusEnum(StrEnum):
|
|
561
816
|
UP = "up"
|
|
562
817
|
MAINTENANCE = "maintenance"
|
|
@@ -840,6 +1095,8 @@ class ObjectModelNameEnum(StrEnum):
|
|
|
840
1095
|
CLUSTERS_LOAD_BALANCING_PROPERTIES = "ClustersLoadBalancingProperties"
|
|
841
1096
|
CLUSTERS_FIREWALL_PROPERTIES = "ClustersFirewallProperties"
|
|
842
1097
|
CLUSTERS_OS_PROPERTIES = "ClustersOsProperties"
|
|
1098
|
+
PROJECT = "Project"
|
|
1099
|
+
PROJECT_ENVIRONMENT = "ProjectEnvironment"
|
|
843
1100
|
|
|
844
1101
|
|
|
845
1102
|
class PhpExtensionEnum(StrEnum):
|
|
@@ -991,7 +1248,9 @@ class SshKeyCreatePublicRequest(BaseCoreApiModel):
|
|
|
991
1248
|
|
|
992
1249
|
|
|
993
1250
|
class SecurityTxtPolicyCreateRequest(BaseCoreApiModel):
|
|
1251
|
+
name: constr(pattern=r"^[a-zA-Z0-9-_ ]+$", min_length=1, max_length=32)
|
|
994
1252
|
cluster_id: int
|
|
1253
|
+
is_default: bool
|
|
995
1254
|
expires_timestamp: datetime
|
|
996
1255
|
email_contacts: List[EmailStr]
|
|
997
1256
|
url_contacts: List[AnyUrl]
|
|
@@ -1013,6 +1272,8 @@ class SecurityTxtPolicyCreateRequest(BaseCoreApiModel):
|
|
|
1013
1272
|
|
|
1014
1273
|
|
|
1015
1274
|
class SecurityTxtPolicyUpdateRequest(BaseCoreApiModel):
|
|
1275
|
+
name: constr(pattern=r"^[a-zA-Z0-9-_ ]+$", min_length=1, max_length=32)
|
|
1276
|
+
is_default: Optional[bool] = None
|
|
1016
1277
|
expires_timestamp: Optional[datetime] = None
|
|
1017
1278
|
email_contacts: Optional[List[EmailStr]] = None
|
|
1018
1279
|
url_contacts: Optional[List[AnyUrl]] = None
|
|
@@ -1046,6 +1307,7 @@ class RegionIncludes(BaseCoreApiModel):
|
|
|
1046
1307
|
class RegionResource(BaseCoreApiModel):
|
|
1047
1308
|
id: int
|
|
1048
1309
|
name: constr(pattern=r"^[A-Z0-9-]+$", min_length=1, max_length=32)
|
|
1310
|
+
iso_3166_alpha_2_country_code: Iso3166Alpha2CountryCodeEnum
|
|
1049
1311
|
includes: RegionIncludes
|
|
1050
1312
|
|
|
1051
1313
|
|
|
@@ -1211,6 +1473,7 @@ class VirtualHostServerSoftwareNameEnum(StrEnum):
|
|
|
1211
1473
|
|
|
1212
1474
|
|
|
1213
1475
|
class VirtualHostUpdateRequest(BaseCoreApiModel):
|
|
1476
|
+
domain: Optional[str] = None
|
|
1214
1477
|
server_aliases: Optional[List[str]] = None
|
|
1215
1478
|
document_root: Optional[str] = None
|
|
1216
1479
|
fpm_pool_id: Optional[int] = None
|
|
@@ -1390,6 +1653,7 @@ class DatabaseResource(BaseCoreApiModel):
|
|
|
1390
1653
|
optimizing_enabled: bool
|
|
1391
1654
|
backups_enabled: bool
|
|
1392
1655
|
deployment_status: DeploymentStatusEnum
|
|
1656
|
+
project_environment_id: int | None
|
|
1393
1657
|
includes: DatabaseIncludes
|
|
1394
1658
|
|
|
1395
1659
|
|
|
@@ -1632,6 +1896,7 @@ class RedisInstanceResource(BaseCoreApiModel):
|
|
|
1632
1896
|
max_databases: int
|
|
1633
1897
|
eviction_policy: RedisEvictionPolicyEnum
|
|
1634
1898
|
deployment_status: DeploymentStatusEnum
|
|
1899
|
+
project_environment_id: int | None
|
|
1635
1900
|
includes: RedisInstanceIncludes
|
|
1636
1901
|
|
|
1637
1902
|
|
|
@@ -1660,6 +1925,8 @@ class SecurityTxtPolicyResource(BaseCoreApiModel):
|
|
|
1660
1925
|
created_at: datetime
|
|
1661
1926
|
updated_at: datetime
|
|
1662
1927
|
cluster_id: int
|
|
1928
|
+
name: constr(pattern=r"^[a-zA-Z0-9-_ ]+$", min_length=1, max_length=32)
|
|
1929
|
+
is_default: bool
|
|
1663
1930
|
expires_timestamp: datetime
|
|
1664
1931
|
email_contacts: List[EmailStr]
|
|
1665
1932
|
url_contacts: List[AnyUrl]
|
|
@@ -1685,6 +1952,7 @@ class TaskCollectionResource(BaseCoreApiModel):
|
|
|
1685
1952
|
uuid: UUID4
|
|
1686
1953
|
description: constr(pattern=r"^[ -~]+$", min_length=1, max_length=65535)
|
|
1687
1954
|
collection_type: TaskCollectionTypeEnum
|
|
1955
|
+
request_id: UUID4 | None
|
|
1688
1956
|
cluster_id: Optional[int]
|
|
1689
1957
|
reference: constr(pattern=r"^[a-zA-Z0-9-_ ]+$", min_length=1, max_length=255)
|
|
1690
1958
|
includes: TaskCollectionIncludes
|
|
@@ -1838,7 +2106,7 @@ class CronResource(BaseCoreApiModel):
|
|
|
1838
2106
|
node_id: int
|
|
1839
2107
|
name: constr(pattern=r"^[a-z0-9-_]+$", min_length=1, max_length=64)
|
|
1840
2108
|
unix_user_id: int
|
|
1841
|
-
command: constr(pattern=r"^[ -~]
|
|
2109
|
+
command: constr(pattern=r"^[!-~](?:[ -~]*[!-~])?$", min_length=1, max_length=65535)
|
|
1842
2110
|
email_address: Optional[EmailStr]
|
|
1843
2111
|
schedule: str
|
|
1844
2112
|
error_count: int
|
|
@@ -1864,7 +2132,7 @@ class DaemonResource(BaseCoreApiModel):
|
|
|
1864
2132
|
cluster_id: int
|
|
1865
2133
|
name: constr(pattern=r"^[a-z0-9-_]+$", min_length=1, max_length=64)
|
|
1866
2134
|
unix_user_id: int
|
|
1867
|
-
command: constr(pattern=r"^[ -~]
|
|
2135
|
+
command: constr(pattern=r"^[!-~](?:[ -~]*[!-~])?$", min_length=1, max_length=65535)
|
|
1868
2136
|
nodes_ids: List[int]
|
|
1869
2137
|
memory_limit: Optional[conint(ge=256)]
|
|
1870
2138
|
cpu_limit: Optional[int]
|
|
@@ -2285,6 +2553,7 @@ class DomainRouterResource(BaseCoreApiModel):
|
|
|
2285
2553
|
domain: str
|
|
2286
2554
|
virtual_host_id: Optional[int]
|
|
2287
2555
|
url_redirect_id: Optional[int]
|
|
2556
|
+
n8n_instance_id: Optional[int]
|
|
2288
2557
|
category: DomainRouterCategoryEnum
|
|
2289
2558
|
cluster_id: int
|
|
2290
2559
|
node_id: Optional[int]
|
|
@@ -2387,7 +2656,7 @@ class RequestLogResource(BaseCoreApiModel):
|
|
|
2387
2656
|
|
|
2388
2657
|
|
|
2389
2658
|
class ObjectLogIncludes(BaseCoreApiModel):
|
|
2390
|
-
|
|
2659
|
+
pass
|
|
2391
2660
|
|
|
2392
2661
|
|
|
2393
2662
|
class ObjectLogResource(BaseCoreApiModel):
|
|
@@ -3012,6 +3281,7 @@ class SpecificationNameEnum(StrEnum):
|
|
|
3012
3281
|
CLUSTER_SUPPORTS_UNIX_USER_BORG_REPOSITORIES = (
|
|
3013
3282
|
"Cluster supports UNIX user Borg repositories"
|
|
3014
3283
|
)
|
|
3284
|
+
CLUSTER_SUPPORTS_PROJECTS = "Cluster supports projects"
|
|
3015
3285
|
|
|
3016
3286
|
|
|
3017
3287
|
class TableInnodbDataLengths(BaseCoreApiModel):
|
|
@@ -3209,6 +3479,7 @@ class DomainRoutersSearchRequest(BaseCoreApiModel):
|
|
|
3209
3479
|
domain: Optional[str] = None
|
|
3210
3480
|
virtual_host_id: Optional[int] = None
|
|
3211
3481
|
url_redirect_id: Optional[int] = None
|
|
3482
|
+
n8n_instance_id: Optional[int] = None
|
|
3212
3483
|
category: Optional[DomainRouterCategoryEnum] = None
|
|
3213
3484
|
cluster_id: Optional[int] = None
|
|
3214
3485
|
node_id: Optional[int] = None
|
|
@@ -3348,6 +3619,7 @@ class N8nInstanceResource(BaseCoreApiModel):
|
|
|
3348
3619
|
domain: str
|
|
3349
3620
|
name: constr(pattern=r"^[a-z0-9-_]+$", min_length=1, max_length=64)
|
|
3350
3621
|
cluster_id: int
|
|
3622
|
+
deployment_status: DeploymentStatusEnum
|
|
3351
3623
|
includes: N8nInstanceIncludes
|
|
3352
3624
|
|
|
3353
3625
|
|
|
@@ -3360,6 +3632,7 @@ class RedisInstancesSearchRequest(BaseCoreApiModel):
|
|
|
3360
3632
|
|
|
3361
3633
|
class RegionsSearchRequest(BaseCoreApiModel):
|
|
3362
3634
|
name: Optional[str] = None
|
|
3635
|
+
iso_3166_alpha_2_country_code: Iso3166Alpha2CountryCodeEnum | None = None
|
|
3363
3636
|
|
|
3364
3637
|
|
|
3365
3638
|
class RequestLogsSearchRequest(BaseCoreApiModel):
|
|
@@ -17,27 +17,21 @@ class BasicAuthenticationRealms(Resource):
|
|
|
17
17
|
query_parameters={},
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
-
return DtoResponse.
|
|
20
|
+
return DtoResponse.from_responses(
|
|
21
21
|
local_response, models.BasicAuthenticationRealmResource
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
def list_basic_authentication_realms(
|
|
25
25
|
self,
|
|
26
26
|
*,
|
|
27
|
-
page: int = 1,
|
|
28
|
-
per_page: int = 50,
|
|
29
27
|
include_filters: models.BasicAuthenticationRealmsSearchRequest | None = None,
|
|
30
28
|
includes: list[str] | None = None,
|
|
31
29
|
) -> DtoResponse[list[models.BasicAuthenticationRealmResource]]:
|
|
32
|
-
|
|
30
|
+
local_responses = self.api_connector.send_or_fail_with_auto_pagination(
|
|
33
31
|
"GET",
|
|
34
32
|
"/api/v1/basic-authentication-realms",
|
|
35
33
|
data=None,
|
|
36
|
-
query_parameters=
|
|
37
|
-
"page": page,
|
|
38
|
-
"per_page": per_page,
|
|
39
|
-
}
|
|
40
|
-
| (
|
|
34
|
+
query_parameters=(
|
|
41
35
|
include_filters.model_dump(exclude_unset=True)
|
|
42
36
|
if include_filters
|
|
43
37
|
else {}
|
|
@@ -45,8 +39,8 @@ class BasicAuthenticationRealms(Resource):
|
|
|
45
39
|
| construct_includes_query_parameter(includes),
|
|
46
40
|
)
|
|
47
41
|
|
|
48
|
-
return DtoResponse.
|
|
49
|
-
|
|
42
|
+
return DtoResponse.from_responses(
|
|
43
|
+
local_responses, models.BasicAuthenticationRealmResource
|
|
50
44
|
)
|
|
51
45
|
|
|
52
46
|
def read_basic_authentication_realm(
|
|
@@ -62,7 +56,7 @@ class BasicAuthenticationRealms(Resource):
|
|
|
62
56
|
query_parameters=construct_includes_query_parameter(includes),
|
|
63
57
|
)
|
|
64
58
|
|
|
65
|
-
return DtoResponse.
|
|
59
|
+
return DtoResponse.from_responses(
|
|
66
60
|
local_response,
|
|
67
61
|
models.BasicAuthenticationRealmResource,
|
|
68
62
|
)
|
|
@@ -80,7 +74,7 @@ class BasicAuthenticationRealms(Resource):
|
|
|
80
74
|
query_parameters={},
|
|
81
75
|
)
|
|
82
76
|
|
|
83
|
-
return DtoResponse.
|
|
77
|
+
return DtoResponse.from_responses(
|
|
84
78
|
local_response, models.BasicAuthenticationRealmResource
|
|
85
79
|
)
|
|
86
80
|
|
|
@@ -96,4 +90,4 @@ class BasicAuthenticationRealms(Resource):
|
|
|
96
90
|
query_parameters={},
|
|
97
91
|
)
|
|
98
92
|
|
|
99
|
-
return DtoResponse.
|
|
93
|
+
return DtoResponse.from_responses(local_response, models.DetailMessage)
|
|
@@ -22,25 +22,19 @@ class BorgArchives(Resource):
|
|
|
22
22
|
},
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
-
return DtoResponse.
|
|
25
|
+
return DtoResponse.from_responses(local_response, models.TaskCollectionResource)
|
|
26
26
|
|
|
27
27
|
def list_borg_archives(
|
|
28
28
|
self,
|
|
29
29
|
*,
|
|
30
|
-
page: int = 1,
|
|
31
|
-
per_page: int = 50,
|
|
32
30
|
include_filters: models.BorgArchivesSearchRequest | None = None,
|
|
33
31
|
includes: list[str] | None = None,
|
|
34
32
|
) -> DtoResponse[list[models.BorgArchiveResource]]:
|
|
35
|
-
|
|
33
|
+
local_responses = self.api_connector.send_or_fail_with_auto_pagination(
|
|
36
34
|
"GET",
|
|
37
35
|
"/api/v1/borg-archives",
|
|
38
36
|
data=None,
|
|
39
|
-
query_parameters=
|
|
40
|
-
"page": page,
|
|
41
|
-
"per_page": per_page,
|
|
42
|
-
}
|
|
43
|
-
| (
|
|
37
|
+
query_parameters=(
|
|
44
38
|
include_filters.model_dump(exclude_unset=True)
|
|
45
39
|
if include_filters
|
|
46
40
|
else {}
|
|
@@ -48,7 +42,7 @@ class BorgArchives(Resource):
|
|
|
48
42
|
| construct_includes_query_parameter(includes),
|
|
49
43
|
)
|
|
50
44
|
|
|
51
|
-
return DtoResponse.
|
|
45
|
+
return DtoResponse.from_responses(local_responses, models.BorgArchiveResource)
|
|
52
46
|
|
|
53
47
|
def read_borg_archive(
|
|
54
48
|
self,
|
|
@@ -63,7 +57,7 @@ class BorgArchives(Resource):
|
|
|
63
57
|
query_parameters=construct_includes_query_parameter(includes),
|
|
64
58
|
)
|
|
65
59
|
|
|
66
|
-
return DtoResponse.
|
|
60
|
+
return DtoResponse.from_responses(local_response, models.BorgArchiveResource)
|
|
67
61
|
|
|
68
62
|
def get_borg_archive_metadata(
|
|
69
63
|
self,
|
|
@@ -77,7 +71,7 @@ class BorgArchives(Resource):
|
|
|
77
71
|
query_parameters={},
|
|
78
72
|
)
|
|
79
73
|
|
|
80
|
-
return DtoResponse.
|
|
74
|
+
return DtoResponse.from_responses(local_response, models.BorgArchiveMetadata)
|
|
81
75
|
|
|
82
76
|
def restore_borg_archive(
|
|
83
77
|
self,
|
|
@@ -96,7 +90,7 @@ class BorgArchives(Resource):
|
|
|
96
90
|
},
|
|
97
91
|
)
|
|
98
92
|
|
|
99
|
-
return DtoResponse.
|
|
93
|
+
return DtoResponse.from_responses(local_response, models.TaskCollectionResource)
|
|
100
94
|
|
|
101
95
|
def list_borg_archive_contents(
|
|
102
96
|
self,
|
|
@@ -113,7 +107,7 @@ class BorgArchives(Resource):
|
|
|
113
107
|
},
|
|
114
108
|
)
|
|
115
109
|
|
|
116
|
-
return DtoResponse.
|
|
110
|
+
return DtoResponse.from_responses(local_response, models.BorgArchiveContent)
|
|
117
111
|
|
|
118
112
|
def download_borg_archive(
|
|
119
113
|
self,
|
|
@@ -132,4 +126,4 @@ class BorgArchives(Resource):
|
|
|
132
126
|
},
|
|
133
127
|
)
|
|
134
128
|
|
|
135
|
-
return DtoResponse.
|
|
129
|
+
return DtoResponse.from_responses(local_response, models.TaskCollectionResource)
|