Skip to main content

Tag Policy

View as Markdown

A tag policy makes a tag key governed and defines the values that can be assigned to it. Governed tags are enforced across all workspaces in the account, and only users with the ASSIGN permission on the governed tag can assign it. See https://docs.databricks.com/aws/en/admin/governed-tags/.

TagPolicy object​

A tag policy makes a tag key governed and defines the values that can be assigned to it. Governed tags are enforced across all workspaces in the account, and only users with the ASSIGN permission on the governed tag can assign it. See https://docs.databricks.com/aws/en/admin/governed-tags/.

tag_keystring[ 1 .. 256 ] charactersImmutable

The tag key that this policy governs. Tag keys are case-sensitive.

Example: sensitivity_level

idstringOutput onlyImmutable

The unique identifier of the tag policy, generated when the policy is created.

descriptionstring<= 4096 characters

A description of the governed tag, such as its purpose or the meaning of its values.

Example: Identifies the sensitivity level of the data for compliance purposes.

valuesarray of object<= 500 itemsUnordered list

The allowed values of the governed tag. Only these values can be assigned to the tag key, and each value must be unique. A policy without values defines a key-only governed tag.

Show child attributesHide child attributes
namestring[ 1 .. 256 ] characters

The value that can be assigned to the tag key. Values are case-sensitive.

create_timestringOutput onlyImmutable

Timestamp when the tag policy was created

update_timestringOutput only

Timestamp when the tag policy was last updated

Get a tag policy GA​

GET /api/2.1/tag-policies/{tag_key}

Gets a single tag policy by its associated governed tag's key. For Terraform usage, see the Tag Policy Terraform documentation. To list granted permissions for tag policies, use the Account Access Control Proxy API.

API scopes: tags

Parameters​

tag_keystringRequiredpath

The key of the governed tag whose policy to get.

Response​

Returns the TagPolicy object.

List tag policies GA​

GET /api/2.1/tag-policies

Lists the tag policies for all governed tags in the account. For Terraform usage, see the Tag Policy Terraform documentation. To list granted permissions for tag policies, use the Account Access Control Proxy API.

API scopes: tags

Parameters​

page_sizeint32query

The maximum number of results to return in this request. Fewer results may be returned than requested. If unspecified or set to 0, this defaults to 1000. The maximum value is 1000; values above 1000 will be coerced down to 1000.

page_tokenstringquery

An optional page token received from a previous list tag policies call.

Response​

Returns a list of TagPolicy objects.

Create a new tag policy GA​

POST /api/2.1/tag-policies

Creates a new tag policy, making the associated tag key governed. For Terraform usage, see the Tag Policy Terraform documentation. To manage permissions for tag policies, use the Account Access Control Proxy API.

API scopes: tags

Request body​

tag_keystring[ 1 .. 256 ] charactersRequiredImmutable

The tag key that this policy governs. Tag keys are case-sensitive.

Example: sensitivity_level

descriptionstring<= 4096 characters

A description of the governed tag, such as its purpose or the meaning of its values.

Example: Identifies the sensitivity level of the data for compliance purposes.

valuesarray of object<= 500 itemsUnordered list

The allowed values of the governed tag. Only these values can be assigned to the tag key, and each value must be unique. A policy without values defines a key-only governed tag.

Show child attributesHide child attributes
namestring[ 1 .. 256 ] charactersRequired

The value that can be assigned to the tag key. Values are case-sensitive.

Response​

Returns the TagPolicy object.

Update an existing tag policy GA​

PATCH /api/2.1/tag-policies/{tag_key}

Updates an existing tag policy for a single governed tag. For Terraform usage, see the Tag Policy Terraform documentation. To manage permissions for tag policies, use the Account Access Control Proxy API.

API scopes: tags

Parameters​

tag_keystring[ 1 .. 256 ] charactersRequiredImmutablepath

The tag key that this policy governs. Tag keys are case-sensitive.

Example: sensitivity_level

update_maskstringRequiredquery

The comma-separated list of tag policy fields to update. When the mask includes values, the values in the request replace all existing allowed values.

Examples:

  • description,values : Update the description and allowed values

Request body​

descriptionstring<= 4096 characters

A description of the governed tag, such as its purpose or the meaning of its values.

Example: Identifies the sensitivity level of the data for compliance purposes.

valuesarray of object<= 500 itemsUnordered list

The allowed values of the governed tag. Only these values can be assigned to the tag key, and each value must be unique. A policy without values defines a key-only governed tag.

Show child attributesHide child attributes
namestring[ 1 .. 256 ] charactersRequired

The value that can be assigned to the tag key. Values are case-sensitive.

Response​

Returns the TagPolicy object.

Delete a tag policy GA​

DELETE /api/2.1/tag-policies/{tag_key}

Deletes a tag policy by its associated governed tag's key, leaving that tag key ungoverned. For Terraform usage, see the Tag Policy Terraform documentation.

API scopes: tags

Parameters​

tag_keystringRequiredpath

The key of the governed tag whose policy to delete.