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

@@ -415,7 +415,7 @@ class AzureActiveDirectoryToken:
415
415
  class AzureManagedIdentity:
416
416
  """The Azure managed identity configuration."""
417
417
 
418
- access_connector_id: Optional[str] = None
418
+ access_connector_id: str
419
419
  """The Azure resource ID of the Azure Databricks Access Connector. Use the format
420
420
  `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`."""
421
421
 
@@ -508,6 +508,8 @@ class AzureManagedIdentityResponse:
508
508
 
509
509
  @dataclass
510
510
  class AzureServicePrincipal:
511
+ """The Azure service principal configuration."""
512
+
511
513
  directory_id: str
512
514
  """The directory ID corresponding to the Azure Active Directory (AAD) tenant of the application."""
513
515
 
@@ -1161,22 +1163,31 @@ class CreateConnection:
1161
1163
 
1162
1164
  @dataclass
1163
1165
  class CreateCredentialRequest:
1166
+ name: str
1167
+ """The credential name. The name must be unique among storage and service credentials within the
1168
+ metastore."""
1169
+
1164
1170
  aws_iam_role: Optional[AwsIamRole] = None
1165
1171
  """The AWS IAM role configuration"""
1166
1172
 
1167
1173
  azure_managed_identity: Optional[AzureManagedIdentity] = None
1168
1174
  """The Azure managed identity configuration."""
1169
1175
 
1176
+ azure_service_principal: Optional[AzureServicePrincipal] = None
1177
+ """The Azure service principal configuration."""
1178
+
1170
1179
  comment: Optional[str] = None
1171
1180
  """Comment associated with the credential."""
1172
1181
 
1173
- name: Optional[str] = None
1174
- """The credential name. The name must be unique among storage and service credentials within the
1175
- metastore."""
1182
+ gcp_service_account_key: Optional[GcpServiceAccountKey] = None
1176
1183
 
1177
1184
  purpose: Optional[CredentialPurpose] = None
1178
1185
  """Indicates the purpose of the credential."""
1179
1186
 
1187
+ read_only: Optional[bool] = None
1188
+ """Whether the credential is usable only for read operations. Only applicable when purpose is
1189
+ **STORAGE**."""
1190
+
1180
1191
  skip_validation: Optional[bool] = None
1181
1192
  """Optional. Supplying true to this argument skips validation of the created set of credentials."""
1182
1193
 
@@ -1185,9 +1196,14 @@ class CreateCredentialRequest:
1185
1196
  body = {}
1186
1197
  if self.aws_iam_role: body['aws_iam_role'] = self.aws_iam_role.as_dict()
1187
1198
  if self.azure_managed_identity: body['azure_managed_identity'] = self.azure_managed_identity.as_dict()
1199
+ if self.azure_service_principal:
1200
+ body['azure_service_principal'] = self.azure_service_principal.as_dict()
1188
1201
  if self.comment is not None: body['comment'] = self.comment
1202
+ if self.gcp_service_account_key:
1203
+ body['gcp_service_account_key'] = self.gcp_service_account_key.as_dict()
1189
1204
  if self.name is not None: body['name'] = self.name
1190
1205
  if self.purpose is not None: body['purpose'] = self.purpose.value
1206
+ if self.read_only is not None: body['read_only'] = self.read_only
1191
1207
  if self.skip_validation is not None: body['skip_validation'] = self.skip_validation
1192
1208
  return body
1193
1209
 
@@ -1196,9 +1212,12 @@ class CreateCredentialRequest:
1196
1212
  """Deserializes the CreateCredentialRequest from a dictionary."""
1197
1213
  return cls(aws_iam_role=_from_dict(d, 'aws_iam_role', AwsIamRole),
1198
1214
  azure_managed_identity=_from_dict(d, 'azure_managed_identity', AzureManagedIdentity),
1215
+ azure_service_principal=_from_dict(d, 'azure_service_principal', AzureServicePrincipal),
1199
1216
  comment=d.get('comment', None),
1217
+ gcp_service_account_key=_from_dict(d, 'gcp_service_account_key', GcpServiceAccountKey),
1200
1218
  name=d.get('name', None),
1201
1219
  purpose=_enum(d, 'purpose', CredentialPurpose),
1220
+ read_only=d.get('read_only', None),
1202
1221
  skip_validation=d.get('skip_validation', None))
1203
1222
 
1204
1223
 
@@ -1796,6 +1815,9 @@ class CredentialInfo:
1796
1815
  azure_managed_identity: Optional[AzureManagedIdentity] = None
1797
1816
  """The Azure managed identity configuration."""
1798
1817
 
1818
+ azure_service_principal: Optional[AzureServicePrincipal] = None
1819
+ """The Azure service principal configuration."""
1820
+
1799
1821
  comment: Optional[str] = None
1800
1822
  """Comment associated with the credential."""
1801
1823
 
@@ -1827,17 +1849,27 @@ class CredentialInfo:
1827
1849
  purpose: Optional[CredentialPurpose] = None
1828
1850
  """Indicates the purpose of the credential."""
1829
1851
 
1852
+ read_only: Optional[bool] = None
1853
+ """Whether the credential is usable only for read operations. Only applicable when purpose is
1854
+ **STORAGE**."""
1855
+
1830
1856
  updated_at: Optional[int] = None
1831
1857
  """Time at which this credential was last modified, in epoch milliseconds."""
1832
1858
 
1833
1859
  updated_by: Optional[str] = None
1834
1860
  """Username of user who last modified the credential."""
1835
1861
 
1862
+ used_for_managed_storage: Optional[bool] = None
1863
+ """Whether this credential is the current metastore's root storage credential. Only applicable when
1864
+ purpose is **STORAGE**."""
1865
+
1836
1866
  def as_dict(self) -> dict:
1837
1867
  """Serializes the CredentialInfo into a dictionary suitable for use as a JSON request body."""
1838
1868
  body = {}
1839
1869
  if self.aws_iam_role: body['aws_iam_role'] = self.aws_iam_role.as_dict()
1840
1870
  if self.azure_managed_identity: body['azure_managed_identity'] = self.azure_managed_identity.as_dict()
1871
+ if self.azure_service_principal:
1872
+ body['azure_service_principal'] = self.azure_service_principal.as_dict()
1841
1873
  if self.comment is not None: body['comment'] = self.comment
1842
1874
  if self.created_at is not None: body['created_at'] = self.created_at
1843
1875
  if self.created_by is not None: body['created_by'] = self.created_by
@@ -1848,8 +1880,11 @@ class CredentialInfo:
1848
1880
  if self.name is not None: body['name'] = self.name
1849
1881
  if self.owner is not None: body['owner'] = self.owner
1850
1882
  if self.purpose is not None: body['purpose'] = self.purpose.value
1883
+ if self.read_only is not None: body['read_only'] = self.read_only
1851
1884
  if self.updated_at is not None: body['updated_at'] = self.updated_at
1852
1885
  if self.updated_by is not None: body['updated_by'] = self.updated_by
1886
+ if self.used_for_managed_storage is not None:
1887
+ body['used_for_managed_storage'] = self.used_for_managed_storage
1853
1888
  return body
1854
1889
 
1855
1890
  @classmethod
@@ -1857,6 +1892,7 @@ class CredentialInfo:
1857
1892
  """Deserializes the CredentialInfo from a dictionary."""
1858
1893
  return cls(aws_iam_role=_from_dict(d, 'aws_iam_role', AwsIamRole),
1859
1894
  azure_managed_identity=_from_dict(d, 'azure_managed_identity', AzureManagedIdentity),
1895
+ azure_service_principal=_from_dict(d, 'azure_service_principal', AzureServicePrincipal),
1860
1896
  comment=d.get('comment', None),
1861
1897
  created_at=d.get('created_at', None),
1862
1898
  created_by=d.get('created_by', None),
@@ -1867,13 +1903,16 @@ class CredentialInfo:
1867
1903
  name=d.get('name', None),
1868
1904
  owner=d.get('owner', None),
1869
1905
  purpose=_enum(d, 'purpose', CredentialPurpose),
1906
+ read_only=d.get('read_only', None),
1870
1907
  updated_at=d.get('updated_at', None),
1871
- updated_by=d.get('updated_by', None))
1908
+ updated_by=d.get('updated_by', None),
1909
+ used_for_managed_storage=d.get('used_for_managed_storage', None))
1872
1910
 
1873
1911
 
1874
1912
  class CredentialPurpose(Enum):
1875
1913
 
1876
1914
  SERVICE = 'SERVICE'
1915
+ STORAGE = 'STORAGE'
1877
1916
 
1878
1917
 
1879
1918
  class CredentialType(Enum):
@@ -2751,6 +2790,35 @@ class GcpOauthToken:
2751
2790
  return cls(oauth_token=d.get('oauth_token', None))
2752
2791
 
2753
2792
 
2793
+ @dataclass
2794
+ class GcpServiceAccountKey:
2795
+ """GCP long-lived credential. GCP Service Account."""
2796
+
2797
+ email: Optional[str] = None
2798
+ """The email of the service account."""
2799
+
2800
+ private_key: Optional[str] = None
2801
+ """The service account's RSA private key."""
2802
+
2803
+ private_key_id: Optional[str] = None
2804
+ """The ID of the service account's private key."""
2805
+
2806
+ def as_dict(self) -> dict:
2807
+ """Serializes the GcpServiceAccountKey into a dictionary suitable for use as a JSON request body."""
2808
+ body = {}
2809
+ if self.email is not None: body['email'] = self.email
2810
+ if self.private_key is not None: body['private_key'] = self.private_key
2811
+ if self.private_key_id is not None: body['private_key_id'] = self.private_key_id
2812
+ return body
2813
+
2814
+ @classmethod
2815
+ def from_dict(cls, d: Dict[str, any]) -> GcpServiceAccountKey:
2816
+ """Deserializes the GcpServiceAccountKey from a dictionary."""
2817
+ return cls(email=d.get('email', None),
2818
+ private_key=d.get('private_key', None),
2819
+ private_key_id=d.get('private_key_id', None))
2820
+
2821
+
2754
2822
  @dataclass
2755
2823
  class GenerateTemporaryServiceCredentialAzureOptions:
2756
2824
  """Options to customize the requested temporary credential"""
@@ -2774,12 +2842,12 @@ class GenerateTemporaryServiceCredentialAzureOptions:
2774
2842
 
2775
2843
  @dataclass
2776
2844
  class GenerateTemporaryServiceCredentialRequest:
2845
+ credential_name: str
2846
+ """The name of the service credential used to generate a temporary credential"""
2847
+
2777
2848
  azure_options: Optional[GenerateTemporaryServiceCredentialAzureOptions] = None
2778
2849
  """Options to customize the requested temporary credential"""
2779
2850
 
2780
- credential_name: Optional[str] = None
2781
- """The name of the service credential used to generate a temporary credential"""
2782
-
2783
2851
  def as_dict(self) -> dict:
2784
2852
  """Serializes the GenerateTemporaryServiceCredentialRequest into a dictionary suitable for use as a JSON request body."""
2785
2853
  body = {}
@@ -5661,11 +5729,15 @@ class UpdateCredentialRequest:
5661
5729
  azure_managed_identity: Optional[AzureManagedIdentity] = None
5662
5730
  """The Azure managed identity configuration."""
5663
5731
 
5732
+ azure_service_principal: Optional[AzureServicePrincipal] = None
5733
+ """The Azure service principal configuration."""
5734
+
5664
5735
  comment: Optional[str] = None
5665
5736
  """Comment associated with the credential."""
5666
5737
 
5667
5738
  force: Optional[bool] = None
5668
- """Force update even if there are dependent services."""
5739
+ """Force an update even if there are dependent services (when purpose is **SERVICE**) or dependent
5740
+ external locations and external tables (when purpose is **STORAGE**)."""
5669
5741
 
5670
5742
  isolation_mode: Optional[IsolationMode] = None
5671
5743
  """Whether the current securable is accessible from all workspaces or a specific set of workspaces."""
@@ -5679,6 +5751,10 @@ class UpdateCredentialRequest:
5679
5751
  owner: Optional[str] = None
5680
5752
  """Username of current owner of credential."""
5681
5753
 
5754
+ read_only: Optional[bool] = None
5755
+ """Whether the credential is usable only for read operations. Only applicable when purpose is
5756
+ **STORAGE**."""
5757
+
5682
5758
  skip_validation: Optional[bool] = None
5683
5759
  """Supply true to this argument to skip validation of the updated credential."""
5684
5760
 
@@ -5687,12 +5763,15 @@ class UpdateCredentialRequest:
5687
5763
  body = {}
5688
5764
  if self.aws_iam_role: body['aws_iam_role'] = self.aws_iam_role.as_dict()
5689
5765
  if self.azure_managed_identity: body['azure_managed_identity'] = self.azure_managed_identity.as_dict()
5766
+ if self.azure_service_principal:
5767
+ body['azure_service_principal'] = self.azure_service_principal.as_dict()
5690
5768
  if self.comment is not None: body['comment'] = self.comment
5691
5769
  if self.force is not None: body['force'] = self.force
5692
5770
  if self.isolation_mode is not None: body['isolation_mode'] = self.isolation_mode.value
5693
5771
  if self.name_arg is not None: body['name_arg'] = self.name_arg
5694
5772
  if self.new_name is not None: body['new_name'] = self.new_name
5695
5773
  if self.owner is not None: body['owner'] = self.owner
5774
+ if self.read_only is not None: body['read_only'] = self.read_only
5696
5775
  if self.skip_validation is not None: body['skip_validation'] = self.skip_validation
5697
5776
  return body
5698
5777
 
@@ -5701,12 +5780,14 @@ class UpdateCredentialRequest:
5701
5780
  """Deserializes the UpdateCredentialRequest from a dictionary."""
5702
5781
  return cls(aws_iam_role=_from_dict(d, 'aws_iam_role', AwsIamRole),
5703
5782
  azure_managed_identity=_from_dict(d, 'azure_managed_identity', AzureManagedIdentity),
5783
+ azure_service_principal=_from_dict(d, 'azure_service_principal', AzureServicePrincipal),
5704
5784
  comment=d.get('comment', None),
5705
5785
  force=d.get('force', None),
5706
5786
  isolation_mode=_enum(d, 'isolation_mode', IsolationMode),
5707
5787
  name_arg=d.get('name_arg', None),
5708
5788
  new_name=d.get('new_name', None),
5709
5789
  owner=d.get('owner', None),
5790
+ read_only=d.get('read_only', None),
5710
5791
  skip_validation=d.get('skip_validation', None))
5711
5792
 
5712
5793
 
@@ -6310,16 +6391,31 @@ class ValidateCredentialRequest:
6310
6391
  credential_name: Optional[str] = None
6311
6392
  """Required. The name of an existing credential or long-lived cloud credential to validate."""
6312
6393
 
6394
+ external_location_name: Optional[str] = None
6395
+ """The name of an existing external location to validate. Only applicable for storage credentials
6396
+ (purpose is **STORAGE**.)"""
6397
+
6313
6398
  purpose: Optional[CredentialPurpose] = None
6314
6399
  """The purpose of the credential. This should only be used when the credential is specified."""
6315
6400
 
6401
+ read_only: Optional[bool] = None
6402
+ """Whether the credential is only usable for read operations. Only applicable for storage
6403
+ credentials (purpose is **STORAGE**.)"""
6404
+
6405
+ url: Optional[str] = None
6406
+ """The external location url to validate. Only applicable when purpose is **STORAGE**."""
6407
+
6316
6408
  def as_dict(self) -> dict:
6317
6409
  """Serializes the ValidateCredentialRequest into a dictionary suitable for use as a JSON request body."""
6318
6410
  body = {}
6319
6411
  if self.aws_iam_role: body['aws_iam_role'] = self.aws_iam_role.as_dict()
6320
6412
  if self.azure_managed_identity: body['azure_managed_identity'] = self.azure_managed_identity.as_dict()
6321
6413
  if self.credential_name is not None: body['credential_name'] = self.credential_name
6414
+ if self.external_location_name is not None:
6415
+ body['external_location_name'] = self.external_location_name
6322
6416
  if self.purpose is not None: body['purpose'] = self.purpose.value
6417
+ if self.read_only is not None: body['read_only'] = self.read_only
6418
+ if self.url is not None: body['url'] = self.url
6323
6419
  return body
6324
6420
 
6325
6421
  @classmethod
@@ -6328,24 +6424,33 @@ class ValidateCredentialRequest:
6328
6424
  return cls(aws_iam_role=_from_dict(d, 'aws_iam_role', AwsIamRole),
6329
6425
  azure_managed_identity=_from_dict(d, 'azure_managed_identity', AzureManagedIdentity),
6330
6426
  credential_name=d.get('credential_name', None),
6331
- purpose=_enum(d, 'purpose', CredentialPurpose))
6427
+ external_location_name=d.get('external_location_name', None),
6428
+ purpose=_enum(d, 'purpose', CredentialPurpose),
6429
+ read_only=d.get('read_only', None),
6430
+ url=d.get('url', None))
6332
6431
 
6333
6432
 
6334
6433
  @dataclass
6335
6434
  class ValidateCredentialResponse:
6435
+ is_dir: Optional[bool] = None
6436
+ """Whether the tested location is a directory in cloud storage. Only applicable for when purpose is
6437
+ **STORAGE**."""
6438
+
6336
6439
  results: Optional[List[CredentialValidationResult]] = None
6337
6440
  """The results of the validation check."""
6338
6441
 
6339
6442
  def as_dict(self) -> dict:
6340
6443
  """Serializes the ValidateCredentialResponse into a dictionary suitable for use as a JSON request body."""
6341
6444
  body = {}
6445
+ if self.is_dir is not None: body['isDir'] = self.is_dir
6342
6446
  if self.results: body['results'] = [v.as_dict() for v in self.results]
6343
6447
  return body
6344
6448
 
6345
6449
  @classmethod
6346
6450
  def from_dict(cls, d: Dict[str, any]) -> ValidateCredentialResponse:
6347
6451
  """Deserializes the ValidateCredentialResponse from a dictionary."""
6348
- return cls(results=_repeated_dict(d, 'results', CredentialValidationResult))
6452
+ return cls(is_dir=d.get('isDir', None),
6453
+ results=_repeated_dict(d, 'results', CredentialValidationResult))
6349
6454
 
6350
6455
 
6351
6456
  class ValidateCredentialResult(Enum):
@@ -7405,28 +7510,41 @@ class CredentialsAPI:
7405
7510
  self._api = api_client
7406
7511
 
7407
7512
  def create_credential(self,
7513
+ name: str,
7408
7514
  *,
7409
7515
  aws_iam_role: Optional[AwsIamRole] = None,
7410
7516
  azure_managed_identity: Optional[AzureManagedIdentity] = None,
7517
+ azure_service_principal: Optional[AzureServicePrincipal] = None,
7411
7518
  comment: Optional[str] = None,
7412
- name: Optional[str] = None,
7519
+ gcp_service_account_key: Optional[GcpServiceAccountKey] = None,
7413
7520
  purpose: Optional[CredentialPurpose] = None,
7521
+ read_only: Optional[bool] = None,
7414
7522
  skip_validation: Optional[bool] = None) -> CredentialInfo:
7415
7523
  """Create a credential.
7416
7524
 
7417
- Creates a new credential.
7525
+ Creates a new credential. The type of credential to be created is determined by the **purpose** field,
7526
+ which should be either **SERVICE** or **STORAGE**.
7418
7527
 
7528
+ The caller must be a metastore admin or have the metastore privilege **CREATE_STORAGE_CREDENTIAL** for
7529
+ storage credentials, or **CREATE_SERVICE_CREDENTIAL** for service credentials.
7530
+
7531
+ :param name: str
7532
+ The credential name. The name must be unique among storage and service credentials within the
7533
+ metastore.
7419
7534
  :param aws_iam_role: :class:`AwsIamRole` (optional)
7420
7535
  The AWS IAM role configuration
7421
7536
  :param azure_managed_identity: :class:`AzureManagedIdentity` (optional)
7422
7537
  The Azure managed identity configuration.
7538
+ :param azure_service_principal: :class:`AzureServicePrincipal` (optional)
7539
+ The Azure service principal configuration.
7423
7540
  :param comment: str (optional)
7424
7541
  Comment associated with the credential.
7425
- :param name: str (optional)
7426
- The credential name. The name must be unique among storage and service credentials within the
7427
- metastore.
7542
+ :param gcp_service_account_key: :class:`GcpServiceAccountKey` (optional)
7428
7543
  :param purpose: :class:`CredentialPurpose` (optional)
7429
7544
  Indicates the purpose of the credential.
7545
+ :param read_only: bool (optional)
7546
+ Whether the credential is usable only for read operations. Only applicable when purpose is
7547
+ **STORAGE**.
7430
7548
  :param skip_validation: bool (optional)
7431
7549
  Optional. Supplying true to this argument skips validation of the created set of credentials.
7432
7550
 
@@ -7436,9 +7554,14 @@ class CredentialsAPI:
7436
7554
  if aws_iam_role is not None: body['aws_iam_role'] = aws_iam_role.as_dict()
7437
7555
  if azure_managed_identity is not None:
7438
7556
  body['azure_managed_identity'] = azure_managed_identity.as_dict()
7557
+ if azure_service_principal is not None:
7558
+ body['azure_service_principal'] = azure_service_principal.as_dict()
7439
7559
  if comment is not None: body['comment'] = comment
7560
+ if gcp_service_account_key is not None:
7561
+ body['gcp_service_account_key'] = gcp_service_account_key.as_dict()
7440
7562
  if name is not None: body['name'] = name
7441
7563
  if purpose is not None: body['purpose'] = purpose.value
7564
+ if read_only is not None: body['read_only'] = read_only
7442
7565
  if skip_validation is not None: body['skip_validation'] = skip_validation
7443
7566
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
7444
7567
 
@@ -7448,12 +7571,14 @@ class CredentialsAPI:
7448
7571
  def delete_credential(self, name_arg: str, *, force: Optional[bool] = None):
7449
7572
  """Delete a credential.
7450
7573
 
7451
- Deletes a credential from the metastore. The caller must be an owner of the credential.
7574
+ Deletes a service or storage credential from the metastore. The caller must be an owner of the
7575
+ credential.
7452
7576
 
7453
7577
  :param name_arg: str
7454
7578
  Name of the credential.
7455
7579
  :param force: bool (optional)
7456
- Force deletion even if there are dependent services.
7580
+ Force an update even if there are dependent services (when purpose is **SERVICE**) or dependent
7581
+ external locations and external tables (when purpose is **STORAGE**).
7457
7582
 
7458
7583
 
7459
7584
  """
@@ -7465,19 +7590,20 @@ class CredentialsAPI:
7465
7590
  self._api.do('DELETE', f'/api/2.1/unity-catalog/credentials/{name_arg}', query=query, headers=headers)
7466
7591
 
7467
7592
  def generate_temporary_service_credential(
7468
- self,
7469
- *,
7470
- azure_options: Optional[GenerateTemporaryServiceCredentialAzureOptions] = None,
7471
- credential_name: Optional[str] = None) -> TemporaryCredentials:
7593
+ self,
7594
+ credential_name: str,
7595
+ *,
7596
+ azure_options: Optional[GenerateTemporaryServiceCredentialAzureOptions] = None
7597
+ ) -> TemporaryCredentials:
7472
7598
  """Generate a temporary service credential.
7473
7599
 
7474
7600
  Returns a set of temporary credentials generated using the specified service credential. The caller
7475
7601
  must be a metastore admin or have the metastore privilege **ACCESS** on the service credential.
7476
7602
 
7603
+ :param credential_name: str
7604
+ The name of the service credential used to generate a temporary credential
7477
7605
  :param azure_options: :class:`GenerateTemporaryServiceCredentialAzureOptions` (optional)
7478
7606
  Options to customize the requested temporary credential
7479
- :param credential_name: str (optional)
7480
- The name of the service credential used to generate a temporary credential
7481
7607
 
7482
7608
  :returns: :class:`TemporaryCredentials`
7483
7609
  """
@@ -7495,8 +7621,8 @@ class CredentialsAPI:
7495
7621
  def get_credential(self, name_arg: str) -> CredentialInfo:
7496
7622
  """Get a credential.
7497
7623
 
7498
- Gets a credential from the metastore. The caller must be a metastore admin, the owner of the
7499
- credential, or have any permission on the credential.
7624
+ Gets a service or storage credential from the metastore. The caller must be a metastore admin, the
7625
+ owner of the credential, or have any permission on the credential.
7500
7626
 
7501
7627
  :param name_arg: str
7502
7628
  Name of the credential.
@@ -7555,15 +7681,17 @@ class CredentialsAPI:
7555
7681
  *,
7556
7682
  aws_iam_role: Optional[AwsIamRole] = None,
7557
7683
  azure_managed_identity: Optional[AzureManagedIdentity] = None,
7684
+ azure_service_principal: Optional[AzureServicePrincipal] = None,
7558
7685
  comment: Optional[str] = None,
7559
7686
  force: Optional[bool] = None,
7560
7687
  isolation_mode: Optional[IsolationMode] = None,
7561
7688
  new_name: Optional[str] = None,
7562
7689
  owner: Optional[str] = None,
7690
+ read_only: Optional[bool] = None,
7563
7691
  skip_validation: Optional[bool] = None) -> CredentialInfo:
7564
7692
  """Update a credential.
7565
7693
 
7566
- Updates a credential on the metastore.
7694
+ Updates a service or storage credential on the metastore.
7567
7695
 
7568
7696
  The caller must be the owner of the credential or a metastore admin or have the `MANAGE` permission.
7569
7697
  If the caller is a metastore admin, only the __owner__ field can be changed.
@@ -7574,16 +7702,22 @@ class CredentialsAPI:
7574
7702
  The AWS IAM role configuration
7575
7703
  :param azure_managed_identity: :class:`AzureManagedIdentity` (optional)
7576
7704
  The Azure managed identity configuration.
7705
+ :param azure_service_principal: :class:`AzureServicePrincipal` (optional)
7706
+ The Azure service principal configuration.
7577
7707
  :param comment: str (optional)
7578
7708
  Comment associated with the credential.
7579
7709
  :param force: bool (optional)
7580
- Force update even if there are dependent services.
7710
+ Force an update even if there are dependent services (when purpose is **SERVICE**) or dependent
7711
+ external locations and external tables (when purpose is **STORAGE**).
7581
7712
  :param isolation_mode: :class:`IsolationMode` (optional)
7582
7713
  Whether the current securable is accessible from all workspaces or a specific set of workspaces.
7583
7714
  :param new_name: str (optional)
7584
7715
  New name of credential.
7585
7716
  :param owner: str (optional)
7586
7717
  Username of current owner of credential.
7718
+ :param read_only: bool (optional)
7719
+ Whether the credential is usable only for read operations. Only applicable when purpose is
7720
+ **STORAGE**.
7587
7721
  :param skip_validation: bool (optional)
7588
7722
  Supply true to this argument to skip validation of the updated credential.
7589
7723
 
@@ -7593,11 +7727,14 @@ class CredentialsAPI:
7593
7727
  if aws_iam_role is not None: body['aws_iam_role'] = aws_iam_role.as_dict()
7594
7728
  if azure_managed_identity is not None:
7595
7729
  body['azure_managed_identity'] = azure_managed_identity.as_dict()
7730
+ if azure_service_principal is not None:
7731
+ body['azure_service_principal'] = azure_service_principal.as_dict()
7596
7732
  if comment is not None: body['comment'] = comment
7597
7733
  if force is not None: body['force'] = force
7598
7734
  if isolation_mode is not None: body['isolation_mode'] = isolation_mode.value
7599
7735
  if new_name is not None: body['new_name'] = new_name
7600
7736
  if owner is not None: body['owner'] = owner
7737
+ if read_only is not None: body['read_only'] = read_only
7601
7738
  if skip_validation is not None: body['skip_validation'] = skip_validation
7602
7739
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
7603
7740
 
@@ -7612,14 +7749,25 @@ class CredentialsAPI:
7612
7749
  aws_iam_role: Optional[AwsIamRole] = None,
7613
7750
  azure_managed_identity: Optional[AzureManagedIdentity] = None,
7614
7751
  credential_name: Optional[str] = None,
7615
- purpose: Optional[CredentialPurpose] = None) -> ValidateCredentialResponse:
7752
+ external_location_name: Optional[str] = None,
7753
+ purpose: Optional[CredentialPurpose] = None,
7754
+ read_only: Optional[bool] = None,
7755
+ url: Optional[str] = None) -> ValidateCredentialResponse:
7616
7756
  """Validate a credential.
7617
7757
 
7618
7758
  Validates a credential.
7619
7759
 
7620
- Either the __credential_name__ or the cloud-specific credential must be provided.
7760
+ For service credentials (purpose is **SERVICE**), either the __credential_name__ or the cloud-specific
7761
+ credential must be provided.
7621
7762
 
7622
- The caller must be a metastore admin or the credential owner.
7763
+ For storage credentials (purpose is **STORAGE**), at least one of __external_location_name__ and
7764
+ __url__ need to be provided. If only one of them is provided, it will be used for validation. And if
7765
+ both are provided, the __url__ will be used for validation, and __external_location_name__ will be
7766
+ ignored when checking overlapping urls. Either the __credential_name__ or the cloud-specific
7767
+ credential must be provided.
7768
+
7769
+ The caller must be a metastore admin or the credential owner or have the required permission on the
7770
+ metastore and the credential (e.g., **CREATE_EXTERNAL_LOCATION** when purpose is **STORAGE**).
7623
7771
 
7624
7772
  :param aws_iam_role: :class:`AwsIamRole` (optional)
7625
7773
  The AWS IAM role configuration
@@ -7627,8 +7775,16 @@ class CredentialsAPI:
7627
7775
  The Azure managed identity configuration.
7628
7776
  :param credential_name: str (optional)
7629
7777
  Required. The name of an existing credential or long-lived cloud credential to validate.
7778
+ :param external_location_name: str (optional)
7779
+ The name of an existing external location to validate. Only applicable for storage credentials
7780
+ (purpose is **STORAGE**.)
7630
7781
  :param purpose: :class:`CredentialPurpose` (optional)
7631
7782
  The purpose of the credential. This should only be used when the credential is specified.
7783
+ :param read_only: bool (optional)
7784
+ Whether the credential is only usable for read operations. Only applicable for storage credentials
7785
+ (purpose is **STORAGE**.)
7786
+ :param url: str (optional)
7787
+ The external location url to validate. Only applicable when purpose is **STORAGE**.
7632
7788
 
7633
7789
  :returns: :class:`ValidateCredentialResponse`
7634
7790
  """
@@ -7637,7 +7793,10 @@ class CredentialsAPI:
7637
7793
  if azure_managed_identity is not None:
7638
7794
  body['azure_managed_identity'] = azure_managed_identity.as_dict()
7639
7795
  if credential_name is not None: body['credential_name'] = credential_name
7796
+ if external_location_name is not None: body['external_location_name'] = external_location_name
7640
7797
  if purpose is not None: body['purpose'] = purpose.value
7798
+ if read_only is not None: body['read_only'] = read_only
7799
+ if url is not None: body['url'] = url
7641
7800
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
7642
7801
 
7643
7802
  res = self._api.do('POST', '/api/2.1/unity-catalog/validate-credentials', body=body, headers=headers)
@@ -8640,7 +8799,7 @@ class OnlineTablesAPI:
8640
8799
  Long-running operation waiter for :class:`OnlineTable`.
8641
8800
  See :method:wait_get_online_table_active for more details.
8642
8801
  """
8643
- body = table
8802
+ body = table.as_dict()
8644
8803
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
8645
8804
 
8646
8805
  op_response = self._api.do('POST', '/api/2.0/online-tables', body=body, headers=headers)
@@ -10128,6 +10287,7 @@ class TablesAPI:
10128
10287
  max_results: Optional[int] = None,
10129
10288
  omit_columns: Optional[bool] = None,
10130
10289
  omit_properties: Optional[bool] = None,
10290
+ omit_username: Optional[bool] = None,
10131
10291
  page_token: Optional[str] = None) -> Iterator[TableInfo]:
10132
10292
  """List tables.
10133
10293
 
@@ -10157,6 +10317,9 @@ class TablesAPI:
10157
10317
  Whether to omit the columns of the table from the response or not.
10158
10318
  :param omit_properties: bool (optional)
10159
10319
  Whether to omit the properties of the table from the response or not.
10320
+ :param omit_username: bool (optional)
10321
+ Whether to omit the username of the table (e.g. owner, updated_by, created_by) from the response or
10322
+ not.
10160
10323
  :param page_token: str (optional)
10161
10324
  Opaque token to send for the next page of results (pagination).
10162
10325
 
@@ -10172,6 +10335,7 @@ class TablesAPI:
10172
10335
  if max_results is not None: query['max_results'] = max_results
10173
10336
  if omit_columns is not None: query['omit_columns'] = omit_columns
10174
10337
  if omit_properties is not None: query['omit_properties'] = omit_properties
10338
+ if omit_username is not None: query['omit_username'] = omit_username
10175
10339
  if page_token is not None: query['page_token'] = page_token
10176
10340
  if schema_name is not None: query['schema_name'] = schema_name
10177
10341
  headers = {'Accept': 'application/json', }