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

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

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

aws-native.sns.getTopicPolicy

Explore with Pulumi AI

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

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 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.

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>
Copy
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]
Copy
func LookupTopicPolicy(ctx *Context, args *LookupTopicPolicyArgs, opts ...InvokeOption) (*LookupTopicPolicyResult, error)
func LookupTopicPolicyOutput(ctx *Context, args *LookupTopicPolicyOutputArgs, opts ...InvokeOption) LookupTopicPolicyResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetTopicPolicyResult> getTopicPolicy(GetTopicPolicyArgs args, InvokeOptions options)
public static Output<GetTopicPolicyResult> getTopicPolicy(GetTopicPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws-native:sns:getTopicPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

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

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

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi