/
queueInlinePolicy.go
147 lines (121 loc) · 5.35 KB
/
queueInlinePolicy.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
// 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 sqs
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Schema for SQS QueueInlinePolicy
type QueueInlinePolicy struct {
pulumi.CustomResourceState
// A policy document that contains permissions to add to the specified SQS queue
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SQS::QueueInlinePolicy` for more information about the expected schema for this property.
PolicyDocument pulumi.AnyOutput `pulumi:"policyDocument"`
// The URL of the SQS queue.
Queue pulumi.StringOutput `pulumi:"queue"`
}
// NewQueueInlinePolicy registers a new resource with the given unique name, arguments, and options.
func NewQueueInlinePolicy(ctx *pulumi.Context,
name string, args *QueueInlinePolicyArgs, opts ...pulumi.ResourceOption) (*QueueInlinePolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PolicyDocument == nil {
return nil, errors.New("invalid value for required argument 'PolicyDocument'")
}
if args.Queue == nil {
return nil, errors.New("invalid value for required argument 'Queue'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"queue",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource QueueInlinePolicy
err := ctx.RegisterResource("aws-native:sqs:QueueInlinePolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetQueueInlinePolicy gets an existing QueueInlinePolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetQueueInlinePolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *QueueInlinePolicyState, opts ...pulumi.ResourceOption) (*QueueInlinePolicy, error) {
var resource QueueInlinePolicy
err := ctx.ReadResource("aws-native:sqs:QueueInlinePolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering QueueInlinePolicy resources.
type queueInlinePolicyState struct {
}
type QueueInlinePolicyState struct {
}
func (QueueInlinePolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*queueInlinePolicyState)(nil)).Elem()
}
type queueInlinePolicyArgs struct {
// A policy document that contains permissions to add to the specified SQS queue
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SQS::QueueInlinePolicy` for more information about the expected schema for this property.
PolicyDocument interface{} `pulumi:"policyDocument"`
// The URL of the SQS queue.
Queue string `pulumi:"queue"`
}
// The set of arguments for constructing a QueueInlinePolicy resource.
type QueueInlinePolicyArgs struct {
// A policy document that contains permissions to add to the specified SQS queue
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SQS::QueueInlinePolicy` for more information about the expected schema for this property.
PolicyDocument pulumi.Input
// The URL of the SQS queue.
Queue pulumi.StringInput
}
func (QueueInlinePolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*queueInlinePolicyArgs)(nil)).Elem()
}
type QueueInlinePolicyInput interface {
pulumi.Input
ToQueueInlinePolicyOutput() QueueInlinePolicyOutput
ToQueueInlinePolicyOutputWithContext(ctx context.Context) QueueInlinePolicyOutput
}
func (*QueueInlinePolicy) ElementType() reflect.Type {
return reflect.TypeOf((**QueueInlinePolicy)(nil)).Elem()
}
func (i *QueueInlinePolicy) ToQueueInlinePolicyOutput() QueueInlinePolicyOutput {
return i.ToQueueInlinePolicyOutputWithContext(context.Background())
}
func (i *QueueInlinePolicy) ToQueueInlinePolicyOutputWithContext(ctx context.Context) QueueInlinePolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueInlinePolicyOutput)
}
type QueueInlinePolicyOutput struct{ *pulumi.OutputState }
func (QueueInlinePolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**QueueInlinePolicy)(nil)).Elem()
}
func (o QueueInlinePolicyOutput) ToQueueInlinePolicyOutput() QueueInlinePolicyOutput {
return o
}
func (o QueueInlinePolicyOutput) ToQueueInlinePolicyOutputWithContext(ctx context.Context) QueueInlinePolicyOutput {
return o
}
// A policy document that contains permissions to add to the specified SQS queue
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SQS::QueueInlinePolicy` for more information about the expected schema for this property.
func (o QueueInlinePolicyOutput) PolicyDocument() pulumi.AnyOutput {
return o.ApplyT(func(v *QueueInlinePolicy) pulumi.AnyOutput { return v.PolicyDocument }).(pulumi.AnyOutput)
}
// The URL of the SQS queue.
func (o QueueInlinePolicyOutput) Queue() pulumi.StringOutput {
return o.ApplyT(func(v *QueueInlinePolicy) pulumi.StringOutput { return v.Queue }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*QueueInlinePolicyInput)(nil)).Elem(), &QueueInlinePolicy{})
pulumi.RegisterOutputType(QueueInlinePolicyOutput{})
}