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

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.105.0 published on Thursday, May 2, 2024 by Pulumi

aws-native.sns.getTopicPolicy

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.105.0 published on Thursday, May 2, 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
    Id string
    id String
    id string
    id str
    id String

    getTopicPolicy Result

    The following output properties are available:

    Id string
    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
    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
    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
    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
    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
    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

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.105.0 published on Thursday, May 2, 2024 by Pulumi