Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions packages/aws-cdk-lib/aws-sns/lib/topic-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,18 @@ export interface ITopic extends IResource, notifications.INotificationRuleTarget
addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult;

/**
* Grant topic publishing permissions to the given identity
* Grant topic publishing permissions to the given identity.
*
* This grants the `sns:Publish` action on this topic. If the topic is encrypted
* with a customer-managed KMS key, it also grants `kms:Decrypt` and
* `kms:GenerateDataKey*` on the key.
*/
grantPublish(identity: iam.IGrantable): iam.Grant;

/**
* Grant topic subscribing permissions to the given identity
* Grant topic subscribing permissions to the given identity.
*
* This grants the `sns:Subscribe` action on this topic.
*/
grantSubscribe(identity: iam.IGrantable): iam.Grant;
}
Expand Down Expand Up @@ -224,7 +230,11 @@ export abstract class TopicBase extends Resource implements ITopic, IEncryptedRe
}

/**
* Grant topic publishing permissions to the given identity
* Grant topic publishing permissions to the given identity.
*
* This grants the `sns:Publish` action on this topic. If the topic is encrypted
* with a customer-managed KMS key, it also grants `kms:Decrypt` and
* `kms:GenerateDataKey*` on the key.
*
* The use of this method is discouraged. Please use `grants.publish()` instead.
*
Expand All @@ -235,7 +245,9 @@ export abstract class TopicBase extends Resource implements ITopic, IEncryptedRe
}

/**
* Grant topic subscribing permissions to the given identity
* Grant topic subscribing permissions to the given identity.
*
* This grants the `sns:Subscribe` action on this topic.
*
* The use of this method is discouraged. Please use `grants.subscribe()` instead.
*
Expand Down
Loading