Skip to content

Commit 06d3e97

Browse files
committed
update
1 parent 67e3724 commit 06d3e97

File tree

20 files changed

+1051
-2380
lines changed

20 files changed

+1051
-2380
lines changed

databricks/sdk/apps/v2/impl.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,8 +1087,8 @@ def create(self, *, app: Optional[App] = None, no_compute: Optional[bool] = None
10871087
if no_compute is not None:
10881088
query["no_compute"] = no_compute
10891089
headers = {
1090-
"0": "{Accept application/json}",
1091-
"1": "{Content-Type application/json}",
1090+
"Accept": "application/json",
1091+
"Content-Type": "application/json",
10921092
}
10931093

10941094
op_response = self._api.do("POST", "/api/2.0/apps", query=query, body=body, headers=headers)
@@ -1111,7 +1111,7 @@ def delete(self, name: str) -> App:
11111111
"""
11121112

11131113
headers = {
1114-
"0": "{Accept application/json}",
1114+
"Accept": "application/json",
11151115
}
11161116

11171117
res = self._api.do("DELETE", f"/api/2.0/apps/{name}", headers=headers)
@@ -1132,8 +1132,8 @@ def deploy(self, app_name: str, *, app_deployment: Optional[AppDeployment] = Non
11321132
"""
11331133
body = app_deployment.as_dict()
11341134
headers = {
1135-
"0": "{Accept application/json}",
1136-
"1": "{Content-Type application/json}",
1135+
"Accept": "application/json",
1136+
"Content-Type": "application/json",
11371137
}
11381138

11391139
op_response = self._api.do("POST", f"/api/2.0/apps/{app_name}/deployments", body=body, headers=headers)
@@ -1161,7 +1161,7 @@ def get(self, name: str) -> App:
11611161
"""
11621162

11631163
headers = {
1164-
"0": "{Accept application/json}",
1164+
"Accept": "application/json",
11651165
}
11661166

11671167
res = self._api.do("GET", f"/api/2.0/apps/{name}", headers=headers)
@@ -1181,7 +1181,7 @@ def get_deployment(self, app_name: str, deployment_id: str) -> AppDeployment:
11811181
"""
11821182

11831183
headers = {
1184-
"0": "{Accept application/json}",
1184+
"Accept": "application/json",
11851185
}
11861186

11871187
res = self._api.do("GET", f"/api/2.0/apps/{app_name}/deployments/{deployment_id}", headers=headers)
@@ -1199,7 +1199,7 @@ def get_permission_levels(self, app_name: str) -> GetAppPermissionLevelsResponse
11991199
"""
12001200

12011201
headers = {
1202-
"0": "{Accept application/json}",
1202+
"Accept": "application/json",
12031203
}
12041204

12051205
res = self._api.do("GET", f"/api/2.0/permissions/apps/{app_name}/permissionLevels", headers=headers)
@@ -1217,7 +1217,7 @@ def get_permissions(self, app_name: str) -> AppPermissions:
12171217
"""
12181218

12191219
headers = {
1220-
"0": "{Accept application/json}",
1220+
"Accept": "application/json",
12211221
}
12221222

12231223
res = self._api.do("GET", f"/api/2.0/permissions/apps/{app_name}", headers=headers)
@@ -1242,7 +1242,7 @@ def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = N
12421242
if page_token is not None:
12431243
query["page_token"] = page_token
12441244
headers = {
1245-
"0": "{Accept application/json}",
1245+
"Accept": "application/json",
12461246
}
12471247

12481248
while True:
@@ -1277,7 +1277,7 @@ def list_deployments(
12771277
if page_token is not None:
12781278
query["page_token"] = page_token
12791279
headers = {
1280-
"0": "{Accept application/json}",
1280+
"Accept": "application/json",
12811281
}
12821282

12831283
while True:
@@ -1307,8 +1307,8 @@ def set_permissions(
13071307
if access_control_list is not None:
13081308
body["access_control_list"] = [v.as_dict() for v in access_control_list]
13091309
headers = {
1310-
"0": "{Accept application/json}",
1311-
"1": "{Content-Type application/json}",
1310+
"Accept": "application/json",
1311+
"Content-Type": "application/json",
13121312
}
13131313

13141314
res = self._api.do("PUT", f"/api/2.0/permissions/apps/{app_name}", body=body, headers=headers)
@@ -1328,8 +1328,8 @@ def start(self, name: str) -> Wait[App]:
13281328
"""
13291329

13301330
headers = {
1331-
"0": "{Accept application/json}",
1332-
"1": "{Content-Type application/json}",
1331+
"Accept": "application/json",
1332+
"Content-Type": "application/json",
13331333
}
13341334

13351335
op_response = self._api.do("POST", f"/api/2.0/apps/{name}/start", headers=headers)
@@ -1352,8 +1352,8 @@ def stop(self, name: str) -> Wait[App]:
13521352
"""
13531353

13541354
headers = {
1355-
"0": "{Accept application/json}",
1356-
"1": "{Content-Type application/json}",
1355+
"Accept": "application/json",
1356+
"Content-Type": "application/json",
13571357
}
13581358

13591359
op_response = self._api.do("POST", f"/api/2.0/apps/{name}/stop", headers=headers)
@@ -1376,8 +1376,8 @@ def update(self, name: str, *, app: Optional[App] = None) -> App:
13761376
"""
13771377
body = app.as_dict()
13781378
headers = {
1379-
"0": "{Accept application/json}",
1380-
"1": "{Content-Type application/json}",
1379+
"Accept": "application/json",
1380+
"Content-Type": "application/json",
13811381
}
13821382

13831383
res = self._api.do("PATCH", f"/api/2.0/apps/{name}", body=body, headers=headers)
@@ -1400,8 +1400,8 @@ def update_permissions(
14001400
if access_control_list is not None:
14011401
body["access_control_list"] = [v.as_dict() for v in access_control_list]
14021402
headers = {
1403-
"0": "{Accept application/json}",
1404-
"1": "{Content-Type application/json}",
1403+
"Accept": "application/json",
1404+
"Content-Type": "application/json",
14051405
}
14061406

14071407
res = self._api.do("PATCH", f"/api/2.0/permissions/apps/{app_name}", body=body, headers=headers)

databricks/sdk/billing/v2/impl.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,7 @@ def download(self, start_month: str, end_month: str, *, personal_data: Optional[
17651765
if start_month is not None:
17661766
query["start_month"] = start_month
17671767
headers = {
1768-
"0": "{Accept text/plain}",
1768+
"Accept": "text/plain",
17691769
}
17701770

17711771
res = self._api.do(
@@ -1801,8 +1801,8 @@ def create(self, *, policy: Optional[BudgetPolicy] = None, request_id: Optional[
18011801
if request_id is not None:
18021802
body["request_id"] = request_id
18031803
headers = {
1804-
"0": "{Accept application/json}",
1805-
"1": "{Content-Type application/json}",
1804+
"Accept": "application/json",
1805+
"Content-Type": "application/json",
18061806
}
18071807

18081808
res = self._api.do(
@@ -1822,7 +1822,7 @@ def delete(self, policy_id: str):
18221822
"""
18231823

18241824
headers = {
1825-
"0": "{Accept application/json}",
1825+
"Accept": "application/json",
18261826
}
18271827

18281828
self._api.do("DELETE", f"/api/2.1/accounts/{self._api.account_id}/budget-policies/{policy_id}", headers=headers)
@@ -1839,7 +1839,7 @@ def get(self, policy_id: str) -> BudgetPolicy:
18391839
"""
18401840

18411841
headers = {
1842-
"0": "{Accept application/json}",
1842+
"Accept": "application/json",
18431843
}
18441844

18451845
res = self._api.do(
@@ -1886,7 +1886,7 @@ def list(
18861886
if sort_spec is not None:
18871887
query["sort_spec"] = sort_spec.as_dict()
18881888
headers = {
1889-
"0": "{Accept application/json}",
1889+
"Accept": "application/json",
18901890
}
18911891

18921892
while True:
@@ -1921,8 +1921,8 @@ def update(
19211921
if limit_config is not None:
19221922
query["limit_config"] = limit_config.as_dict()
19231923
headers = {
1924-
"0": "{Accept application/json}",
1925-
"1": "{Content-Type application/json}",
1924+
"Accept": "application/json",
1925+
"Content-Type": "application/json",
19261926
}
19271927

19281928
res = self._api.do(
@@ -1958,8 +1958,8 @@ def create(self, budget: CreateBudgetConfigurationBudget) -> CreateBudgetConfigu
19581958
if budget is not None:
19591959
body["budget"] = budget.as_dict()
19601960
headers = {
1961-
"0": "{Accept application/json}",
1962-
"1": "{Content-Type application/json}",
1961+
"Accept": "application/json",
1962+
"Content-Type": "application/json",
19631963
}
19641964

19651965
res = self._api.do("POST", f"/api/2.1/accounts/{self._api.account_id}/budgets", body=body, headers=headers)
@@ -1978,7 +1978,7 @@ def delete(self, budget_id: str):
19781978
"""
19791979

19801980
headers = {
1981-
"0": "{Accept application/json}",
1981+
"Accept": "application/json",
19821982
}
19831983

19841984
self._api.do("DELETE", f"/api/2.1/accounts/{self._api.account_id}/budgets/{budget_id}", headers=headers)
@@ -1995,7 +1995,7 @@ def get(self, budget_id: str) -> GetBudgetConfigurationResponse:
19951995
"""
19961996

19971997
headers = {
1998-
"0": "{Accept application/json}",
1998+
"Accept": "application/json",
19991999
}
20002000

20012001
res = self._api.do("GET", f"/api/2.1/accounts/{self._api.account_id}/budgets/{budget_id}", headers=headers)
@@ -2017,7 +2017,7 @@ def list(self, *, page_token: Optional[str] = None) -> Iterator[BudgetConfigurat
20172017
if page_token is not None:
20182018
query["page_token"] = page_token
20192019
headers = {
2020-
"0": "{Accept application/json}",
2020+
"Accept": "application/json",
20212021
}
20222022

20232023
while True:
@@ -2048,8 +2048,8 @@ def update(self, budget_id: str, budget: UpdateBudgetConfigurationBudget) -> Upd
20482048
if budget is not None:
20492049
body["budget"] = budget.as_dict()
20502050
headers = {
2051-
"0": "{Accept application/json}",
2052-
"1": "{Content-Type application/json}",
2051+
"Accept": "application/json",
2052+
"Content-Type": "application/json",
20532053
}
20542054

20552055
res = self._api.do(
@@ -2143,8 +2143,8 @@ def create(
21432143
if log_delivery_configuration is not None:
21442144
body["log_delivery_configuration"] = log_delivery_configuration.as_dict()
21452145
headers = {
2146-
"0": "{Accept application/json}",
2147-
"1": "{Content-Type application/json}",
2146+
"Accept": "application/json",
2147+
"Content-Type": "application/json",
21482148
}
21492149

21502150
res = self._api.do("POST", f"/api/2.0/accounts/{self._api.account_id}/log-delivery", body=body, headers=headers)
@@ -2162,7 +2162,7 @@ def get(self, log_delivery_configuration_id: str) -> WrappedLogDeliveryConfigura
21622162
"""
21632163

21642164
headers = {
2165-
"0": "{Accept application/json}",
2165+
"Accept": "application/json",
21662166
}
21672167

21682168
res = self._api.do(
@@ -2201,7 +2201,7 @@ def list(
22012201
if storage_configuration_id is not None:
22022202
query["storage_configuration_id"] = storage_configuration_id
22032203
headers = {
2204-
"0": "{Accept application/json}",
2204+
"Accept": "application/json",
22052205
}
22062206

22072207
json = self._api.do(
@@ -2232,8 +2232,8 @@ def patch_status(self, log_delivery_configuration_id: str, status: LogDeliveryCo
22322232
if status is not None:
22332233
body["status"] = status.value
22342234
headers = {
2235-
"0": "{Accept application/json}",
2236-
"1": "{Content-Type application/json}",
2235+
"Accept": "application/json",
2236+
"Content-Type": "application/json",
22372237
}
22382238

22392239
self._api.do(
@@ -2273,8 +2273,8 @@ def create(
22732273
if workspace_id is not None:
22742274
body["workspace_id"] = workspace_id
22752275
headers = {
2276-
"0": "{Accept application/json}",
2277-
"1": "{Content-Type application/json}",
2276+
"Accept": "application/json",
2277+
"Content-Type": "application/json",
22782278
}
22792279

22802280
res = self._api.do("POST", f"/api/2.0/accounts/{self._api.account_id}/dashboard", body=body, headers=headers)
@@ -2302,7 +2302,7 @@ def get(
23022302
if workspace_id is not None:
23032303
query["workspace_id"] = workspace_id
23042304
headers = {
2305-
"0": "{Accept application/json}",
2305+
"Accept": "application/json",
23062306
}
23072307

23082308
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/dashboard", query=query, headers=headers)

0 commit comments

Comments
 (0)