1. Packages
  2. AWS Native
  3. API Docs
  4. sns
  5. getTopicPolicy

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

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

aws-native.sns.getTopicPolicy

Explore with Pulumi AI

aws-native logo

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

AWS Native v0.126.0 published on Monday, Sep 30, 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.

    Using getTopicPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTopicPolicy(args: GetTopicPolicyArgs, opts?: InvokeOptions): Promise<GetTopicPolicyResult>
    function getTopicPolicyOutput(args: GetTopicPolicyOutputArgs, opts?: InvokeOptions): Output<GetTopicPolicyResult>
    def get_topic_policy(id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetTopicPolicyResult
    def get_topic_policy_output(id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetTopicPolicyResult]
    func LookupTopicPolicy(ctx *Context, args *LookupTopicPolicyArgs, opts ...InvokeOption) (*LookupTopicPolicyResult, error)
    func LookupTopicPolicyOutput(ctx *Context, args *LookupTopicPolicyOutputArgs, opts ...InvokeOption) LookupTopicPolicyResultOutput

    > Note: This function is named LookupTopicPolicy in the Go SDK.

    public static class GetTopicPolicy 
    {
        public static Task<GetTopicPolicyResult> InvokeAsync(GetTopicPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetTopicPolicyResult> Invoke(GetTopicPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTopicPolicyResult> getTopicPolicy(GetTopicPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:sns:getTopicPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getTopicPolicy Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed 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.
    Id string
    The provider-assigned unique ID for this managed 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.
    id String
    The provider-assigned unique ID for this managed 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.
    id string
    The provider-assigned unique ID for this managed 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.
    id str
    The provider-assigned unique ID for this managed 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.
    id String
    The provider-assigned unique ID for this managed 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.

    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 Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi