stackit-sqlserverflex 1.1.0__py3-none-any.whl → 1.1.2__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.
- stackit/sqlserverflex/api/default_api.py +16 -1
- stackit/sqlserverflex/api_client.py +22 -9
- stackit/sqlserverflex/exceptions.py +1 -1
- stackit/sqlserverflex/models/__init__.py +0 -1
- stackit/sqlserverflex/models/backup_list_backups_response_grouped.py +3 -3
- stackit/sqlserverflex/models/data_point.py +7 -1
- stackit/sqlserverflex/models/host.py +3 -3
- stackit/sqlserverflex/models/host_metric.py +3 -3
- stackit/sqlserverflex/models/list_backups_response.py +3 -3
- stackit/sqlserverflex/models/list_collations_response.py +3 -3
- stackit/sqlserverflex/models/list_compatibility_response.py +3 -3
- stackit/sqlserverflex/models/list_databases_response.py +3 -3
- stackit/sqlserverflex/models/list_flavors_response.py +3 -3
- stackit/sqlserverflex/models/list_instances_response.py +3 -3
- stackit/sqlserverflex/models/list_metrics_response.py +3 -3
- stackit/sqlserverflex/models/list_restore_jobs_response.py +3 -3
- stackit/sqlserverflex/models/list_users_response.py +3 -3
- stackit/sqlserverflex/rest.py +19 -3
- {stackit_sqlserverflex-1.1.0.dist-info → stackit_sqlserverflex-1.1.2.dist-info}/METADATA +14 -12
- {stackit_sqlserverflex-1.1.0.dist-info → stackit_sqlserverflex-1.1.2.dist-info}/RECORD +25 -25
- {stackit_sqlserverflex-1.1.0.dist-info → stackit_sqlserverflex-1.1.2.dist-info}/WHEEL +1 -1
- {stackit_sqlserverflex-1.1.0.dist-info → stackit_sqlserverflex-1.1.2.dist-info/licenses}/LICENSE.md +0 -0
- {stackit_sqlserverflex-1.1.0.dist-info → stackit_sqlserverflex-1.1.2.dist-info/licenses}/NOTICE.txt +0 -0
|
@@ -4487,6 +4487,7 @@ class DefaultApi:
|
|
|
4487
4487
|
self,
|
|
4488
4488
|
project_id: Annotated[StrictStr, Field(description="The UUID of the project.")],
|
|
4489
4489
|
instance_id: Annotated[StrictStr, Field(description="The UUID of the instance.")],
|
|
4490
|
+
region: Annotated[StrictStr, Field(description="The region which should be addressed")],
|
|
4490
4491
|
metric: Annotated[
|
|
4491
4492
|
StrictStr,
|
|
4492
4493
|
Field(
|
|
@@ -4530,6 +4531,8 @@ class DefaultApi:
|
|
|
4530
4531
|
:type project_id: str
|
|
4531
4532
|
:param instance_id: The UUID of the instance. (required)
|
|
4532
4533
|
:type instance_id: str
|
|
4534
|
+
:param region: The region which should be addressed (required)
|
|
4535
|
+
:type region: str
|
|
4533
4536
|
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. (required)
|
|
4534
4537
|
:type metric: str
|
|
4535
4538
|
:param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required)
|
|
@@ -4565,6 +4568,7 @@ class DefaultApi:
|
|
|
4565
4568
|
_param = self._list_metrics_serialize(
|
|
4566
4569
|
project_id=project_id,
|
|
4567
4570
|
instance_id=instance_id,
|
|
4571
|
+
region=region,
|
|
4568
4572
|
metric=metric,
|
|
4569
4573
|
granularity=granularity,
|
|
4570
4574
|
period=period,
|
|
@@ -4594,6 +4598,7 @@ class DefaultApi:
|
|
|
4594
4598
|
self,
|
|
4595
4599
|
project_id: Annotated[StrictStr, Field(description="The UUID of the project.")],
|
|
4596
4600
|
instance_id: Annotated[StrictStr, Field(description="The UUID of the instance.")],
|
|
4601
|
+
region: Annotated[StrictStr, Field(description="The region which should be addressed")],
|
|
4597
4602
|
metric: Annotated[
|
|
4598
4603
|
StrictStr,
|
|
4599
4604
|
Field(
|
|
@@ -4637,6 +4642,8 @@ class DefaultApi:
|
|
|
4637
4642
|
:type project_id: str
|
|
4638
4643
|
:param instance_id: The UUID of the instance. (required)
|
|
4639
4644
|
:type instance_id: str
|
|
4645
|
+
:param region: The region which should be addressed (required)
|
|
4646
|
+
:type region: str
|
|
4640
4647
|
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. (required)
|
|
4641
4648
|
:type metric: str
|
|
4642
4649
|
:param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required)
|
|
@@ -4672,6 +4679,7 @@ class DefaultApi:
|
|
|
4672
4679
|
_param = self._list_metrics_serialize(
|
|
4673
4680
|
project_id=project_id,
|
|
4674
4681
|
instance_id=instance_id,
|
|
4682
|
+
region=region,
|
|
4675
4683
|
metric=metric,
|
|
4676
4684
|
granularity=granularity,
|
|
4677
4685
|
period=period,
|
|
@@ -4701,6 +4709,7 @@ class DefaultApi:
|
|
|
4701
4709
|
self,
|
|
4702
4710
|
project_id: Annotated[StrictStr, Field(description="The UUID of the project.")],
|
|
4703
4711
|
instance_id: Annotated[StrictStr, Field(description="The UUID of the instance.")],
|
|
4712
|
+
region: Annotated[StrictStr, Field(description="The region which should be addressed")],
|
|
4704
4713
|
metric: Annotated[
|
|
4705
4714
|
StrictStr,
|
|
4706
4715
|
Field(
|
|
@@ -4744,6 +4753,8 @@ class DefaultApi:
|
|
|
4744
4753
|
:type project_id: str
|
|
4745
4754
|
:param instance_id: The UUID of the instance. (required)
|
|
4746
4755
|
:type instance_id: str
|
|
4756
|
+
:param region: The region which should be addressed (required)
|
|
4757
|
+
:type region: str
|
|
4747
4758
|
:param metric: The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. (required)
|
|
4748
4759
|
:type metric: str
|
|
4749
4760
|
:param granularity: The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. (required)
|
|
@@ -4779,6 +4790,7 @@ class DefaultApi:
|
|
|
4779
4790
|
_param = self._list_metrics_serialize(
|
|
4780
4791
|
project_id=project_id,
|
|
4781
4792
|
instance_id=instance_id,
|
|
4793
|
+
region=region,
|
|
4782
4794
|
metric=metric,
|
|
4783
4795
|
granularity=granularity,
|
|
4784
4796
|
period=period,
|
|
@@ -4803,6 +4815,7 @@ class DefaultApi:
|
|
|
4803
4815
|
self,
|
|
4804
4816
|
project_id,
|
|
4805
4817
|
instance_id,
|
|
4818
|
+
region,
|
|
4806
4819
|
metric,
|
|
4807
4820
|
granularity,
|
|
4808
4821
|
period,
|
|
@@ -4830,6 +4843,8 @@ class DefaultApi:
|
|
|
4830
4843
|
_path_params["projectId"] = project_id
|
|
4831
4844
|
if instance_id is not None:
|
|
4832
4845
|
_path_params["instanceId"] = instance_id
|
|
4846
|
+
if region is not None:
|
|
4847
|
+
_path_params["region"] = region
|
|
4833
4848
|
if metric is not None:
|
|
4834
4849
|
_path_params["metric"] = metric
|
|
4835
4850
|
# process the query parameters
|
|
@@ -4862,7 +4877,7 @@ class DefaultApi:
|
|
|
4862
4877
|
|
|
4863
4878
|
return self.api_client.param_serialize(
|
|
4864
4879
|
method="GET",
|
|
4865
|
-
resource_path="/v2/projects/{projectId}/instances/{instanceId}/metrics/{metric}",
|
|
4880
|
+
resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}",
|
|
4866
4881
|
path_params=_path_params,
|
|
4867
4882
|
query_params=_query_params,
|
|
4868
4883
|
header_params=_header_params,
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
import datetime
|
|
16
|
+
import decimal
|
|
16
17
|
import json
|
|
17
18
|
import mimetypes
|
|
18
19
|
import os
|
|
19
20
|
import re
|
|
20
21
|
import tempfile
|
|
22
|
+
import uuid
|
|
21
23
|
from enum import Enum
|
|
22
24
|
from typing import Dict, List, Optional, Tuple, Union
|
|
23
25
|
from urllib.parse import quote
|
|
@@ -64,8 +66,10 @@ class ApiClient:
|
|
|
64
66
|
"bool": bool,
|
|
65
67
|
"date": datetime.date,
|
|
66
68
|
"datetime": datetime.datetime,
|
|
69
|
+
"decimal": decimal.Decimal,
|
|
67
70
|
"object": object,
|
|
68
71
|
}
|
|
72
|
+
_pool = None
|
|
69
73
|
|
|
70
74
|
def __init__(self, configuration, header_name=None, header_value=None, cookie=None) -> None:
|
|
71
75
|
self.config: Configuration = configuration
|
|
@@ -268,7 +272,7 @@ class ApiClient:
|
|
|
268
272
|
return_data = self.__deserialize_file(response_data)
|
|
269
273
|
elif response_type is not None:
|
|
270
274
|
match = None
|
|
271
|
-
content_type = response_data.
|
|
275
|
+
content_type = response_data.headers.get("content-type")
|
|
272
276
|
if content_type is not None:
|
|
273
277
|
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
|
|
274
278
|
encoding = match.group(1) if match else "utf-8"
|
|
@@ -285,7 +289,7 @@ class ApiClient:
|
|
|
285
289
|
return ApiResponse(
|
|
286
290
|
status_code=response_data.status,
|
|
287
291
|
data=return_data,
|
|
288
|
-
headers=response_data.
|
|
292
|
+
headers=response_data.headers,
|
|
289
293
|
raw_data=response_data.data,
|
|
290
294
|
)
|
|
291
295
|
|
|
@@ -297,6 +301,7 @@ class ApiClient:
|
|
|
297
301
|
If obj is str, int, long, float, bool, return directly.
|
|
298
302
|
If obj is datetime.datetime, datetime.date
|
|
299
303
|
convert to string in iso8601 format.
|
|
304
|
+
If obj is decimal.Decimal return string representation.
|
|
300
305
|
If obj is list, sanitize each element in the list.
|
|
301
306
|
If obj is dict, return the dict.
|
|
302
307
|
If obj is OpenAPI model, return the properties dict.
|
|
@@ -312,12 +317,16 @@ class ApiClient:
|
|
|
312
317
|
return obj.get_secret_value()
|
|
313
318
|
elif isinstance(obj, self.PRIMITIVE_TYPES):
|
|
314
319
|
return obj
|
|
320
|
+
elif isinstance(obj, uuid.UUID):
|
|
321
|
+
return str(obj)
|
|
315
322
|
elif isinstance(obj, list):
|
|
316
323
|
return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj]
|
|
317
324
|
elif isinstance(obj, tuple):
|
|
318
325
|
return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj)
|
|
319
326
|
elif isinstance(obj, (datetime.datetime, datetime.date)):
|
|
320
327
|
return obj.isoformat()
|
|
328
|
+
elif isinstance(obj, decimal.Decimal):
|
|
329
|
+
return str(obj)
|
|
321
330
|
|
|
322
331
|
elif isinstance(obj, dict):
|
|
323
332
|
obj_dict = obj
|
|
@@ -327,7 +336,7 @@ class ApiClient:
|
|
|
327
336
|
# and attributes which value is not None.
|
|
328
337
|
# Convert attribute name to json key in
|
|
329
338
|
# model definition for request.
|
|
330
|
-
if hasattr(obj, "to_dict") and callable(obj
|
|
339
|
+
if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
|
|
331
340
|
obj_dict = obj.to_dict()
|
|
332
341
|
else:
|
|
333
342
|
obj_dict = obj.__dict__
|
|
@@ -355,7 +364,7 @@ class ApiClient:
|
|
|
355
364
|
data = json.loads(response_text)
|
|
356
365
|
except ValueError:
|
|
357
366
|
data = response_text
|
|
358
|
-
elif re.match(r"^application/(json|[\w
|
|
367
|
+
elif re.match(r"^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE):
|
|
359
368
|
if response_text == "":
|
|
360
369
|
data = ""
|
|
361
370
|
else:
|
|
@@ -401,12 +410,14 @@ class ApiClient:
|
|
|
401
410
|
|
|
402
411
|
if klass in self.PRIMITIVE_TYPES:
|
|
403
412
|
return self.__deserialize_primitive(data, klass)
|
|
404
|
-
elif klass
|
|
413
|
+
elif klass is object:
|
|
405
414
|
return self.__deserialize_object(data)
|
|
406
|
-
elif klass
|
|
415
|
+
elif klass is datetime.date:
|
|
407
416
|
return self.__deserialize_date(data)
|
|
408
|
-
elif klass
|
|
417
|
+
elif klass is datetime.datetime:
|
|
409
418
|
return self.__deserialize_datetime(data)
|
|
419
|
+
elif klass is decimal.Decimal:
|
|
420
|
+
return decimal.Decimal(data)
|
|
410
421
|
elif issubclass(klass, Enum):
|
|
411
422
|
return self.__deserialize_enum(data, klass)
|
|
412
423
|
else:
|
|
@@ -554,12 +565,14 @@ class ApiClient:
|
|
|
554
565
|
os.close(fd)
|
|
555
566
|
os.remove(path)
|
|
556
567
|
|
|
557
|
-
content_disposition = response.
|
|
568
|
+
content_disposition = response.headers.get("Content-Disposition")
|
|
558
569
|
if content_disposition:
|
|
559
570
|
m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition)
|
|
560
571
|
if m is None:
|
|
561
572
|
raise ValueError("Unexpected 'content-disposition' header value")
|
|
562
|
-
filename = m.group(1)
|
|
573
|
+
filename = os.path.basename(m.group(1)) # Strip any directory traversal
|
|
574
|
+
if filename in ("", ".", ".."): # fall back to tmp filename
|
|
575
|
+
filename = os.path.basename(path)
|
|
563
576
|
path = os.path.join(os.path.dirname(path), filename)
|
|
564
577
|
|
|
565
578
|
with open(path, "wb") as f:
|
|
@@ -73,9 +73,9 @@ class BackupListBackupsResponseGrouped(BaseModel):
|
|
|
73
73
|
# override the default output from pydantic by calling `to_dict()` of each item in backups (list)
|
|
74
74
|
_items = []
|
|
75
75
|
if self.backups:
|
|
76
|
-
for
|
|
77
|
-
if
|
|
78
|
-
_items.append(
|
|
76
|
+
for _item_backups in self.backups:
|
|
77
|
+
if _item_backups:
|
|
78
|
+
_items.append(_item_backups.to_dict())
|
|
79
79
|
_dict["backups"] = _items
|
|
80
80
|
return _dict
|
|
81
81
|
|
|
@@ -18,7 +18,13 @@ import json
|
|
|
18
18
|
import pprint
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set, Union
|
|
20
20
|
|
|
21
|
-
from pydantic import
|
|
21
|
+
from pydantic import (
|
|
22
|
+
BaseModel,
|
|
23
|
+
ConfigDict,
|
|
24
|
+
StrictFloat,
|
|
25
|
+
StrictInt,
|
|
26
|
+
StrictStr,
|
|
27
|
+
)
|
|
22
28
|
from typing_extensions import Self
|
|
23
29
|
|
|
24
30
|
|
|
@@ -73,9 +73,9 @@ class Host(BaseModel):
|
|
|
73
73
|
# override the default output from pydantic by calling `to_dict()` of each item in host_metrics (list)
|
|
74
74
|
_items = []
|
|
75
75
|
if self.host_metrics:
|
|
76
|
-
for
|
|
77
|
-
if
|
|
78
|
-
_items.append(
|
|
76
|
+
for _item_host_metrics in self.host_metrics:
|
|
77
|
+
if _item_host_metrics:
|
|
78
|
+
_items.append(_item_host_metrics.to_dict())
|
|
79
79
|
_dict["hostMetrics"] = _items
|
|
80
80
|
return _dict
|
|
81
81
|
|
|
@@ -74,9 +74,9 @@ class HostMetric(BaseModel):
|
|
|
74
74
|
# override the default output from pydantic by calling `to_dict()` of each item in datapoints (list)
|
|
75
75
|
_items = []
|
|
76
76
|
if self.datapoints:
|
|
77
|
-
for
|
|
78
|
-
if
|
|
79
|
-
_items.append(
|
|
77
|
+
for _item_datapoints in self.datapoints:
|
|
78
|
+
if _item_datapoints:
|
|
79
|
+
_items.append(_item_datapoints.to_dict())
|
|
80
80
|
_dict["datapoints"] = _items
|
|
81
81
|
return _dict
|
|
82
82
|
|
|
@@ -74,9 +74,9 @@ class ListBackupsResponse(BaseModel):
|
|
|
74
74
|
# override the default output from pydantic by calling `to_dict()` of each item in databases (list)
|
|
75
75
|
_items = []
|
|
76
76
|
if self.databases:
|
|
77
|
-
for
|
|
78
|
-
if
|
|
79
|
-
_items.append(
|
|
77
|
+
for _item_databases in self.databases:
|
|
78
|
+
if _item_databases:
|
|
79
|
+
_items.append(_item_databases.to_dict())
|
|
80
80
|
_dict["databases"] = _items
|
|
81
81
|
return _dict
|
|
82
82
|
|
|
@@ -72,9 +72,9 @@ class ListCollationsResponse(BaseModel):
|
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of each item in collations (list)
|
|
73
73
|
_items = []
|
|
74
74
|
if self.collations:
|
|
75
|
-
for
|
|
76
|
-
if
|
|
77
|
-
_items.append(
|
|
75
|
+
for _item_collations in self.collations:
|
|
76
|
+
if _item_collations:
|
|
77
|
+
_items.append(_item_collations.to_dict())
|
|
78
78
|
_dict["collations"] = _items
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -74,9 +74,9 @@ class ListCompatibilityResponse(BaseModel):
|
|
|
74
74
|
# override the default output from pydantic by calling `to_dict()` of each item in compatibilities (list)
|
|
75
75
|
_items = []
|
|
76
76
|
if self.compatibilities:
|
|
77
|
-
for
|
|
78
|
-
if
|
|
79
|
-
_items.append(
|
|
77
|
+
for _item_compatibilities in self.compatibilities:
|
|
78
|
+
if _item_compatibilities:
|
|
79
|
+
_items.append(_item_compatibilities.to_dict())
|
|
80
80
|
_dict["compatibilities"] = _items
|
|
81
81
|
return _dict
|
|
82
82
|
|
|
@@ -72,9 +72,9 @@ class ListDatabasesResponse(BaseModel):
|
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of each item in databases (list)
|
|
73
73
|
_items = []
|
|
74
74
|
if self.databases:
|
|
75
|
-
for
|
|
76
|
-
if
|
|
77
|
-
_items.append(
|
|
75
|
+
for _item_databases in self.databases:
|
|
76
|
+
if _item_databases:
|
|
77
|
+
_items.append(_item_databases.to_dict())
|
|
78
78
|
_dict["databases"] = _items
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -72,9 +72,9 @@ class ListFlavorsResponse(BaseModel):
|
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of each item in flavors (list)
|
|
73
73
|
_items = []
|
|
74
74
|
if self.flavors:
|
|
75
|
-
for
|
|
76
|
-
if
|
|
77
|
-
_items.append(
|
|
75
|
+
for _item_flavors in self.flavors:
|
|
76
|
+
if _item_flavors:
|
|
77
|
+
_items.append(_item_flavors.to_dict())
|
|
78
78
|
_dict["flavors"] = _items
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -73,9 +73,9 @@ class ListInstancesResponse(BaseModel):
|
|
|
73
73
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
74
74
|
_items = []
|
|
75
75
|
if self.items:
|
|
76
|
-
for
|
|
77
|
-
if
|
|
78
|
-
_items.append(
|
|
76
|
+
for _item_items in self.items:
|
|
77
|
+
if _item_items:
|
|
78
|
+
_items.append(_item_items.to_dict())
|
|
79
79
|
_dict["items"] = _items
|
|
80
80
|
return _dict
|
|
81
81
|
|
|
@@ -72,9 +72,9 @@ class ListMetricsResponse(BaseModel):
|
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of each item in hosts (list)
|
|
73
73
|
_items = []
|
|
74
74
|
if self.hosts:
|
|
75
|
-
for
|
|
76
|
-
if
|
|
77
|
-
_items.append(
|
|
75
|
+
for _item_hosts in self.hosts:
|
|
76
|
+
if _item_hosts:
|
|
77
|
+
_items.append(_item_hosts.to_dict())
|
|
78
78
|
_dict["hosts"] = _items
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -72,9 +72,9 @@ class ListRestoreJobsResponse(BaseModel):
|
|
|
72
72
|
# override the default output from pydantic by calling `to_dict()` of each item in running_restores (list)
|
|
73
73
|
_items = []
|
|
74
74
|
if self.running_restores:
|
|
75
|
-
for
|
|
76
|
-
if
|
|
77
|
-
_items.append(
|
|
75
|
+
for _item_running_restores in self.running_restores:
|
|
76
|
+
if _item_running_restores:
|
|
77
|
+
_items.append(_item_running_restores.to_dict())
|
|
78
78
|
_dict["runningRestores"] = _items
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
@@ -73,9 +73,9 @@ class ListUsersResponse(BaseModel):
|
|
|
73
73
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
74
74
|
_items = []
|
|
75
75
|
if self.items:
|
|
76
|
-
for
|
|
77
|
-
if
|
|
78
|
-
_items.append(
|
|
76
|
+
for _item_items in self.items:
|
|
77
|
+
if _item_items:
|
|
78
|
+
_items.append(_item_items.to_dict())
|
|
79
79
|
_dict["items"] = _items
|
|
80
80
|
return _dict
|
|
81
81
|
|
stackit/sqlserverflex/rest.py
CHANGED
|
@@ -39,12 +39,17 @@ class RESTResponse(io.IOBase):
|
|
|
39
39
|
self.data = self.response.content
|
|
40
40
|
return self.data
|
|
41
41
|
|
|
42
|
+
@property
|
|
43
|
+
def headers(self):
|
|
44
|
+
"""Returns a dictionary of response headers."""
|
|
45
|
+
return self.response.headers
|
|
46
|
+
|
|
42
47
|
def getheaders(self):
|
|
43
|
-
"""Returns a dictionary of the response headers."""
|
|
48
|
+
"""Returns a dictionary of the response headers; use ``headers`` instead."""
|
|
44
49
|
return self.response.headers
|
|
45
50
|
|
|
46
51
|
def getheader(self, name, default=None):
|
|
47
|
-
"""Returns a given response header."""
|
|
52
|
+
"""Returns a given response header; use ``headers.get()`` instead."""
|
|
48
53
|
return self.response.headers.get(name, default)
|
|
49
54
|
|
|
50
55
|
|
|
@@ -94,6 +99,7 @@ class RESTClientObject:
|
|
|
94
99
|
url,
|
|
95
100
|
data=request_body,
|
|
96
101
|
headers=headers,
|
|
102
|
+
timeout=_request_timeout,
|
|
97
103
|
)
|
|
98
104
|
elif content_type == "application/x-www-form-urlencoded":
|
|
99
105
|
r = self.session.request(
|
|
@@ -101,6 +107,7 @@ class RESTClientObject:
|
|
|
101
107
|
url,
|
|
102
108
|
params=post_params,
|
|
103
109
|
headers=headers,
|
|
110
|
+
timeout=_request_timeout,
|
|
104
111
|
)
|
|
105
112
|
elif content_type == "multipart/form-data":
|
|
106
113
|
# must del headers['Content-Type'], or the correct
|
|
@@ -114,6 +121,7 @@ class RESTClientObject:
|
|
|
114
121
|
url,
|
|
115
122
|
files=post_params,
|
|
116
123
|
headers=headers,
|
|
124
|
+
timeout=_request_timeout,
|
|
117
125
|
)
|
|
118
126
|
# Pass a `string` parameter directly in the body to support
|
|
119
127
|
# other content types than JSON when `body` argument is
|
|
@@ -124,10 +132,17 @@ class RESTClientObject:
|
|
|
124
132
|
url,
|
|
125
133
|
data=body,
|
|
126
134
|
headers=headers,
|
|
135
|
+
timeout=_request_timeout,
|
|
127
136
|
)
|
|
128
137
|
elif headers["Content-Type"].startswith("text/") and isinstance(body, bool):
|
|
129
138
|
request_body = "true" if body else "false"
|
|
130
|
-
r = self.session.request(
|
|
139
|
+
r = self.session.request(
|
|
140
|
+
method,
|
|
141
|
+
url,
|
|
142
|
+
data=request_body,
|
|
143
|
+
headers=headers,
|
|
144
|
+
timeout=_request_timeout,
|
|
145
|
+
)
|
|
131
146
|
else:
|
|
132
147
|
# Cannot generate the request from given parameters
|
|
133
148
|
msg = """Cannot prepare a request message for provided
|
|
@@ -141,6 +156,7 @@ class RESTClientObject:
|
|
|
141
156
|
url,
|
|
142
157
|
params={},
|
|
143
158
|
headers=headers,
|
|
159
|
+
timeout=_request_timeout,
|
|
144
160
|
)
|
|
145
161
|
except requests.exceptions.SSLError as e:
|
|
146
162
|
msg = "\n".join([type(e).__name__, str(e)])
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: stackit-sqlserverflex
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: STACKIT MSSQL Service API
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Project-URL: Homepage, https://github.com/stackitcloud/stackit-sdk-python
|
|
6
|
+
Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
|
|
7
|
+
Author-email: STACKIT Developer Tools <developer-tools@stackit.cloud>
|
|
8
|
+
License-File: LICENSE.md
|
|
9
|
+
License-File: NOTICE.txt
|
|
8
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
9
11
|
Classifier: Operating System :: OS Independent
|
|
10
12
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -13,12 +15,12 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
13
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
|
|
17
|
-
Requires-
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Requires-Python: <4.0,>=3.9
|
|
20
|
+
Requires-Dist: pydantic>=2.9.2
|
|
21
|
+
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
22
|
+
Requires-Dist: requests>=2.32.3
|
|
23
|
+
Requires-Dist: stackit-core>=0.0.1a
|
|
22
24
|
Description-Content-Type: text/markdown
|
|
23
25
|
|
|
24
26
|
# stackit.sqlserverflex
|
|
@@ -43,4 +45,4 @@ import stackit.sqlserverflex
|
|
|
43
45
|
|
|
44
46
|
## Getting Started
|
|
45
47
|
|
|
46
|
-
[Examples](https://github.com/stackitcloud/stackit-sdk-python/tree/main/examples) for the usage of the package can be found in the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-python) of the SDK.
|
|
48
|
+
[Examples](https://github.com/stackitcloud/stackit-sdk-python/tree/main/examples) for the usage of the package can be found in the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-python) of the SDK.
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
stackit/sqlserverflex/__init__.py,sha256=hhJLPiikxG7Dh_1aKrvY9JGZSIQCxxfQPEj1fbaWvT4,8885
|
|
2
|
-
stackit/sqlserverflex/
|
|
3
|
-
stackit/sqlserverflex/api/default_api.py,sha256=0rtUizPQoZ7G-wcLKafXdl6Eq2CcuIm6k5UwjHgFRTI,346482
|
|
4
|
-
stackit/sqlserverflex/api_client.py,sha256=ElPWktGJ4KVGhuCm6Bs9LDrWQtJ6OVTk9Z9pgn-U-sM,23371
|
|
2
|
+
stackit/sqlserverflex/api_client.py,sha256=tL4Bzd9d4k8Fwn0GWOZ22uVTpfb3TKtCOGoYAYM18l4,23939
|
|
5
3
|
stackit/sqlserverflex/api_response.py,sha256=HRYkVqMNIlfODacTQPTbiVj2YdcnutpQrKJdeAoCSpM,642
|
|
6
4
|
stackit/sqlserverflex/configuration.py,sha256=zZWS4FlD2sFNyYYNJMYPjYJQaeeeyPa2tIU0bkbLfQM,5716
|
|
7
|
-
stackit/sqlserverflex/exceptions.py,sha256=
|
|
8
|
-
stackit/sqlserverflex/
|
|
5
|
+
stackit/sqlserverflex/exceptions.py,sha256=dJAg_qzM5bAKlsfnjAHybWYYV50DBras1u-Uh4tlpXw,6419
|
|
6
|
+
stackit/sqlserverflex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
stackit/sqlserverflex/rest.py,sha256=teEVlvlsTW51ze4FZOnKPNHFuyL5LC57-IlJ-0Ii_vI,6415
|
|
8
|
+
stackit/sqlserverflex/api/__init__.py,sha256=vnWx4mPu8WNw9lyJ-_R5PHyz_KTKRlPdAPCAl72jpnQ,108
|
|
9
|
+
stackit/sqlserverflex/api/default_api.py,sha256=dgEzVBeUYPrjE0y_pBeofS_9oVtb1yrGGGoPu9jee4E,347253
|
|
10
|
+
stackit/sqlserverflex/models/__init__.py,sha256=KdOtc1naGkGyh1DpGWoZeDXw1hQJOu7En2ycAzXTwi0,4887
|
|
9
11
|
stackit/sqlserverflex/models/acl.py,sha256=kQtvt-DvCcKsTbp9KdCoaZFPAMO1zsWSMHbl-t-12E8,2384
|
|
10
12
|
stackit/sqlserverflex/models/backup.py,sha256=V-4rImegWdgP0IU2afXPDZ_b68cJMohU5xai-k2udgk,3192
|
|
11
|
-
stackit/sqlserverflex/models/backup_list_backups_response_grouped.py,sha256=
|
|
13
|
+
stackit/sqlserverflex/models/backup_list_backups_response_grouped.py,sha256=eHJ6Zsn-pnAIlKHQbHeEo5VIS2k4fx9ejyJ9XWR-l2Q,3148
|
|
12
14
|
stackit/sqlserverflex/models/create_database_payload.py,sha256=XQggbNPjPFSmSxc5huMpHsqz6m9XiRcGRjQ7_BHeKGQ,3105
|
|
13
15
|
stackit/sqlserverflex/models/create_database_response.py,sha256=-D5TTIgjNI10PxCVYGAyDolffuOg6wyyY0lqJnANLz4,2442
|
|
14
16
|
stackit/sqlserverflex/models/create_instance_payload.py,sha256=A9b_WmE2TY5-tvw71vVbqYE6P_pkwVHeKYsDcp9qe4o,5171
|
|
15
17
|
stackit/sqlserverflex/models/create_instance_response.py,sha256=JP9P-sfkhU6PmOS1P5aFvJm-tAtd3n4-ZHh4fyA3LyI,2442
|
|
16
18
|
stackit/sqlserverflex/models/create_user_payload.py,sha256=GqBhx_tK6jexecW5a3efxbv5TdxBnkmRdgiTcIP-ScA,2695
|
|
17
19
|
stackit/sqlserverflex/models/create_user_response.py,sha256=wHWJMAvnO_p2P-M0aE_9IudUrTL2ZSZxmQaC5Ei_y9E,2701
|
|
18
|
-
stackit/sqlserverflex/models/data_point.py,sha256=
|
|
20
|
+
stackit/sqlserverflex/models/data_point.py,sha256=HxB7OQ3yKZL42uv6NjKMaZroJNAdsyBk_gkOhvD_YwY,2568
|
|
19
21
|
stackit/sqlserverflex/models/database.py,sha256=RznZCotdue0zqEI_fTMYTnAdHVfiSP8b1Xq9qRJmDcE,2606
|
|
20
22
|
stackit/sqlserverflex/models/database_documentation_create_database_request_options.py,sha256=7ADIW-fKA32YtRe099_t-6fRTcv2wtCMuu2p1EciErc,3076
|
|
21
23
|
stackit/sqlserverflex/models/database_options.py,sha256=RZKXGJhaQuDg0_FLBM2La4XQOB33KBWOKPXxoSVjonI,3041
|
|
@@ -24,8 +26,8 @@ stackit/sqlserverflex/models/get_backup_response.py,sha256=eGKBxkXDdS1UUyhbFkqu4
|
|
|
24
26
|
stackit/sqlserverflex/models/get_database_response.py,sha256=9IGh9BGXfspuUgFcB6IlL5eE0YNgOtHMj-yYIB2DeII,2779
|
|
25
27
|
stackit/sqlserverflex/models/get_instance_response.py,sha256=dmmnHanBhCwqROmy7iW7lv65FCn_cWrfT1moH4wnO5k,2696
|
|
26
28
|
stackit/sqlserverflex/models/get_user_response.py,sha256=3VlVqXQPvJN9DoAgLYwrrtSIVpT-7LXTBdoBEwKbJfc,2736
|
|
27
|
-
stackit/sqlserverflex/models/host.py,sha256=
|
|
28
|
-
stackit/sqlserverflex/models/host_metric.py,sha256=
|
|
29
|
+
stackit/sqlserverflex/models/host.py,sha256=vC7CmnoXSMhWoo9Ul0b60nhbifOu5LxoiOdRvJarre4,3183
|
|
30
|
+
stackit/sqlserverflex/models/host_metric.py,sha256=TSxHKNr_XeGDVuSnOzzwL-5V_zZYbnjRMf4c6Eq0pu0,3239
|
|
29
31
|
stackit/sqlserverflex/models/instance.py,sha256=4fZ7SVTnguXQG6rkj-i16X4-jQbtl_4uMwF3JCcpGCk,4266
|
|
30
32
|
stackit/sqlserverflex/models/instance_documentation_acl.py,sha256=D1BJ-kONUXBYXdvo76lHWgNMNyV0jL7eoe7zj42RdXc,2548
|
|
31
33
|
stackit/sqlserverflex/models/instance_documentation_options.py,sha256=tE8taG7yZEERXX9_zB7SeCrG3I38ffR8UY90DFIZVzs,3013
|
|
@@ -34,17 +36,17 @@ stackit/sqlserverflex/models/instance_error.py,sha256=vIUtSumMXECirW8bgQXhbNiFBt
|
|
|
34
36
|
stackit/sqlserverflex/models/instance_flavor_entry.py,sha256=Z-_cpnT7CHupmTSVj9DltmzYGtmZmQ4pEYXRhUJHZZ4,2894
|
|
35
37
|
stackit/sqlserverflex/models/instance_list_instance.py,sha256=0pBLBQnCw3vUDYbMn1HGIjLVR3n3o3aXaK503DlB_HU,2582
|
|
36
38
|
stackit/sqlserverflex/models/instance_list_user.py,sha256=IczONw07wh0BAKxJy2kEPEFnaSnGaWwe-eA86T3ASy4,2504
|
|
37
|
-
stackit/sqlserverflex/models/list_backups_response.py,sha256=
|
|
38
|
-
stackit/sqlserverflex/models/list_collations_response.py,sha256=
|
|
39
|
-
stackit/sqlserverflex/models/list_compatibility_response.py,sha256=
|
|
40
|
-
stackit/sqlserverflex/models/list_databases_response.py,sha256=
|
|
41
|
-
stackit/sqlserverflex/models/list_flavors_response.py,sha256=
|
|
42
|
-
stackit/sqlserverflex/models/list_instances_response.py,sha256=
|
|
43
|
-
stackit/sqlserverflex/models/list_metrics_response.py,sha256=
|
|
44
|
-
stackit/sqlserverflex/models/list_restore_jobs_response.py,sha256=
|
|
39
|
+
stackit/sqlserverflex/models/list_backups_response.py,sha256=v6AKuSHNFRSv8hxp-4sgHi5pYUlXmDwnf6kn7JdginA,3179
|
|
40
|
+
stackit/sqlserverflex/models/list_collations_response.py,sha256=1uTb2USHeCKZoT39hDegg-Zqx1kkEPy2LOdk8A_xxSc,3152
|
|
41
|
+
stackit/sqlserverflex/models/list_compatibility_response.py,sha256=1Pvoc4u9uW3VHE4QoSBCiaRMaouNP4stmjaRxuO6F0E,3249
|
|
42
|
+
stackit/sqlserverflex/models/list_databases_response.py,sha256=r2sjo_G4WvELpssm__7xpiaQj2TSykDkfm0t8SeEUJo,3078
|
|
43
|
+
stackit/sqlserverflex/models/list_flavors_response.py,sha256=tzrsFJV5LKcOz7yov_tZHhTYAFLzs2UQ-9vDSfXrroQ,3092
|
|
44
|
+
stackit/sqlserverflex/models/list_instances_response.py,sha256=SahQnBZrhnNRgcP6yPT1-Y6sRp1wUpEoGv-7g7nsQwo,3182
|
|
45
|
+
stackit/sqlserverflex/models/list_metrics_response.py,sha256=8Q0i5FLGl4t-hbwqQO25wZMJNlPO9LsvEmxrVZFYxpw,2896
|
|
46
|
+
stackit/sqlserverflex/models/list_restore_jobs_response.py,sha256=0yJbUuuP6_sY767zpbea23Ba_zR1PA7fOw8Gd9DoaWU,3266
|
|
45
47
|
stackit/sqlserverflex/models/list_roles_response.py,sha256=ghUjijUeihzdAOGK8CaJmlKJjWhzR-hYihnp_f8fdBo,2440
|
|
46
48
|
stackit/sqlserverflex/models/list_storages_response.py,sha256=MgR-i57dLOb6HhADH3pGKG9CvByc-QzbPaCLdio5MKE,3113
|
|
47
|
-
stackit/sqlserverflex/models/list_users_response.py,sha256=
|
|
49
|
+
stackit/sqlserverflex/models/list_users_response.py,sha256=tJkYXNIw5NtATMFoamDYdx3QpPeh5cZk2_tnHzKnQaY,3150
|
|
48
50
|
stackit/sqlserverflex/models/list_versions_response.py,sha256=ReHC1BOEuqkBU7_qgGJFk9XdgAY8xiCd1HhNjD181FE,2464
|
|
49
51
|
stackit/sqlserverflex/models/mssql_database_collation.py,sha256=mT4E_Jeni7UwgFWQ6EoqsLUt2tk2Vczhu54HKBXotYk,2588
|
|
50
52
|
stackit/sqlserverflex/models/mssql_database_compatibility.py,sha256=iL7qS6FDw8yKWL9LJIgrD8RO4Ar0zl7TokbQten-sN4,2657
|
|
@@ -61,10 +63,8 @@ stackit/sqlserverflex/models/update_instance_payload.py,sha256=Q-fTfOhj5H1wWhC1k
|
|
|
61
63
|
stackit/sqlserverflex/models/update_instance_response.py,sha256=dtSUyT9qvhYVqAZSV110IthgWr7OXaz2MAlegWKpOdI,2708
|
|
62
64
|
stackit/sqlserverflex/models/user.py,sha256=TZ4GvFn9K0jn8h4nAwlhy8p0ow1dLJfmZw0bCDPXBDM,3090
|
|
63
65
|
stackit/sqlserverflex/models/user_response_user.py,sha256=8h_QwHVJ_AmQnZOFdR5QyJD4MCiBKhdU-kiLK36vNs4,2986
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
stackit_sqlserverflex-1.1.
|
|
67
|
-
stackit_sqlserverflex-1.1.
|
|
68
|
-
stackit_sqlserverflex-1.1.
|
|
69
|
-
stackit_sqlserverflex-1.1.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
70
|
-
stackit_sqlserverflex-1.1.0.dist-info/RECORD,,
|
|
66
|
+
stackit_sqlserverflex-1.1.2.dist-info/METADATA,sha256=qmS-LtRe7YJMHZ81jDV8WcPt2MNgrqw3o0zgIW_hzfI,1804
|
|
67
|
+
stackit_sqlserverflex-1.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
68
|
+
stackit_sqlserverflex-1.1.2.dist-info/licenses/LICENSE.md,sha256=3dF8Tb7yZn2tS4zyNa-yNe-68pH8qyWdGz4ioMd3MgE,10933
|
|
69
|
+
stackit_sqlserverflex-1.1.2.dist-info/licenses/NOTICE.txt,sha256=2NmOBbrveYxoc1q3Ttg2Py99H_uUiZtuzui5BSyh0qQ,66
|
|
70
|
+
stackit_sqlserverflex-1.1.2.dist-info/RECORD,,
|
{stackit_sqlserverflex-1.1.0.dist-info → stackit_sqlserverflex-1.1.2.dist-info/licenses}/LICENSE.md
RENAMED
|
File without changes
|
{stackit_sqlserverflex-1.1.0.dist-info → stackit_sqlserverflex-1.1.2.dist-info/licenses}/NOTICE.txt
RENAMED
|
File without changes
|