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.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.sns.TopicPolicy

Explore with Pulumi AI

aws-native logo

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

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 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 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:

    PolicyDocument 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 an AWS::SNS::Topic resource.
    PolicyDocument 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 an AWS::SNS::Topic resource.
    policyDocument 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 an AWS::SNS::Topic resource.
    policyDocument 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 an AWS::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 an AWS::SNS::Topic resource.
    policyDocument 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 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
    aws-native logo

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

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi