---
title: "GetPolicyStatementKinds"
description: "List the statement kinds a policy permits"
canonical: "https://pgbeam.com/docs/go-sdk/policies/getPolicyStatementKinds"
last-updated: "2026-10-26T18:53:12.000Z"
---

# GetPolicyStatementKinds

> List the statement kinds a policy permits

URL: https://pgbeam.com/docs/go-sdk/policies/getPolicyStatementKinds

{/* Auto-generated from OpenAPI. Do not edit. Run `pnpm generate:sdk-docs` to regenerate. */}

Returns, for every statement kind the proxy classifies, whether this policy permits a statement of that kind, and when it does not, the rule and reason the proxy would refuse it with. The answer comes from the data plane's own policy engine rather than from the stored fields, so it resolves them the way enforcement does: COPY is refused whatever the allowlist says, deny beats allow, read_only is a ceiling the allowlist cannot lift, and an unclassified statement fails closed unless "other" is allowlisted. Each kind is judged on its own, with no relations and a WHERE clause, so table lists, masking, budgets and the other floors are not part of these verdicts.

## Usage

```go
result, err := client.Policies.GetPolicyStatementKinds(ctx, "prj_xxx", "pol_xxx")
```

## Parameters

| Parameter | Type              | Required | Description                                                |
| --------- | ----------------- | -------- | ---------------------------------------------------------- |
| ctx       | `context.Context` | Yes      | Request context                                            |
| projectID | `string`          | Yes      | Unique project identifier (prefixed, e.g. prj_xxx).        |
| policyID  | `string`          | Yes      | Unique policy profile identifier (prefixed, e.g. pol_xxx). |

## Response

`(*pgbeam.PolicyStatementKinds, error)`: one verdict per statement kind.

## Example

```go
import pgbeam "go.pgbeam.com/sdk"

client := pgbeam.NewClient(&pgbeam.ClientOptions{
  APIKey: "pbu_...",
})

result, err := client.Policies.GetPolicyStatementKinds(ctx, "prj_xxx", "pol_xxx")
if err != nil {
  log.Fatal(err)
}
fmt.Println(result)
```

## Errors

| Status | Description                                                                                                                                                                                                                                                                                           |
| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400    | The request was rejected. `code` is `INVALID_INPUT`, and `errors` names the offending fields when the failure was a validation one.                                                                                                                                                                   |
| 401    | Missing or invalid authentication. `code` is `UNAUTHORIZED`.                                                                                                                                                                                                                                          |
| 403    | The caller is authenticated but not allowed to perform this operation. `code` is `FORBIDDEN` when the caller's role is insufficient, and `PLAN_LIMIT_REACHED` when the organization's plan is what stands in the way. The two are answered differently, so branch on the code rather than the status. |
| 404    | The resource does not exist, or the caller is not entitled to know that it does. `code` is `NOT_FOUND`.                                                                                                                                                                                               |
| 429    | Rate limited. `code` is `RATE_LIMITED`.                                                                                                                                                                                                                                                               |
| 500    | The request failed for a reason on our side. `code` is `INTERNAL_ERROR`. Quote `request_id` when reporting it.                                                                                                                                                                                        |