databricks-sdk 0.58.0__py3-none-any.whl → 0.60.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.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

Files changed (34) hide show
  1. databricks/sdk/__init__.py +18 -10
  2. databricks/sdk/credentials_provider.py +2 -2
  3. databricks/sdk/mixins/files.py +43 -15
  4. databricks/sdk/mixins/open_ai_client.py +28 -7
  5. databricks/sdk/oidc.py +6 -2
  6. databricks/sdk/service/{aibuilder.py → agentbricks.py} +5 -132
  7. databricks/sdk/service/apps.py +52 -46
  8. databricks/sdk/service/billing.py +9 -200
  9. databricks/sdk/service/catalog.py +5501 -7697
  10. databricks/sdk/service/cleanrooms.py +24 -54
  11. databricks/sdk/service/compute.py +456 -2515
  12. databricks/sdk/service/dashboards.py +1 -177
  13. databricks/sdk/service/database.py +34 -53
  14. databricks/sdk/service/files.py +2 -218
  15. databricks/sdk/service/iam.py +16 -295
  16. databricks/sdk/service/jobs.py +108 -1171
  17. databricks/sdk/service/marketplace.py +0 -573
  18. databricks/sdk/service/ml.py +76 -2445
  19. databricks/sdk/service/oauth2.py +122 -237
  20. databricks/sdk/service/pipelines.py +180 -752
  21. databricks/sdk/service/provisioning.py +0 -603
  22. databricks/sdk/service/serving.py +5 -577
  23. databricks/sdk/service/settings.py +192 -1560
  24. databricks/sdk/service/sharing.py +5 -470
  25. databricks/sdk/service/sql.py +117 -1704
  26. databricks/sdk/service/vectorsearch.py +0 -391
  27. databricks/sdk/service/workspace.py +250 -721
  28. databricks/sdk/version.py +1 -1
  29. {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/METADATA +1 -1
  30. {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/RECORD +34 -34
  31. {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/WHEEL +0 -0
  32. {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/licenses/LICENSE +0 -0
  33. {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/licenses/NOTICE +0 -0
  34. {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.60.0.dist-info}/top_level.txt +0 -0
@@ -224,40 +224,6 @@ class CreateCredentialAwsCredentials:
224
224
  return cls(sts_role=_from_dict(d, "sts_role", CreateCredentialStsRole))
225
225
 
226
226
 
227
- @dataclass
228
- class CreateCredentialRequest:
229
- credentials_name: str
230
- """The human-readable name of the credential configuration object."""
231
-
232
- aws_credentials: CreateCredentialAwsCredentials
233
-
234
- def as_dict(self) -> dict:
235
- """Serializes the CreateCredentialRequest into a dictionary suitable for use as a JSON request body."""
236
- body = {}
237
- if self.aws_credentials:
238
- body["aws_credentials"] = self.aws_credentials.as_dict()
239
- if self.credentials_name is not None:
240
- body["credentials_name"] = self.credentials_name
241
- return body
242
-
243
- def as_shallow_dict(self) -> dict:
244
- """Serializes the CreateCredentialRequest into a shallow dictionary of its immediate attributes."""
245
- body = {}
246
- if self.aws_credentials:
247
- body["aws_credentials"] = self.aws_credentials
248
- if self.credentials_name is not None:
249
- body["credentials_name"] = self.credentials_name
250
- return body
251
-
252
- @classmethod
253
- def from_dict(cls, d: Dict[str, Any]) -> CreateCredentialRequest:
254
- """Deserializes the CreateCredentialRequest from a dictionary."""
255
- return cls(
256
- aws_credentials=_from_dict(d, "aws_credentials", CreateCredentialAwsCredentials),
257
- credentials_name=d.get("credentials_name", None),
258
- )
259
-
260
-
261
227
  @dataclass
262
228
  class CreateCredentialStsRole:
263
229
  role_arn: Optional[str] = None
@@ -283,47 +249,6 @@ class CreateCredentialStsRole:
283
249
  return cls(role_arn=d.get("role_arn", None))
284
250
 
285
251
 
286
- @dataclass
287
- class CreateCustomerManagedKeyRequest:
288
- use_cases: List[KeyUseCase]
289
- """The cases that the key can be used for."""
290
-
291
- aws_key_info: Optional[CreateAwsKeyInfo] = None
292
-
293
- gcp_key_info: Optional[CreateGcpKeyInfo] = None
294
-
295
- def as_dict(self) -> dict:
296
- """Serializes the CreateCustomerManagedKeyRequest into a dictionary suitable for use as a JSON request body."""
297
- body = {}
298
- if self.aws_key_info:
299
- body["aws_key_info"] = self.aws_key_info.as_dict()
300
- if self.gcp_key_info:
301
- body["gcp_key_info"] = self.gcp_key_info.as_dict()
302
- if self.use_cases:
303
- body["use_cases"] = [v.value for v in self.use_cases]
304
- return body
305
-
306
- def as_shallow_dict(self) -> dict:
307
- """Serializes the CreateCustomerManagedKeyRequest into a shallow dictionary of its immediate attributes."""
308
- body = {}
309
- if self.aws_key_info:
310
- body["aws_key_info"] = self.aws_key_info
311
- if self.gcp_key_info:
312
- body["gcp_key_info"] = self.gcp_key_info
313
- if self.use_cases:
314
- body["use_cases"] = self.use_cases
315
- return body
316
-
317
- @classmethod
318
- def from_dict(cls, d: Dict[str, Any]) -> CreateCustomerManagedKeyRequest:
319
- """Deserializes the CreateCustomerManagedKeyRequest from a dictionary."""
320
- return cls(
321
- aws_key_info=_from_dict(d, "aws_key_info", CreateAwsKeyInfo),
322
- gcp_key_info=_from_dict(d, "gcp_key_info", CreateGcpKeyInfo),
323
- use_cases=_repeated_enum(d, "use_cases", KeyUseCase),
324
- )
325
-
326
-
327
252
  @dataclass
328
253
  class CreateGcpKeyInfo:
329
254
  kms_key_id: str
@@ -349,346 +274,6 @@ class CreateGcpKeyInfo:
349
274
  return cls(kms_key_id=d.get("kms_key_id", None))
350
275
 
351
276
 
352
- @dataclass
353
- class CreateNetworkRequest:
354
- network_name: str
355
- """The human-readable name of the network configuration."""
356
-
357
- gcp_network_info: Optional[GcpNetworkInfo] = None
358
-
359
- security_group_ids: Optional[List[str]] = None
360
- """IDs of one to five security groups associated with this network. Security group IDs **cannot**
361
- be used in multiple network configurations."""
362
-
363
- subnet_ids: Optional[List[str]] = None
364
- """IDs of at least two subnets associated with this network. Subnet IDs **cannot** be used in
365
- multiple network configurations."""
366
-
367
- vpc_endpoints: Optional[NetworkVpcEndpoints] = None
368
-
369
- vpc_id: Optional[str] = None
370
- """The ID of the VPC associated with this network. VPC IDs can be used in multiple network
371
- configurations."""
372
-
373
- def as_dict(self) -> dict:
374
- """Serializes the CreateNetworkRequest into a dictionary suitable for use as a JSON request body."""
375
- body = {}
376
- if self.gcp_network_info:
377
- body["gcp_network_info"] = self.gcp_network_info.as_dict()
378
- if self.network_name is not None:
379
- body["network_name"] = self.network_name
380
- if self.security_group_ids:
381
- body["security_group_ids"] = [v for v in self.security_group_ids]
382
- if self.subnet_ids:
383
- body["subnet_ids"] = [v for v in self.subnet_ids]
384
- if self.vpc_endpoints:
385
- body["vpc_endpoints"] = self.vpc_endpoints.as_dict()
386
- if self.vpc_id is not None:
387
- body["vpc_id"] = self.vpc_id
388
- return body
389
-
390
- def as_shallow_dict(self) -> dict:
391
- """Serializes the CreateNetworkRequest into a shallow dictionary of its immediate attributes."""
392
- body = {}
393
- if self.gcp_network_info:
394
- body["gcp_network_info"] = self.gcp_network_info
395
- if self.network_name is not None:
396
- body["network_name"] = self.network_name
397
- if self.security_group_ids:
398
- body["security_group_ids"] = self.security_group_ids
399
- if self.subnet_ids:
400
- body["subnet_ids"] = self.subnet_ids
401
- if self.vpc_endpoints:
402
- body["vpc_endpoints"] = self.vpc_endpoints
403
- if self.vpc_id is not None:
404
- body["vpc_id"] = self.vpc_id
405
- return body
406
-
407
- @classmethod
408
- def from_dict(cls, d: Dict[str, Any]) -> CreateNetworkRequest:
409
- """Deserializes the CreateNetworkRequest from a dictionary."""
410
- return cls(
411
- gcp_network_info=_from_dict(d, "gcp_network_info", GcpNetworkInfo),
412
- network_name=d.get("network_name", None),
413
- security_group_ids=d.get("security_group_ids", None),
414
- subnet_ids=d.get("subnet_ids", None),
415
- vpc_endpoints=_from_dict(d, "vpc_endpoints", NetworkVpcEndpoints),
416
- vpc_id=d.get("vpc_id", None),
417
- )
418
-
419
-
420
- @dataclass
421
- class CreateStorageConfigurationRequest:
422
- storage_configuration_name: str
423
- """The human-readable name of the storage configuration."""
424
-
425
- root_bucket_info: RootBucketInfo
426
-
427
- def as_dict(self) -> dict:
428
- """Serializes the CreateStorageConfigurationRequest into a dictionary suitable for use as a JSON request body."""
429
- body = {}
430
- if self.root_bucket_info:
431
- body["root_bucket_info"] = self.root_bucket_info.as_dict()
432
- if self.storage_configuration_name is not None:
433
- body["storage_configuration_name"] = self.storage_configuration_name
434
- return body
435
-
436
- def as_shallow_dict(self) -> dict:
437
- """Serializes the CreateStorageConfigurationRequest into a shallow dictionary of its immediate attributes."""
438
- body = {}
439
- if self.root_bucket_info:
440
- body["root_bucket_info"] = self.root_bucket_info
441
- if self.storage_configuration_name is not None:
442
- body["storage_configuration_name"] = self.storage_configuration_name
443
- return body
444
-
445
- @classmethod
446
- def from_dict(cls, d: Dict[str, Any]) -> CreateStorageConfigurationRequest:
447
- """Deserializes the CreateStorageConfigurationRequest from a dictionary."""
448
- return cls(
449
- root_bucket_info=_from_dict(d, "root_bucket_info", RootBucketInfo),
450
- storage_configuration_name=d.get("storage_configuration_name", None),
451
- )
452
-
453
-
454
- @dataclass
455
- class CreateVpcEndpointRequest:
456
- vpc_endpoint_name: str
457
- """The human-readable name of the storage configuration."""
458
-
459
- aws_vpc_endpoint_id: Optional[str] = None
460
- """The ID of the VPC endpoint object in AWS."""
461
-
462
- gcp_vpc_endpoint_info: Optional[GcpVpcEndpointInfo] = None
463
-
464
- region: Optional[str] = None
465
- """The AWS region in which this VPC endpoint object exists."""
466
-
467
- def as_dict(self) -> dict:
468
- """Serializes the CreateVpcEndpointRequest into a dictionary suitable for use as a JSON request body."""
469
- body = {}
470
- if self.aws_vpc_endpoint_id is not None:
471
- body["aws_vpc_endpoint_id"] = self.aws_vpc_endpoint_id
472
- if self.gcp_vpc_endpoint_info:
473
- body["gcp_vpc_endpoint_info"] = self.gcp_vpc_endpoint_info.as_dict()
474
- if self.region is not None:
475
- body["region"] = self.region
476
- if self.vpc_endpoint_name is not None:
477
- body["vpc_endpoint_name"] = self.vpc_endpoint_name
478
- return body
479
-
480
- def as_shallow_dict(self) -> dict:
481
- """Serializes the CreateVpcEndpointRequest into a shallow dictionary of its immediate attributes."""
482
- body = {}
483
- if self.aws_vpc_endpoint_id is not None:
484
- body["aws_vpc_endpoint_id"] = self.aws_vpc_endpoint_id
485
- if self.gcp_vpc_endpoint_info:
486
- body["gcp_vpc_endpoint_info"] = self.gcp_vpc_endpoint_info
487
- if self.region is not None:
488
- body["region"] = self.region
489
- if self.vpc_endpoint_name is not None:
490
- body["vpc_endpoint_name"] = self.vpc_endpoint_name
491
- return body
492
-
493
- @classmethod
494
- def from_dict(cls, d: Dict[str, Any]) -> CreateVpcEndpointRequest:
495
- """Deserializes the CreateVpcEndpointRequest from a dictionary."""
496
- return cls(
497
- aws_vpc_endpoint_id=d.get("aws_vpc_endpoint_id", None),
498
- gcp_vpc_endpoint_info=_from_dict(d, "gcp_vpc_endpoint_info", GcpVpcEndpointInfo),
499
- region=d.get("region", None),
500
- vpc_endpoint_name=d.get("vpc_endpoint_name", None),
501
- )
502
-
503
-
504
- @dataclass
505
- class CreateWorkspaceRequest:
506
- workspace_name: str
507
- """The workspace's human-readable name."""
508
-
509
- aws_region: Optional[str] = None
510
- """The AWS region of the workspace's data plane."""
511
-
512
- cloud: Optional[str] = None
513
- """The cloud provider which the workspace uses. For Google Cloud workspaces, always set this field
514
- to `gcp`."""
515
-
516
- cloud_resource_container: Optional[CloudResourceContainer] = None
517
-
518
- credentials_id: Optional[str] = None
519
- """ID of the workspace's credential configuration object."""
520
-
521
- custom_tags: Optional[Dict[str, str]] = None
522
- """The custom tags key-value pairing that is attached to this workspace. The key-value pair is a
523
- string of utf-8 characters. The value can be an empty string, with maximum length of 255
524
- characters. The key can be of maximum length of 127 characters, and cannot be empty."""
525
-
526
- deployment_name: Optional[str] = None
527
- """The deployment name defines part of the subdomain for the workspace. The workspace URL for the
528
- web application and REST APIs is `<workspace-deployment-name>.cloud.databricks.com`. For
529
- example, if the deployment name is `abcsales`, your workspace URL will be
530
- `https://abcsales.cloud.databricks.com`. Hyphens are allowed. This property supports only the
531
- set of characters that are allowed in a subdomain.
532
-
533
- To set this value, you must have a deployment name prefix. Contact your Databricks account team
534
- to add an account deployment name prefix to your account.
535
-
536
- Workspace deployment names follow the account prefix and a hyphen. For example, if your
537
- account's deployment prefix is `acme` and the workspace deployment name is `workspace-1`, the
538
- JSON response for the `deployment_name` field becomes `acme-workspace-1`. The workspace URL
539
- would be `acme-workspace-1.cloud.databricks.com`.
540
-
541
- You can also set the `deployment_name` to the reserved keyword `EMPTY` if you want the
542
- deployment name to only include the deployment prefix. For example, if your account's deployment
543
- prefix is `acme` and the workspace deployment name is `EMPTY`, the `deployment_name` becomes
544
- `acme` only and the workspace URL is `acme.cloud.databricks.com`.
545
-
546
- This value must be unique across all non-deleted deployments across all AWS regions.
547
-
548
- If a new workspace omits this property, the server generates a unique deployment name for you
549
- with the pattern `dbc-xxxxxxxx-xxxx`."""
550
-
551
- gcp_managed_network_config: Optional[GcpManagedNetworkConfig] = None
552
-
553
- gke_config: Optional[GkeConfig] = None
554
-
555
- is_no_public_ip_enabled: Optional[bool] = None
556
- """Whether no public IP is enabled for the workspace."""
557
-
558
- location: Optional[str] = None
559
- """The Google Cloud region of the workspace data plane in your Google account. For example,
560
- `us-east4`."""
561
-
562
- managed_services_customer_managed_key_id: Optional[str] = None
563
- """The ID of the workspace's managed services encryption key configuration object. This is used to
564
- help protect and control access to the workspace's notebooks, secrets, Databricks SQL queries,
565
- and query history. The provided key configuration object property `use_cases` must contain
566
- `MANAGED_SERVICES`."""
567
-
568
- network_id: Optional[str] = None
569
-
570
- pricing_tier: Optional[PricingTier] = None
571
-
572
- private_access_settings_id: Optional[str] = None
573
- """ID of the workspace's private access settings object. Only used for PrivateLink. This ID must be
574
- specified for customers using [AWS PrivateLink] for either front-end (user-to-workspace
575
- connection), back-end (data plane to control plane connection), or both connection types.
576
-
577
- Before configuring PrivateLink, read the [Databricks article about PrivateLink].",
578
-
579
- [AWS PrivateLink]: https://aws.amazon.com/privatelink/
580
- [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html"""
581
-
582
- storage_configuration_id: Optional[str] = None
583
- """The ID of the workspace's storage configuration object."""
584
-
585
- storage_customer_managed_key_id: Optional[str] = None
586
- """The ID of the workspace's storage encryption key configuration object. This is used to encrypt
587
- the workspace's root S3 bucket (root DBFS and system data) and, optionally, cluster EBS volumes.
588
- The provided key configuration object property `use_cases` must contain `STORAGE`."""
589
-
590
- def as_dict(self) -> dict:
591
- """Serializes the CreateWorkspaceRequest into a dictionary suitable for use as a JSON request body."""
592
- body = {}
593
- if self.aws_region is not None:
594
- body["aws_region"] = self.aws_region
595
- if self.cloud is not None:
596
- body["cloud"] = self.cloud
597
- if self.cloud_resource_container:
598
- body["cloud_resource_container"] = self.cloud_resource_container.as_dict()
599
- if self.credentials_id is not None:
600
- body["credentials_id"] = self.credentials_id
601
- if self.custom_tags:
602
- body["custom_tags"] = self.custom_tags
603
- if self.deployment_name is not None:
604
- body["deployment_name"] = self.deployment_name
605
- if self.gcp_managed_network_config:
606
- body["gcp_managed_network_config"] = self.gcp_managed_network_config.as_dict()
607
- if self.gke_config:
608
- body["gke_config"] = self.gke_config.as_dict()
609
- if self.is_no_public_ip_enabled is not None:
610
- body["is_no_public_ip_enabled"] = self.is_no_public_ip_enabled
611
- if self.location is not None:
612
- body["location"] = self.location
613
- if self.managed_services_customer_managed_key_id is not None:
614
- body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
615
- if self.network_id is not None:
616
- body["network_id"] = self.network_id
617
- if self.pricing_tier is not None:
618
- body["pricing_tier"] = self.pricing_tier.value
619
- if self.private_access_settings_id is not None:
620
- body["private_access_settings_id"] = self.private_access_settings_id
621
- if self.storage_configuration_id is not None:
622
- body["storage_configuration_id"] = self.storage_configuration_id
623
- if self.storage_customer_managed_key_id is not None:
624
- body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
625
- if self.workspace_name is not None:
626
- body["workspace_name"] = self.workspace_name
627
- return body
628
-
629
- def as_shallow_dict(self) -> dict:
630
- """Serializes the CreateWorkspaceRequest into a shallow dictionary of its immediate attributes."""
631
- body = {}
632
- if self.aws_region is not None:
633
- body["aws_region"] = self.aws_region
634
- if self.cloud is not None:
635
- body["cloud"] = self.cloud
636
- if self.cloud_resource_container:
637
- body["cloud_resource_container"] = self.cloud_resource_container
638
- if self.credentials_id is not None:
639
- body["credentials_id"] = self.credentials_id
640
- if self.custom_tags:
641
- body["custom_tags"] = self.custom_tags
642
- if self.deployment_name is not None:
643
- body["deployment_name"] = self.deployment_name
644
- if self.gcp_managed_network_config:
645
- body["gcp_managed_network_config"] = self.gcp_managed_network_config
646
- if self.gke_config:
647
- body["gke_config"] = self.gke_config
648
- if self.is_no_public_ip_enabled is not None:
649
- body["is_no_public_ip_enabled"] = self.is_no_public_ip_enabled
650
- if self.location is not None:
651
- body["location"] = self.location
652
- if self.managed_services_customer_managed_key_id is not None:
653
- body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
654
- if self.network_id is not None:
655
- body["network_id"] = self.network_id
656
- if self.pricing_tier is not None:
657
- body["pricing_tier"] = self.pricing_tier
658
- if self.private_access_settings_id is not None:
659
- body["private_access_settings_id"] = self.private_access_settings_id
660
- if self.storage_configuration_id is not None:
661
- body["storage_configuration_id"] = self.storage_configuration_id
662
- if self.storage_customer_managed_key_id is not None:
663
- body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
664
- if self.workspace_name is not None:
665
- body["workspace_name"] = self.workspace_name
666
- return body
667
-
668
- @classmethod
669
- def from_dict(cls, d: Dict[str, Any]) -> CreateWorkspaceRequest:
670
- """Deserializes the CreateWorkspaceRequest from a dictionary."""
671
- return cls(
672
- aws_region=d.get("aws_region", None),
673
- cloud=d.get("cloud", None),
674
- cloud_resource_container=_from_dict(d, "cloud_resource_container", CloudResourceContainer),
675
- credentials_id=d.get("credentials_id", None),
676
- custom_tags=d.get("custom_tags", None),
677
- deployment_name=d.get("deployment_name", None),
678
- gcp_managed_network_config=_from_dict(d, "gcp_managed_network_config", GcpManagedNetworkConfig),
679
- gke_config=_from_dict(d, "gke_config", GkeConfig),
680
- is_no_public_ip_enabled=d.get("is_no_public_ip_enabled", None),
681
- location=d.get("location", None),
682
- managed_services_customer_managed_key_id=d.get("managed_services_customer_managed_key_id", None),
683
- network_id=d.get("network_id", None),
684
- pricing_tier=_enum(d, "pricing_tier", PricingTier),
685
- private_access_settings_id=d.get("private_access_settings_id", None),
686
- storage_configuration_id=d.get("storage_configuration_id", None),
687
- storage_customer_managed_key_id=d.get("storage_customer_managed_key_id", None),
688
- workspace_name=d.get("workspace_name", None),
689
- )
690
-
691
-
692
277
  @dataclass
693
278
  class Credential:
694
279
  account_id: Optional[str] = None
@@ -1689,194 +1274,6 @@ class UpdateResponse:
1689
1274
  return cls()
1690
1275
 
1691
1276
 
1692
- @dataclass
1693
- class UpdateWorkspaceRequest:
1694
- aws_region: Optional[str] = None
1695
- """The AWS region of the workspace's data plane (for example, `us-west-2`). This parameter is
1696
- available only for updating failed workspaces."""
1697
-
1698
- credentials_id: Optional[str] = None
1699
- """ID of the workspace's credential configuration object. This parameter is available for updating
1700
- both failed and running workspaces."""
1701
-
1702
- custom_tags: Optional[Dict[str, str]] = None
1703
- """The custom tags key-value pairing that is attached to this workspace. The key-value pair is a
1704
- string of utf-8 characters. The value can be an empty string, with maximum length of 255
1705
- characters. The key can be of maximum length of 127 characters, and cannot be empty."""
1706
-
1707
- managed_services_customer_managed_key_id: Optional[str] = None
1708
- """The ID of the workspace's managed services encryption key configuration object. This parameter
1709
- is available only for updating failed workspaces."""
1710
-
1711
- network_connectivity_config_id: Optional[str] = None
1712
-
1713
- network_id: Optional[str] = None
1714
- """The ID of the workspace's network configuration object. Used only if you already use a
1715
- customer-managed VPC. For failed workspaces only, you can switch from a Databricks-managed VPC
1716
- to a customer-managed VPC by updating the workspace to add a network configuration ID."""
1717
-
1718
- private_access_settings_id: Optional[str] = None
1719
- """The ID of the workspace's private access settings configuration object. This parameter is
1720
- available only for updating failed workspaces."""
1721
-
1722
- storage_configuration_id: Optional[str] = None
1723
- """The ID of the workspace's storage configuration object. This parameter is available only for
1724
- updating failed workspaces."""
1725
-
1726
- storage_customer_managed_key_id: Optional[str] = None
1727
- """The ID of the key configuration object for workspace storage. This parameter is available for
1728
- updating both failed and running workspaces."""
1729
-
1730
- workspace_id: Optional[int] = None
1731
- """Workspace ID."""
1732
-
1733
- def as_dict(self) -> dict:
1734
- """Serializes the UpdateWorkspaceRequest into a dictionary suitable for use as a JSON request body."""
1735
- body = {}
1736
- if self.aws_region is not None:
1737
- body["aws_region"] = self.aws_region
1738
- if self.credentials_id is not None:
1739
- body["credentials_id"] = self.credentials_id
1740
- if self.custom_tags:
1741
- body["custom_tags"] = self.custom_tags
1742
- if self.managed_services_customer_managed_key_id is not None:
1743
- body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
1744
- if self.network_connectivity_config_id is not None:
1745
- body["network_connectivity_config_id"] = self.network_connectivity_config_id
1746
- if self.network_id is not None:
1747
- body["network_id"] = self.network_id
1748
- if self.private_access_settings_id is not None:
1749
- body["private_access_settings_id"] = self.private_access_settings_id
1750
- if self.storage_configuration_id is not None:
1751
- body["storage_configuration_id"] = self.storage_configuration_id
1752
- if self.storage_customer_managed_key_id is not None:
1753
- body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
1754
- if self.workspace_id is not None:
1755
- body["workspace_id"] = self.workspace_id
1756
- return body
1757
-
1758
- def as_shallow_dict(self) -> dict:
1759
- """Serializes the UpdateWorkspaceRequest into a shallow dictionary of its immediate attributes."""
1760
- body = {}
1761
- if self.aws_region is not None:
1762
- body["aws_region"] = self.aws_region
1763
- if self.credentials_id is not None:
1764
- body["credentials_id"] = self.credentials_id
1765
- if self.custom_tags:
1766
- body["custom_tags"] = self.custom_tags
1767
- if self.managed_services_customer_managed_key_id is not None:
1768
- body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
1769
- if self.network_connectivity_config_id is not None:
1770
- body["network_connectivity_config_id"] = self.network_connectivity_config_id
1771
- if self.network_id is not None:
1772
- body["network_id"] = self.network_id
1773
- if self.private_access_settings_id is not None:
1774
- body["private_access_settings_id"] = self.private_access_settings_id
1775
- if self.storage_configuration_id is not None:
1776
- body["storage_configuration_id"] = self.storage_configuration_id
1777
- if self.storage_customer_managed_key_id is not None:
1778
- body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
1779
- if self.workspace_id is not None:
1780
- body["workspace_id"] = self.workspace_id
1781
- return body
1782
-
1783
- @classmethod
1784
- def from_dict(cls, d: Dict[str, Any]) -> UpdateWorkspaceRequest:
1785
- """Deserializes the UpdateWorkspaceRequest from a dictionary."""
1786
- return cls(
1787
- aws_region=d.get("aws_region", None),
1788
- credentials_id=d.get("credentials_id", None),
1789
- custom_tags=d.get("custom_tags", None),
1790
- managed_services_customer_managed_key_id=d.get("managed_services_customer_managed_key_id", None),
1791
- network_connectivity_config_id=d.get("network_connectivity_config_id", None),
1792
- network_id=d.get("network_id", None),
1793
- private_access_settings_id=d.get("private_access_settings_id", None),
1794
- storage_configuration_id=d.get("storage_configuration_id", None),
1795
- storage_customer_managed_key_id=d.get("storage_customer_managed_key_id", None),
1796
- workspace_id=d.get("workspace_id", None),
1797
- )
1798
-
1799
-
1800
- @dataclass
1801
- class UpsertPrivateAccessSettingsRequest:
1802
- private_access_settings_name: str
1803
- """The human-readable name of the private access settings object."""
1804
-
1805
- region: str
1806
- """The cloud region for workspaces associated with this private access settings object."""
1807
-
1808
- allowed_vpc_endpoint_ids: Optional[List[str]] = None
1809
- """An array of Databricks VPC endpoint IDs. This is the Databricks ID that is returned when
1810
- registering the VPC endpoint configuration in your Databricks account. This is not the ID of the
1811
- VPC endpoint in AWS.
1812
-
1813
- Only used when `private_access_level` is set to `ENDPOINT`. This is an allow list of VPC
1814
- endpoints that in your account that can connect to your workspace over AWS PrivateLink.
1815
-
1816
- If hybrid access to your workspace is enabled by setting `public_access_enabled` to `true`, this
1817
- control only works for PrivateLink connections. To control how your workspace is accessed via
1818
- public internet, see [IP access lists].
1819
-
1820
- [IP access lists]: https://docs.databricks.com/security/network/ip-access-list.html"""
1821
-
1822
- private_access_level: Optional[PrivateAccessLevel] = None
1823
-
1824
- private_access_settings_id: Optional[str] = None
1825
- """Databricks Account API private access settings ID."""
1826
-
1827
- public_access_enabled: Optional[bool] = None
1828
- """Determines if the workspace can be accessed over public internet. For fully private workspaces,
1829
- you can optionally specify `false`, but only if you implement both the front-end and the
1830
- back-end PrivateLink connections. Otherwise, specify `true`, which means that public access is
1831
- enabled."""
1832
-
1833
- def as_dict(self) -> dict:
1834
- """Serializes the UpsertPrivateAccessSettingsRequest into a dictionary suitable for use as a JSON request body."""
1835
- body = {}
1836
- if self.allowed_vpc_endpoint_ids:
1837
- body["allowed_vpc_endpoint_ids"] = [v for v in self.allowed_vpc_endpoint_ids]
1838
- if self.private_access_level is not None:
1839
- body["private_access_level"] = self.private_access_level.value
1840
- if self.private_access_settings_id is not None:
1841
- body["private_access_settings_id"] = self.private_access_settings_id
1842
- if self.private_access_settings_name is not None:
1843
- body["private_access_settings_name"] = self.private_access_settings_name
1844
- if self.public_access_enabled is not None:
1845
- body["public_access_enabled"] = self.public_access_enabled
1846
- if self.region is not None:
1847
- body["region"] = self.region
1848
- return body
1849
-
1850
- def as_shallow_dict(self) -> dict:
1851
- """Serializes the UpsertPrivateAccessSettingsRequest into a shallow dictionary of its immediate attributes."""
1852
- body = {}
1853
- if self.allowed_vpc_endpoint_ids:
1854
- body["allowed_vpc_endpoint_ids"] = self.allowed_vpc_endpoint_ids
1855
- if self.private_access_level is not None:
1856
- body["private_access_level"] = self.private_access_level
1857
- if self.private_access_settings_id is not None:
1858
- body["private_access_settings_id"] = self.private_access_settings_id
1859
- if self.private_access_settings_name is not None:
1860
- body["private_access_settings_name"] = self.private_access_settings_name
1861
- if self.public_access_enabled is not None:
1862
- body["public_access_enabled"] = self.public_access_enabled
1863
- if self.region is not None:
1864
- body["region"] = self.region
1865
- return body
1866
-
1867
- @classmethod
1868
- def from_dict(cls, d: Dict[str, Any]) -> UpsertPrivateAccessSettingsRequest:
1869
- """Deserializes the UpsertPrivateAccessSettingsRequest from a dictionary."""
1870
- return cls(
1871
- allowed_vpc_endpoint_ids=d.get("allowed_vpc_endpoint_ids", None),
1872
- private_access_level=_enum(d, "private_access_level", PrivateAccessLevel),
1873
- private_access_settings_id=d.get("private_access_settings_id", None),
1874
- private_access_settings_name=d.get("private_access_settings_name", None),
1875
- public_access_enabled=d.get("public_access_enabled", None),
1876
- region=d.get("region", None),
1877
- )
1878
-
1879
-
1880
1277
  @dataclass
1881
1278
  class VpcEndpoint:
1882
1279
  account_id: Optional[str] = None