UNPKG

1.21 kBTypeScriptView Raw
1import { PolicyDocument } from '@aws-cdk/aws-iam';
2import { Resource } from '@aws-cdk/core';
3import { Construct } from 'constructs';
4import { ITopic } from './topic-base';
5/**
6 * Properties to associate SNS topics with a policy
7 */
8export interface TopicPolicyProps {
9 /**
10 * The set of topics this policy applies to.
11 */
12 readonly topics: ITopic[];
13 /**
14 * IAM policy document to apply to topic(s).
15 * @default empty policy document
16 */
17 readonly policyDocument?: PolicyDocument;
18}
19/**
20 * The policy for an SNS Topic
21 *
22 * Policies define the operations that are allowed on this resource.
23 *
24 * You almost never need to define this construct directly.
25 *
26 * All AWS resources that support resource policies have a method called
27 * `addToResourcePolicy()`, which will automatically create a new resource
28 * policy if one doesn't exist yet, otherwise it will add to the existing
29 * policy.
30 *
31 * Prefer to use `addToResourcePolicy()` instead.
32 */
33export declare class TopicPolicy extends Resource {
34 /**
35 * The IAM policy document for this policy.
36 */
37 readonly document: PolicyDocument;
38 constructor(scope: Construct, id: string, props: TopicPolicyProps);
39}