Skip to main content

Budget Policy

View as Markdown

BudgetPolicy object

Contains the BudgetPolicy details.

policy_idstring

The Id of the policy. This field is generated by <Databricks> and globally unique.

Constraints: = 36 characters

policy_namestring

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.

Constraints: [ 1 .. 127 ] characters

custom_tagsarray of object

A list of tags defined by the customer. At most 20 entries are allowed per policy.

Show child attributesHide child attributes
keystring

The key of the tag.

  • Must be unique among all custom tags of the same policy
  • Cannot be “budget-policy-name”, “budget-policy-id” or "budget-policy-resolution-result" - these tags are preserved.

Constraints: [ 1 .. 512 ] characters

valuestring

The value of the tag.

Constraints: <= 256 characters

binding_workspace_idsarray of int64

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.

Get GA

GET /api/2.1/accounts/{account_id}/budget-policies/{policy_id}

Retrieves a policy by it's ID.

API scopes: billing

Parameters

policy_idstringpath

The Id of the policy.

Constraints: [ 1 .. 40 ] characters

account_idstringpath

The account Id of the customer

Response

Returns the BudgetPolicy object.

List GA

GET /api/2.1/accounts/{account_id}/budget-policies

Lists all policies. Policies are returned in the alphabetically ascending order of their names.

API scopes: billing

Parameters

account_idstringpath

The account Id of the customer

page_sizeint32query

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_tokenstringquery

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.

filter_byobjectquery

A filter to apply to the list of policies.

Show child attributesHide child attributes
policy_namestring

The partial name of policies to be filtered on. If unspecified, all policies will be returned.

Constraints: <= 127 characters

creator_user_idint64

The policy creator user id to be filtered on. If unspecified, all policies will be returned.

creator_user_namestring

Deprecated: Do not use this field in new integrations. Creator filtering will be removed in a future version. The policy creator user name to be filtered on. If unspecified, all policies will be returned.

sort_specobjectquery

The sort specification.

Show child attributesHide child attributes
fieldstring

The filed to sort by

Values: FIELD_UNSPECIFIED, POLICY_NAME

descendingboolean

Whether to sort in descending order.

Response

Returns a list of BudgetPolicy objects.

Create GA

POST /api/2.1/accounts/{account_id}/budget-policies

Creates a new policy.

API scopes: billing

Parameters

account_idstringpath

The account Id of the customer

Request body

request_idstring

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.

Constraints: = 36 characters

policyobject

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.

Show child attributesHide child attributes
policy_idstring

The Id of the policy. This field is generated by <Databricks> and globally unique.

Constraints: = 36 characters

policy_namestring

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.

Constraints: [ 1 .. 127 ] characters

custom_tagsarray of object

A list of tags defined by the customer. At most 20 entries are allowed per policy.

Show child attributesHide child attributes
keystring

The key of the tag.

  • Must be unique among all custom tags of the same policy
  • Cannot be “budget-policy-name”, “budget-policy-id” or "budget-policy-resolution-result" - these tags are preserved.

Constraints: [ 1 .. 512 ] characters

valuestring

The value of the tag.

Constraints: <= 256 characters

binding_workspace_idsarray of int64

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.

Response

Returns the BudgetPolicy object.

Update GA

PATCH /api/2.1/accounts/{account_id}/budget-policies/{policy.policy_id}

Updates a policy

API scopes: billing

Parameters

policyobjectpath

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.

Show child attributesHide child attributes
policy_idstring

The Id of the policy. This field is generated by <Databricks> and globally unique.

Constraints: = 36 characters

policy_namestring

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.

Constraints: [ 1 .. 127 ] characters

custom_tagsarray of object

A list of tags defined by the customer. At most 20 entries are allowed per policy.

Show child attributesHide child attributes
keystring

The key of the tag.

  • Must be unique among all custom tags of the same policy
  • Cannot be “budget-policy-name”, “budget-policy-id” or "budget-policy-resolution-result" - these tags are preserved.

Constraints: [ 1 .. 512 ] characters

valuestring

The value of the tag.

Constraints: <= 256 characters

binding_workspace_idsarray of int64

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.

account_idstringpath

The account Id of the customer

limit_configobjectquery

DEPRECATED. This is redundant field as LimitConfig is part of the BudgetPolicy

Response

Returns the BudgetPolicy object.

Delete GA

DELETE /api/2.1/accounts/{account_id}/budget-policies/{policy_id}

Deletes a policy

API scopes: billing

Parameters

policy_idstringpath

The Id of the policy.

Constraints: [ 1 .. 40 ] characters

account_idstringpath

The account Id of the customer