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¶
Creates a new policy.
- Parameters:
policy –
BudgetPolicy(optional) The policy to create.policy_idneeds to be empty as it will be generatedpolicy_namemust 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_idis provided.
- Returns:
- delete(policy_id: str)¶
Deletes a policy
- Parameters:
policy_id – str The Id of the policy.
- get(policy_id: str) BudgetPolicy¶
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]¶
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
ListServerlessPoliciescall. Provide this to retrieve the subsequent page. If unspecified, the first page will be returned.When paginating, all other parameters provided to
ListServerlessPoliciesRequestmust match the call that provided the page token.sort_spec –
SortSpec(optional) The sort specification.
- Returns:
Iterator over
BudgetPolicy
- update(policy_id: str, policy: BudgetPolicy [, limit_config: Optional[LimitConfig]]) BudgetPolicy¶
Updates a policy
- Parameters:
policy_id – str The Id of the policy. This field is generated by Databricks and globally unique.
policy –
BudgetPolicyThe policy to update.creator_user_idcannot be specified in the request. All other fields must be specified even if not changed. Thepolicy_idis used to identify the policy to update.limit_config –
LimitConfig(optional) DEPRECATED. This is redundant field as LimitConfig is part of the BudgetPolicy
- Returns: