/
getTopicInlinePolicy.go
82 lines (67 loc) · 3.11 KB
/
getTopicInlinePolicy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package sns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Schema for AWS::SNS::TopicInlinePolicy
func LookupTopicInlinePolicy(ctx *pulumi.Context, args *LookupTopicInlinePolicyArgs, opts ...pulumi.InvokeOption) (*LookupTopicInlinePolicyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTopicInlinePolicyResult
err := ctx.Invoke("aws-native:sns:getTopicInlinePolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupTopicInlinePolicyArgs struct {
// The Amazon Resource Name (ARN) of the topic to which you want to add the policy.
TopicArn string `pulumi:"topicArn"`
}
type LookupTopicInlinePolicyResult struct {
// A policy document that contains permissions to add to the specified SNS topics.
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SNS::TopicInlinePolicy` for more information about the expected schema for this property.
PolicyDocument interface{} `pulumi:"policyDocument"`
}
func LookupTopicInlinePolicyOutput(ctx *pulumi.Context, args LookupTopicInlinePolicyOutputArgs, opts ...pulumi.InvokeOption) LookupTopicInlinePolicyResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupTopicInlinePolicyResult, error) {
args := v.(LookupTopicInlinePolicyArgs)
r, err := LookupTopicInlinePolicy(ctx, &args, opts...)
var s LookupTopicInlinePolicyResult
if r != nil {
s = *r
}
return s, err
}).(LookupTopicInlinePolicyResultOutput)
}
type LookupTopicInlinePolicyOutputArgs struct {
// The Amazon Resource Name (ARN) of the topic to which you want to add the policy.
TopicArn pulumi.StringInput `pulumi:"topicArn"`
}
func (LookupTopicInlinePolicyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTopicInlinePolicyArgs)(nil)).Elem()
}
type LookupTopicInlinePolicyResultOutput struct{ *pulumi.OutputState }
func (LookupTopicInlinePolicyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTopicInlinePolicyResult)(nil)).Elem()
}
func (o LookupTopicInlinePolicyResultOutput) ToLookupTopicInlinePolicyResultOutput() LookupTopicInlinePolicyResultOutput {
return o
}
func (o LookupTopicInlinePolicyResultOutput) ToLookupTopicInlinePolicyResultOutputWithContext(ctx context.Context) LookupTopicInlinePolicyResultOutput {
return o
}
// A policy document that contains permissions to add to the specified SNS topics.
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SNS::TopicInlinePolicy` for more information about the expected schema for this property.
func (o LookupTopicInlinePolicyResultOutput) PolicyDocument() pulumi.AnyOutput {
return o.ApplyT(func(v LookupTopicInlinePolicyResult) interface{} { return v.PolicyDocument }).(pulumi.AnyOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTopicInlinePolicyResultOutput{})
}