@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:21.247Z") public class CfnTopicPolicy extends CfnResource implements IInspectable
The AWS::SNS::TopicPolicy
resource associates Amazon SNS topics with a policy. For an example snippet, see Declaring an Amazon SNS policy in the AWS CloudFormation User Guide .
Example:
// 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; CfnTopicPolicy cfnTopicPolicy = CfnTopicPolicy.Builder.create(this, "MyCfnTopicPolicy") .policyDocument(policyDocument) .topics(List.of("topics")) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnTopicPolicy.Builder
A fluent builder for
CfnTopicPolicy . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnTopicPolicy(Construct scope,
java.lang.String id,
CfnTopicPolicyProps props)
Create a new `AWS::SNS::TopicPolicy`.
|
protected |
CfnTopicPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTopicPolicy(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getPolicyDocument()
A policy document that contains permissions to add to the specified SNS topics.
|
java.util.List<java.lang.String> |
getTopics()
The Amazon Resource Names (ARN) of the topics to which you want to add the policy.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setPolicyDocument(java.lang.Object value)
A policy document that contains permissions to add to the specified SNS topics.
|
void |
setTopics(java.util.List<java.lang.String> value)
The Amazon Resource Names (ARN) of the topics to which you want to add the policy.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnTopicPolicy(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTopicPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnTopicPolicy(Construct scope, java.lang.String id, CfnTopicPolicyProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.Object getPolicyDocument()
public void setPolicyDocument(java.lang.Object value)
public java.util.List<java.lang.String> getTopics()
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-properties-sns-topic.html)
resource.
public void setTopics(java.util.List<java.lang.String> value)
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-properties-sns-topic.html)
resource.