# Get a rule set

Launch stage: Public Preview

`GET /api/2.0/preview/accounts/{account_id}/access-control/rule-sets`

Get a rule set by its name. A rule set is always attached to a resource and contains a list of access rules on the
 said resource. Currently only a default rule set for each resource is supported.

API scopes: access-management

## Path parameters

- `account_id` (string, required)
  Databricks account ID.

## Query parameters

- `name` (string, required)
  The ruleset name associated with the request.
  
   Examples | Summary
   :--- | :---
   `name=accounts/<ACCOUNT_ID>/ruleSets/default` | A name for a rule set on the account.
   `name=accounts/<ACCOUNT_ID>/groups/<GROUP_ID>/ruleSets/default` | A name for a rule set on the group.
   `name=accounts/<ACCOUNT_ID>/servicePrincipals/<SERVICE_PRINCIPAL_APPLICATION_ID>/ruleSets/default` | A name for a rule set on the service principal.
   `name=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID>/ruleSets/default` | A name for a rule set on the tag policy.
- `etag` (string, required)
  Etag used for versioning. The response is at least as fresh as the eTag provided. Etag is used for optimistic
   concurrency control as a way to help prevent simultaneous updates of a rule set from overwriting each other. It is
   strongly suggested that systems make use of the etag in the read -> modify -> write pattern to perform rule set
   updates in order to avoid race conditions that is get an etag from a GET rule set request, and pass it with the
   PUT update request to identify the rule set version you are updating.
  
   Examples | Summary
   :--- | :---
   `etag=` | An empty etag can only be used in GET to indicate no freshness requirements.
   `etag=RENUAAABhSweA4NvVmmUYdiU717H3Tgy0UJdor3gE4a+mq/oj9NjAf8ZsQ==` | An etag encoded a specific version of the rule set to get or to be updated.

## Returns

Returns the RuleSet object.

## Response

```json
{
  "name": "string",
  "etag": "string",
  "grant_rules": [
    {
      "principals": [
        "string"
      ],
      "role": "string"
    }
  ]
}
```

