Billing¶
These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.billing module.
- class databricks.sdk.service.billing.ActionConfiguration(action_configuration_id: 'Optional[str]' = None, action_type: 'Optional[ActionConfigurationType]' = None, target: 'Optional[str]' = None)¶
- action_configuration_id: str | None = None¶
Databricks action configuration ID.
- action_type: ActionConfigurationType | None = None¶
The type of the action.
- target: str | None = None¶
Target for the action. For example, an email address.
- as_dict() dict¶
Serializes the ActionConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ActionConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ActionConfiguration¶
Deserializes the ActionConfiguration from a dictionary.
- class databricks.sdk.service.billing.ActionConfigurationType¶
Type of action that a budget alert executes when its threshold is crossed.
- EMAIL_NOTIFICATION = "EMAIL_NOTIFICATION"¶
- class databricks.sdk.service.billing.AlertConfiguration(action_configurations: 'Optional[List[ActionConfiguration]]' = None, alert_configuration_id: 'Optional[str]' = None, quantity_threshold: 'Optional[str]' = None, quantity_type: 'Optional[AlertConfigurationQuantityType]' = None, time_period: 'Optional[AlertConfigurationTimePeriod]' = None, trigger_type: 'Optional[AlertConfigurationTriggerType]' = None)¶
- action_configurations: List[ActionConfiguration] | None = None¶
Configured actions for this alert. These define what happens when an alert enters a triggered state.
- alert_configuration_id: str | None = None¶
Databricks alert configuration ID.
- quantity_threshold: str | None = None¶
The threshold for the budget alert to determine if it is in a triggered state. The number is evaluated based on quantity_type.
- quantity_type: AlertConfigurationQuantityType | None = None¶
The way to calculate cost for this budget alert. This is what quantity_threshold is measured in.
- time_period: AlertConfigurationTimePeriod | None = None¶
The time window of usage data for the budget.
- trigger_type: AlertConfigurationTriggerType | None = None¶
The evaluation method to determine when this budget alert is in a triggered state.
- as_dict() dict¶
Serializes the AlertConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the AlertConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertConfiguration¶
Deserializes the AlertConfiguration from a dictionary.
- class databricks.sdk.service.billing.AlertConfigurationQuantityType¶
- LIST_PRICE_DOLLARS_USD = "LIST_PRICE_DOLLARS_USD"¶
- class databricks.sdk.service.billing.AlertConfigurationTriggerType¶
- CUMULATIVE_SPENDING_EXCEEDED = "CUMULATIVE_SPENDING_EXCEEDED"¶
- class databricks.sdk.service.billing.BudgetConfiguration(account_id: 'Optional[str]' = None, alert_configurations: 'Optional[List[AlertConfiguration]]' = None, budget_configuration_id: 'Optional[str]' = None, create_time: 'Optional[int]' = None, display_name: 'Optional[str]' = None, filter: 'Optional[BudgetConfigurationFilter]' = None, update_time: 'Optional[int]' = None)¶
- account_id: str | None = None¶
Databricks account ID.
- alert_configurations: List[AlertConfiguration] | None = None¶
Alerts to configure when this budget is in a triggered state. Budgets must have exactly one alert configuration.
- budget_configuration_id: str | None = None¶
Databricks budget configuration ID.
- create_time: int | None = None¶
Creation time of this budget configuration.
- display_name: str | None = None¶
Human-readable name of budget configuration. Max Length: 128
- filter: BudgetConfigurationFilter | None = None¶
Configured filters for this budget. These are applied to your account’s usage to limit the scope of what is considered for this budget. Leave empty to include all usage for this account. All provided filters must be matched for usage to be included.
- update_time: int | None = None¶
Update time of this budget configuration.
- as_dict() dict¶
Serializes the BudgetConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the BudgetConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) BudgetConfiguration¶
Deserializes the BudgetConfiguration from a dictionary.
- class databricks.sdk.service.billing.BudgetConfigurationFilter(tags: 'Optional[List[BudgetConfigurationFilterTagClause]]' = None, workspace_id: 'Optional[BudgetConfigurationFilterWorkspaceIdClause]' = None)¶
- tags: List[BudgetConfigurationFilterTagClause] | None = None¶
A list of tag keys and values that will limit the budget to usage that includes those specific custom tags. Tags are case-sensitive and should be entered exactly as they appear in your usage data.
- workspace_id: BudgetConfigurationFilterWorkspaceIdClause | None = None¶
If provided, usage must match with the provided Databricks workspace IDs.
- as_dict() dict¶
Serializes the BudgetConfigurationFilter into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the BudgetConfigurationFilter into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) BudgetConfigurationFilter¶
Deserializes the BudgetConfigurationFilter from a dictionary.
- class databricks.sdk.service.billing.BudgetConfigurationFilterClause(operator: 'Optional[BudgetConfigurationFilterOperator]' = None, values: 'Optional[List[str]]' = None)¶
- operator: BudgetConfigurationFilterOperator | None = None¶
- values: List[str] | None = None¶
- as_dict() dict¶
Serializes the BudgetConfigurationFilterClause into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the BudgetConfigurationFilterClause into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) BudgetConfigurationFilterClause¶
Deserializes the BudgetConfigurationFilterClause from a dictionary.
- class databricks.sdk.service.billing.BudgetConfigurationFilterTagClause(key: 'Optional[str]' = None, value: 'Optional[BudgetConfigurationFilterClause]' = None)¶
- key: str | None = None¶
- value: BudgetConfigurationFilterClause | None = None¶
- as_dict() dict¶
Serializes the BudgetConfigurationFilterTagClause into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the BudgetConfigurationFilterTagClause into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) BudgetConfigurationFilterTagClause¶
Deserializes the BudgetConfigurationFilterTagClause from a dictionary.
- class databricks.sdk.service.billing.BudgetConfigurationFilterWorkspaceIdClause(operator: 'Optional[BudgetConfigurationFilterOperator]' = None, values: 'Optional[List[int]]' = None)¶
- operator: BudgetConfigurationFilterOperator | None = None¶
- values: List[int] | None = None¶
- as_dict() dict¶
Serializes the BudgetConfigurationFilterWorkspaceIdClause into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the BudgetConfigurationFilterWorkspaceIdClause into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) BudgetConfigurationFilterWorkspaceIdClause¶
Deserializes the BudgetConfigurationFilterWorkspaceIdClause from a dictionary.
- class databricks.sdk.service.billing.BudgetPolicy(binding_workspace_ids: List[int] | None = None, custom_tags: List[CustomPolicyTag] | None = None, policy_id: str | None = None, policy_name: str | None = None)¶
Contains the BudgetPolicy details.
- binding_workspace_ids: List[int] | None = None¶
List of workspaces that this budget policy will be exclusively bound to. An empty binding implies that this budget policy is open to any workspace in the account.
- custom_tags: List[CustomPolicyTag] | None = None¶
A list of tags defined by the customer. At most 20 entries are allowed per policy.
- policy_id: str | None = None¶
The Id of the policy. This field is generated by Databricks and globally unique.
- policy_name: str | None = None¶
The name of the policy. - Must be unique among active policies. - Can contain only characters from the ISO 8859-1 (latin1) set. - Can’t start with reserved keywords such as databricks:default-policy.
- as_dict() dict¶
Serializes the BudgetPolicy into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the BudgetPolicy into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) BudgetPolicy¶
Deserializes the BudgetPolicy from a dictionary.
- class databricks.sdk.service.billing.CreateBillingUsageDashboardResponse(dashboard_id: 'Optional[str]' = None)¶
- dashboard_id: str | None = None¶
The unique id of the usage dashboard.
- as_dict() dict¶
Serializes the CreateBillingUsageDashboardResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CreateBillingUsageDashboardResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateBillingUsageDashboardResponse¶
Deserializes the CreateBillingUsageDashboardResponse from a dictionary.
- class databricks.sdk.service.billing.CreateBudgetConfigurationBudget(account_id: 'Optional[str]' = None, alert_configurations: 'Optional[List[CreateBudgetConfigurationBudgetAlertConfigurations]]' = None, display_name: 'Optional[str]' = None, filter: 'Optional[BudgetConfigurationFilter]' = None)¶
- account_id: str | None = None¶
Databricks account ID.
- alert_configurations: List[CreateBudgetConfigurationBudgetAlertConfigurations] | None = None¶
Alerts to configure when this budget is in a triggered state. Budgets must have exactly one alert configuration.
- display_name: str | None = None¶
Human-readable name of budget configuration. Max Length: 128
- filter: BudgetConfigurationFilter | None = None¶
Configured filters for this budget. These are applied to your account’s usage to limit the scope of what is considered for this budget. Leave empty to include all usage for this account. All provided filters must be matched for usage to be included.
- as_dict() dict¶
Serializes the CreateBudgetConfigurationBudget into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CreateBudgetConfigurationBudget into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateBudgetConfigurationBudget¶
Deserializes the CreateBudgetConfigurationBudget from a dictionary.
- class databricks.sdk.service.billing.CreateBudgetConfigurationBudgetActionConfigurations(action_type: 'Optional[ActionConfigurationType]' = None, target: 'Optional[str]' = None)¶
- action_type: ActionConfigurationType | None = None¶
The type of the action.
- target: str | None = None¶
Target for the action. For example, an email address.
- as_dict() dict¶
Serializes the CreateBudgetConfigurationBudgetActionConfigurations into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CreateBudgetConfigurationBudgetActionConfigurations into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateBudgetConfigurationBudgetActionConfigurations¶
Deserializes the CreateBudgetConfigurationBudgetActionConfigurations from a dictionary.
- class databricks.sdk.service.billing.CreateBudgetConfigurationBudgetAlertConfigurations(action_configurations: 'Optional[List[CreateBudgetConfigurationBudgetActionConfigurations]]' = None, quantity_threshold: 'Optional[str]' = None, quantity_type: 'Optional[AlertConfigurationQuantityType]' = None, time_period: 'Optional[AlertConfigurationTimePeriod]' = None, trigger_type: 'Optional[AlertConfigurationTriggerType]' = None)¶
- action_configurations: List[CreateBudgetConfigurationBudgetActionConfigurations] | None = None¶
Configured actions for this alert. These define what happens when an alert enters a triggered state.
- quantity_threshold: str | None = None¶
The threshold for the budget alert to determine if it is in a triggered state. The number is evaluated based on quantity_type.
- quantity_type: AlertConfigurationQuantityType | None = None¶
The way to calculate cost for this budget alert. This is what quantity_threshold is measured in.
- time_period: AlertConfigurationTimePeriod | None = None¶
The time window of usage data for the budget.
- trigger_type: AlertConfigurationTriggerType | None = None¶
The evaluation method to determine when this budget alert is in a triggered state.
- as_dict() dict¶
Serializes the CreateBudgetConfigurationBudgetAlertConfigurations into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CreateBudgetConfigurationBudgetAlertConfigurations into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateBudgetConfigurationBudgetAlertConfigurations¶
Deserializes the CreateBudgetConfigurationBudgetAlertConfigurations from a dictionary.
- class databricks.sdk.service.billing.CreateBudgetConfigurationResponse(budget: 'Optional[BudgetConfiguration]' = None)¶
- budget: BudgetConfiguration | None = None¶
The created budget configuration.
- as_dict() dict¶
Serializes the CreateBudgetConfigurationResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CreateBudgetConfigurationResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateBudgetConfigurationResponse¶
Deserializes the CreateBudgetConfigurationResponse from a dictionary.
- class databricks.sdk.service.billing.CreateLogDeliveryConfigurationParams(log_type: LogType, output_format: OutputFormat, credentials_id: str, storage_configuration_id: str, config_name: str | None = None, delivery_path_prefix: str | None = None, delivery_start_time: str | None = None, status: LogDeliveryConfigStatus | None = None, workspace_ids_filter: List[int] | None = None)¶
Log Delivery Configuration
- log_type: LogType¶
Log delivery type. Supported values are: * BILLABLE_USAGE — Configure [billable usage log delivery]. For the CSV schema, see the [View billable usage]. * AUDIT_LOGS — Configure [audit log delivery]. For the JSON schema, see [Configure audit logging]
[Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
- output_format: OutputFormat¶
The file type of log delivery. * If log_type is BILLABLE_USAGE, this value must be CSV. Only the CSV (comma-separated values) format is supported. For the schema, see the [View billable usage] * If log_type is AUDIT_LOGS, this value must be JSON. Only the JSON (JavaScript Object Notation) format is supported. For the schema, see the [Configuring audit logs].
[Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
- credentials_id: str¶
The ID for a method:credentials/create that represents the AWS IAM role with policy and trust relationship as described in the main billable usage documentation page. See [Configure billable usage delivery].
[Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
- storage_configuration_id: str¶
The ID for a method:storage/create that represents the S3 bucket with bucket policy as described in the main billable usage documentation page. See [Configure billable usage delivery].
[Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
- config_name: str | None = None¶
The optional human-readable name of the log delivery configuration. Defaults to empty.
- delivery_path_prefix: str | None = None¶
The optional delivery path prefix within Amazon S3 storage. Defaults to empty, which means that logs are delivered to the root of the bucket. This must be a valid S3 object key. This must not start or end with a slash character.
- delivery_start_time: str | None = None¶
This field applies only if log_type is BILLABLE_USAGE. This is the optional start month and year for delivery, specified in YYYY-MM format. Defaults to current year and month. BILLABLE_USAGE logs are not available for usage before March 2019 (2019-03).
- status: LogDeliveryConfigStatus | None = None¶
Status of log delivery configuration. Set to ENABLED (enabled) or DISABLED (disabled). Defaults to ENABLED. You can [enable or disable the configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration is not supported, so disable a log delivery configuration that is no longer needed.
- workspace_ids_filter: List[int] | None = None¶
Optional filter that specifies workspace IDs to deliver logs for. By default the workspace filter is empty and log delivery applies at the account level, delivering workspace-level logs for all workspaces in your account, plus account level logs. You can optionally set this field to an array of workspace IDs (each one is an int64) to which log delivery should apply, in which case only workspace-level logs relating to the specified workspaces are delivered. If you plan to use different log delivery configurations for different workspaces, set this field explicitly. Be aware that delivery configurations mentioning specific workspaces won’t apply to new workspaces created in the future, and delivery won’t include account level logs. For some types of Databricks deployments there is only one workspace per account ID, so this field is unnecessary.
- as_dict() dict¶
Serializes the CreateLogDeliveryConfigurationParams into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CreateLogDeliveryConfigurationParams into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateLogDeliveryConfigurationParams¶
Deserializes the CreateLogDeliveryConfigurationParams from a dictionary.
- class databricks.sdk.service.billing.DeleteBudgetConfigurationResponse¶
- as_dict() dict¶
Serializes the DeleteBudgetConfigurationResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DeleteBudgetConfigurationResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DeleteBudgetConfigurationResponse¶
Deserializes the DeleteBudgetConfigurationResponse from a dictionary.
- class databricks.sdk.service.billing.DeliveryStatus¶
The status string for log delivery. Possible values are: CREATED: There were no log delivery attempts since the config was created. SUCCEEDED: The latest attempt of log delivery has succeeded completely. USER_FAILURE: The latest attempt of log delivery failed because of misconfiguration of customer provided permissions on role or storage. SYSTEM_FAILURE: The latest attempt of log delivery failed because of an Databricks internal error. Contact support if it doesn’t go away soon. NOT_FOUND: The log delivery status as the configuration has been disabled since the release of this feature or there are no workspaces in the account.
- CREATED = "CREATED"¶
- NOT_FOUND = "NOT_FOUND"¶
- SUCCEEDED = "SUCCEEDED"¶
- SYSTEM_FAILURE = "SYSTEM_FAILURE"¶
- USER_FAILURE = "USER_FAILURE"¶
- class databricks.sdk.service.billing.DownloadResponse(contents: 'Optional[BinaryIO]' = None)¶
- contents: BinaryIO | None = None¶
- as_dict() dict¶
Serializes the DownloadResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DownloadResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DownloadResponse¶
Deserializes the DownloadResponse from a dictionary.
- class databricks.sdk.service.billing.Filter(creator_user_id: int | None = None, creator_user_name: str | None = None, policy_name: str | None = None)¶
Structured representation of a filter to be applied to a list of policies. All specified filters will be applied in conjunction.
- creator_user_id: int | None = None¶
The policy creator user id to be filtered on. If unspecified, all policies will be returned.
- creator_user_name: str | None = None¶
The policy creator user name to be filtered on. If unspecified, all policies will be returned.
- policy_name: str | None = None¶
The partial name of policies to be filtered on. If unspecified, all policies will be returned.
- as_dict() dict¶
Serializes the Filter into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Filter into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.billing.GetBillingUsageDashboardResponse(dashboard_id: 'Optional[str]' = None, dashboard_url: 'Optional[str]' = None)¶
- dashboard_id: str | None = None¶
The unique id of the usage dashboard.
- dashboard_url: str | None = None¶
The URL of the usage dashboard.
- as_dict() dict¶
Serializes the GetBillingUsageDashboardResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GetBillingUsageDashboardResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) GetBillingUsageDashboardResponse¶
Deserializes the GetBillingUsageDashboardResponse from a dictionary.
- class databricks.sdk.service.billing.GetBudgetConfigurationResponse(budget: 'Optional[BudgetConfiguration]' = None)¶
- budget: BudgetConfiguration | None = None¶
- as_dict() dict¶
Serializes the GetBudgetConfigurationResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GetBudgetConfigurationResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) GetBudgetConfigurationResponse¶
Deserializes the GetBudgetConfigurationResponse from a dictionary.
- class databricks.sdk.service.billing.GetLogDeliveryConfigurationResponse(log_delivery_configuration: 'Optional[LogDeliveryConfiguration]' = None)¶
- log_delivery_configuration: LogDeliveryConfiguration | None = None¶
The fetched log delivery configuration
- as_dict() dict¶
Serializes the GetLogDeliveryConfigurationResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GetLogDeliveryConfigurationResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) GetLogDeliveryConfigurationResponse¶
Deserializes the GetLogDeliveryConfigurationResponse from a dictionary.
- class databricks.sdk.service.billing.LimitConfig¶
The limit configuration of the policy. Limit configuration provide a budget policy level cost control by enforcing the limit.
- as_dict() dict¶
Serializes the LimitConfig into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the LimitConfig into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) LimitConfig¶
Deserializes the LimitConfig from a dictionary.
- class databricks.sdk.service.billing.ListBudgetConfigurationsResponse(budgets: 'Optional[List[BudgetConfiguration]]' = None, next_page_token: 'Optional[str]' = None)¶
- budgets: List[BudgetConfiguration] | None = None¶
- next_page_token: str | None = None¶
Token which can be sent as page_token to retrieve the next page of results. If this field is omitted, there are no subsequent budgets.
- as_dict() dict¶
Serializes the ListBudgetConfigurationsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListBudgetConfigurationsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListBudgetConfigurationsResponse¶
Deserializes the ListBudgetConfigurationsResponse from a dictionary.
- class databricks.sdk.service.billing.ListBudgetPoliciesResponse(next_page_token: str | None = None, policies: List[BudgetPolicy] | None = None, previous_page_token: str | None = None)¶
A list of policies.
- next_page_token: str | None = None¶
A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
- policies: List[BudgetPolicy] | None = None¶
- previous_page_token: str | None = None¶
A token that can be sent as page_token to retrieve the previous page. In this field is omitted, there are no previous pages.
- as_dict() dict¶
Serializes the ListBudgetPoliciesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListBudgetPoliciesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListBudgetPoliciesResponse¶
Deserializes the ListBudgetPoliciesResponse from a dictionary.
- class databricks.sdk.service.billing.LogDeliveryConfigStatus¶
Log Delivery Status
ENABLED: All dependencies have executed and succeeded DISABLED: At least one dependency has succeeded
- DISABLED = "DISABLED"¶
- ENABLED = "ENABLED"¶
- class databricks.sdk.service.billing.LogDeliveryConfiguration(log_type: LogType, output_format: OutputFormat, credentials_id: str, storage_configuration_id: str, account_id: str | None = None, config_id: str | None = None, config_name: str | None = None, creation_time: int | None = None, delivery_path_prefix: str | None = None, delivery_start_time: str | None = None, log_delivery_status: LogDeliveryStatus | None = None, status: LogDeliveryConfigStatus | None = None, update_time: int | None = None, workspace_ids_filter: List[int] | None = None)¶
Log Delivery Configuration
- log_type: LogType¶
Log delivery type. Supported values are: * BILLABLE_USAGE — Configure [billable usage log delivery]. For the CSV schema, see the [View billable usage]. * AUDIT_LOGS — Configure [audit log delivery]. For the JSON schema, see [Configure audit logging]
[Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
- output_format: OutputFormat¶
The file type of log delivery. * If log_type is BILLABLE_USAGE, this value must be CSV. Only the CSV (comma-separated values) format is supported. For the schema, see the [View billable usage] * If log_type is AUDIT_LOGS, this value must be JSON. Only the JSON (JavaScript Object Notation) format is supported. For the schema, see the [Configuring audit logs].
[Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
- credentials_id: str¶
The ID for a method:credentials/create that represents the AWS IAM role with policy and trust relationship as described in the main billable usage documentation page. See [Configure billable usage delivery].
[Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
- storage_configuration_id: str¶
The ID for a method:storage/create that represents the S3 bucket with bucket policy as described in the main billable usage documentation page. See [Configure billable usage delivery].
[Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
- account_id: str | None = None¶
Databricks account ID.
- config_id: str | None = None¶
The unique UUID of log delivery configuration
- config_name: str | None = None¶
The optional human-readable name of the log delivery configuration. Defaults to empty.
- creation_time: int | None = None¶
Time in epoch milliseconds when the log delivery configuration was created.
- delivery_path_prefix: str | None = None¶
The optional delivery path prefix within Amazon S3 storage. Defaults to empty, which means that logs are delivered to the root of the bucket. This must be a valid S3 object key. This must not start or end with a slash character.
- delivery_start_time: str | None = None¶
This field applies only if log_type is BILLABLE_USAGE. This is the optional start month and year for delivery, specified in YYYY-MM format. Defaults to current year and month. BILLABLE_USAGE logs are not available for usage before March 2019 (2019-03).
- log_delivery_status: LogDeliveryStatus | None = None¶
The LogDeliveryStatus of this log delivery configuration
- status: LogDeliveryConfigStatus | None = None¶
Status of log delivery configuration. Set to ENABLED (enabled) or DISABLED (disabled). Defaults to ENABLED. You can [enable or disable the configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration is not supported, so disable a log delivery configuration that is no longer needed.
- update_time: int | None = None¶
Time in epoch milliseconds when the log delivery configuration was updated.
- workspace_ids_filter: List[int] | None = None¶
Optional filter that specifies workspace IDs to deliver logs for. By default the workspace filter is empty and log delivery applies at the account level, delivering workspace-level logs for all workspaces in your account, plus account level logs. You can optionally set this field to an array of workspace IDs (each one is an int64) to which log delivery should apply, in which case only workspace-level logs relating to the specified workspaces are delivered. If you plan to use different log delivery configurations for different workspaces, set this field explicitly. Be aware that delivery configurations mentioning specific workspaces won’t apply to new workspaces created in the future, and delivery won’t include account level logs. For some types of Databricks deployments there is only one workspace per account ID, so this field is unnecessary.
- as_dict() dict¶
Serializes the LogDeliveryConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the LogDeliveryConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) LogDeliveryConfiguration¶
Deserializes the LogDeliveryConfiguration from a dictionary.
- class databricks.sdk.service.billing.LogDeliveryStatus(status: 'DeliveryStatus', message: 'str', last_attempt_time: 'Optional[str]' = None, last_successful_attempt_time: 'Optional[str]' = None)¶
- status: DeliveryStatus¶
Enum that describes the status. Possible values are: * CREATED: There were no log delivery attempts since the config was created. * SUCCEEDED: The latest attempt of log delivery has succeeded completely. * USER_FAILURE: The latest attempt of log delivery failed because of misconfiguration of customer provided permissions on role or storage. * SYSTEM_FAILURE: The latest attempt of log delivery failed because of an Databricks internal error. Contact support if it doesn’t go away soon. * NOT_FOUND: The log delivery status as the configuration has been disabled since the release of this feature or there are no workspaces in the account.
- message: str¶
Informative message about the latest log delivery attempt. If the log delivery fails with USER_FAILURE, error details will be provided for fixing misconfigurations in cloud permissions.
- last_attempt_time: str | None = None¶
The UTC time for the latest log delivery attempt.
- last_successful_attempt_time: str | None = None¶
The UTC time for the latest successful log delivery.
- as_dict() dict¶
Serializes the LogDeliveryStatus into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the LogDeliveryStatus into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) LogDeliveryStatus¶
Deserializes the LogDeliveryStatus from a dictionary.
- class databricks.sdk.service.billing.LogType¶
Log Delivery Type
- AUDIT_LOGS = "AUDIT_LOGS"¶
- BILLABLE_USAGE = "BILLABLE_USAGE"¶
- class databricks.sdk.service.billing.OutputFormat¶
Log Delivery Output Format
- CSV = "CSV"¶
- JSON = "JSON"¶
- class databricks.sdk.service.billing.PatchStatusResponse¶
- as_dict() dict¶
Serializes the PatchStatusResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PatchStatusResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PatchStatusResponse¶
Deserializes the PatchStatusResponse from a dictionary.
- class databricks.sdk.service.billing.SortSpec(descending: 'Optional[bool]' = None, field: 'Optional[SortSpecField]' = None)¶
- descending: bool | None = None¶
Whether to sort in descending order.
- field: SortSpecField | None = None¶
The filed to sort by
- as_dict() dict¶
Serializes the SortSpec into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SortSpec into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.billing.UpdateBudgetConfigurationBudget(account_id: 'Optional[str]' = None, alert_configurations: 'Optional[List[AlertConfiguration]]' = None, budget_configuration_id: 'Optional[str]' = None, display_name: 'Optional[str]' = None, filter: 'Optional[BudgetConfigurationFilter]' = None)¶
- account_id: str | None = None¶
Databricks account ID.
- alert_configurations: List[AlertConfiguration] | None = None¶
Alerts to configure when this budget is in a triggered state. Budgets must have exactly one alert configuration.
- budget_configuration_id: str | None = None¶
Databricks budget configuration ID.
- display_name: str | None = None¶
Human-readable name of budget configuration. Max Length: 128
- filter: BudgetConfigurationFilter | None = None¶
Configured filters for this budget. These are applied to your account’s usage to limit the scope of what is considered for this budget. Leave empty to include all usage for this account. All provided filters must be matched for usage to be included.
- as_dict() dict¶
Serializes the UpdateBudgetConfigurationBudget into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the UpdateBudgetConfigurationBudget into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateBudgetConfigurationBudget¶
Deserializes the UpdateBudgetConfigurationBudget from a dictionary.
- class databricks.sdk.service.billing.UpdateBudgetConfigurationResponse(budget: 'Optional[BudgetConfiguration]' = None)¶
- budget: BudgetConfiguration | None = None¶
The updated budget.
- as_dict() dict¶
Serializes the UpdateBudgetConfigurationResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the UpdateBudgetConfigurationResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateBudgetConfigurationResponse¶
Deserializes the UpdateBudgetConfigurationResponse from a dictionary.
- class databricks.sdk.service.billing.UsageDashboardMajorVersion¶
- USAGE_DASHBOARD_MAJOR_VERSION_1 = "USAGE_DASHBOARD_MAJOR_VERSION_1"¶
- USAGE_DASHBOARD_MAJOR_VERSION_2 = "USAGE_DASHBOARD_MAJOR_VERSION_2"¶
- class databricks.sdk.service.billing.UsageDashboardType¶
- USAGE_DASHBOARD_TYPE_GLOBAL = "USAGE_DASHBOARD_TYPE_GLOBAL"¶
- USAGE_DASHBOARD_TYPE_WORKSPACE = "USAGE_DASHBOARD_TYPE_WORKSPACE"¶
- class databricks.sdk.service.billing.WrappedLogDeliveryConfiguration(log_delivery_configuration: 'Optional[LogDeliveryConfiguration]' = None)¶
- log_delivery_configuration: LogDeliveryConfiguration | None = None¶
The created log delivery configuration
- as_dict() dict¶
Serializes the WrappedLogDeliveryConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the WrappedLogDeliveryConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) WrappedLogDeliveryConfiguration¶
Deserializes the WrappedLogDeliveryConfiguration from a dictionary.
- class databricks.sdk.service.billing.WrappedLogDeliveryConfigurations(log_delivery_configurations: 'Optional[List[LogDeliveryConfiguration]]' = None, next_page_token: 'Optional[str]' = None)¶
- log_delivery_configurations: List[LogDeliveryConfiguration] | None = None¶
Log delivery configurations were returned successfully.
- next_page_token: str | None = None¶
Token which can be sent as page_token to retrieve the next page of results. If this field is omitted, there are no subsequent budgets.
- as_dict() dict¶
Serializes the WrappedLogDeliveryConfigurations into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the WrappedLogDeliveryConfigurations into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) WrappedLogDeliveryConfigurations¶
Deserializes the WrappedLogDeliveryConfigurations from a dictionary.