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

@@ -19,6 +19,50 @@ _LOG = logging.getLogger("databricks.sdk")
19
19
  # all definitions in this file are in alphabetical order
20
20
 
21
21
 
22
+ @dataclass
23
+ class AccessRequestDestinations:
24
+ destinations: List[NotificationDestination]
25
+ """The access request destinations for the securable."""
26
+
27
+ securable: Securable
28
+ """The securable for which the access request destinations are being retrieved."""
29
+
30
+ are_any_destinations_hidden: Optional[bool] = None
31
+ """Indicates whether any destinations are hidden from the caller due to a lack of permissions. This
32
+ value is true if the caller does not have permission to see all destinations."""
33
+
34
+ def as_dict(self) -> dict:
35
+ """Serializes the AccessRequestDestinations into a dictionary suitable for use as a JSON request body."""
36
+ body = {}
37
+ if self.are_any_destinations_hidden is not None:
38
+ body["are_any_destinations_hidden"] = self.are_any_destinations_hidden
39
+ if self.destinations:
40
+ body["destinations"] = [v.as_dict() for v in self.destinations]
41
+ if self.securable:
42
+ body["securable"] = self.securable.as_dict()
43
+ return body
44
+
45
+ def as_shallow_dict(self) -> dict:
46
+ """Serializes the AccessRequestDestinations into a shallow dictionary of its immediate attributes."""
47
+ body = {}
48
+ if self.are_any_destinations_hidden is not None:
49
+ body["are_any_destinations_hidden"] = self.are_any_destinations_hidden
50
+ if self.destinations:
51
+ body["destinations"] = self.destinations
52
+ if self.securable:
53
+ body["securable"] = self.securable
54
+ return body
55
+
56
+ @classmethod
57
+ def from_dict(cls, d: Dict[str, Any]) -> AccessRequestDestinations:
58
+ """Deserializes the AccessRequestDestinations from a dictionary."""
59
+ return cls(
60
+ are_any_destinations_hidden=d.get("are_any_destinations_hidden", None),
61
+ destinations=_repeated_dict(d, "destinations", NotificationDestination),
62
+ securable=_from_dict(d, "securable", Securable),
63
+ )
64
+
65
+
22
66
  @dataclass
23
67
  class AccountsMetastoreAssignment:
24
68
  metastore_assignment: Optional[MetastoreAssignment] = None
@@ -706,6 +750,31 @@ class AzureUserDelegationSas:
706
750
  return cls(sas_token=d.get("sas_token", None))
707
751
 
708
752
 
753
+ @dataclass
754
+ class BatchCreateAccessRequestsResponse:
755
+ responses: Optional[List[CreateAccessRequestResponse]] = None
756
+ """The access request destinations for each securable object the principal requested."""
757
+
758
+ def as_dict(self) -> dict:
759
+ """Serializes the BatchCreateAccessRequestsResponse into a dictionary suitable for use as a JSON request body."""
760
+ body = {}
761
+ if self.responses:
762
+ body["responses"] = [v.as_dict() for v in self.responses]
763
+ return body
764
+
765
+ def as_shallow_dict(self) -> dict:
766
+ """Serializes the BatchCreateAccessRequestsResponse into a shallow dictionary of its immediate attributes."""
767
+ body = {}
768
+ if self.responses:
769
+ body["responses"] = self.responses
770
+ return body
771
+
772
+ @classmethod
773
+ def from_dict(cls, d: Dict[str, Any]) -> BatchCreateAccessRequestsResponse:
774
+ """Deserializes the BatchCreateAccessRequestsResponse from a dictionary."""
775
+ return cls(responses=_repeated_dict(d, "responses", CreateAccessRequestResponse))
776
+
777
+
709
778
  @dataclass
710
779
  class CancelRefreshResponse:
711
780
  def as_dict(self) -> dict:
@@ -1138,6 +1207,55 @@ class ColumnMask:
1138
1207
  return cls(function_name=d.get("function_name", None), using_column_names=d.get("using_column_names", None))
1139
1208
 
1140
1209
 
1210
+ @dataclass
1211
+ class ColumnMaskOptions:
1212
+ function_name: str
1213
+ """The fully qualified name of the column mask function. The function is called on each row of the
1214
+ target table. The function's first argument and its return type should match the type of the
1215
+ masked column. Required on create and update."""
1216
+
1217
+ on_column: str
1218
+ """The alias of the column to be masked. The alias must refer to one of matched columns. The values
1219
+ of the column is passed to the column mask function as the first argument. Required on create
1220
+ and update."""
1221
+
1222
+ using: Optional[List[FunctionArgument]] = None
1223
+ """Optional list of column aliases or constant literals to be passed as additional arguments to the
1224
+ column mask function. The type of each column should match the positional argument of the column
1225
+ mask function."""
1226
+
1227
+ def as_dict(self) -> dict:
1228
+ """Serializes the ColumnMaskOptions into a dictionary suitable for use as a JSON request body."""
1229
+ body = {}
1230
+ if self.function_name is not None:
1231
+ body["function_name"] = self.function_name
1232
+ if self.on_column is not None:
1233
+ body["on_column"] = self.on_column
1234
+ if self.using:
1235
+ body["using"] = [v.as_dict() for v in self.using]
1236
+ return body
1237
+
1238
+ def as_shallow_dict(self) -> dict:
1239
+ """Serializes the ColumnMaskOptions into a shallow dictionary of its immediate attributes."""
1240
+ body = {}
1241
+ if self.function_name is not None:
1242
+ body["function_name"] = self.function_name
1243
+ if self.on_column is not None:
1244
+ body["on_column"] = self.on_column
1245
+ if self.using:
1246
+ body["using"] = self.using
1247
+ return body
1248
+
1249
+ @classmethod
1250
+ def from_dict(cls, d: Dict[str, Any]) -> ColumnMaskOptions:
1251
+ """Deserializes the ColumnMaskOptions from a dictionary."""
1252
+ return cls(
1253
+ function_name=d.get("function_name", None),
1254
+ on_column=d.get("on_column", None),
1255
+ using=_repeated_dict(d, "using", FunctionArgument),
1256
+ )
1257
+
1258
+
1141
1259
  @dataclass
1142
1260
  class ColumnRelationship:
1143
1261
  source: Optional[str] = None
@@ -1245,9 +1363,6 @@ class ConnectionInfo:
1245
1363
  credential_type: Optional[CredentialType] = None
1246
1364
  """The type of credential."""
1247
1365
 
1248
- environment_settings: Optional[EnvironmentSettings] = None
1249
- """[Create,Update:OPT] Connection environment settings as EnvironmentSettings object."""
1250
-
1251
1366
  full_name: Optional[str] = None
1252
1367
  """Full name of connection."""
1253
1368
 
@@ -1297,8 +1412,6 @@ class ConnectionInfo:
1297
1412
  body["created_by"] = self.created_by
1298
1413
  if self.credential_type is not None:
1299
1414
  body["credential_type"] = self.credential_type.value
1300
- if self.environment_settings:
1301
- body["environment_settings"] = self.environment_settings.as_dict()
1302
1415
  if self.full_name is not None:
1303
1416
  body["full_name"] = self.full_name
1304
1417
  if self.metastore_id is not None:
@@ -1340,8 +1453,6 @@ class ConnectionInfo:
1340
1453
  body["created_by"] = self.created_by
1341
1454
  if self.credential_type is not None:
1342
1455
  body["credential_type"] = self.credential_type
1343
- if self.environment_settings:
1344
- body["environment_settings"] = self.environment_settings
1345
1456
  if self.full_name is not None:
1346
1457
  body["full_name"] = self.full_name
1347
1458
  if self.metastore_id is not None:
@@ -1378,7 +1489,6 @@ class ConnectionInfo:
1378
1489
  created_at=d.get("created_at", None),
1379
1490
  created_by=d.get("created_by", None),
1380
1491
  credential_type=_enum(d, "credential_type", CredentialType),
1381
- environment_settings=_from_dict(d, "environment_settings", EnvironmentSettings),
1382
1492
  full_name=d.get("full_name", None),
1383
1493
  metastore_id=d.get("metastore_id", None),
1384
1494
  name=d.get("name", None),
@@ -1467,6 +1577,93 @@ class ContinuousUpdateStatus:
1467
1577
  )
1468
1578
 
1469
1579
 
1580
+ @dataclass
1581
+ class CreateAccessRequest:
1582
+ behalf_of: Optional[Principal] = None
1583
+ """Optional. The principal this request is for. Empty `behalf_of` defaults to the requester's
1584
+ identity.
1585
+
1586
+ Principals must be unique across the API call."""
1587
+
1588
+ comment: Optional[str] = None
1589
+ """Optional. Comment associated with the request.
1590
+
1591
+ At most 200 characters, can only contain lowercase/uppercase letters (a-z, A-Z), numbers (0-9),
1592
+ punctuation, and spaces."""
1593
+
1594
+ securable_permissions: Optional[List[SecurablePermissions]] = None
1595
+ """List of securables and their corresponding requested UC privileges.
1596
+
1597
+ At most 30 securables can be requested for a principal per batched call. Each securable can only
1598
+ be requested once per principal."""
1599
+
1600
+ def as_dict(self) -> dict:
1601
+ """Serializes the CreateAccessRequest into a dictionary suitable for use as a JSON request body."""
1602
+ body = {}
1603
+ if self.behalf_of:
1604
+ body["behalf_of"] = self.behalf_of.as_dict()
1605
+ if self.comment is not None:
1606
+ body["comment"] = self.comment
1607
+ if self.securable_permissions:
1608
+ body["securable_permissions"] = [v.as_dict() for v in self.securable_permissions]
1609
+ return body
1610
+
1611
+ def as_shallow_dict(self) -> dict:
1612
+ """Serializes the CreateAccessRequest into a shallow dictionary of its immediate attributes."""
1613
+ body = {}
1614
+ if self.behalf_of:
1615
+ body["behalf_of"] = self.behalf_of
1616
+ if self.comment is not None:
1617
+ body["comment"] = self.comment
1618
+ if self.securable_permissions:
1619
+ body["securable_permissions"] = self.securable_permissions
1620
+ return body
1621
+
1622
+ @classmethod
1623
+ def from_dict(cls, d: Dict[str, Any]) -> CreateAccessRequest:
1624
+ """Deserializes the CreateAccessRequest from a dictionary."""
1625
+ return cls(
1626
+ behalf_of=_from_dict(d, "behalf_of", Principal),
1627
+ comment=d.get("comment", None),
1628
+ securable_permissions=_repeated_dict(d, "securable_permissions", SecurablePermissions),
1629
+ )
1630
+
1631
+
1632
+ @dataclass
1633
+ class CreateAccessRequestResponse:
1634
+ behalf_of: Optional[Principal] = None
1635
+ """The principal the request was made on behalf of."""
1636
+
1637
+ request_destinations: Optional[List[AccessRequestDestinations]] = None
1638
+ """The access request destinations for all the securables the principal requested."""
1639
+
1640
+ def as_dict(self) -> dict:
1641
+ """Serializes the CreateAccessRequestResponse into a dictionary suitable for use as a JSON request body."""
1642
+ body = {}
1643
+ if self.behalf_of:
1644
+ body["behalf_of"] = self.behalf_of.as_dict()
1645
+ if self.request_destinations:
1646
+ body["request_destinations"] = [v.as_dict() for v in self.request_destinations]
1647
+ return body
1648
+
1649
+ def as_shallow_dict(self) -> dict:
1650
+ """Serializes the CreateAccessRequestResponse into a shallow dictionary of its immediate attributes."""
1651
+ body = {}
1652
+ if self.behalf_of:
1653
+ body["behalf_of"] = self.behalf_of
1654
+ if self.request_destinations:
1655
+ body["request_destinations"] = self.request_destinations
1656
+ return body
1657
+
1658
+ @classmethod
1659
+ def from_dict(cls, d: Dict[str, Any]) -> CreateAccessRequestResponse:
1660
+ """Deserializes the CreateAccessRequestResponse from a dictionary."""
1661
+ return cls(
1662
+ behalf_of=_from_dict(d, "behalf_of", Principal),
1663
+ request_destinations=_repeated_dict(d, "request_destinations", AccessRequestDestinations),
1664
+ )
1665
+
1666
+
1470
1667
  @dataclass
1471
1668
  class CreateFunction:
1472
1669
  name: str
@@ -2378,6 +2575,24 @@ class DeleteMonitorResponse:
2378
2575
  return cls()
2379
2576
 
2380
2577
 
2578
+ @dataclass
2579
+ class DeletePolicyResponse:
2580
+ def as_dict(self) -> dict:
2581
+ """Serializes the DeletePolicyResponse into a dictionary suitable for use as a JSON request body."""
2582
+ body = {}
2583
+ return body
2584
+
2585
+ def as_shallow_dict(self) -> dict:
2586
+ """Serializes the DeletePolicyResponse into a shallow dictionary of its immediate attributes."""
2587
+ body = {}
2588
+ return body
2589
+
2590
+ @classmethod
2591
+ def from_dict(cls, d: Dict[str, Any]) -> DeletePolicyResponse:
2592
+ """Deserializes the DeletePolicyResponse from a dictionary."""
2593
+ return cls()
2594
+
2595
+
2381
2596
  @dataclass
2382
2597
  class DeleteRequestExternalLineage:
2383
2598
  source: ExternalLineageObject
@@ -2568,6 +2783,15 @@ class DependencyList:
2568
2783
  return cls(dependencies=_repeated_dict(d, "dependencies", Dependency))
2569
2784
 
2570
2785
 
2786
+ class DestinationType(Enum):
2787
+
2788
+ EMAIL = "EMAIL"
2789
+ GENERIC_WEBHOOK = "GENERIC_WEBHOOK"
2790
+ MICROSOFT_TEAMS = "MICROSOFT_TEAMS"
2791
+ SLACK = "SLACK"
2792
+ URL = "URL"
2793
+
2794
+
2571
2795
  @dataclass
2572
2796
  class DisableResponse:
2573
2797
  def as_dict(self) -> dict:
@@ -2805,34 +3029,56 @@ class EncryptionDetails:
2805
3029
 
2806
3030
 
2807
3031
  @dataclass
2808
- class EnvironmentSettings:
2809
- environment_version: Optional[str] = None
3032
+ class EntityTagAssignment:
3033
+ """Represents a tag assignment to an entity"""
3034
+
3035
+ entity_name: str
3036
+ """The fully qualified name of the entity to which the tag is assigned"""
2810
3037
 
2811
- java_dependencies: Optional[List[str]] = None
3038
+ tag_key: str
3039
+ """The key of the tag"""
3040
+
3041
+ entity_type: str
3042
+ """The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas,
3043
+ tables, columns, volumes."""
3044
+
3045
+ tag_value: Optional[str] = None
3046
+ """The value of the tag"""
2812
3047
 
2813
3048
  def as_dict(self) -> dict:
2814
- """Serializes the EnvironmentSettings into a dictionary suitable for use as a JSON request body."""
3049
+ """Serializes the EntityTagAssignment into a dictionary suitable for use as a JSON request body."""
2815
3050
  body = {}
2816
- if self.environment_version is not None:
2817
- body["environment_version"] = self.environment_version
2818
- if self.java_dependencies:
2819
- body["java_dependencies"] = [v for v in self.java_dependencies]
3051
+ if self.entity_name is not None:
3052
+ body["entity_name"] = self.entity_name
3053
+ if self.entity_type is not None:
3054
+ body["entity_type"] = self.entity_type
3055
+ if self.tag_key is not None:
3056
+ body["tag_key"] = self.tag_key
3057
+ if self.tag_value is not None:
3058
+ body["tag_value"] = self.tag_value
2820
3059
  return body
2821
3060
 
2822
3061
  def as_shallow_dict(self) -> dict:
2823
- """Serializes the EnvironmentSettings into a shallow dictionary of its immediate attributes."""
3062
+ """Serializes the EntityTagAssignment into a shallow dictionary of its immediate attributes."""
2824
3063
  body = {}
2825
- if self.environment_version is not None:
2826
- body["environment_version"] = self.environment_version
2827
- if self.java_dependencies:
2828
- body["java_dependencies"] = self.java_dependencies
3064
+ if self.entity_name is not None:
3065
+ body["entity_name"] = self.entity_name
3066
+ if self.entity_type is not None:
3067
+ body["entity_type"] = self.entity_type
3068
+ if self.tag_key is not None:
3069
+ body["tag_key"] = self.tag_key
3070
+ if self.tag_value is not None:
3071
+ body["tag_value"] = self.tag_value
2829
3072
  return body
2830
3073
 
2831
3074
  @classmethod
2832
- def from_dict(cls, d: Dict[str, Any]) -> EnvironmentSettings:
2833
- """Deserializes the EnvironmentSettings from a dictionary."""
3075
+ def from_dict(cls, d: Dict[str, Any]) -> EntityTagAssignment:
3076
+ """Deserializes the EntityTagAssignment from a dictionary."""
2834
3077
  return cls(
2835
- environment_version=d.get("environment_version", None), java_dependencies=d.get("java_dependencies", None)
3078
+ entity_name=d.get("entity_name", None),
3079
+ entity_type=d.get("entity_type", None),
3080
+ tag_key=d.get("tag_key", None),
3081
+ tag_value=d.get("tag_value", None),
2836
3082
  )
2837
3083
 
2838
3084
 
@@ -3830,6 +4076,38 @@ class ForeignKeyConstraint:
3830
4076
  )
3831
4077
 
3832
4078
 
4079
+ @dataclass
4080
+ class FunctionArgument:
4081
+ alias: Optional[str] = None
4082
+ """The alias of a matched column."""
4083
+
4084
+ constant: Optional[str] = None
4085
+ """A constant literal."""
4086
+
4087
+ def as_dict(self) -> dict:
4088
+ """Serializes the FunctionArgument into a dictionary suitable for use as a JSON request body."""
4089
+ body = {}
4090
+ if self.alias is not None:
4091
+ body["alias"] = self.alias
4092
+ if self.constant is not None:
4093
+ body["constant"] = self.constant
4094
+ return body
4095
+
4096
+ def as_shallow_dict(self) -> dict:
4097
+ """Serializes the FunctionArgument into a shallow dictionary of its immediate attributes."""
4098
+ body = {}
4099
+ if self.alias is not None:
4100
+ body["alias"] = self.alias
4101
+ if self.constant is not None:
4102
+ body["constant"] = self.constant
4103
+ return body
4104
+
4105
+ @classmethod
4106
+ def from_dict(cls, d: Dict[str, Any]) -> FunctionArgument:
4107
+ """Deserializes the FunctionArgument from a dictionary."""
4108
+ return cls(alias=d.get("alias", None), constant=d.get("constant", None))
4109
+
4110
+
3833
4111
  @dataclass
3834
4112
  class FunctionDependency:
3835
4113
  """A function that is dependent on a SQL object."""
@@ -4362,6 +4640,77 @@ class GcpPubsub:
4362
4640
  )
4363
4641
 
4364
4642
 
4643
+ @dataclass
4644
+ class GenerateTemporaryPathCredentialResponse:
4645
+ aws_temp_credentials: Optional[AwsCredentials] = None
4646
+
4647
+ azure_aad: Optional[AzureActiveDirectoryToken] = None
4648
+
4649
+ azure_user_delegation_sas: Optional[AzureUserDelegationSas] = None
4650
+
4651
+ expiration_time: Optional[int] = None
4652
+ """Server time when the credential will expire, in epoch milliseconds. The API client is advised to
4653
+ cache the credential given this expiration time."""
4654
+
4655
+ gcp_oauth_token: Optional[GcpOauthToken] = None
4656
+
4657
+ r2_temp_credentials: Optional[R2Credentials] = None
4658
+
4659
+ url: Optional[str] = None
4660
+ """The URL of the storage path accessible by the temporary credential."""
4661
+
4662
+ def as_dict(self) -> dict:
4663
+ """Serializes the GenerateTemporaryPathCredentialResponse into a dictionary suitable for use as a JSON request body."""
4664
+ body = {}
4665
+ if self.aws_temp_credentials:
4666
+ body["aws_temp_credentials"] = self.aws_temp_credentials.as_dict()
4667
+ if self.azure_aad:
4668
+ body["azure_aad"] = self.azure_aad.as_dict()
4669
+ if self.azure_user_delegation_sas:
4670
+ body["azure_user_delegation_sas"] = self.azure_user_delegation_sas.as_dict()
4671
+ if self.expiration_time is not None:
4672
+ body["expiration_time"] = self.expiration_time
4673
+ if self.gcp_oauth_token:
4674
+ body["gcp_oauth_token"] = self.gcp_oauth_token.as_dict()
4675
+ if self.r2_temp_credentials:
4676
+ body["r2_temp_credentials"] = self.r2_temp_credentials.as_dict()
4677
+ if self.url is not None:
4678
+ body["url"] = self.url
4679
+ return body
4680
+
4681
+ def as_shallow_dict(self) -> dict:
4682
+ """Serializes the GenerateTemporaryPathCredentialResponse into a shallow dictionary of its immediate attributes."""
4683
+ body = {}
4684
+ if self.aws_temp_credentials:
4685
+ body["aws_temp_credentials"] = self.aws_temp_credentials
4686
+ if self.azure_aad:
4687
+ body["azure_aad"] = self.azure_aad
4688
+ if self.azure_user_delegation_sas:
4689
+ body["azure_user_delegation_sas"] = self.azure_user_delegation_sas
4690
+ if self.expiration_time is not None:
4691
+ body["expiration_time"] = self.expiration_time
4692
+ if self.gcp_oauth_token:
4693
+ body["gcp_oauth_token"] = self.gcp_oauth_token
4694
+ if self.r2_temp_credentials:
4695
+ body["r2_temp_credentials"] = self.r2_temp_credentials
4696
+ if self.url is not None:
4697
+ body["url"] = self.url
4698
+ return body
4699
+
4700
+ @classmethod
4701
+ def from_dict(cls, d: Dict[str, Any]) -> GenerateTemporaryPathCredentialResponse:
4702
+ """Deserializes the GenerateTemporaryPathCredentialResponse from a dictionary."""
4703
+ return cls(
4704
+ aws_temp_credentials=_from_dict(d, "aws_temp_credentials", AwsCredentials),
4705
+ azure_aad=_from_dict(d, "azure_aad", AzureActiveDirectoryToken),
4706
+ azure_user_delegation_sas=_from_dict(d, "azure_user_delegation_sas", AzureUserDelegationSas),
4707
+ expiration_time=d.get("expiration_time", None),
4708
+ gcp_oauth_token=_from_dict(d, "gcp_oauth_token", GcpOauthToken),
4709
+ r2_temp_credentials=_from_dict(d, "r2_temp_credentials", R2Credentials),
4710
+ url=d.get("url", None),
4711
+ )
4712
+
4713
+
4365
4714
  @dataclass
4366
4715
  class GenerateTemporaryServiceCredentialAzureOptions:
4367
4716
  """The Azure cloud options to customize the requested temporary credential"""
@@ -4955,6 +5304,41 @@ class ListCredentialsResponse:
4955
5304
  )
4956
5305
 
4957
5306
 
5307
+ @dataclass
5308
+ class ListEntityTagAssignmentsResponse:
5309
+ next_page_token: Optional[str] = None
5310
+ """Optional. Pagination token for retrieving the next page of results"""
5311
+
5312
+ tag_assignments: Optional[List[EntityTagAssignment]] = None
5313
+ """The list of tag assignments"""
5314
+
5315
+ def as_dict(self) -> dict:
5316
+ """Serializes the ListEntityTagAssignmentsResponse into a dictionary suitable for use as a JSON request body."""
5317
+ body = {}
5318
+ if self.next_page_token is not None:
5319
+ body["next_page_token"] = self.next_page_token
5320
+ if self.tag_assignments:
5321
+ body["tag_assignments"] = [v.as_dict() for v in self.tag_assignments]
5322
+ return body
5323
+
5324
+ def as_shallow_dict(self) -> dict:
5325
+ """Serializes the ListEntityTagAssignmentsResponse into a shallow dictionary of its immediate attributes."""
5326
+ body = {}
5327
+ if self.next_page_token is not None:
5328
+ body["next_page_token"] = self.next_page_token
5329
+ if self.tag_assignments:
5330
+ body["tag_assignments"] = self.tag_assignments
5331
+ return body
5332
+
5333
+ @classmethod
5334
+ def from_dict(cls, d: Dict[str, Any]) -> ListEntityTagAssignmentsResponse:
5335
+ """Deserializes the ListEntityTagAssignmentsResponse from a dictionary."""
5336
+ return cls(
5337
+ next_page_token=d.get("next_page_token", None),
5338
+ tag_assignments=_repeated_dict(d, "tag_assignments", EntityTagAssignment),
5339
+ )
5340
+
5341
+
4958
5342
  @dataclass
4959
5343
  class ListExternalLineageRelationshipsResponse:
4960
5344
  external_lineage_relationships: Optional[List[ExternalLineageInfo]] = None
@@ -5162,6 +5546,39 @@ class ListModelVersionsResponse:
5162
5546
  )
5163
5547
 
5164
5548
 
5549
+ @dataclass
5550
+ class ListPoliciesResponse:
5551
+ next_page_token: Optional[str] = None
5552
+ """Optional opaque token for continuing pagination. `page_token` should be set to this value for
5553
+ the next request to retrieve the next page of results."""
5554
+
5555
+ policies: Optional[List[PolicyInfo]] = None
5556
+ """The list of retrieved policies."""
5557
+
5558
+ def as_dict(self) -> dict:
5559
+ """Serializes the ListPoliciesResponse into a dictionary suitable for use as a JSON request body."""
5560
+ body = {}
5561
+ if self.next_page_token is not None:
5562
+ body["next_page_token"] = self.next_page_token
5563
+ if self.policies:
5564
+ body["policies"] = [v.as_dict() for v in self.policies]
5565
+ return body
5566
+
5567
+ def as_shallow_dict(self) -> dict:
5568
+ """Serializes the ListPoliciesResponse into a shallow dictionary of its immediate attributes."""
5569
+ body = {}
5570
+ if self.next_page_token is not None:
5571
+ body["next_page_token"] = self.next_page_token
5572
+ if self.policies:
5573
+ body["policies"] = self.policies
5574
+ return body
5575
+
5576
+ @classmethod
5577
+ def from_dict(cls, d: Dict[str, Any]) -> ListPoliciesResponse:
5578
+ """Deserializes the ListPoliciesResponse from a dictionary."""
5579
+ return cls(next_page_token=d.get("next_page_token", None), policies=_repeated_dict(d, "policies", PolicyInfo))
5580
+
5581
+
5165
5582
  @dataclass
5166
5583
  class ListQuotasResponse:
5167
5584
  next_page_token: Optional[str] = None
@@ -5432,6 +5849,38 @@ class ListVolumesResponseContent:
5432
5849
  return cls(next_page_token=d.get("next_page_token", None), volumes=_repeated_dict(d, "volumes", VolumeInfo))
5433
5850
 
5434
5851
 
5852
+ @dataclass
5853
+ class MatchColumn:
5854
+ alias: Optional[str] = None
5855
+ """Optional alias of the matched column."""
5856
+
5857
+ condition: Optional[str] = None
5858
+ """The condition expression used to match a table column."""
5859
+
5860
+ def as_dict(self) -> dict:
5861
+ """Serializes the MatchColumn into a dictionary suitable for use as a JSON request body."""
5862
+ body = {}
5863
+ if self.alias is not None:
5864
+ body["alias"] = self.alias
5865
+ if self.condition is not None:
5866
+ body["condition"] = self.condition
5867
+ return body
5868
+
5869
+ def as_shallow_dict(self) -> dict:
5870
+ """Serializes the MatchColumn into a shallow dictionary of its immediate attributes."""
5871
+ body = {}
5872
+ if self.alias is not None:
5873
+ body["alias"] = self.alias
5874
+ if self.condition is not None:
5875
+ body["condition"] = self.condition
5876
+ return body
5877
+
5878
+ @classmethod
5879
+ def from_dict(cls, d: Dict[str, Any]) -> MatchColumn:
5880
+ """Deserializes the MatchColumn from a dictionary."""
5881
+ return cls(alias=d.get("alias", None), condition=d.get("condition", None))
5882
+
5883
+
5435
5884
  class MatchType(Enum):
5436
5885
  """The artifact pattern matching type"""
5437
5886
 
@@ -6529,7 +6978,56 @@ class NamedTableConstraint:
6529
6978
 
6530
6979
 
6531
6980
  @dataclass
6532
- class OnlineTable:
6981
+ class NotificationDestination:
6982
+ destination_id: Optional[str] = None
6983
+ """The identifier for the destination. This is the email address for EMAIL destinations, the URL
6984
+ for URL destinations, or the unique Databricks notification destination ID for all other
6985
+ external destinations."""
6986
+
6987
+ destination_type: Optional[DestinationType] = None
6988
+ """The type of the destination."""
6989
+
6990
+ special_destination: Optional[SpecialDestination] = None
6991
+ """This field is used to denote whether the destination is the email of the owner of the securable
6992
+ object. The special destination cannot be assigned to a securable and only represents the
6993
+ default destination of the securable. The securable types that support default special
6994
+ destinations are: "catalog", "external_location", "connection", "credential", and "metastore".
6995
+ The **destination_type** of a **special_destination** is always EMAIL."""
6996
+
6997
+ def as_dict(self) -> dict:
6998
+ """Serializes the NotificationDestination into a dictionary suitable for use as a JSON request body."""
6999
+ body = {}
7000
+ if self.destination_id is not None:
7001
+ body["destination_id"] = self.destination_id
7002
+ if self.destination_type is not None:
7003
+ body["destination_type"] = self.destination_type.value
7004
+ if self.special_destination is not None:
7005
+ body["special_destination"] = self.special_destination.value
7006
+ return body
7007
+
7008
+ def as_shallow_dict(self) -> dict:
7009
+ """Serializes the NotificationDestination into a shallow dictionary of its immediate attributes."""
7010
+ body = {}
7011
+ if self.destination_id is not None:
7012
+ body["destination_id"] = self.destination_id
7013
+ if self.destination_type is not None:
7014
+ body["destination_type"] = self.destination_type
7015
+ if self.special_destination is not None:
7016
+ body["special_destination"] = self.special_destination
7017
+ return body
7018
+
7019
+ @classmethod
7020
+ def from_dict(cls, d: Dict[str, Any]) -> NotificationDestination:
7021
+ """Deserializes the NotificationDestination from a dictionary."""
7022
+ return cls(
7023
+ destination_id=d.get("destination_id", None),
7024
+ destination_type=_enum(d, "destination_type", DestinationType),
7025
+ special_destination=_enum(d, "special_destination", SpecialDestination),
7026
+ )
7027
+
7028
+
7029
+ @dataclass
7030
+ class OnlineTable:
6533
7031
  """Online Table information."""
6534
7032
 
6535
7033
  name: Optional[str] = None
@@ -6954,6 +7452,13 @@ class OptionSpecOptionType(Enum):
6954
7452
  OPTION_STRING = "OPTION_STRING"
6955
7453
 
6956
7454
 
7455
+ class PathOperation(Enum):
7456
+
7457
+ PATH_CREATE_TABLE = "PATH_CREATE_TABLE"
7458
+ PATH_READ = "PATH_READ"
7459
+ PATH_READ_WRITE = "PATH_READ_WRITE"
7460
+
7461
+
6957
7462
  @dataclass
6958
7463
  class PermissionsChange:
6959
7464
  add: Optional[List[Privilege]] = None
@@ -7060,6 +7565,178 @@ class PipelineProgress:
7060
7565
  )
7061
7566
 
7062
7567
 
7568
+ @dataclass
7569
+ class PolicyInfo:
7570
+ to_principals: List[str]
7571
+ """List of user or group names that the policy applies to. Required on create and optional on
7572
+ update."""
7573
+
7574
+ for_securable_type: SecurableType
7575
+ """Type of securables that the policy should take effect on. Only `TABLE` is supported at this
7576
+ moment. Required on create and optional on update."""
7577
+
7578
+ policy_type: PolicyType
7579
+ """Type of the policy. Required on create and ignored on update."""
7580
+
7581
+ column_mask: Optional[ColumnMaskOptions] = None
7582
+ """Options for column mask policies. Valid only if `policy_type` is `POLICY_TYPE_COLUMN_MASK`.
7583
+ Required on create and optional on update. When specified on update, the new options will
7584
+ replace the existing options as a whole."""
7585
+
7586
+ comment: Optional[str] = None
7587
+ """Optional description of the policy."""
7588
+
7589
+ created_at: Optional[int] = None
7590
+ """Time at which the policy was created, in epoch milliseconds. Output only."""
7591
+
7592
+ created_by: Optional[str] = None
7593
+ """Username of the user who created the policy. Output only."""
7594
+
7595
+ except_principals: Optional[List[str]] = None
7596
+ """Optional list of user or group names that should be excluded from the policy."""
7597
+
7598
+ id: Optional[str] = None
7599
+ """Unique identifier of the policy. This field is output only and is generated by the system."""
7600
+
7601
+ match_columns: Optional[List[MatchColumn]] = None
7602
+ """Optional list of condition expressions used to match table columns. Only valid when
7603
+ `for_securable_type` is `TABLE`. When specified, the policy only applies to tables whose columns
7604
+ satisfy all match conditions."""
7605
+
7606
+ name: Optional[str] = None
7607
+ """Name of the policy. Required on create and optional on update. To rename the policy, set `name`
7608
+ to a different value on update."""
7609
+
7610
+ on_securable_fullname: Optional[str] = None
7611
+ """Full name of the securable on which the policy is defined. Required on create and ignored on
7612
+ update."""
7613
+
7614
+ on_securable_type: Optional[SecurableType] = None
7615
+ """Type of the securable on which the policy is defined. Only `CATALOG`, `SCHEMA` and `TABLE` are
7616
+ supported at this moment. Required on create and ignored on update."""
7617
+
7618
+ row_filter: Optional[RowFilterOptions] = None
7619
+ """Options for row filter policies. Valid only if `policy_type` is `POLICY_TYPE_ROW_FILTER`.
7620
+ Required on create and optional on update. When specified on update, the new options will
7621
+ replace the existing options as a whole."""
7622
+
7623
+ updated_at: Optional[int] = None
7624
+ """Time at which the policy was last modified, in epoch milliseconds. Output only."""
7625
+
7626
+ updated_by: Optional[str] = None
7627
+ """Username of the user who last modified the policy. Output only."""
7628
+
7629
+ when_condition: Optional[str] = None
7630
+ """Optional condition when the policy should take effect."""
7631
+
7632
+ def as_dict(self) -> dict:
7633
+ """Serializes the PolicyInfo into a dictionary suitable for use as a JSON request body."""
7634
+ body = {}
7635
+ if self.column_mask:
7636
+ body["column_mask"] = self.column_mask.as_dict()
7637
+ if self.comment is not None:
7638
+ body["comment"] = self.comment
7639
+ if self.created_at is not None:
7640
+ body["created_at"] = self.created_at
7641
+ if self.created_by is not None:
7642
+ body["created_by"] = self.created_by
7643
+ if self.except_principals:
7644
+ body["except_principals"] = [v for v in self.except_principals]
7645
+ if self.for_securable_type is not None:
7646
+ body["for_securable_type"] = self.for_securable_type.value
7647
+ if self.id is not None:
7648
+ body["id"] = self.id
7649
+ if self.match_columns:
7650
+ body["match_columns"] = [v.as_dict() for v in self.match_columns]
7651
+ if self.name is not None:
7652
+ body["name"] = self.name
7653
+ if self.on_securable_fullname is not None:
7654
+ body["on_securable_fullname"] = self.on_securable_fullname
7655
+ if self.on_securable_type is not None:
7656
+ body["on_securable_type"] = self.on_securable_type.value
7657
+ if self.policy_type is not None:
7658
+ body["policy_type"] = self.policy_type.value
7659
+ if self.row_filter:
7660
+ body["row_filter"] = self.row_filter.as_dict()
7661
+ if self.to_principals:
7662
+ body["to_principals"] = [v for v in self.to_principals]
7663
+ if self.updated_at is not None:
7664
+ body["updated_at"] = self.updated_at
7665
+ if self.updated_by is not None:
7666
+ body["updated_by"] = self.updated_by
7667
+ if self.when_condition is not None:
7668
+ body["when_condition"] = self.when_condition
7669
+ return body
7670
+
7671
+ def as_shallow_dict(self) -> dict:
7672
+ """Serializes the PolicyInfo into a shallow dictionary of its immediate attributes."""
7673
+ body = {}
7674
+ if self.column_mask:
7675
+ body["column_mask"] = self.column_mask
7676
+ if self.comment is not None:
7677
+ body["comment"] = self.comment
7678
+ if self.created_at is not None:
7679
+ body["created_at"] = self.created_at
7680
+ if self.created_by is not None:
7681
+ body["created_by"] = self.created_by
7682
+ if self.except_principals:
7683
+ body["except_principals"] = self.except_principals
7684
+ if self.for_securable_type is not None:
7685
+ body["for_securable_type"] = self.for_securable_type
7686
+ if self.id is not None:
7687
+ body["id"] = self.id
7688
+ if self.match_columns:
7689
+ body["match_columns"] = self.match_columns
7690
+ if self.name is not None:
7691
+ body["name"] = self.name
7692
+ if self.on_securable_fullname is not None:
7693
+ body["on_securable_fullname"] = self.on_securable_fullname
7694
+ if self.on_securable_type is not None:
7695
+ body["on_securable_type"] = self.on_securable_type
7696
+ if self.policy_type is not None:
7697
+ body["policy_type"] = self.policy_type
7698
+ if self.row_filter:
7699
+ body["row_filter"] = self.row_filter
7700
+ if self.to_principals:
7701
+ body["to_principals"] = self.to_principals
7702
+ if self.updated_at is not None:
7703
+ body["updated_at"] = self.updated_at
7704
+ if self.updated_by is not None:
7705
+ body["updated_by"] = self.updated_by
7706
+ if self.when_condition is not None:
7707
+ body["when_condition"] = self.when_condition
7708
+ return body
7709
+
7710
+ @classmethod
7711
+ def from_dict(cls, d: Dict[str, Any]) -> PolicyInfo:
7712
+ """Deserializes the PolicyInfo from a dictionary."""
7713
+ return cls(
7714
+ column_mask=_from_dict(d, "column_mask", ColumnMaskOptions),
7715
+ comment=d.get("comment", None),
7716
+ created_at=d.get("created_at", None),
7717
+ created_by=d.get("created_by", None),
7718
+ except_principals=d.get("except_principals", None),
7719
+ for_securable_type=_enum(d, "for_securable_type", SecurableType),
7720
+ id=d.get("id", None),
7721
+ match_columns=_repeated_dict(d, "match_columns", MatchColumn),
7722
+ name=d.get("name", None),
7723
+ on_securable_fullname=d.get("on_securable_fullname", None),
7724
+ on_securable_type=_enum(d, "on_securable_type", SecurableType),
7725
+ policy_type=_enum(d, "policy_type", PolicyType),
7726
+ row_filter=_from_dict(d, "row_filter", RowFilterOptions),
7727
+ to_principals=d.get("to_principals", None),
7728
+ updated_at=d.get("updated_at", None),
7729
+ updated_by=d.get("updated_by", None),
7730
+ when_condition=d.get("when_condition", None),
7731
+ )
7732
+
7733
+
7734
+ class PolicyType(Enum):
7735
+
7736
+ POLICY_TYPE_COLUMN_MASK = "POLICY_TYPE_COLUMN_MASK"
7737
+ POLICY_TYPE_ROW_FILTER = "POLICY_TYPE_ROW_FILTER"
7738
+
7739
+
7063
7740
  @dataclass
7064
7741
  class PrimaryKeyConstraint:
7065
7742
  name: str
@@ -7111,6 +7788,44 @@ class PrimaryKeyConstraint:
7111
7788
  )
7112
7789
 
7113
7790
 
7791
+ @dataclass
7792
+ class Principal:
7793
+ id: Optional[str] = None
7794
+ """Databricks user, group or service principal ID."""
7795
+
7796
+ principal_type: Optional[PrincipalType] = None
7797
+
7798
+ def as_dict(self) -> dict:
7799
+ """Serializes the Principal into a dictionary suitable for use as a JSON request body."""
7800
+ body = {}
7801
+ if self.id is not None:
7802
+ body["id"] = self.id
7803
+ if self.principal_type is not None:
7804
+ body["principal_type"] = self.principal_type.value
7805
+ return body
7806
+
7807
+ def as_shallow_dict(self) -> dict:
7808
+ """Serializes the Principal into a shallow dictionary of its immediate attributes."""
7809
+ body = {}
7810
+ if self.id is not None:
7811
+ body["id"] = self.id
7812
+ if self.principal_type is not None:
7813
+ body["principal_type"] = self.principal_type
7814
+ return body
7815
+
7816
+ @classmethod
7817
+ def from_dict(cls, d: Dict[str, Any]) -> Principal:
7818
+ """Deserializes the Principal from a dictionary."""
7819
+ return cls(id=d.get("id", None), principal_type=_enum(d, "principal_type", PrincipalType))
7820
+
7821
+
7822
+ class PrincipalType(Enum):
7823
+
7824
+ GROUP_PRINCIPAL = "GROUP_PRINCIPAL"
7825
+ SERVICE_PRINCIPAL = "SERVICE_PRINCIPAL"
7826
+ USER_PRINCIPAL = "USER_PRINCIPAL"
7827
+
7828
+
7114
7829
  class Privilege(Enum):
7115
7830
 
7116
7831
  ACCESS = "ACCESS"
@@ -7573,6 +8288,42 @@ class RegisteredModelInfo:
7573
8288
  )
7574
8289
 
7575
8290
 
8291
+ @dataclass
8292
+ class RowFilterOptions:
8293
+ function_name: str
8294
+ """The fully qualified name of the row filter function. The function is called on each row of the
8295
+ target table. It should return a boolean value indicating whether the row should be visible to
8296
+ the user. Required on create and update."""
8297
+
8298
+ using: Optional[List[FunctionArgument]] = None
8299
+ """Optional list of column aliases or constant literals to be passed as arguments to the row filter
8300
+ function. The type of each column should match the positional argument of the row filter
8301
+ function."""
8302
+
8303
+ def as_dict(self) -> dict:
8304
+ """Serializes the RowFilterOptions into a dictionary suitable for use as a JSON request body."""
8305
+ body = {}
8306
+ if self.function_name is not None:
8307
+ body["function_name"] = self.function_name
8308
+ if self.using:
8309
+ body["using"] = [v.as_dict() for v in self.using]
8310
+ return body
8311
+
8312
+ def as_shallow_dict(self) -> dict:
8313
+ """Serializes the RowFilterOptions into a shallow dictionary of its immediate attributes."""
8314
+ body = {}
8315
+ if self.function_name is not None:
8316
+ body["function_name"] = self.function_name
8317
+ if self.using:
8318
+ body["using"] = self.using
8319
+ return body
8320
+
8321
+ @classmethod
8322
+ def from_dict(cls, d: Dict[str, Any]) -> RowFilterOptions:
8323
+ """Deserializes the RowFilterOptions from a dictionary."""
8324
+ return cls(function_name=d.get("function_name", None), using=_repeated_dict(d, "using", FunctionArgument))
8325
+
8326
+
7576
8327
  @dataclass
7577
8328
  class SchemaInfo:
7578
8329
  """Next ID: 40"""
@@ -7740,6 +8491,53 @@ class SchemaInfo:
7740
8491
  )
7741
8492
 
7742
8493
 
8494
+ @dataclass
8495
+ class Securable:
8496
+ """Generic definition of a securable, which is uniquely defined in a metastore by its type and full
8497
+ name."""
8498
+
8499
+ full_name: Optional[str] = None
8500
+ """Required. The full name of the catalog/schema/table. Optional if resource_name is present."""
8501
+
8502
+ provider_share: Optional[str] = None
8503
+ """Optional. The name of the Share object that contains the securable when the securable is getting
8504
+ shared in D2D Delta Sharing."""
8505
+
8506
+ type: Optional[SecurableType] = None
8507
+ """Required. The type of securable (catalog/schema/table). Optional if resource_name is present."""
8508
+
8509
+ def as_dict(self) -> dict:
8510
+ """Serializes the Securable into a dictionary suitable for use as a JSON request body."""
8511
+ body = {}
8512
+ if self.full_name is not None:
8513
+ body["full_name"] = self.full_name
8514
+ if self.provider_share is not None:
8515
+ body["provider_share"] = self.provider_share
8516
+ if self.type is not None:
8517
+ body["type"] = self.type.value
8518
+ return body
8519
+
8520
+ def as_shallow_dict(self) -> dict:
8521
+ """Serializes the Securable into a shallow dictionary of its immediate attributes."""
8522
+ body = {}
8523
+ if self.full_name is not None:
8524
+ body["full_name"] = self.full_name
8525
+ if self.provider_share is not None:
8526
+ body["provider_share"] = self.provider_share
8527
+ if self.type is not None:
8528
+ body["type"] = self.type
8529
+ return body
8530
+
8531
+ @classmethod
8532
+ def from_dict(cls, d: Dict[str, Any]) -> Securable:
8533
+ """Deserializes the Securable from a dictionary."""
8534
+ return cls(
8535
+ full_name=d.get("full_name", None),
8536
+ provider_share=d.get("provider_share", None),
8537
+ type=_enum(d, "type", SecurableType),
8538
+ )
8539
+
8540
+
7743
8541
  class SecurableKind(Enum):
7744
8542
 
7745
8543
  TABLE_DB_STORAGE = "TABLE_DB_STORAGE"
@@ -7871,6 +8669,38 @@ class SecurableKindManifest:
7871
8669
  )
7872
8670
 
7873
8671
 
8672
+ @dataclass
8673
+ class SecurablePermissions:
8674
+ permissions: Optional[List[str]] = None
8675
+ """List of requested Unity Catalog permissions."""
8676
+
8677
+ securable: Optional[Securable] = None
8678
+ """The securable for which the access request destinations are being requested."""
8679
+
8680
+ def as_dict(self) -> dict:
8681
+ """Serializes the SecurablePermissions into a dictionary suitable for use as a JSON request body."""
8682
+ body = {}
8683
+ if self.permissions:
8684
+ body["permissions"] = [v for v in self.permissions]
8685
+ if self.securable:
8686
+ body["securable"] = self.securable.as_dict()
8687
+ return body
8688
+
8689
+ def as_shallow_dict(self) -> dict:
8690
+ """Serializes the SecurablePermissions into a shallow dictionary of its immediate attributes."""
8691
+ body = {}
8692
+ if self.permissions:
8693
+ body["permissions"] = self.permissions
8694
+ if self.securable:
8695
+ body["securable"] = self.securable
8696
+ return body
8697
+
8698
+ @classmethod
8699
+ def from_dict(cls, d: Dict[str, Any]) -> SecurablePermissions:
8700
+ """Deserializes the SecurablePermissions from a dictionary."""
8701
+ return cls(permissions=d.get("permissions", None), securable=_from_dict(d, "securable", Securable))
8702
+
8703
+
7874
8704
  class SecurableType(Enum):
7875
8705
  """The type of Unity Catalog securable."""
7876
8706
 
@@ -7893,6 +8723,15 @@ class SecurableType(Enum):
7893
8723
  VOLUME = "VOLUME"
7894
8724
 
7895
8725
 
8726
+ class SpecialDestination(Enum):
8727
+
8728
+ SPECIAL_DESTINATION_CATALOG_OWNER = "SPECIAL_DESTINATION_CATALOG_OWNER"
8729
+ SPECIAL_DESTINATION_CONNECTION_OWNER = "SPECIAL_DESTINATION_CONNECTION_OWNER"
8730
+ SPECIAL_DESTINATION_CREDENTIAL_OWNER = "SPECIAL_DESTINATION_CREDENTIAL_OWNER"
8731
+ SPECIAL_DESTINATION_EXTERNAL_LOCATION_OWNER = "SPECIAL_DESTINATION_EXTERNAL_LOCATION_OWNER"
8732
+ SPECIAL_DESTINATION_METASTORE_OWNER = "SPECIAL_DESTINATION_METASTORE_OWNER"
8733
+
8734
+
7896
8735
  @dataclass
7897
8736
  class SseEncryptionDetails:
7898
8737
  """Server-Side Encryption properties for clients communicating with AWS s3."""
@@ -8113,7 +8952,7 @@ class SystemSchemaInfo:
8113
8952
  state: str
8114
8953
  """The current state of enablement for the system schema. An empty string means the system schema
8115
8954
  is available and ready for opt-in. Possible values: AVAILABLE | ENABLE_INITIALIZED |
8116
- ENABLE_COMPLETED | DISABLE_INITIALIZED | UNAVAILABLE"""
8955
+ ENABLE_COMPLETED | DISABLE_INITIALIZED | UNAVAILABLE | MANAGED"""
8117
8956
 
8118
8957
  def as_dict(self) -> dict:
8119
8958
  """Serializes the SystemSchemaInfo into a dictionary suitable for use as a JSON request body."""
@@ -10251,7 +11090,6 @@ class ConnectionsAPI:
10251
11090
  options: Dict[str, str],
10252
11091
  *,
10253
11092
  comment: Optional[str] = None,
10254
- environment_settings: Optional[EnvironmentSettings] = None,
10255
11093
  properties: Optional[Dict[str, str]] = None,
10256
11094
  read_only: Optional[bool] = None,
10257
11095
  ) -> ConnectionInfo:
@@ -10268,8 +11106,6 @@ class ConnectionsAPI:
10268
11106
  A map of key-value properties attached to the securable.
10269
11107
  :param comment: str (optional)
10270
11108
  User-provided free-form text description.
10271
- :param environment_settings: :class:`EnvironmentSettings` (optional)
10272
- [Create,Update:OPT] Connection environment settings as EnvironmentSettings object.
10273
11109
  :param properties: Dict[str,str] (optional)
10274
11110
  A map of key-value properties attached to the securable.
10275
11111
  :param read_only: bool (optional)
@@ -10282,8 +11118,6 @@ class ConnectionsAPI:
10282
11118
  body["comment"] = comment
10283
11119
  if connection_type is not None:
10284
11120
  body["connection_type"] = connection_type.value
10285
- if environment_settings is not None:
10286
- body["environment_settings"] = environment_settings.as_dict()
10287
11121
  if name is not None:
10288
11122
  body["name"] = name
10289
11123
  if options is not None:
@@ -10364,13 +11198,7 @@ class ConnectionsAPI:
10364
11198
  query["page_token"] = json["next_page_token"]
10365
11199
 
10366
11200
  def update(
10367
- self,
10368
- name: str,
10369
- options: Dict[str, str],
10370
- *,
10371
- environment_settings: Optional[EnvironmentSettings] = None,
10372
- new_name: Optional[str] = None,
10373
- owner: Optional[str] = None,
11201
+ self, name: str, options: Dict[str, str], *, new_name: Optional[str] = None, owner: Optional[str] = None
10374
11202
  ) -> ConnectionInfo:
10375
11203
  """Updates the connection that matches the supplied name.
10376
11204
 
@@ -10378,8 +11206,6 @@ class ConnectionsAPI:
10378
11206
  Name of the connection.
10379
11207
  :param options: Dict[str,str]
10380
11208
  A map of key-value properties attached to the securable.
10381
- :param environment_settings: :class:`EnvironmentSettings` (optional)
10382
- [Create,Update:OPT] Connection environment settings as EnvironmentSettings object.
10383
11209
  :param new_name: str (optional)
10384
11210
  New name for the connection.
10385
11211
  :param owner: str (optional)
@@ -10388,8 +11214,6 @@ class ConnectionsAPI:
10388
11214
  :returns: :class:`ConnectionInfo`
10389
11215
  """
10390
11216
  body = {}
10391
- if environment_settings is not None:
10392
- body["environment_settings"] = environment_settings.as_dict()
10393
11217
  if new_name is not None:
10394
11218
  body["new_name"] = new_name
10395
11219
  if options is not None:
@@ -10754,6 +11578,193 @@ class CredentialsAPI:
10754
11578
  return ValidateCredentialResponse.from_dict(res)
10755
11579
 
10756
11580
 
11581
+ class EntityTagAssignmentsAPI:
11582
+ """Tags are attributes that include keys and optional values that you can use to organize and categorize
11583
+ entities in Unity Catalog. Entity tagging is currently supported on catalogs, schemas, tables (including
11584
+ views), columns, volumes. With these APIs, users can create, update, delete, and list tag assignments
11585
+ across Unity Catalog entities"""
11586
+
11587
+ def __init__(self, api_client):
11588
+ self._api = api_client
11589
+
11590
+ def create(self, tag_assignment: EntityTagAssignment) -> EntityTagAssignment:
11591
+ """Creates a tag assignment for an Unity Catalog entity.
11592
+
11593
+ To add tags to Unity Catalog entities, you must own the entity or have the following privileges: -
11594
+ **APPLY TAG** on the entity - **USE SCHEMA** on the entity's parent schema - **USE CATALOG** on the
11595
+ entity's parent catalog
11596
+
11597
+ To add a governed tag to Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE**
11598
+ permission on the tag policy. See [Manage tag policy permissions].
11599
+
11600
+ [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
11601
+
11602
+ :param tag_assignment: :class:`EntityTagAssignment`
11603
+
11604
+ :returns: :class:`EntityTagAssignment`
11605
+ """
11606
+ body = tag_assignment.as_dict()
11607
+ headers = {
11608
+ "Accept": "application/json",
11609
+ "Content-Type": "application/json",
11610
+ }
11611
+
11612
+ res = self._api.do("POST", "/api/2.1/unity-catalog/entity-tag-assignments", body=body, headers=headers)
11613
+ return EntityTagAssignment.from_dict(res)
11614
+
11615
+ def delete(self, entity_type: str, entity_name: str, tag_key: str):
11616
+ """Deletes a tag assignment for an Unity Catalog entity by its key.
11617
+
11618
+ To delete tags from Unity Catalog entities, you must own the entity or have the following privileges:
11619
+ - **APPLY TAG** on the entity - **USE_SCHEMA** on the entity's parent schema - **USE_CATALOG** on the
11620
+ entity's parent catalog
11621
+
11622
+ To delete a governed tag from Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE**
11623
+ permission on the tag policy. See [Manage tag policy permissions].
11624
+
11625
+ [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
11626
+
11627
+ :param entity_type: str
11628
+ The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables,
11629
+ columns, volumes.
11630
+ :param entity_name: str
11631
+ The fully qualified name of the entity to which the tag is assigned
11632
+ :param tag_key: str
11633
+ Required. The key of the tag to delete
11634
+
11635
+
11636
+ """
11637
+
11638
+ headers = {
11639
+ "Accept": "application/json",
11640
+ }
11641
+
11642
+ self._api.do(
11643
+ "DELETE",
11644
+ f"/api/2.1/unity-catalog/entity-tag-assignments/{entity_type}/{entity_name}/tags/{tag_key}",
11645
+ headers=headers,
11646
+ )
11647
+
11648
+ def get(self, entity_type: str, entity_name: str, tag_key: str) -> EntityTagAssignment:
11649
+ """Gets a tag assignment for an Unity Catalog entity by tag key.
11650
+
11651
+ :param entity_type: str
11652
+ The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables,
11653
+ columns, volumes.
11654
+ :param entity_name: str
11655
+ The fully qualified name of the entity to which the tag is assigned
11656
+ :param tag_key: str
11657
+ Required. The key of the tag
11658
+
11659
+ :returns: :class:`EntityTagAssignment`
11660
+ """
11661
+
11662
+ headers = {
11663
+ "Accept": "application/json",
11664
+ }
11665
+
11666
+ res = self._api.do(
11667
+ "GET",
11668
+ f"/api/2.1/unity-catalog/entity-tag-assignments/{entity_type}/{entity_name}/tags/{tag_key}",
11669
+ headers=headers,
11670
+ )
11671
+ return EntityTagAssignment.from_dict(res)
11672
+
11673
+ def list(
11674
+ self, entity_type: str, entity_name: str, *, max_results: Optional[int] = None, page_token: Optional[str] = None
11675
+ ) -> Iterator[EntityTagAssignment]:
11676
+ """List tag assignments for an Unity Catalog entity
11677
+
11678
+ :param entity_type: str
11679
+ The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables,
11680
+ columns, volumes.
11681
+ :param entity_name: str
11682
+ The fully qualified name of the entity to which the tag is assigned
11683
+ :param max_results: int (optional)
11684
+ Optional. Maximum number of tag assignments to return in a single page
11685
+ :param page_token: str (optional)
11686
+ Optional. Pagination token to retrieve the next page of results
11687
+
11688
+ :returns: Iterator over :class:`EntityTagAssignment`
11689
+ """
11690
+
11691
+ query = {}
11692
+ if max_results is not None:
11693
+ query["max_results"] = max_results
11694
+ if page_token is not None:
11695
+ query["page_token"] = page_token
11696
+ headers = {
11697
+ "Accept": "application/json",
11698
+ }
11699
+
11700
+ while True:
11701
+ json = self._api.do(
11702
+ "GET",
11703
+ f"/api/2.1/unity-catalog/entity-tag-assignments/{entity_type}/{entity_name}/tags",
11704
+ query=query,
11705
+ headers=headers,
11706
+ )
11707
+ if "tag_assignments" in json:
11708
+ for v in json["tag_assignments"]:
11709
+ yield EntityTagAssignment.from_dict(v)
11710
+ if "next_page_token" not in json or not json["next_page_token"]:
11711
+ return
11712
+ query["page_token"] = json["next_page_token"]
11713
+
11714
+ def update(
11715
+ self, entity_type: str, entity_name: str, tag_key: str, tag_assignment: EntityTagAssignment, update_mask: str
11716
+ ) -> EntityTagAssignment:
11717
+ """Updates an existing tag assignment for an Unity Catalog entity.
11718
+
11719
+ To update tags to Unity Catalog entities, you must own the entity or have the following privileges: -
11720
+ **APPLY TAG** on the entity - **USE SCHEMA** on the entity's parent schema - **USE CATALOG** on the
11721
+ entity's parent catalog
11722
+
11723
+ To update a governed tag to Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE**
11724
+ permission on the tag policy. See [Manage tag policy permissions].
11725
+
11726
+ [Manage tag policy permissions]: https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions
11727
+
11728
+ :param entity_type: str
11729
+ The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables,
11730
+ columns, volumes.
11731
+ :param entity_name: str
11732
+ The fully qualified name of the entity to which the tag is assigned
11733
+ :param tag_key: str
11734
+ The key of the tag
11735
+ :param tag_assignment: :class:`EntityTagAssignment`
11736
+ :param update_mask: str
11737
+ The field mask must be a single string, with multiple fields separated by commas (no spaces). The
11738
+ field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g.,
11739
+ `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only
11740
+ the entire collection field can be specified. Field names must exactly match the resource field
11741
+ names.
11742
+
11743
+ A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
11744
+ fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API
11745
+ changes in the future.
11746
+
11747
+ :returns: :class:`EntityTagAssignment`
11748
+ """
11749
+ body = tag_assignment.as_dict()
11750
+ query = {}
11751
+ if update_mask is not None:
11752
+ query["update_mask"] = update_mask
11753
+ headers = {
11754
+ "Accept": "application/json",
11755
+ "Content-Type": "application/json",
11756
+ }
11757
+
11758
+ res = self._api.do(
11759
+ "PATCH",
11760
+ f"/api/2.1/unity-catalog/entity-tag-assignments/{entity_type}/{entity_name}/tags/{tag_key}",
11761
+ query=query,
11762
+ body=body,
11763
+ headers=headers,
11764
+ )
11765
+ return EntityTagAssignment.from_dict(res)
11766
+
11767
+
10757
11768
  class ExternalLineageAPI:
10758
11769
  """External Lineage APIs enable defining and managing lineage relationships between Databricks objects and
10759
11770
  external systems. These APIs allow users to capture data flows connecting Databricks tables, models, and
@@ -12175,6 +13186,185 @@ class OnlineTablesAPI:
12175
13186
  return OnlineTable.from_dict(res)
12176
13187
 
12177
13188
 
13189
+ class PoliciesAPI:
13190
+ """Attribute-Based Access Control (ABAC) provides high leverage governance for enforcing compliance policies
13191
+ in Unity Catalog. With ABAC policies, access is controlled in a hierarchical and scalable manner, based on
13192
+ data attributes rather than specific resources, enabling more flexible and comprehensive access control.
13193
+ ABAC policies in Unity Catalog support conditions on securable properties, governance tags, and
13194
+ environment contexts. Callers must have the `MANAGE` privilege on a securable to view, create, update, or
13195
+ delete ABAC policies."""
13196
+
13197
+ def __init__(self, api_client):
13198
+ self._api = api_client
13199
+
13200
+ def create_policy(self, policy_info: PolicyInfo) -> PolicyInfo:
13201
+ """Creates a new policy on a securable. The new policy applies to the securable and all its descendants.
13202
+
13203
+ :param policy_info: :class:`PolicyInfo`
13204
+ Required. The policy to create.
13205
+
13206
+ :returns: :class:`PolicyInfo`
13207
+ """
13208
+ body = policy_info.as_dict()
13209
+ headers = {
13210
+ "Accept": "application/json",
13211
+ "Content-Type": "application/json",
13212
+ }
13213
+
13214
+ res = self._api.do("POST", "/api/2.1/unity-catalog/policies", body=body, headers=headers)
13215
+ return PolicyInfo.from_dict(res)
13216
+
13217
+ def delete_policy(self, on_securable_type: str, on_securable_fullname: str, name: str) -> DeletePolicyResponse:
13218
+ """Delete an ABAC policy defined on a securable.
13219
+
13220
+ :param on_securable_type: str
13221
+ Required. The type of the securable to delete the policy from.
13222
+ :param on_securable_fullname: str
13223
+ Required. The fully qualified name of the securable to delete the policy from.
13224
+ :param name: str
13225
+ Required. The name of the policy to delete
13226
+
13227
+ :returns: :class:`DeletePolicyResponse`
13228
+ """
13229
+
13230
+ headers = {
13231
+ "Accept": "application/json",
13232
+ }
13233
+
13234
+ res = self._api.do(
13235
+ "DELETE",
13236
+ f"/api/2.1/unity-catalog/policies/{on_securable_type}/{on_securable_fullname}/{name}",
13237
+ headers=headers,
13238
+ )
13239
+ return DeletePolicyResponse.from_dict(res)
13240
+
13241
+ def get_policy(self, on_securable_type: str, on_securable_fullname: str, name: str) -> PolicyInfo:
13242
+ """Get the policy definition on a securable
13243
+
13244
+ :param on_securable_type: str
13245
+ Required. The type of the securable to retrieve the policy for.
13246
+ :param on_securable_fullname: str
13247
+ Required. The fully qualified name of securable to retrieve policy for.
13248
+ :param name: str
13249
+ Required. The name of the policy to retrieve.
13250
+
13251
+ :returns: :class:`PolicyInfo`
13252
+ """
13253
+
13254
+ headers = {
13255
+ "Accept": "application/json",
13256
+ }
13257
+
13258
+ res = self._api.do(
13259
+ "GET",
13260
+ f"/api/2.1/unity-catalog/policies/{on_securable_type}/{on_securable_fullname}/{name}",
13261
+ headers=headers,
13262
+ )
13263
+ return PolicyInfo.from_dict(res)
13264
+
13265
+ def list_policies(
13266
+ self,
13267
+ on_securable_type: str,
13268
+ on_securable_fullname: str,
13269
+ *,
13270
+ include_inherited: Optional[bool] = None,
13271
+ max_results: Optional[int] = None,
13272
+ page_token: Optional[str] = None,
13273
+ ) -> Iterator[PolicyInfo]:
13274
+ """List all policies defined on a securable. Optionally, the list can include inherited policies defined
13275
+ on the securable's parent schema or catalog.
13276
+
13277
+ :param on_securable_type: str
13278
+ Required. The type of the securable to list policies for.
13279
+ :param on_securable_fullname: str
13280
+ Required. The fully qualified name of securable to list policies for.
13281
+ :param include_inherited: bool (optional)
13282
+ Optional. Whether to include policies defined on parent securables. By default, the inherited
13283
+ policies are not included.
13284
+ :param max_results: int (optional)
13285
+ Optional. Maximum number of policies to return on a single page (page length). - When not set or set
13286
+ to 0, the page length is set to a server configured value (recommended); - When set to a value
13287
+ greater than 0, the page length is the minimum of this value and a server configured value;
13288
+ :param page_token: str (optional)
13289
+ Optional. Opaque pagination token to go to next page based on previous query.
13290
+
13291
+ :returns: Iterator over :class:`PolicyInfo`
13292
+ """
13293
+
13294
+ query = {}
13295
+ if include_inherited is not None:
13296
+ query["include_inherited"] = include_inherited
13297
+ if max_results is not None:
13298
+ query["max_results"] = max_results
13299
+ if page_token is not None:
13300
+ query["page_token"] = page_token
13301
+ headers = {
13302
+ "Accept": "application/json",
13303
+ }
13304
+
13305
+ while True:
13306
+ json = self._api.do(
13307
+ "GET",
13308
+ f"/api/2.1/unity-catalog/policies/{on_securable_type}/{on_securable_fullname}",
13309
+ query=query,
13310
+ headers=headers,
13311
+ )
13312
+ if "policies" in json:
13313
+ for v in json["policies"]:
13314
+ yield PolicyInfo.from_dict(v)
13315
+ if "next_page_token" not in json or not json["next_page_token"]:
13316
+ return
13317
+ query["page_token"] = json["next_page_token"]
13318
+
13319
+ def update_policy(
13320
+ self,
13321
+ on_securable_type: str,
13322
+ on_securable_fullname: str,
13323
+ name: str,
13324
+ policy_info: PolicyInfo,
13325
+ *,
13326
+ update_mask: Optional[str] = None,
13327
+ ) -> PolicyInfo:
13328
+ """Update an ABAC policy on a securable.
13329
+
13330
+ :param on_securable_type: str
13331
+ Required. The type of the securable to update the policy for.
13332
+ :param on_securable_fullname: str
13333
+ Required. The fully qualified name of the securable to update the policy for.
13334
+ :param name: str
13335
+ Required. The name of the policy to update.
13336
+ :param policy_info: :class:`PolicyInfo`
13337
+ Optional fields to update. This is the request body for updating a policy. Use `update_mask` field
13338
+ to specify which fields in the request is to be updated. - If `update_mask` is empty or "*", all
13339
+ specified fields will be updated. - If `update_mask` is specified, only the fields specified in the
13340
+ `update_mask` will be updated. If a field is specified in `update_mask` and not set in the request,
13341
+ the field will be cleared. Users can use the update mask to explicitly unset optional fields such as
13342
+ `exception_principals` and `when_condition`.
13343
+ :param update_mask: str (optional)
13344
+ Optional. The update mask field for specifying user intentions on which fields to update in the
13345
+ request.
13346
+
13347
+ :returns: :class:`PolicyInfo`
13348
+ """
13349
+ body = policy_info.as_dict()
13350
+ query = {}
13351
+ if update_mask is not None:
13352
+ query["update_mask"] = update_mask
13353
+ headers = {
13354
+ "Accept": "application/json",
13355
+ "Content-Type": "application/json",
13356
+ }
13357
+
13358
+ res = self._api.do(
13359
+ "PATCH",
13360
+ f"/api/2.1/unity-catalog/policies/{on_securable_type}/{on_securable_fullname}/{name}",
13361
+ query=query,
13362
+ body=body,
13363
+ headers=headers,
13364
+ )
13365
+ return PolicyInfo.from_dict(res)
13366
+
13367
+
12178
13368
  class QualityMonitorsAPI:
12179
13369
  """A monitor computes and monitors data or model quality metrics for a table over time. It generates metrics
12180
13370
  tables and a dashboard that you can use to monitor table health and set alerts. Most write operations
@@ -12942,6 +14132,112 @@ class ResourceQuotasAPI:
12942
14132
  query["page_token"] = json["next_page_token"]
12943
14133
 
12944
14134
 
14135
+ class RfaAPI:
14136
+ """Request for Access enables customers to request access to and manage access request destinations for Unity
14137
+ Catalog securables.
14138
+
14139
+ These APIs provide a standardized way to update, get, and request to access request destinations.
14140
+ Fine-grained authorization ensures that only users with appropriate permissions can manage access request
14141
+ destinations."""
14142
+
14143
+ def __init__(self, api_client):
14144
+ self._api = api_client
14145
+
14146
+ def batch_create_access_requests(
14147
+ self, *, requests: Optional[List[CreateAccessRequest]] = None
14148
+ ) -> BatchCreateAccessRequestsResponse:
14149
+ """Creates access requests for Unity Catalog permissions for a specified principal on a securable object.
14150
+ This Batch API can take in multiple principals, securable objects, and permissions as the input and
14151
+ returns the access request destinations for each. Principals must be unique across the API call.
14152
+
14153
+ The supported securable types are: "metastore", "catalog", "schema", "table", "external_location",
14154
+ "connection", "credential", "function", "registered_model", and "volume".
14155
+
14156
+ :param requests: List[:class:`CreateAccessRequest`] (optional)
14157
+ A list of individual access requests, where each request corresponds to a set of permissions being
14158
+ requested on a list of securables for a specified principal.
14159
+
14160
+ At most 30 requests per API call.
14161
+
14162
+ :returns: :class:`BatchCreateAccessRequestsResponse`
14163
+ """
14164
+ body = {}
14165
+ if requests is not None:
14166
+ body["requests"] = [v.as_dict() for v in requests]
14167
+ headers = {
14168
+ "Accept": "application/json",
14169
+ "Content-Type": "application/json",
14170
+ }
14171
+
14172
+ res = self._api.do("POST", "/api/3.0/rfa/requests", body=body, headers=headers)
14173
+ return BatchCreateAccessRequestsResponse.from_dict(res)
14174
+
14175
+ def get_access_request_destinations(self, securable_type: str, full_name: str) -> AccessRequestDestinations:
14176
+ """Gets an array of access request destinations for the specified securable. Any caller can see URL
14177
+ destinations or the destinations on the metastore. Otherwise, only those with **BROWSE** permissions
14178
+ on the securable can see destinations.
14179
+
14180
+ The supported securable types are: "metastore", "catalog", "schema", "table", "external_location",
14181
+ "connection", "credential", "function", "registered_model", and "volume".
14182
+
14183
+ :param securable_type: str
14184
+ The type of the securable.
14185
+ :param full_name: str
14186
+ The full name of the securable.
14187
+
14188
+ :returns: :class:`AccessRequestDestinations`
14189
+ """
14190
+
14191
+ headers = {
14192
+ "Accept": "application/json",
14193
+ }
14194
+
14195
+ res = self._api.do("GET", f"/api/3.0/rfa/destinations/{securable_type}/{full_name}", headers=headers)
14196
+ return AccessRequestDestinations.from_dict(res)
14197
+
14198
+ def update_access_request_destinations(
14199
+ self, access_request_destinations: AccessRequestDestinations, update_mask: str
14200
+ ) -> AccessRequestDestinations:
14201
+ """Updates the access request destinations for the given securable. The caller must be a metastore admin,
14202
+ the owner of the securable, or a user that has the **MANAGE** privilege on the securable in order to
14203
+ assign destinations. Destinations cannot be updated for securables underneath schemas (tables,
14204
+ volumes, functions, and models). For these securable types, destinations are inherited from the parent
14205
+ securable. A maximum of 5 emails and 5 external notification destinations (Slack, Microsoft Teams, and
14206
+ Generic Webhook destinations) can be assigned to a securable. If a URL destination is assigned, no
14207
+ other destinations can be set.
14208
+
14209
+ The supported securable types are: "metastore", "catalog", "schema", "table", "external_location",
14210
+ "connection", "credential", "function", "registered_model", and "volume".
14211
+
14212
+ :param access_request_destinations: :class:`AccessRequestDestinations`
14213
+ The access request destinations to assign to the securable. For each destination, a
14214
+ **destination_id** and **destination_type** must be defined.
14215
+ :param update_mask: str
14216
+ The field mask must be a single string, with multiple fields separated by commas (no spaces). The
14217
+ field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g.,
14218
+ `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only
14219
+ the entire collection field can be specified. Field names must exactly match the resource field
14220
+ names.
14221
+
14222
+ A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
14223
+ fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API
14224
+ changes in the future.
14225
+
14226
+ :returns: :class:`AccessRequestDestinations`
14227
+ """
14228
+ body = access_request_destinations.as_dict()
14229
+ query = {}
14230
+ if update_mask is not None:
14231
+ query["update_mask"] = update_mask
14232
+ headers = {
14233
+ "Accept": "application/json",
14234
+ "Content-Type": "application/json",
14235
+ }
14236
+
14237
+ res = self._api.do("PATCH", "/api/3.0/rfa/destinations", query=query, body=body, headers=headers)
14238
+ return AccessRequestDestinations.from_dict(res)
14239
+
14240
+
12945
14241
  class SchemasAPI:
12946
14242
  """A schema (also called a database) is the second layer of Unity Catalog’s three-level namespace. A schema
12947
14243
  organizes tables, views and functions. To access (or list) a table or view in a schema, users must have
@@ -12960,7 +14256,7 @@ class SchemasAPI:
12960
14256
  properties: Optional[Dict[str, str]] = None,
12961
14257
  storage_root: Optional[str] = None,
12962
14258
  ) -> SchemaInfo:
12963
- """Creates a new schema for catalog in the Metatastore. The caller must be a metastore admin, or have the
14259
+ """Creates a new schema for catalog in the Metastore. The caller must be a metastore admin, or have the
12964
14260
  **CREATE_SCHEMA** privilege in the parent catalog.
12965
14261
 
12966
14262
  :param name: str
@@ -13642,6 +14938,79 @@ class TablesAPI:
13642
14938
  def __init__(self, api_client):
13643
14939
  self._api = api_client
13644
14940
 
14941
+ def create(
14942
+ self,
14943
+ name: str,
14944
+ catalog_name: str,
14945
+ schema_name: str,
14946
+ table_type: TableType,
14947
+ data_source_format: DataSourceFormat,
14948
+ storage_location: str,
14949
+ *,
14950
+ columns: Optional[List[ColumnInfo]] = None,
14951
+ properties: Optional[Dict[str, str]] = None,
14952
+ ) -> TableInfo:
14953
+ """Creates a new table in the specified catalog and schema.
14954
+
14955
+ To create an external delta table, the caller must have the **EXTERNAL_USE_SCHEMA** privilege on the
14956
+ parent schema and the **EXTERNAL_USE_LOCATION** privilege on the external location. These privileges
14957
+ must always be granted explicitly, and cannot be inherited through ownership or **ALL_PRIVILEGES**.
14958
+
14959
+ Standard UC permissions needed to create tables still apply: **USE_CATALOG** on the parent catalog (or
14960
+ ownership of the parent catalog), **CREATE_TABLE** and **USE_SCHEMA** on the parent schema (or
14961
+ ownership of the parent schema), and **CREATE_EXTERNAL_TABLE** on external location.
14962
+
14963
+ The **columns** field needs to be in a Spark compatible format, so we recommend you use Spark to
14964
+ create these tables. The API itself does not validate the correctness of the column spec. If the spec
14965
+ is not Spark compatible, the tables may not be readable by Databricks Runtime.
14966
+
14967
+ NOTE: The Create Table API for external clients only supports creating **external delta tables**. The
14968
+ values shown in the respective enums are all values supported by Databricks, however for this specific
14969
+ Create Table API, only **table_type** **EXTERNAL** and **data_source_format** **DELTA** are supported.
14970
+ Additionally, column masks are not supported when creating tables through this API.
14971
+
14972
+ :param name: str
14973
+ Name of table, relative to parent schema.
14974
+ :param catalog_name: str
14975
+ Name of parent catalog.
14976
+ :param schema_name: str
14977
+ Name of parent schema relative to its parent catalog.
14978
+ :param table_type: :class:`TableType`
14979
+ :param data_source_format: :class:`DataSourceFormat`
14980
+ :param storage_location: str
14981
+ Storage root URL for table (for **MANAGED**, **EXTERNAL** tables).
14982
+ :param columns: List[:class:`ColumnInfo`] (optional)
14983
+ The array of __ColumnInfo__ definitions of the table's columns.
14984
+ :param properties: Dict[str,str] (optional)
14985
+ A map of key-value properties attached to the securable.
14986
+
14987
+ :returns: :class:`TableInfo`
14988
+ """
14989
+ body = {}
14990
+ if catalog_name is not None:
14991
+ body["catalog_name"] = catalog_name
14992
+ if columns is not None:
14993
+ body["columns"] = [v.as_dict() for v in columns]
14994
+ if data_source_format is not None:
14995
+ body["data_source_format"] = data_source_format.value
14996
+ if name is not None:
14997
+ body["name"] = name
14998
+ if properties is not None:
14999
+ body["properties"] = properties
15000
+ if schema_name is not None:
15001
+ body["schema_name"] = schema_name
15002
+ if storage_location is not None:
15003
+ body["storage_location"] = storage_location
15004
+ if table_type is not None:
15005
+ body["table_type"] = table_type.value
15006
+ headers = {
15007
+ "Accept": "application/json",
15008
+ "Content-Type": "application/json",
15009
+ }
15010
+
15011
+ res = self._api.do("POST", "/api/2.1/unity-catalog/tables", body=body, headers=headers)
15012
+ return TableInfo.from_dict(res)
15013
+
13645
15014
  def delete(self, full_name: str):
13646
15015
  """Deletes a table from the specified parent catalog and schema. The caller must be the owner of the
13647
15016
  parent catalog, have the **USE_CATALOG** privilege on the parent catalog and be the owner of the
@@ -13663,10 +15032,10 @@ class TablesAPI:
13663
15032
  def exists(self, full_name: str) -> TableExistsResponse:
13664
15033
  """Gets if a table exists in the metastore for a specific catalog and schema. The caller must satisfy one
13665
15034
  of the following requirements: * Be a metastore admin * Be the owner of the parent catalog * Be the
13666
- owner of the parent schema and have the USE_CATALOG privilege on the parent catalog * Have the
15035
+ owner of the parent schema and have the **USE_CATALOG** privilege on the parent catalog * Have the
13667
15036
  **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema,
13668
- and either be the table owner or have the SELECT privilege on the table. * Have BROWSE privilege on
13669
- the parent catalog * Have BROWSE privilege on the parent schema.
15037
+ and either be the table owner or have the **SELECT** privilege on the table. * Have **BROWSE**
15038
+ privilege on the parent catalog * Have **BROWSE** privilege on the parent schema
13670
15039
 
13671
15040
  :param full_name: str
13672
15041
  Full name of the table.
@@ -13691,9 +15060,9 @@ class TablesAPI:
13691
15060
  ) -> TableInfo:
13692
15061
  """Gets a table from the metastore for a specific catalog and schema. The caller must satisfy one of the
13693
15062
  following requirements: * Be a metastore admin * Be the owner of the parent catalog * Be the owner of
13694
- the parent schema and have the USE_CATALOG privilege on the parent catalog * Have the **USE_CATALOG**
13695
- privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema, and either be
13696
- the table owner or have the SELECT privilege on the table.
15063
+ the parent schema and have the **USE_CATALOG** privilege on the parent catalog * Have the
15064
+ **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema,
15065
+ and either be the table owner or have the **SELECT** privilege on the table.
13697
15066
 
13698
15067
  :param full_name: str
13699
15068
  Full name of the table.
@@ -13891,19 +15260,86 @@ class TablesAPI:
13891
15260
  self._api.do("PATCH", f"/api/2.1/unity-catalog/tables/{full_name}", body=body, headers=headers)
13892
15261
 
13893
15262
 
15263
+ class TemporaryPathCredentialsAPI:
15264
+ """Temporary Path Credentials refer to short-lived, downscoped credentials used to access external cloud
15265
+ storage locations registered in Databricks. These credentials are employed to provide secure and
15266
+ time-limited access to data in cloud environments such as AWS, Azure, and Google Cloud. Each cloud
15267
+ provider has its own type of credentials: AWS uses temporary session tokens via AWS Security Token Service
15268
+ (STS), Azure utilizes Shared Access Signatures (SAS) for its data storage services, and Google Cloud
15269
+ supports temporary credentials through OAuth 2.0.
15270
+
15271
+ Temporary path credentials ensure that data access is limited in scope and duration, reducing the risk of
15272
+ unauthorized access or misuse. To use the temporary path credentials API, a metastore admin needs to
15273
+ enable the external_access_enabled flag (off by default) at the metastore level. A user needs to be
15274
+ granted the EXTERNAL USE LOCATION permission by external location owner. For requests on existing external
15275
+ tables, user also needs to be granted the EXTERNAL USE SCHEMA permission at the schema level by catalog
15276
+ admin.
15277
+
15278
+ Note that EXTERNAL USE SCHEMA is a schema level permission that can only be granted by catalog admin
15279
+ explicitly and is not included in schema ownership or ALL PRIVILEGES on the schema for security reasons.
15280
+ Similarly, EXTERNAL USE LOCATION is an external location level permission that can only be granted by
15281
+ external location owner explicitly and is not included in external location ownership or ALL PRIVILEGES on
15282
+ the external location for security reasons.
15283
+
15284
+ This API only supports temporary path credentials for external locations and external tables, and volumes
15285
+ will be supported in the future."""
15286
+
15287
+ def __init__(self, api_client):
15288
+ self._api = api_client
15289
+
15290
+ def generate_temporary_path_credentials(
15291
+ self, url: str, operation: PathOperation, *, dry_run: Optional[bool] = None
15292
+ ) -> GenerateTemporaryPathCredentialResponse:
15293
+ """Get a short-lived credential for directly accessing cloud storage locations registered in Databricks.
15294
+ The Generate Temporary Path Credentials API is only supported for external storage paths, specifically
15295
+ external locations and external tables. Managed tables are not supported by this API. The metastore
15296
+ must have **external_access_enabled** flag set to true (default false). The caller must have the
15297
+ **EXTERNAL_USE_LOCATION** privilege on the external location; this privilege can only be granted by
15298
+ external location owners. For requests on existing external tables, the caller must also have the
15299
+ **EXTERNAL_USE_SCHEMA** privilege on the parent schema; this privilege can only be granted by catalog
15300
+ owners.
15301
+
15302
+ :param url: str
15303
+ URL for path-based access.
15304
+ :param operation: :class:`PathOperation`
15305
+ The operation being performed on the path.
15306
+ :param dry_run: bool (optional)
15307
+ Optional. When set to true, the service will not validate that the generated credentials can perform
15308
+ write operations, therefore no new paths will be created and the response will not contain valid
15309
+ credentials. Defaults to false.
15310
+
15311
+ :returns: :class:`GenerateTemporaryPathCredentialResponse`
15312
+ """
15313
+ body = {}
15314
+ if dry_run is not None:
15315
+ body["dry_run"] = dry_run
15316
+ if operation is not None:
15317
+ body["operation"] = operation.value
15318
+ if url is not None:
15319
+ body["url"] = url
15320
+ headers = {
15321
+ "Accept": "application/json",
15322
+ "Content-Type": "application/json",
15323
+ }
15324
+
15325
+ res = self._api.do("POST", "/api/2.0/unity-catalog/temporary-path-credentials", body=body, headers=headers)
15326
+ return GenerateTemporaryPathCredentialResponse.from_dict(res)
15327
+
15328
+
13894
15329
  class TemporaryTableCredentialsAPI:
13895
15330
  """Temporary Table Credentials refer to short-lived, downscoped credentials used to access cloud storage
13896
- locationswhere table data is stored in Databricks. These credentials are employed to provide secure and
13897
- time-limitedaccess to data in cloud environments such as AWS, Azure, and Google Cloud. Each cloud provider
13898
- has its own typeof credentials: AWS uses temporary session tokens via AWS Security Token Service (STS),
13899
- Azure utilizesShared Access Signatures (SAS) for its data storage services, and Google Cloud supports
13900
- temporary credentialsthrough OAuth 2.0.Temporary table credentials ensure that data access is limited in
13901
- scope and duration, reducing the risk ofunauthorized access or misuse. To use the temporary table
13902
- credentials API, a metastore admin needs to enable the external_access_enabled flag (off by default) at
13903
- the metastore level, and user needs to be granted the EXTERNAL USE SCHEMA permission at the schema level
13904
- by catalog admin. Note that EXTERNAL USE SCHEMA is a schema level permission that can only be granted by
13905
- catalog admin explicitly and is not included in schema ownership or ALL PRIVILEGES on the schema for
13906
- security reason."""
15331
+ locations where table data is stored in Databricks. These credentials are employed to provide secure and
15332
+ time-limited access to data in cloud environments such as AWS, Azure, and Google Cloud. Each cloud
15333
+ provider has its own type of credentials: AWS uses temporary session tokens via AWS Security Token Service
15334
+ (STS), Azure utilizes Shared Access Signatures (SAS) for its data storage services, and Google Cloud
15335
+ supports temporary credentials through OAuth 2.0.
15336
+
15337
+ Temporary table credentials ensure that data access is limited in scope and duration, reducing the risk of
15338
+ unauthorized access or misuse. To use the temporary table credentials API, a metastore admin needs to
15339
+ enable the external_access_enabled flag (off by default) at the metastore level, and user needs to be
15340
+ granted the EXTERNAL USE SCHEMA permission at the schema level by catalog admin. Note that EXTERNAL USE
15341
+ SCHEMA is a schema level permission that can only be granted by catalog admin explicitly and is not
15342
+ included in schema ownership or ALL PRIVILEGES on the schema for security reasons."""
13907
15343
 
13908
15344
  def __init__(self, api_client):
13909
15345
  self._api = api_client
@@ -13912,9 +15348,9 @@ class TemporaryTableCredentialsAPI:
13912
15348
  self, *, operation: Optional[TableOperation] = None, table_id: Optional[str] = None
13913
15349
  ) -> GenerateTemporaryTableCredentialResponse:
13914
15350
  """Get a short-lived credential for directly accessing the table data on cloud storage. The metastore
13915
- must have external_access_enabled flag set to true (default false). The caller must have
13916
- EXTERNAL_USE_SCHEMA privilege on the parent schema and this privilege can only be granted by catalog
13917
- owners.
15351
+ must have **external_access_enabled** flag set to true (default false). The caller must have the
15352
+ **EXTERNAL_USE_SCHEMA** privilege on the parent schema and this privilege can only be granted by
15353
+ catalog owners.
13918
15354
 
13919
15355
  :param operation: :class:`TableOperation` (optional)
13920
15356
  The operation performed against the table data, either READ or READ_WRITE. If READ_WRITE is