stackit-sqlserverflex 1.3.0__py3-none-any.whl → 1.5.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.
Files changed (87) hide show
  1. stackit/sqlserverflex/__init__.py +128 -88
  2. stackit/sqlserverflex/api/default_api.py +1977 -1535
  3. stackit/sqlserverflex/api_client.py +1 -1
  4. stackit/sqlserverflex/configuration.py +1 -1
  5. stackit/sqlserverflex/exceptions.py +1 -1
  6. stackit/sqlserverflex/models/__init__.py +69 -47
  7. stackit/sqlserverflex/models/{restore_running_restore.py → backup_running_restore.py} +11 -11
  8. stackit/sqlserverflex/models/backup_sort.py +47 -0
  9. stackit/sqlserverflex/models/create_database_payload.py +13 -17
  10. stackit/sqlserverflex/models/create_database_response.py +3 -3
  11. stackit/sqlserverflex/models/create_instance_payload.py +39 -39
  12. stackit/sqlserverflex/models/{instance_documentation_options.py → create_instance_payload_network.py} +17 -13
  13. stackit/sqlserverflex/models/create_instance_response.py +3 -3
  14. stackit/sqlserverflex/models/create_user_payload.py +9 -5
  15. stackit/sqlserverflex/models/create_user_response.py +35 -10
  16. stackit/sqlserverflex/models/{mssql_database_collation.py → database_getcollation.py} +5 -5
  17. stackit/sqlserverflex/models/{mssql_database_compatibility.py → database_getcompatibility.py} +5 -5
  18. stackit/sqlserverflex/models/database_roles.py +84 -0
  19. stackit/sqlserverflex/models/database_sort.py +45 -0
  20. stackit/sqlserverflex/models/{instance_error.py → error.py} +12 -14
  21. stackit/sqlserverflex/models/{list_users_response.py → external_s3.py} +27 -21
  22. stackit/sqlserverflex/models/flavor_sort.py +53 -0
  23. stackit/sqlserverflex/models/{instance_flavor_entry.py → flavor_storage_classes_storage_class.py} +13 -17
  24. stackit/sqlserverflex/models/{storage_range.py → flavor_storage_range.py} +8 -8
  25. stackit/sqlserverflex/models/get_backup_response.py +12 -18
  26. stackit/sqlserverflex/models/get_database_response.py +20 -10
  27. stackit/sqlserverflex/models/get_instance_response.py +85 -10
  28. stackit/sqlserverflex/models/get_user_response.py +19 -10
  29. stackit/sqlserverflex/models/instance_edition.py +38 -0
  30. stackit/sqlserverflex/models/{database_documentation_create_database_request_options.py → instance_encryption.py} +14 -14
  31. stackit/sqlserverflex/models/{single_database.py → instance_network.py} +21 -16
  32. stackit/sqlserverflex/models/instance_network_access_scope.py +37 -0
  33. stackit/sqlserverflex/models/instance_sort.py +45 -0
  34. stackit/sqlserverflex/models/{type.py → instance_version.py} +5 -10
  35. stackit/sqlserverflex/models/instance_version_opt.py +36 -0
  36. stackit/sqlserverflex/models/{backup.py → list_backup.py} +17 -19
  37. stackit/sqlserverflex/models/{backup_list_backups_response_grouped.py → list_backup_response.py} +18 -12
  38. stackit/sqlserverflex/models/list_backups_response.py +17 -17
  39. stackit/sqlserverflex/models/list_collations_response.py +5 -5
  40. stackit/sqlserverflex/models/list_compatibility_response.py +6 -6
  41. stackit/sqlserverflex/models/{list_restore_jobs_response.py → list_current_running_restore_jobs.py} +10 -8
  42. stackit/sqlserverflex/models/{flavor.py → list_database.py} +12 -17
  43. stackit/sqlserverflex/models/list_databases_response.py +13 -7
  44. stackit/sqlserverflex/models/{instance.py → list_flavors.py} +45 -45
  45. stackit/sqlserverflex/models/list_flavors_response.py +13 -7
  46. stackit/sqlserverflex/models/{user_response_user.py → list_instance.py} +22 -18
  47. stackit/sqlserverflex/models/list_instances_response.py +20 -16
  48. stackit/sqlserverflex/models/list_roles_response.py +3 -3
  49. stackit/sqlserverflex/models/list_storages_response.py +23 -7
  50. stackit/sqlserverflex/models/list_user.py +85 -0
  51. stackit/sqlserverflex/models/list_user_response.py +104 -0
  52. stackit/sqlserverflex/models/list_versions_response.py +19 -4
  53. stackit/sqlserverflex/models/{instance_documentation_storage.py → pagination.py} +15 -11
  54. stackit/sqlserverflex/models/partial_update_instance_payload.py +42 -20
  55. stackit/sqlserverflex/models/{database.py → partial_update_instance_payload_network.py} +8 -10
  56. stackit/sqlserverflex/models/replicas.py +37 -0
  57. stackit/sqlserverflex/models/reset_user_response.py +15 -10
  58. stackit/sqlserverflex/models/{host.py → restore_database_from_backup_payload.py} +18 -20
  59. stackit/sqlserverflex/models/restore_database_from_backup_payload_source.py +150 -0
  60. stackit/sqlserverflex/models/s3file_info.py +84 -0
  61. stackit/sqlserverflex/models/source_backup.py +90 -0
  62. stackit/sqlserverflex/models/source_external_s3.py +107 -0
  63. stackit/sqlserverflex/models/state.py +41 -0
  64. stackit/sqlserverflex/models/storage.py +6 -4
  65. stackit/sqlserverflex/models/storage_create.py +84 -0
  66. stackit/sqlserverflex/models/{acl.py → storage_update.py} +9 -9
  67. stackit/sqlserverflex/models/{trigger_database_restore_payload.py → trigger_restore_payload.py} +8 -7
  68. stackit/sqlserverflex/models/update_instance_payload.py +43 -19
  69. stackit/sqlserverflex/models/{instance_documentation_acl.py → update_instance_payload_network.py} +8 -8
  70. stackit/sqlserverflex/models/{instance_list_instance.py → update_instance_protection_payload.py} +9 -11
  71. stackit/sqlserverflex/models/update_instance_protection_response.py +83 -0
  72. stackit/sqlserverflex/models/user_sort.py +43 -0
  73. stackit/sqlserverflex/models/{host_metric.py → validation_error.py} +24 -22
  74. stackit/sqlserverflex/models/{instance_list_user.py → validation_error_validation_inner.py} +10 -10
  75. stackit/sqlserverflex/models/{database_options.py → version.py} +23 -15
  76. stackit/sqlserverflex/rest.py +1 -1
  77. {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.5.0.dist-info}/METADATA +4 -4
  78. stackit_sqlserverflex-1.5.0.dist-info/RECORD +84 -0
  79. {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.5.0.dist-info}/WHEEL +1 -1
  80. stackit/sqlserverflex/models/data_point.py +0 -90
  81. stackit/sqlserverflex/models/list_metrics_response.py +0 -94
  82. stackit/sqlserverflex/models/single_user.py +0 -110
  83. stackit/sqlserverflex/models/update_instance_response.py +0 -88
  84. stackit/sqlserverflex/models/user.py +0 -101
  85. stackit_sqlserverflex-1.3.0.dist-info/RECORD +0 -70
  86. {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.5.0.dist-info}/licenses/LICENSE.md +0 -0
  87. {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.5.0.dist-info}/licenses/NOTICE.txt +0 -0
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -28,19 +28,15 @@ class GetBackupResponse(BaseModel):
28
28
  GetBackupResponse
29
29
  """ # noqa: E501
30
30
 
31
- end_time: Optional[StrictStr] = Field(
32
- default=None, description="Backup end time represents local server time", alias="endTime"
31
+ completion_time: StrictStr = Field(
32
+ description="The time when the backup was completed in RFC3339 format.", alias="completionTime"
33
33
  )
34
- error: Optional[StrictStr] = Field(default=None, description="Backup error")
35
- id: Optional[StrictStr] = Field(default=None, description="Backup id")
36
- labels: Optional[List[StrictStr]] = Field(default=None, description="Backup labels")
37
- name: Optional[StrictStr] = Field(default=None, description="Backup name")
38
- options: Optional[Dict[str, StrictStr]] = Field(default=None, description="Backup specific options")
39
- size: Optional[StrictInt] = Field(default=None, description="Backup size in byte")
40
- start_time: Optional[StrictStr] = Field(
41
- default=None, description="Backup start time represents local server time", alias="startTime"
42
- )
43
- __properties: ClassVar[List[str]] = ["endTime", "error", "id", "labels", "name", "options", "size", "startTime"]
34
+ id: StrictInt = Field(description="The ID of the backup.")
35
+ name: StrictStr = Field(description="The name of the backup.")
36
+ retained_until: StrictStr = Field(description="The time until the backup will be retained.", alias="retainedUntil")
37
+ size: StrictInt = Field(description="The size of the backup in bytes.")
38
+ type: StrictStr = Field(description="The type of the backup, which can be automated or manual triggered.")
39
+ __properties: ClassVar[List[str]] = ["completionTime", "id", "name", "retainedUntil", "size", "type"]
44
40
 
45
41
  model_config = ConfigDict(
46
42
  validate_by_name=True,
@@ -92,14 +88,12 @@ class GetBackupResponse(BaseModel):
92
88
 
93
89
  _obj = cls.model_validate(
94
90
  {
95
- "endTime": obj.get("endTime"),
96
- "error": obj.get("error"),
91
+ "completionTime": obj.get("completionTime"),
97
92
  "id": obj.get("id"),
98
- "labels": obj.get("labels"),
99
93
  "name": obj.get("name"),
100
- "options": obj.get("options"),
94
+ "retainedUntil": obj.get("retainedUntil"),
101
95
  "size": obj.get("size"),
102
- "startTime": obj.get("startTime"),
96
+ "type": obj.get("type"),
103
97
  }
104
98
  )
105
99
  return _obj
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,20 +18,27 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.single_database import SingleDatabase
26
-
27
25
 
28
26
  class GetDatabaseResponse(BaseModel):
29
27
  """
30
28
  GetDatabaseResponse
31
29
  """ # noqa: E501
32
30
 
33
- database: Optional[SingleDatabase] = None
34
- __properties: ClassVar[List[str]] = ["database"]
31
+ collation_name: StrictStr = Field(
32
+ description="The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. ",
33
+ alias="collationName",
34
+ )
35
+ compatibility_level: StrictInt = Field(
36
+ description="CompatibilityLevel of the Database.", alias="compatibilityLevel"
37
+ )
38
+ id: StrictInt = Field(description="The id of the database.")
39
+ name: StrictStr = Field(description="The name of the database.")
40
+ owner: StrictStr = Field(description="The owner of the database.")
41
+ __properties: ClassVar[List[str]] = ["collationName", "compatibilityLevel", "id", "name", "owner"]
35
42
 
36
43
  model_config = ConfigDict(
37
44
  validate_by_name=True,
@@ -70,9 +77,6 @@ class GetDatabaseResponse(BaseModel):
70
77
  exclude=excluded_fields,
71
78
  exclude_none=True,
72
79
  )
73
- # override the default output from pydantic by calling `to_dict()` of database
74
- if self.database:
75
- _dict["database"] = self.database.to_dict()
76
80
  return _dict
77
81
 
78
82
  @classmethod
@@ -85,6 +89,12 @@ class GetDatabaseResponse(BaseModel):
85
89
  return cls.model_validate(obj)
86
90
 
87
91
  _obj = cls.model_validate(
88
- {"database": SingleDatabase.from_dict(obj["database"]) if obj.get("database") is not None else None}
92
+ {
93
+ "collationName": obj.get("collationName"),
94
+ "compatibilityLevel": obj.get("compatibilityLevel"),
95
+ "id": obj.get("id"),
96
+ "name": obj.get("name"),
97
+ "owner": obj.get("owner"),
98
+ }
89
99
  )
90
100
  return _obj
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,11 +18,24 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict
21
+ from pydantic import (
22
+ BaseModel,
23
+ ConfigDict,
24
+ Field,
25
+ StrictBool,
26
+ StrictInt,
27
+ StrictStr,
28
+ )
22
29
  from pydantic_core import to_jsonable_python
23
- from typing_extensions import Self
30
+ from typing_extensions import Annotated, Self
24
31
 
25
- from stackit.sqlserverflex.models.instance import Instance
32
+ from stackit.sqlserverflex.models.instance_edition import InstanceEdition
33
+ from stackit.sqlserverflex.models.instance_encryption import InstanceEncryption
34
+ from stackit.sqlserverflex.models.instance_network import InstanceNetwork
35
+ from stackit.sqlserverflex.models.instance_version import InstanceVersion
36
+ from stackit.sqlserverflex.models.replicas import Replicas
37
+ from stackit.sqlserverflex.models.state import State
38
+ from stackit.sqlserverflex.models.storage import Storage
26
39
 
27
40
 
28
41
  class GetInstanceResponse(BaseModel):
@@ -30,8 +43,45 @@ class GetInstanceResponse(BaseModel):
30
43
  GetInstanceResponse
31
44
  """ # noqa: E501
32
45
 
33
- item: Optional[Instance] = None
34
- __properties: ClassVar[List[str]] = ["item"]
46
+ backup_schedule: StrictStr = Field(
47
+ description="The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.",
48
+ alias="backupSchedule",
49
+ )
50
+ edition: InstanceEdition
51
+ encryption: Optional[InstanceEncryption] = None
52
+ flavor_id: StrictStr = Field(description="The id of the instance flavor.", alias="flavorId")
53
+ id: StrictStr = Field(description="The ID of the instance.")
54
+ is_deletable: StrictBool = Field(description="Whether the instance can be deleted or not.", alias="isDeletable")
55
+ labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=63)]]]] = Field(
56
+ default=None,
57
+ description="A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` ",
58
+ )
59
+ name: StrictStr = Field(description="The name of the instance.")
60
+ network: InstanceNetwork
61
+ replicas: Replicas
62
+ retention_days: StrictInt = Field(
63
+ description="The days for how long the backup files should be stored before cleaned up. 30 to 90",
64
+ alias="retentionDays",
65
+ )
66
+ state: State
67
+ storage: Storage
68
+ version: InstanceVersion
69
+ __properties: ClassVar[List[str]] = [
70
+ "backupSchedule",
71
+ "edition",
72
+ "encryption",
73
+ "flavorId",
74
+ "id",
75
+ "isDeletable",
76
+ "labels",
77
+ "name",
78
+ "network",
79
+ "replicas",
80
+ "retentionDays",
81
+ "state",
82
+ "storage",
83
+ "version",
84
+ ]
35
85
 
36
86
  model_config = ConfigDict(
37
87
  validate_by_name=True,
@@ -70,9 +120,15 @@ class GetInstanceResponse(BaseModel):
70
120
  exclude=excluded_fields,
71
121
  exclude_none=True,
72
122
  )
73
- # override the default output from pydantic by calling `to_dict()` of item
74
- if self.item:
75
- _dict["item"] = self.item.to_dict()
123
+ # override the default output from pydantic by calling `to_dict()` of encryption
124
+ if self.encryption:
125
+ _dict["encryption"] = self.encryption.to_dict()
126
+ # override the default output from pydantic by calling `to_dict()` of network
127
+ if self.network:
128
+ _dict["network"] = self.network.to_dict()
129
+ # override the default output from pydantic by calling `to_dict()` of storage
130
+ if self.storage:
131
+ _dict["storage"] = self.storage.to_dict()
76
132
  return _dict
77
133
 
78
134
  @classmethod
@@ -84,5 +140,24 @@ class GetInstanceResponse(BaseModel):
84
140
  if not isinstance(obj, dict):
85
141
  return cls.model_validate(obj)
86
142
 
87
- _obj = cls.model_validate({"item": Instance.from_dict(obj["item"]) if obj.get("item") is not None else None})
143
+ _obj = cls.model_validate(
144
+ {
145
+ "backupSchedule": obj.get("backupSchedule"),
146
+ "edition": obj.get("edition"),
147
+ "encryption": (
148
+ InstanceEncryption.from_dict(obj["encryption"]) if obj.get("encryption") is not None else None
149
+ ),
150
+ "flavorId": obj.get("flavorId"),
151
+ "id": obj.get("id"),
152
+ "isDeletable": obj.get("isDeletable"),
153
+ "labels": obj.get("labels"),
154
+ "name": obj.get("name"),
155
+ "network": InstanceNetwork.from_dict(obj["network"]) if obj.get("network") is not None else None,
156
+ "replicas": obj.get("replicas"),
157
+ "retentionDays": obj.get("retentionDays"),
158
+ "state": obj.get("state"),
159
+ "storage": Storage.from_dict(obj["storage"]) if obj.get("storage") is not None else None,
160
+ "version": obj.get("version"),
161
+ }
162
+ )
88
163
  return _obj
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,20 +18,24 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.user_response_user import UserResponseUser
26
-
27
25
 
28
26
  class GetUserResponse(BaseModel):
29
27
  """
30
28
  GetUserResponse
31
29
  """ # noqa: E501
32
30
 
33
- item: Optional[UserResponseUser] = None
34
- __properties: ClassVar[List[str]] = ["item"]
31
+ default_database: StrictStr = Field(description="The default database for a user of the instance.")
32
+ host: StrictStr = Field(description="The host of the instance in which the user belongs to.")
33
+ id: StrictInt = Field(description="The ID of the user.")
34
+ port: StrictInt = Field(description="The port of the instance in which the user belongs to.")
35
+ roles: List[StrictStr] = Field(description="A list of user roles.")
36
+ status: StrictStr = Field(description="The current status of the user.")
37
+ username: StrictStr = Field(description="The name of the user.")
38
+ __properties: ClassVar[List[str]] = ["default_database", "host", "id", "port", "roles", "status", "username"]
35
39
 
36
40
  model_config = ConfigDict(
37
41
  validate_by_name=True,
@@ -70,9 +74,6 @@ class GetUserResponse(BaseModel):
70
74
  exclude=excluded_fields,
71
75
  exclude_none=True,
72
76
  )
73
- # override the default output from pydantic by calling `to_dict()` of item
74
- if self.item:
75
- _dict["item"] = self.item.to_dict()
76
77
  return _dict
77
78
 
78
79
  @classmethod
@@ -85,6 +86,14 @@ class GetUserResponse(BaseModel):
85
86
  return cls.model_validate(obj)
86
87
 
87
88
  _obj = cls.model_validate(
88
- {"item": UserResponseUser.from_dict(obj["item"]) if obj.get("item") is not None else None}
89
+ {
90
+ "default_database": obj.get("default_database"),
91
+ "host": obj.get("host"),
92
+ "id": obj.get("id"),
93
+ "port": obj.get("port"),
94
+ "roles": obj.get("roles"),
95
+ "status": obj.get("status"),
96
+ "username": obj.get("username"),
97
+ }
89
98
  )
90
99
  return _obj
@@ -0,0 +1,38 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT MSSQL Service API
5
+
6
+ This is the documentation for the STACKIT MSSQL service
7
+
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class InstanceEdition(str, Enum):
24
+ """
25
+ Edition of the MSSQL server instance
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ STANDARD = "Standard"
32
+ ENTERPRISECORE = "EnterpriseCore"
33
+ DEVELOPER = "developer"
34
+
35
+ @classmethod
36
+ def from_json(cls, json_str: str) -> Self:
37
+ """Create an instance of InstanceEdition from a JSON string"""
38
+ return cls(json.loads(json_str))
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -23,17 +23,16 @@ from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
25
 
26
- class DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel):
26
+ class InstanceEncryption(BaseModel):
27
27
  """
28
- DatabaseDocumentationCreateDatabaseRequestOptions
28
+ this defines which key to use for storage encryption
29
29
  """ # noqa: E501
30
30
 
31
- collation: Optional[StrictStr] = Field(default=None, description="Collation of the database")
32
- compatibility_level: Optional[StrictStr] = Field(
33
- default=None, description="CompatibilityLevel of the Database.", alias="compatibilityLevel"
34
- )
35
- owner: StrictStr = Field(description="Name of the owner of the database.")
36
- __properties: ClassVar[List[str]] = ["collation", "compatibilityLevel", "owner"]
31
+ kek_key_id: StrictStr = Field(description="The key identifier", alias="kekKeyId")
32
+ kek_key_ring_id: StrictStr = Field(description="The keyring identifier", alias="kekKeyRingId")
33
+ kek_key_version: StrictStr = Field(description="The key version", alias="kekKeyVersion")
34
+ service_account: StrictStr = Field(alias="serviceAccount")
35
+ __properties: ClassVar[List[str]] = ["kekKeyId", "kekKeyRingId", "kekKeyVersion", "serviceAccount"]
37
36
 
38
37
  model_config = ConfigDict(
39
38
  validate_by_name=True,
@@ -52,7 +51,7 @@ class DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel):
52
51
 
53
52
  @classmethod
54
53
  def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of DatabaseDocumentationCreateDatabaseRequestOptions from a JSON string"""
54
+ """Create an instance of InstanceEncryption from a JSON string"""
56
55
  return cls.from_dict(json.loads(json_str))
57
56
 
58
57
  def to_dict(self) -> Dict[str, Any]:
@@ -76,7 +75,7 @@ class DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel):
76
75
 
77
76
  @classmethod
78
77
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
- """Create an instance of DatabaseDocumentationCreateDatabaseRequestOptions from a dict"""
78
+ """Create an instance of InstanceEncryption from a dict"""
80
79
  if obj is None:
81
80
  return None
82
81
 
@@ -85,9 +84,10 @@ class DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel):
85
84
 
86
85
  _obj = cls.model_validate(
87
86
  {
88
- "collation": obj.get("collation"),
89
- "compatibilityLevel": obj.get("compatibilityLevel"),
90
- "owner": obj.get("owner"),
87
+ "kekKeyId": obj.get("kekKeyId"),
88
+ "kekKeyRingId": obj.get("kekKeyRingId"),
89
+ "kekKeyVersion": obj.get("kekKeyVersion"),
90
+ "serviceAccount": obj.get("serviceAccount"),
91
91
  }
92
92
  )
93
93
  return _obj
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -22,18 +22,23 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.database_options import DatabaseOptions
25
+ from stackit.sqlserverflex.models.instance_network_access_scope import (
26
+ InstanceNetworkAccessScope,
27
+ )
26
28
 
27
29
 
28
- class SingleDatabase(BaseModel):
30
+ class InstanceNetwork(BaseModel):
29
31
  """
30
- SingleDatabase
32
+ The access configuration of the instance
31
33
  """ # noqa: E501
32
34
 
33
- id: Optional[StrictStr] = Field(default=None, description="Database id")
34
- name: Optional[StrictStr] = Field(default=None, description="Database name")
35
- options: Optional[DatabaseOptions] = Field(default=None, description="Database specific options")
36
- __properties: ClassVar[List[str]] = ["id", "name", "options"]
35
+ access_scope: Optional[InstanceNetworkAccessScope] = Field(
36
+ default=InstanceNetworkAccessScope.PUBLIC, alias="accessScope"
37
+ )
38
+ acl: Optional[List[StrictStr]] = Field(default=None, description="List of IPV4 cidr.")
39
+ instance_address: Optional[StrictStr] = Field(default=None, alias="instanceAddress")
40
+ router_address: Optional[StrictStr] = Field(default=None, alias="routerAddress")
41
+ __properties: ClassVar[List[str]] = ["accessScope", "acl", "instanceAddress", "routerAddress"]
37
42
 
38
43
  model_config = ConfigDict(
39
44
  validate_by_name=True,
@@ -52,7 +57,7 @@ class SingleDatabase(BaseModel):
52
57
 
53
58
  @classmethod
54
59
  def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of SingleDatabase from a JSON string"""
60
+ """Create an instance of InstanceNetwork from a JSON string"""
56
61
  return cls.from_dict(json.loads(json_str))
57
62
 
58
63
  def to_dict(self) -> Dict[str, Any]:
@@ -72,14 +77,11 @@ class SingleDatabase(BaseModel):
72
77
  exclude=excluded_fields,
73
78
  exclude_none=True,
74
79
  )
75
- # override the default output from pydantic by calling `to_dict()` of options
76
- if self.options:
77
- _dict["options"] = self.options.to_dict()
78
80
  return _dict
79
81
 
80
82
  @classmethod
81
83
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
- """Create an instance of SingleDatabase from a dict"""
84
+ """Create an instance of InstanceNetwork from a dict"""
83
85
  if obj is None:
84
86
  return None
85
87
 
@@ -88,9 +90,12 @@ class SingleDatabase(BaseModel):
88
90
 
89
91
  _obj = cls.model_validate(
90
92
  {
91
- "id": obj.get("id"),
92
- "name": obj.get("name"),
93
- "options": DatabaseOptions.from_dict(obj["options"]) if obj.get("options") is not None else None,
93
+ "accessScope": (
94
+ obj.get("accessScope") if obj.get("accessScope") is not None else InstanceNetworkAccessScope.PUBLIC
95
+ ),
96
+ "acl": obj.get("acl"),
97
+ "instanceAddress": obj.get("instanceAddress"),
98
+ "routerAddress": obj.get("routerAddress"),
94
99
  }
95
100
  )
96
101
  return _obj
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT MSSQL Service API
5
+
6
+ This is the documentation for the STACKIT MSSQL service
7
+
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class InstanceNetworkAccessScope(str, Enum):
24
+ """
25
+ The network access scope of the instance ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ PUBLIC = "PUBLIC"
32
+ SNA = "SNA"
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of InstanceNetworkAccessScope from a JSON string"""
37
+ return cls(json.loads(json_str))
@@ -0,0 +1,45 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT MSSQL Service API
5
+
6
+ This is the documentation for the STACKIT MSSQL service
7
+
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class InstanceSort(str, Enum):
24
+ """
25
+ InstanceSort
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ INDEX_DOT_DESC = "index.desc"
32
+ INDEX_DOT_ASC = "index.asc"
33
+ ID_DOT_DESC = "id.desc"
34
+ ID_DOT_ASC = "id.asc"
35
+ IS_DELETABLE_DOT_DESC = "is_deletable.desc"
36
+ IS_DELETABLE_DOT_ASC = "is_deletable.asc"
37
+ NAME_DOT_ASC = "name.asc"
38
+ NAME_DOT_DESC = "name.desc"
39
+ STATE_DOT_ASC = "state.asc"
40
+ STATE_DOT_DESC = "state.desc"
41
+
42
+ @classmethod
43
+ def from_json(cls, json_str: str) -> Self:
44
+ """Create an instance of InstanceSort from a JSON string"""
45
+ return cls(json.loads(json_str))
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -20,22 +20,17 @@ from enum import Enum
20
20
  from typing_extensions import Self
21
21
 
22
22
 
23
- class Type(str, Enum):
23
+ class InstanceVersion(str, Enum):
24
24
  """
25
- Type
25
+ The sqlserver version used for the instance.
26
26
  """
27
27
 
28
28
  """
29
29
  allowed enum values
30
30
  """
31
- NOTFOUND = "NotFound"
32
- CREATE = "Create"
33
- READ = "Read"
34
- DELETE = "Delete"
35
- UPDATE = "Update"
36
- VALIDATION = "Validation"
31
+ ENUM_2022 = "2022"
37
32
 
38
33
  @classmethod
39
34
  def from_json(cls, json_str: str) -> Self:
40
- """Create an instance of Type from a JSON string"""
35
+ """Create an instance of InstanceVersion from a JSON string"""
41
36
  return cls(json.loads(json_str))
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT MSSQL Service API
5
+
6
+ This is the documentation for the STACKIT MSSQL service
7
+
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class InstanceVersionOpt(str, Enum):
24
+ """
25
+ InstanceVersionOpt
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ ENUM_2022 = "2022"
32
+
33
+ @classmethod
34
+ def from_json(cls, json_str: str) -> Self:
35
+ """Create an instance of InstanceVersionOpt from a JSON string"""
36
+ return cls(json.loads(json_str))