# CfnPolicyStoreProps

Struct · External

Properties for defining a `CfnPolicyStore`.

Used as props by: [CfnPolicyStore](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnPolicyStore.html)

- Source: Generated at build time
- Type last changed: v2.241.0 · 2 Mar 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_verifiedpermissions as verifiedpermissions } from 'aws-cdk-lib';

declare const default_: any;
const cfnPolicyStoreProps: verifiedpermissions.CfnPolicyStoreProps = {
  validationSettings: {
    mode: 'mode',
  },

  // the properties below are optional
  deletionProtection: {
    mode: 'mode',
  },
  description: 'description',
  encryptionSettings: {
    default: default_,
    kmsEncryptionSettings: {
      key: 'key',

      // the properties below are optional
      encryptionContext: {
        encryptionContextKey: 'encryptionContext',
      },
    },
  },
  schema: {
    cedarJson: 'cedarJson',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_verifiedpermissions as verifiedpermissions

# default_: Any

cfn_policy_store_props = verifiedpermissions.CfnPolicyStoreProps(
    validation_settings=verifiedpermissions.CfnPolicyStore.ValidationSettingsProperty(
        mode="mode"
    ),

    # the properties below are optional
    deletion_protection=verifiedpermissions.CfnPolicyStore.DeletionProtectionProperty(
        mode="mode"
    ),
    description="description",
    encryption_settings=verifiedpermissions.CfnPolicyStore.EncryptionSettingsProperty(
        default=default_,
        kms_encryption_settings=verifiedpermissions.CfnPolicyStore.KmsEncryptionSettingsProperty(
            key="key",

            # the properties below are optional
            encryption_context={
                "encryption_context_key": "encryptionContext"
            }
        )
    ),
    schema=verifiedpermissions.CfnPolicyStore.SchemaDefinitionProperty(
        cedar_json="cedarJson"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.verifiedpermissions.*;

Object default_;

CfnPolicyStoreProps cfnPolicyStoreProps = CfnPolicyStoreProps.builder()
        .validationSettings(ValidationSettingsProperty.builder()
                .mode("mode")
                .build())

        // the properties below are optional
        .deletionProtection(DeletionProtectionProperty.builder()
                .mode("mode")
                .build())
        .description("description")
        .encryptionSettings(EncryptionSettingsProperty.builder()
                .default(default_)
                .kmsEncryptionSettings(KmsEncryptionSettingsProperty.builder()
                        .key("key")

                        // the properties below are optional
                        .encryptionContext(Map.of(
                                "encryptionContextKey", "encryptionContext"))
                        .build())
                .build())
        .schema(SchemaDefinitionProperty.builder()
                .cedarJson("cedarJson")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.VerifiedPermissions;

var default_;

var cfnPolicyStoreProps = new CfnPolicyStoreProps {
    ValidationSettings = new ValidationSettingsProperty {
        Mode = "mode"
    },

    // the properties below are optional
    DeletionProtection = new DeletionProtectionProperty {
        Mode = "mode"
    },
    Description = "description",
    EncryptionSettings = new EncryptionSettingsProperty {
        Default = default_,
        KmsEncryptionSettings = new KmsEncryptionSettingsProperty {
            Key = "key",

            // the properties below are optional
            EncryptionContext = new Dictionary<string, string> {
                { "encryptionContextKey", "encryptionContext" }
            }
        }
    },
    Schema = new SchemaDefinitionProperty {
        CedarJson = "cedarJson"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var default_ interface{}

cfnPolicyStoreProps := &CfnPolicyStoreProps{
	ValidationSettings: &ValidationSettingsProperty{
		Mode: jsii.String("mode"),
	},

	// the properties below are optional
	DeletionProtection: &DeletionProtectionProperty{
		Mode: jsii.String("mode"),
	},
	Description: jsii.String("description"),
	EncryptionSettings: &EncryptionSettingsProperty{
		Default: default_,
		KmsEncryptionSettings: &KmsEncryptionSettingsProperty{
			Key: jsii.String("key"),

			// the properties below are optional
			EncryptionContext: map[string]*string{
				"encryptionContextKey": jsii.String("encryptionContext"),
			},
		},
	},
	Schema: &SchemaDefinitionProperty{
		CedarJson: jsii.String("cedarJson"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `deletionProtection`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPolicyStore.DeletionProtectionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnPolicyStore.DeletionProtectionProperty.html) — Specifies whether the policy store can be deleted. If enabled, the policy store can't be deleted.

  The default state is `DISABLED` .

- `description`: string — Descriptive text that you can provide to help with identification of the current policy store.

- `encryptionSettings`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPolicyStore.EncryptionSettingsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnPolicyStore.EncryptionSettingsProperty.html)

- `schema`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPolicyStore.SchemaDefinitionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnPolicyStore.SchemaDefinitionProperty.html) — Creates or updates the policy schema in a policy store.

  Cedar can use the schema to validate any Cedar policies and policy templates submitted to the policy store. Any changes to the schema validate only policies and templates submitted after the schema change. Existing policies and templates are not re-evaluated against the changed schema. If you later update a policy, then it is evaluated against the new schema at that time.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The list of key-value pairs to associate with the policy store.

- `validationSettings`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPolicyStore.ValidationSettingsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnPolicyStore.ValidationSettingsProperty.html) (required) — Specifies the validation setting for this policy store.

  Currently, the only valid and required value is `Mode` .

  > We recommend that you turn on `STRICT` mode only after you define a schema. If a schema doesn't exist, then `STRICT` mode causes any policy to fail validation, and Verified Permissions rejects the policy. You can turn off validation by using the [UpdatePolicyStore](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyStore) . Then, when you have a schema defined, use [UpdatePolicyStore](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyStore) again to turn validation back on.
