# CfnSecurityPolicyProps

Struct · External

Properties for defining a `CfnSecurityPolicy`.

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

- Source: Generated at build time
- Type last changed: v2.78.0 · 4 May 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opensearchserverless as opensearchserverless } from 'aws-cdk-lib';
const cfnSecurityPolicyProps: opensearchserverless.CfnSecurityPolicyProps = {
  name: 'name',
  policy: 'policy',
  type: 'type',

  // the properties below are optional
  description: 'description',
};
```

Python:

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

cfn_security_policy_props = opensearchserverless.CfnSecurityPolicyProps(
    name="name",
    policy="policy",
    type="type",

    # the properties below are optional
    description="description"
)
```

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.opensearchserverless.*;

CfnSecurityPolicyProps cfnSecurityPolicyProps = CfnSecurityPolicyProps.builder()
        .name("name")
        .policy("policy")
        .type("type")

        // the properties below are optional
        .description("description")
        .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.OpenSearchServerless;

var cfnSecurityPolicyProps = new CfnSecurityPolicyProps {
    Name = "name",
    Policy = "policy",
    Type = "type",

    // the properties below are optional
    Description = "description"
};
```

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"

cfnSecurityPolicyProps := &CfnSecurityPolicyProps{
	Name: jsii.String("name"),
	Policy: jsii.String("policy"),
	Type: jsii.String("type"),

	// the properties below are optional
	Description: jsii.String("description"),
}
```

## Properties

- `description`: string — The description of the security policy.

- `name`: string (required) — The name of the policy.

- `policy`: string (required) — The JSON policy document without any whitespaces.

- `type`: string (required) — The type of security policy.

  Can be either `encryption` or `network` .
