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

@@ -717,14 +717,12 @@ class CreateBudgetPolicyRequest:
717
717
 
718
718
  @dataclass
719
719
  class CreateLogDeliveryConfigurationParams:
720
+ """* Log Delivery Configuration"""
721
+
720
722
  log_type: LogType
721
- """Log delivery type. Supported values are:
722
-
723
- * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the CSV schema, see the
724
- [View billable usage].
725
-
726
- * `AUDIT_LOGS` — Configure [audit log delivery]. For the JSON schema, see [Configure audit
727
- logging]
723
+ """Log delivery type. Supported values are: * `BILLABLE_USAGE` — Configure [billable usage log
724
+ delivery]. For the CSV schema, see the [View billable usage]. * `AUDIT_LOGS` — Configure
725
+ [audit log delivery]. For the JSON schema, see [Configure audit logging]
728
726
 
729
727
  [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
730
728
  [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
@@ -732,12 +730,11 @@ class CreateLogDeliveryConfigurationParams:
732
730
  [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html"""
733
731
 
734
732
  output_format: OutputFormat
735
- """The file type of log delivery.
736
-
737
- * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the CSV (comma-separated
738
- values) format is supported. For the schema, see the [View billable usage] * If `log_type` is
739
- `AUDIT_LOGS`, this value must be `JSON`. Only the JSON (JavaScript Object Notation) format is
740
- supported. For the schema, see the [Configuring audit logs].
733
+ """The file type of log delivery. * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`.
734
+ Only the CSV (comma-separated values) format is supported. For the schema, see the [View
735
+ billable usage] * If `log_type` is `AUDIT_LOGS`, this value must be `JSON`. Only the JSON
736
+ (JavaScript Object Notation) format is supported. For the schema, see the [Configuring audit
737
+ logs].
741
738
 
742
739
  [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
743
740
  [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html"""
@@ -764,9 +761,9 @@ class CreateLogDeliveryConfigurationParams:
764
761
  start or end with a slash character."""
765
762
 
766
763
  delivery_start_time: Optional[str] = None
767
- """This field applies only if `log_type` is `BILLABLE_USAGE`. This is the optional start month and
768
- year for delivery, specified in `YYYY-MM` format. Defaults to current year and month.
769
- `BILLABLE_USAGE` logs are not available for usage before March 2019 (`2019-03`)."""
764
+ """This field applies only if log_type is BILLABLE_USAGE. This is the optional start month and year
765
+ for delivery, specified in YYYY-MM format. Defaults to current year and month. BILLABLE_USAGE
766
+ logs are not available for usage before March 2019 (2019-03)."""
770
767
 
771
768
  status: Optional[LogDeliveryConfigStatus] = None
772
769
  """Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled).
@@ -885,12 +882,12 @@ class DeleteResponse:
885
882
 
886
883
 
887
884
  class DeliveryStatus(Enum):
888
- """The status string for log delivery. Possible values are: * `CREATED`: There were no log delivery
889
- attempts since the config was created. * `SUCCEEDED`: The latest attempt of log delivery has
890
- succeeded completely. * `USER_FAILURE`: The latest attempt of log delivery failed because of
891
- misconfiguration of customer provided permissions on role or storage. * `SYSTEM_FAILURE`: The
885
+ """* The status string for log delivery. Possible values are: `CREATED`: There were no log delivery
886
+ attempts since the config was created. `SUCCEEDED`: The latest attempt of log delivery has
887
+ succeeded completely. `USER_FAILURE`: The latest attempt of log delivery failed because of
888
+ misconfiguration of customer provided permissions on role or storage. `SYSTEM_FAILURE`: The
892
889
  latest attempt of log delivery failed because of an Databricks internal error. Contact support
893
- if it doesn't go away soon. * `NOT_FOUND`: The log delivery status as the configuration has been
890
+ if it doesn't go away soon. `NOT_FOUND`: The log delivery status as the configuration has been
894
891
  disabled since the release of this feature or there are no workspaces in the account."""
895
892
 
896
893
  CREATED = "CREATED"
@@ -1026,6 +1023,31 @@ class GetBudgetConfigurationResponse:
1026
1023
  return cls(budget=_from_dict(d, "budget", BudgetConfiguration))
1027
1024
 
1028
1025
 
1026
+ @dataclass
1027
+ class GetLogDeliveryConfigurationResponse:
1028
+ log_delivery_configuration: Optional[LogDeliveryConfiguration] = None
1029
+ """The fetched log delivery configuration"""
1030
+
1031
+ def as_dict(self) -> dict:
1032
+ """Serializes the GetLogDeliveryConfigurationResponse into a dictionary suitable for use as a JSON request body."""
1033
+ body = {}
1034
+ if self.log_delivery_configuration:
1035
+ body["log_delivery_configuration"] = self.log_delivery_configuration.as_dict()
1036
+ return body
1037
+
1038
+ def as_shallow_dict(self) -> dict:
1039
+ """Serializes the GetLogDeliveryConfigurationResponse into a shallow dictionary of its immediate attributes."""
1040
+ body = {}
1041
+ if self.log_delivery_configuration:
1042
+ body["log_delivery_configuration"] = self.log_delivery_configuration
1043
+ return body
1044
+
1045
+ @classmethod
1046
+ def from_dict(cls, d: Dict[str, Any]) -> GetLogDeliveryConfigurationResponse:
1047
+ """Deserializes the GetLogDeliveryConfigurationResponse from a dictionary."""
1048
+ return cls(log_delivery_configuration=_from_dict(d, "log_delivery_configuration", LogDeliveryConfiguration))
1049
+
1050
+
1029
1051
  @dataclass
1030
1052
  class LimitConfig:
1031
1053
  """The limit configuration of the policy. Limit configuration provide a budget policy level cost
@@ -1128,10 +1150,10 @@ class ListBudgetPoliciesResponse:
1128
1150
 
1129
1151
 
1130
1152
  class LogDeliveryConfigStatus(Enum):
1131
- """Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled).
1132
- Defaults to `ENABLED`. You can [enable or disable the
1133
- configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration
1134
- is not supported, so disable a log delivery configuration that is no longer needed."""
1153
+ """* Log Delivery Status
1154
+
1155
+ `ENABLED`: All dependencies have executed and succeeded `DISABLED`: At least one dependency has
1156
+ succeeded"""
1135
1157
 
1136
1158
  DISABLED = "DISABLED"
1137
1159
  ENABLED = "ENABLED"
@@ -1139,62 +1161,65 @@ class LogDeliveryConfigStatus(Enum):
1139
1161
 
1140
1162
  @dataclass
1141
1163
  class LogDeliveryConfiguration:
1142
- account_id: Optional[str] = None
1143
- """The Databricks account ID that hosts the log delivery configuration."""
1164
+ """* Log Delivery Configuration"""
1144
1165
 
1145
- config_id: Optional[str] = None
1146
- """Databricks log delivery configuration ID."""
1166
+ log_type: LogType
1167
+ """Log delivery type. Supported values are: * `BILLABLE_USAGE` — Configure [billable usage log
1168
+ delivery]. For the CSV schema, see the [View billable usage]. * `AUDIT_LOGS` — Configure
1169
+ [audit log delivery]. For the JSON schema, see [Configure audit logging]
1170
+
1171
+ [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1172
+ [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
1173
+ [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1174
+ [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html"""
1147
1175
 
1148
- config_name: Optional[str] = None
1149
- """The optional human-readable name of the log delivery configuration. Defaults to empty."""
1176
+ output_format: OutputFormat
1177
+ """The file type of log delivery. * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`.
1178
+ Only the CSV (comma-separated values) format is supported. For the schema, see the [View
1179
+ billable usage] * If `log_type` is `AUDIT_LOGS`, this value must be `JSON`. Only the JSON
1180
+ (JavaScript Object Notation) format is supported. For the schema, see the [Configuring audit
1181
+ logs].
1182
+
1183
+ [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1184
+ [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html"""
1150
1185
 
1151
- creation_time: Optional[int] = None
1152
- """Time in epoch milliseconds when the log delivery configuration was created."""
1186
+ account_id: str
1187
+ """Databricks account ID."""
1153
1188
 
1154
- credentials_id: Optional[str] = None
1189
+ credentials_id: str
1155
1190
  """The ID for a method:credentials/create that represents the AWS IAM role with policy and trust
1156
1191
  relationship as described in the main billable usage documentation page. See [Configure billable
1157
1192
  usage delivery].
1158
1193
 
1159
1194
  [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html"""
1160
1195
 
1196
+ storage_configuration_id: str
1197
+ """The ID for a method:storage/create that represents the S3 bucket with bucket policy as described
1198
+ in the main billable usage documentation page. See [Configure billable usage delivery].
1199
+
1200
+ [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html"""
1201
+
1202
+ config_id: Optional[str] = None
1203
+ """The unique UUID of log delivery configuration"""
1204
+
1205
+ config_name: Optional[str] = None
1206
+ """The optional human-readable name of the log delivery configuration. Defaults to empty."""
1207
+
1208
+ creation_time: Optional[int] = None
1209
+ """Time in epoch milliseconds when the log delivery configuration was created."""
1210
+
1161
1211
  delivery_path_prefix: Optional[str] = None
1162
1212
  """The optional delivery path prefix within Amazon S3 storage. Defaults to empty, which means that
1163
1213
  logs are delivered to the root of the bucket. This must be a valid S3 object key. This must not
1164
1214
  start or end with a slash character."""
1165
1215
 
1166
1216
  delivery_start_time: Optional[str] = None
1167
- """This field applies only if `log_type` is `BILLABLE_USAGE`. This is the optional start month and
1168
- year for delivery, specified in `YYYY-MM` format. Defaults to current year and month.
1169
- `BILLABLE_USAGE` logs are not available for usage before March 2019 (`2019-03`)."""
1217
+ """This field applies only if log_type is BILLABLE_USAGE. This is the optional start month and year
1218
+ for delivery, specified in YYYY-MM format. Defaults to current year and month. BILLABLE_USAGE
1219
+ logs are not available for usage before March 2019 (2019-03)."""
1170
1220
 
1171
1221
  log_delivery_status: Optional[LogDeliveryStatus] = None
1172
- """Databricks log delivery status."""
1173
-
1174
- log_type: Optional[LogType] = None
1175
- """Log delivery type. Supported values are:
1176
-
1177
- * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the CSV schema, see the
1178
- [View billable usage].
1179
-
1180
- * `AUDIT_LOGS` — Configure [audit log delivery]. For the JSON schema, see [Configure audit
1181
- logging]
1182
-
1183
- [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1184
- [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
1185
- [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1186
- [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html"""
1187
-
1188
- output_format: Optional[OutputFormat] = None
1189
- """The file type of log delivery.
1190
-
1191
- * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the CSV (comma-separated
1192
- values) format is supported. For the schema, see the [View billable usage] * If `log_type` is
1193
- `AUDIT_LOGS`, this value must be `JSON`. Only the JSON (JavaScript Object Notation) format is
1194
- supported. For the schema, see the [Configuring audit logs].
1195
-
1196
- [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1197
- [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html"""
1222
+ """The LogDeliveryStatus of this log delivery configuration"""
1198
1223
 
1199
1224
  status: Optional[LogDeliveryConfigStatus] = None
1200
1225
  """Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled).
@@ -1202,12 +1227,6 @@ class LogDeliveryConfiguration:
1202
1227
  configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration
1203
1228
  is not supported, so disable a log delivery configuration that is no longer needed."""
1204
1229
 
1205
- storage_configuration_id: Optional[str] = None
1206
- """The ID for a method:storage/create that represents the S3 bucket with bucket policy as described
1207
- in the main billable usage documentation page. See [Configure billable usage delivery].
1208
-
1209
- [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html"""
1210
-
1211
1230
  update_time: Optional[int] = None
1212
1231
  """Time in epoch milliseconds when the log delivery configuration was updated."""
1213
1232
 
@@ -1312,20 +1331,8 @@ class LogDeliveryConfiguration:
1312
1331
 
1313
1332
  @dataclass
1314
1333
  class LogDeliveryStatus:
1315
- """Databricks log delivery status."""
1316
-
1317
- last_attempt_time: Optional[str] = None
1318
- """The UTC time for the latest log delivery attempt."""
1319
-
1320
- last_successful_attempt_time: Optional[str] = None
1321
- """The UTC time for the latest successful log delivery."""
1322
-
1323
- message: Optional[str] = None
1324
- """Informative message about the latest log delivery attempt. If the log delivery fails with
1325
- USER_FAILURE, error details will be provided for fixing misconfigurations in cloud permissions."""
1326
-
1327
- status: Optional[DeliveryStatus] = None
1328
- """The status string for log delivery. Possible values are: * `CREATED`: There were no log delivery
1334
+ status: DeliveryStatus
1335
+ """Enum that describes the status. Possible values are: * `CREATED`: There were no log delivery
1329
1336
  attempts since the config was created. * `SUCCEEDED`: The latest attempt of log delivery has
1330
1337
  succeeded completely. * `USER_FAILURE`: The latest attempt of log delivery failed because of
1331
1338
  misconfiguration of customer provided permissions on role or storage. * `SYSTEM_FAILURE`: The
@@ -1333,6 +1340,16 @@ class LogDeliveryStatus:
1333
1340
  if it doesn't go away soon. * `NOT_FOUND`: The log delivery status as the configuration has been
1334
1341
  disabled since the release of this feature or there are no workspaces in the account."""
1335
1342
 
1343
+ message: str
1344
+ """Informative message about the latest log delivery attempt. If the log delivery fails with
1345
+ USER_FAILURE, error details will be provided for fixing misconfigurations in cloud permissions."""
1346
+
1347
+ last_attempt_time: Optional[str] = None
1348
+ """The UTC time for the latest log delivery attempt."""
1349
+
1350
+ last_successful_attempt_time: Optional[str] = None
1351
+ """The UTC time for the latest successful log delivery."""
1352
+
1336
1353
  def as_dict(self) -> dict:
1337
1354
  """Serializes the LogDeliveryStatus into a dictionary suitable for use as a JSON request body."""
1338
1355
  body = {}
@@ -1371,34 +1388,14 @@ class LogDeliveryStatus:
1371
1388
 
1372
1389
 
1373
1390
  class LogType(Enum):
1374
- """Log delivery type. Supported values are:
1375
-
1376
- * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the CSV schema, see the
1377
- [View billable usage].
1378
-
1379
- * `AUDIT_LOGS` — Configure [audit log delivery]. For the JSON schema, see [Configure audit
1380
- logging]
1381
-
1382
- [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1383
- [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
1384
- [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1385
- [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
1386
- """
1391
+ """* Log Delivery Type"""
1387
1392
 
1388
1393
  AUDIT_LOGS = "AUDIT_LOGS"
1389
1394
  BILLABLE_USAGE = "BILLABLE_USAGE"
1390
1395
 
1391
1396
 
1392
1397
  class OutputFormat(Enum):
1393
- """The file type of log delivery.
1394
-
1395
- * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the CSV (comma-separated
1396
- values) format is supported. For the schema, see the [View billable usage] * If `log_type` is
1397
- `AUDIT_LOGS`, this value must be `JSON`. Only the JSON (JavaScript Object Notation) format is
1398
- supported. For the schema, see the [Configuring audit logs].
1399
-
1400
- [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
1401
- [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html"""
1398
+ """* Log Delivery Output Format"""
1402
1399
 
1403
1400
  CSV = "CSV"
1404
1401
  JSON = "JSON"
@@ -1580,6 +1577,8 @@ class UpdateBudgetConfigurationResponse:
1580
1577
 
1581
1578
  @dataclass
1582
1579
  class UpdateLogDeliveryConfigurationStatusRequest:
1580
+ """* Update Log Delivery Configuration"""
1581
+
1583
1582
  status: LogDeliveryConfigStatus
1584
1583
  """Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled).
1585
1584
  Defaults to `ENABLED`. You can [enable or disable the
@@ -1587,7 +1586,7 @@ class UpdateLogDeliveryConfigurationStatusRequest:
1587
1586
  is not supported, so disable a log delivery configuration that is no longer needed."""
1588
1587
 
1589
1588
  log_delivery_configuration_id: Optional[str] = None
1590
- """Databricks log delivery configuration ID"""
1589
+ """The log delivery configuration id of customer"""
1591
1590
 
1592
1591
  def as_dict(self) -> dict:
1593
1592
  """Serializes the UpdateLogDeliveryConfigurationStatusRequest into a dictionary suitable for use as a JSON request body."""
@@ -1624,7 +1623,10 @@ class UsageDashboardType(Enum):
1624
1623
 
1625
1624
  @dataclass
1626
1625
  class WrappedCreateLogDeliveryConfiguration:
1627
- log_delivery_configuration: Optional[CreateLogDeliveryConfigurationParams] = None
1626
+ """* Properties of the new log delivery configuration."""
1627
+
1628
+ log_delivery_configuration: CreateLogDeliveryConfigurationParams
1629
+ """* Log Delivery Configuration"""
1628
1630
 
1629
1631
  def as_dict(self) -> dict:
1630
1632
  """Serializes the WrappedCreateLogDeliveryConfiguration into a dictionary suitable for use as a JSON request body."""
@@ -1651,6 +1653,7 @@ class WrappedCreateLogDeliveryConfiguration:
1651
1653
  @dataclass
1652
1654
  class WrappedLogDeliveryConfiguration:
1653
1655
  log_delivery_configuration: Optional[LogDeliveryConfiguration] = None
1656
+ """The created log delivery configuration"""
1654
1657
 
1655
1658
  def as_dict(self) -> dict:
1656
1659
  """Serializes the WrappedLogDeliveryConfiguration into a dictionary suitable for use as a JSON request body."""
@@ -1675,12 +1678,19 @@ class WrappedLogDeliveryConfiguration:
1675
1678
  @dataclass
1676
1679
  class WrappedLogDeliveryConfigurations:
1677
1680
  log_delivery_configurations: Optional[List[LogDeliveryConfiguration]] = None
1681
+ """Log delivery configurations were returned successfully."""
1682
+
1683
+ next_page_token: Optional[str] = None
1684
+ """Token which can be sent as `page_token` to retrieve the next page of results. If this field is
1685
+ omitted, there are no subsequent budgets."""
1678
1686
 
1679
1687
  def as_dict(self) -> dict:
1680
1688
  """Serializes the WrappedLogDeliveryConfigurations into a dictionary suitable for use as a JSON request body."""
1681
1689
  body = {}
1682
1690
  if self.log_delivery_configurations:
1683
1691
  body["log_delivery_configurations"] = [v.as_dict() for v in self.log_delivery_configurations]
1692
+ if self.next_page_token is not None:
1693
+ body["next_page_token"] = self.next_page_token
1684
1694
  return body
1685
1695
 
1686
1696
  def as_shallow_dict(self) -> dict:
@@ -1688,13 +1698,16 @@ class WrappedLogDeliveryConfigurations:
1688
1698
  body = {}
1689
1699
  if self.log_delivery_configurations:
1690
1700
  body["log_delivery_configurations"] = self.log_delivery_configurations
1701
+ if self.next_page_token is not None:
1702
+ body["next_page_token"] = self.next_page_token
1691
1703
  return body
1692
1704
 
1693
1705
  @classmethod
1694
1706
  def from_dict(cls, d: Dict[str, Any]) -> WrappedLogDeliveryConfigurations:
1695
1707
  """Deserializes the WrappedLogDeliveryConfigurations from a dictionary."""
1696
1708
  return cls(
1697
- log_delivery_configurations=_repeated_dict(d, "log_delivery_configurations", LogDeliveryConfiguration)
1709
+ log_delivery_configurations=_repeated_dict(d, "log_delivery_configurations", LogDeliveryConfiguration),
1710
+ next_page_token=d.get("next_page_token", None),
1698
1711
  )
1699
1712
 
1700
1713
 
@@ -2031,58 +2044,14 @@ class BudgetsAPI:
2031
2044
 
2032
2045
 
2033
2046
  class LogDeliveryAPI:
2034
- """These APIs manage log delivery configurations for this account. The two supported log types for this API
2035
- are _billable usage logs_ and _audit logs_. This feature is in Public Preview. This feature works with all
2036
- account ID types.
2037
-
2038
- Log delivery works with all account types. However, if your account is on the E2 version of the platform
2039
- or on a select custom plan that allows multiple workspaces per account, you can optionally configure
2040
- different storage destinations for each workspace. Log delivery status is also provided to know the latest
2041
- status of log delivery attempts. The high-level flow of billable usage delivery:
2042
-
2043
- 1. **Create storage**: In AWS, [create a new AWS S3 bucket] with a specific bucket policy. Using
2044
- Databricks APIs, call the Account API to create a [storage configuration object](:method:Storage/Create)
2045
- that uses the bucket name. 2. **Create credentials**: In AWS, create the appropriate AWS IAM role. For
2046
- full details, including the required IAM role policies and trust relationship, see [Billable usage log
2047
- delivery]. Using Databricks APIs, call the Account API to create a [credential configuration
2048
- object](:method:Credentials/Create) that uses the IAM role"s ARN. 3. **Create log delivery
2049
- configuration**: Using Databricks APIs, call the Account API to [create a log delivery
2050
- configuration](:method:LogDelivery/Create) that uses the credential and storage configuration objects from
2051
- previous steps. You can specify if the logs should include all events of that log type in your account
2052
- (_Account level_ delivery) or only events for a specific set of workspaces (_workspace level_ delivery).
2053
- Account level log delivery applies to all current and future workspaces plus account level logs, while
2054
- workspace level log delivery solely delivers logs related to the specified workspaces. You can create
2055
- multiple types of delivery configurations per account.
2056
-
2057
- For billable usage delivery: * For more information about billable usage logs, see [Billable usage log
2058
- delivery]. For the CSV schema, see the [Usage page]. * The delivery location is
2059
- `<bucket-name>/<prefix>/billable-usage/csv/`, where `<prefix>` is the name of the optional delivery path
2060
- prefix you set up during log delivery configuration. Files are named
2061
- `workspaceId=<workspace-id>-usageMonth=<month>.csv`. * All billable usage logs apply to specific
2062
- workspaces (_workspace level_ logs). You can aggregate usage for your entire account by creating an
2063
- _account level_ delivery configuration that delivers logs for all current and future workspaces in your
2064
- account. * The files are delivered daily by overwriting the month's CSV file for each workspace.
2065
-
2066
- For audit log delivery: * For more information about about audit log delivery, see [Audit log delivery],
2067
- which includes information about the used JSON schema. * The delivery location is
2068
- `<bucket-name>/<delivery-path-prefix>/workspaceId=<workspaceId>/date=<yyyy-mm-dd>/auditlogs_<internal-id>.json`.
2069
- Files may get overwritten with the same content multiple times to achieve exactly-once delivery. * If the
2070
- audit log delivery configuration included specific workspace IDs, only _workspace-level_ audit logs for
2071
- those workspaces are delivered. If the log delivery configuration applies to the entire account (_account
2072
- level_ delivery configuration), the audit log delivery includes workspace-level audit logs for all
2073
- workspaces in the account as well as account-level audit logs. See [Audit log delivery] for details. *
2074
- Auditable events are typically available in logs within 15 minutes.
2075
-
2076
- [Audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
2077
- [Billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
2078
- [Usage page]: https://docs.databricks.com/administration-guide/account-settings/usage.html
2079
- [create a new AWS S3 bucket]: https://docs.databricks.com/administration-guide/account-api/aws-storage.html"""
2047
+ """These APIs manage Log delivery configurations for this account. Log delivery configs enable you to
2048
+ configure the delivery of the specified type of logs to your storage account."""
2080
2049
 
2081
2050
  def __init__(self, api_client):
2082
2051
  self._api = api_client
2083
2052
 
2084
2053
  def create(
2085
- self, *, log_delivery_configuration: Optional[CreateLogDeliveryConfigurationParams] = None
2054
+ self, log_delivery_configuration: CreateLogDeliveryConfigurationParams
2086
2055
  ) -> WrappedLogDeliveryConfiguration:
2087
2056
  """Create a new log delivery configuration.
2088
2057
 
@@ -2107,7 +2076,8 @@ class LogDeliveryAPI:
2107
2076
  [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
2108
2077
  [Deliver and access billable usage logs]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
2109
2078
 
2110
- :param log_delivery_configuration: :class:`CreateLogDeliveryConfigurationParams` (optional)
2079
+ :param log_delivery_configuration: :class:`CreateLogDeliveryConfigurationParams`
2080
+ * Log Delivery Configuration
2111
2081
 
2112
2082
  :returns: :class:`WrappedLogDeliveryConfiguration`
2113
2083
  """
@@ -2122,15 +2092,15 @@ class LogDeliveryAPI:
2122
2092
  res = self._api.do("POST", f"/api/2.0/accounts/{self._api.account_id}/log-delivery", body=body, headers=headers)
2123
2093
  return WrappedLogDeliveryConfiguration.from_dict(res)
2124
2094
 
2125
- def get(self, log_delivery_configuration_id: str) -> WrappedLogDeliveryConfiguration:
2095
+ def get(self, log_delivery_configuration_id: str) -> GetLogDeliveryConfigurationResponse:
2126
2096
  """Get log delivery configuration.
2127
2097
 
2128
2098
  Gets a Databricks log delivery configuration object for an account, both specified by ID.
2129
2099
 
2130
2100
  :param log_delivery_configuration_id: str
2131
- Databricks log delivery configuration ID
2101
+ The log delivery configuration id of customer
2132
2102
 
2133
- :returns: :class:`WrappedLogDeliveryConfiguration`
2103
+ :returns: :class:`GetLogDeliveryConfigurationResponse`
2134
2104
  """
2135
2105
 
2136
2106
  headers = {
@@ -2142,12 +2112,13 @@ class LogDeliveryAPI:
2142
2112
  f"/api/2.0/accounts/{self._api.account_id}/log-delivery/{log_delivery_configuration_id}",
2143
2113
  headers=headers,
2144
2114
  )
2145
- return WrappedLogDeliveryConfiguration.from_dict(res)
2115
+ return GetLogDeliveryConfigurationResponse.from_dict(res)
2146
2116
 
2147
2117
  def list(
2148
2118
  self,
2149
2119
  *,
2150
2120
  credentials_id: Optional[str] = None,
2121
+ page_token: Optional[str] = None,
2151
2122
  status: Optional[LogDeliveryConfigStatus] = None,
2152
2123
  storage_configuration_id: Optional[str] = None,
2153
2124
  ) -> Iterator[LogDeliveryConfiguration]:
@@ -2156,11 +2127,14 @@ class LogDeliveryAPI:
2156
2127
  Gets all Databricks log delivery configurations associated with an account specified by ID.
2157
2128
 
2158
2129
  :param credentials_id: str (optional)
2159
- Filter by credential configuration ID.
2130
+ The Credentials id to filter the search results with
2131
+ :param page_token: str (optional)
2132
+ A page token received from a previous get all budget configurations call. This token can be used to
2133
+ retrieve the subsequent page. Requests first page if absent.
2160
2134
  :param status: :class:`LogDeliveryConfigStatus` (optional)
2161
- Filter by status `ENABLED` or `DISABLED`.
2135
+ The log delivery status to filter the search results with
2162
2136
  :param storage_configuration_id: str (optional)
2163
- Filter by storage configuration ID.
2137
+ The Storage Configuration id to filter the search results with
2164
2138
 
2165
2139
  :returns: Iterator over :class:`LogDeliveryConfiguration`
2166
2140
  """
@@ -2168,6 +2142,8 @@ class LogDeliveryAPI:
2168
2142
  query = {}
2169
2143
  if credentials_id is not None:
2170
2144
  query["credentials_id"] = credentials_id
2145
+ if page_token is not None:
2146
+ query["page_token"] = page_token
2171
2147
  if status is not None:
2172
2148
  query["status"] = status.value
2173
2149
  if storage_configuration_id is not None:
@@ -2176,11 +2152,16 @@ class LogDeliveryAPI:
2176
2152
  "Accept": "application/json",
2177
2153
  }
2178
2154
 
2179
- json = self._api.do(
2180
- "GET", f"/api/2.0/accounts/{self._api.account_id}/log-delivery", query=query, headers=headers
2181
- )
2182
- parsed = WrappedLogDeliveryConfigurations.from_dict(json).log_delivery_configurations
2183
- return parsed if parsed is not None else []
2155
+ while True:
2156
+ json = self._api.do(
2157
+ "GET", f"/api/2.0/accounts/{self._api.account_id}/log-delivery", query=query, headers=headers
2158
+ )
2159
+ if "log_delivery_configurations" in json:
2160
+ for v in json["log_delivery_configurations"]:
2161
+ yield LogDeliveryConfiguration.from_dict(v)
2162
+ if "next_page_token" not in json or not json["next_page_token"]:
2163
+ return
2164
+ query["page_token"] = json["next_page_token"]
2184
2165
 
2185
2166
  def patch_status(self, log_delivery_configuration_id: str, status: LogDeliveryConfigStatus):
2186
2167
  """Enable or disable log delivery configuration.
@@ -2191,7 +2172,7 @@ class LogDeliveryAPI:
2191
2172
  under [Create log delivery](:method:LogDelivery/Create).
2192
2173
 
2193
2174
  :param log_delivery_configuration_id: str
2194
- Databricks log delivery configuration ID
2175
+ The log delivery configuration id of customer
2195
2176
  :param status: :class:`LogDeliveryConfigStatus`
2196
2177
  Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled). Defaults
2197
2178
  to `ENABLED`. You can [enable or disable the