a.budget_policy
: Budget Policy¶
- class databricks.sdk.service.billing.BudgetPolicyAPI¶
A service serves REST API about Budget policies
- create([, policy: Optional[BudgetPolicy], request_id: Optional[str]]) BudgetPolicy ¶
Create a budget policy.
Creates a new policy.
- Parameters:
policy –
BudgetPolicy
(optional) The policy to create. policy_id needs to be empty as it will be generated policy_name must be provided, custom_tags may need to be provided depending on the cloud provider. All other fields are optional.request_id – str (optional) A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a request_id is provided.
- Returns:
- delete(policy_id: str)¶
Delete a budget policy.
Deletes a policy
- Parameters:
policy_id – str The Id of the policy.
- get(policy_id: str) BudgetPolicy ¶
Get a budget policy.
Retrieves a policy by it’s ID.
- Parameters:
policy_id – str The Id of the policy.
- Returns:
- list([, filter_by: Optional[Filter], page_size: Optional[int], page_token: Optional[str], sort_spec: Optional[SortSpec]]) Iterator[BudgetPolicy] ¶
List policies.
Lists all policies. Policies are returned in the alphabetically ascending order of their names.
- Parameters:
filter_by –
Filter
(optional) A filter to apply to the list of policies.page_size – int (optional) The maximum number of budget policies to return. If unspecified, at most 100 budget policies will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_token –
str (optional) A page token, received from a previous ListServerlessPolicies call. Provide this to retrieve the subsequent page. If unspecified, the first page will be returned.
When paginating, all other parameters provided to ListServerlessPoliciesRequest must match the call that provided the page token.
sort_spec –
SortSpec
(optional) The sort specification.
- Returns:
Iterator over
BudgetPolicy
- update(policy_id: str [, limit_config: Optional[LimitConfig], policy: Optional[BudgetPolicy]]) BudgetPolicy ¶
Update a budget policy.
Updates a policy
- Parameters:
policy_id – str The Id of the policy. This field is generated by Databricks and globally unique.
limit_config –
LimitConfig
(optional) DEPRECATED. This is redundant field as LimitConfig is part of the BudgetPolicypolicy –
BudgetPolicy
(optional) Contains the BudgetPolicy details.
- Returns: