# CfnTopicPolicyProps

Properties for defining a `CfnTopicPolicy`.

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

- Source: Generated at build time

## Example

TypeScript:

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

declare const policyDocument: any;
const cfnTopicPolicyProps: sns.CfnTopicPolicyProps = {
  policyDocument: policyDocument,
  topics: ['topics'],
};
```

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_sns as sns

# policy_document: Any

cfn_topic_policy_props = sns.CfnTopicPolicyProps(
    policy_document=policy_document,
    topics=["topics"]
)
```

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

Object policyDocument;

CfnTopicPolicyProps cfnTopicPolicyProps = CfnTopicPolicyProps.builder()
        .policyDocument(policyDocument)
        .topics(List.of("topics"))
        .build();
```

C# / .NET:

```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.SNS;

var policyDocument;

var cfnTopicPolicyProps = new CfnTopicPolicyProps {
    PolicyDocument = policyDocument,
    Topics = new [] { "topics" }
};
```

Golang:

```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 policyDocument interface{}

cfnTopicPolicyProps := &CfnTopicPolicyProps{
	PolicyDocument: policyDocument,
	Topics: []*string{
		jsii.String("topics"),
	},
}
```

## Properties

- `policyDocument`: any (required) — A policy document that contains permissions to add to the specified SNS topics.

- `topics`: string[] (required) — The Amazon Resource Names (ARN) of the topics to which you want to add the policy.

  You can use the `[Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)` function to specify an `[AWS::SNS::Topic](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html)` resource.
