We recommend new projects start with resources from the AWS provider.
aws-native.sns.getTopicPolicy
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.
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.
- 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.
- Id string
- The provider-assigned unique ID for this managed 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.
- id String
- The provider-assigned unique ID for this managed 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.
- id string
- 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 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.
- 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 anAWS::SNS::Topic
resource.
- id String
- 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 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.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.