``a.budget_policy``: Budget Policy ================================== .. currentmodule:: databricks.sdk.service.billing .. py:class:: BudgetPolicyAPI A service serves REST API about Budget policies .. py:method:: create( [, policy: Optional[BudgetPolicy], request_id: Optional[str]]) -> BudgetPolicy Creates a new policy. :param policy: :class:`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. :param 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: :class:`BudgetPolicy` .. py:method:: delete(policy_id: str) Deletes a policy :param policy_id: str The Id of the policy. .. py:method:: get(policy_id: str) -> BudgetPolicy Retrieves a policy by it's ID. :param policy_id: str The Id of the policy. :returns: :class:`BudgetPolicy` .. py:method:: 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. :param filter_by: :class:`Filter` (optional) A filter to apply to the list of policies. :param 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. :param 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. :param sort_spec: :class:`SortSpec` (optional) The sort specification. :returns: Iterator over :class:`BudgetPolicy` .. py:method:: update(policy_id: str, policy: BudgetPolicy [, limit_config: Optional[LimitConfig]]) -> BudgetPolicy Updates a policy :param policy_id: str The Id of the policy. This field is generated by Databricks and globally unique. :param policy: :class:`BudgetPolicy` The policy to update. `creator_user_id` cannot be specified in the request. All other fields must be specified even if not changed. The `policy_id` is used to identify the policy to update. :param limit_config: :class:`LimitConfig` (optional) DEPRECATED. This is redundant field as LimitConfig is part of the BudgetPolicy :returns: :class:`BudgetPolicy`