Class CfnTopicPolicy
A CloudFormation AWS::SNS::TopicPolicy
.
Inherited Members
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.AWS.SNS.dll
Syntax (csharp)
public class CfnTopicPolicy : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnTopicPolicy
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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 .
CloudformationResource: AWS::SNS::TopicPolicy
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html
ExampleMetadata: fixture=_generated
Examples
// 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 cfnTopicPolicy = new CfnTopicPolicy(this, "MyCfnTopicPolicy", new CfnTopicPolicyProps {
PolicyDocument = policyDocument,
Topics = new [] { "topics" }
});
Synopsis
Constructors
CfnTopicPolicy(Construct, String, ICfnTopicPolicyProps) | Create a new |
CfnTopicPolicy(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnTopicPolicy(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
PolicyDocument | A policy document that contains permissions to add to the specified SNS topics. |
Topics | The Amazon Resource Names (ARN) of the topics to which you want to add the policy. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnTopicPolicy(Construct, String, ICfnTopicPolicyProps)
Create a new AWS::SNS::TopicPolicy
.
public CfnTopicPolicy(Construct scope, string id, ICfnTopicPolicyProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnTopicPolicyProps
- resource properties.
CfnTopicPolicy(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnTopicPolicy(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnTopicPolicy(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnTopicPolicy(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
PolicyDocument
A policy document that contains permissions to add to the specified SNS topics.
public virtual object PolicyDocument { get; set; }
Property Value
System.Object
Remarks
Topics
The Amazon Resource Names (ARN) of the topics to which you want to add the policy.
public virtual string[] Topics { get; set; }
Property Value
System.String[]
Remarks
You can use the Ref
function to specify an AWS::SNS::Topic
resource.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>