# PolicyStatement

A Cedar authorization policy statement.

A statement names the principal, action and resource it applies to, and optionally
conditions that narrow it further. All three parts are required, so a statement is
complete as soon as it is constructed.

- Source: [`aws-bedrockagentcore/lib/policy/policy-statement.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/policy/policy-statement.ts#L752)
- Type last changed: v2.269.0 · 10 Sep 2026

## Example

```ts
import { Policy, PolicyEngine, PolicyStatement } from 'aws-cdk-lib/aws-bedrockagentcore';
declare const engine: PolicyEngine;

// Example 4: raw Cedar, for features the API does not model
new Policy(this, 'CustomPolicy', {
  policyEngine: engine,
  statement: PolicyStatement.fromCedar('permit(principal, action, resource) when { context.custom > 10 };'),
});
```

## Initializer

```ts
new PolicyStatement(props: PolicyStatementProps)
```

## Methods

- `fromCedar(cedarStatement: string): PolicyStatement // chainable` (static) — Create a statement from raw Cedar source.

  Use this for Cedar features this API does not model, or to migrate an existing
  policy.

  The source is used exactly as given. This method does not escape, quote, or
  validate it, so it is treated as trusted input and you own its correctness and
  its safety. Do not build the string by joining values that come from outside
  your application: a value containing a double quote can close a string literal
  early and add policy statements you did not write. Pass such values through
  `PolicyCondition` and the principal, action and resource factories instead,
  which reject that case at synthesis time. Service-side validation does not help,
  because an injected policy is still valid Cedar.

  **Parameters**

  - `cedarStatement` — - Complete Cedar policy statement.

- `toCedar(): string` — Generate the Cedar policy statement string.

  This is called internally by the Policy construct.

  **Returns:** Valid Cedar policy statement
