We recommend new projects start with resources from the AWS provider.
aws-native.sns.TopicPolicy
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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 string
- The unique name of the resource.
- args TopicPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args TopicPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TopicPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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:
- Policy
Document 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 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 anAWS::SNS::Topic
resource.
- Policy
Document 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 []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 anAWS::SNS::Topic
resource.
- policy
Document 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 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 anAWS::SNS::Topic
resource.
- policy
Document 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 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 anAWS::SNS::Topic
resource.
- policy_
document 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 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 anAWS::SNS::Topic
resource.
- policy
Document 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 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 anAWS::SNS::Topic
resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TopicPolicy resource produces the following output properties:
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.