1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. sns
  5. TopicPolicy

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.sns.TopicPolicy

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

The AWS::SNS::TopicPolicy resource associates SNS topics with a policy. For an example snippet, see Declaring an policy in the User Guide.

Create TopicPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new TopicPolicy(name: string, args: TopicPolicyArgs, opts?: CustomResourceOptions);
@overload
def TopicPolicy(resource_name: str,
                args: TopicPolicyArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def TopicPolicy(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                policy_document: Optional[Any] = None,
                topics: Optional[Sequence[str]] = None)
func NewTopicPolicy(ctx *Context, name string, args TopicPolicyArgs, opts ...ResourceOption) (*TopicPolicy, error)
public TopicPolicy(string name, TopicPolicyArgs args, CustomResourceOptions? opts = null)
public TopicPolicy(String name, TopicPolicyArgs args)
public TopicPolicy(String name, TopicPolicyArgs args, CustomResourceOptions options)
type: aws-native:sns:TopicPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TopicPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TopicPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TopicPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TopicPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TopicPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

TopicPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The TopicPolicy resource accepts the following input properties:

PolicyDocument This property is required. object

A policy document that contains permissions to add to the specified SNS topics.

Search the CloudFormation User Guide for AWS::SNS::TopicPolicy for more information about the expected schema for this property.

Topics This property is required. List<string>
The Amazon Resource Names (ARN) of the topics to which you want to add the policy. You can use the Ref function to specify an AWS::SNS::Topic resource.
PolicyDocument This property is required. interface{}

A policy document that contains permissions to add to the specified SNS topics.

Search the CloudFormation User Guide for AWS::SNS::TopicPolicy for more information about the expected schema for this property.

Topics This property is required. []string
The Amazon Resource Names (ARN) of the topics to which you want to add the policy. You can use the Ref function to specify an AWS::SNS::Topic resource.
policyDocument This property is required. Object

A policy document that contains permissions to add to the specified SNS topics.

Search the CloudFormation User Guide for AWS::SNS::TopicPolicy for more information about the expected schema for this property.

topics This property is required. List<String>
The Amazon Resource Names (ARN) of the topics to which you want to add the policy. You can use the Ref function to specify an AWS::SNS::Topic resource.
policyDocument This property is required. any

A policy document that contains permissions to add to the specified SNS topics.

Search the CloudFormation User Guide for AWS::SNS::TopicPolicy for more information about the expected schema for this property.

topics This property is required. string[]
The Amazon Resource Names (ARN) of the topics to which you want to add the policy. You can use the Ref function to specify an AWS::SNS::Topic resource.
policy_document This property is required. Any

A policy document that contains permissions to add to the specified SNS topics.

Search the CloudFormation User Guide for AWS::SNS::TopicPolicy for more information about the expected schema for this property.

topics This property is required. Sequence[str]
The Amazon Resource Names (ARN) of the topics to which you want to add the policy. You can use the Ref function to specify an AWS::SNS::Topic resource.
policyDocument This property is required. Any

A policy document that contains permissions to add to the specified SNS topics.

Search the CloudFormation User Guide for AWS::SNS::TopicPolicy for more information about the expected schema for this property.

topics This property is required. List<String>
The Amazon Resource Names (ARN) of the topics to which you want to add the policy. You can use the Ref function to specify an AWS::SNS::Topic resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the TopicPolicy resource produces the following output properties:

AwsId string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
AwsId string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
awsId String
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
awsId string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
aws_id str
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
awsId String
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi