generated from pulumi/pulumi-tf-provider-boilerplate
/
detachUserPolicyOperation.go
232 lines (184 loc) · 9.52 KB
/
detachUserPolicyOperation.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dlc
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type DetachUserPolicyOperation struct {
pulumi.CustomResourceState
// Authentication policy collection.
PolicySets DetachUserPolicyOperationPolicySetArrayOutput `pulumi:"policySets"`
// User id, the same as the sub-user uin.
UserId pulumi.StringOutput `pulumi:"userId"`
}
// NewDetachUserPolicyOperation registers a new resource with the given unique name, arguments, and options.
func NewDetachUserPolicyOperation(ctx *pulumi.Context,
name string, args *DetachUserPolicyOperationArgs, opts ...pulumi.ResourceOption) (*DetachUserPolicyOperation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.UserId == nil {
return nil, errors.New("invalid value for required argument 'UserId'")
}
opts = pkgResourceDefaultOpts(opts)
var resource DetachUserPolicyOperation
err := ctx.RegisterResource("tencentcloud:Dlc/detachUserPolicyOperation:DetachUserPolicyOperation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDetachUserPolicyOperation gets an existing DetachUserPolicyOperation 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 GetDetachUserPolicyOperation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DetachUserPolicyOperationState, opts ...pulumi.ResourceOption) (*DetachUserPolicyOperation, error) {
var resource DetachUserPolicyOperation
err := ctx.ReadResource("tencentcloud:Dlc/detachUserPolicyOperation:DetachUserPolicyOperation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DetachUserPolicyOperation resources.
type detachUserPolicyOperationState struct {
// Authentication policy collection.
PolicySets []DetachUserPolicyOperationPolicySet `pulumi:"policySets"`
// User id, the same as the sub-user uin.
UserId *string `pulumi:"userId"`
}
type DetachUserPolicyOperationState struct {
// Authentication policy collection.
PolicySets DetachUserPolicyOperationPolicySetArrayInput
// User id, the same as the sub-user uin.
UserId pulumi.StringPtrInput
}
func (DetachUserPolicyOperationState) ElementType() reflect.Type {
return reflect.TypeOf((*detachUserPolicyOperationState)(nil)).Elem()
}
type detachUserPolicyOperationArgs struct {
// Authentication policy collection.
PolicySets []DetachUserPolicyOperationPolicySet `pulumi:"policySets"`
// User id, the same as the sub-user uin.
UserId string `pulumi:"userId"`
}
// The set of arguments for constructing a DetachUserPolicyOperation resource.
type DetachUserPolicyOperationArgs struct {
// Authentication policy collection.
PolicySets DetachUserPolicyOperationPolicySetArrayInput
// User id, the same as the sub-user uin.
UserId pulumi.StringInput
}
func (DetachUserPolicyOperationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*detachUserPolicyOperationArgs)(nil)).Elem()
}
type DetachUserPolicyOperationInput interface {
pulumi.Input
ToDetachUserPolicyOperationOutput() DetachUserPolicyOperationOutput
ToDetachUserPolicyOperationOutputWithContext(ctx context.Context) DetachUserPolicyOperationOutput
}
func (*DetachUserPolicyOperation) ElementType() reflect.Type {
return reflect.TypeOf((**DetachUserPolicyOperation)(nil)).Elem()
}
func (i *DetachUserPolicyOperation) ToDetachUserPolicyOperationOutput() DetachUserPolicyOperationOutput {
return i.ToDetachUserPolicyOperationOutputWithContext(context.Background())
}
func (i *DetachUserPolicyOperation) ToDetachUserPolicyOperationOutputWithContext(ctx context.Context) DetachUserPolicyOperationOutput {
return pulumi.ToOutputWithContext(ctx, i).(DetachUserPolicyOperationOutput)
}
// DetachUserPolicyOperationArrayInput is an input type that accepts DetachUserPolicyOperationArray and DetachUserPolicyOperationArrayOutput values.
// You can construct a concrete instance of `DetachUserPolicyOperationArrayInput` via:
//
// DetachUserPolicyOperationArray{ DetachUserPolicyOperationArgs{...} }
type DetachUserPolicyOperationArrayInput interface {
pulumi.Input
ToDetachUserPolicyOperationArrayOutput() DetachUserPolicyOperationArrayOutput
ToDetachUserPolicyOperationArrayOutputWithContext(context.Context) DetachUserPolicyOperationArrayOutput
}
type DetachUserPolicyOperationArray []DetachUserPolicyOperationInput
func (DetachUserPolicyOperationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DetachUserPolicyOperation)(nil)).Elem()
}
func (i DetachUserPolicyOperationArray) ToDetachUserPolicyOperationArrayOutput() DetachUserPolicyOperationArrayOutput {
return i.ToDetachUserPolicyOperationArrayOutputWithContext(context.Background())
}
func (i DetachUserPolicyOperationArray) ToDetachUserPolicyOperationArrayOutputWithContext(ctx context.Context) DetachUserPolicyOperationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DetachUserPolicyOperationArrayOutput)
}
// DetachUserPolicyOperationMapInput is an input type that accepts DetachUserPolicyOperationMap and DetachUserPolicyOperationMapOutput values.
// You can construct a concrete instance of `DetachUserPolicyOperationMapInput` via:
//
// DetachUserPolicyOperationMap{ "key": DetachUserPolicyOperationArgs{...} }
type DetachUserPolicyOperationMapInput interface {
pulumi.Input
ToDetachUserPolicyOperationMapOutput() DetachUserPolicyOperationMapOutput
ToDetachUserPolicyOperationMapOutputWithContext(context.Context) DetachUserPolicyOperationMapOutput
}
type DetachUserPolicyOperationMap map[string]DetachUserPolicyOperationInput
func (DetachUserPolicyOperationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DetachUserPolicyOperation)(nil)).Elem()
}
func (i DetachUserPolicyOperationMap) ToDetachUserPolicyOperationMapOutput() DetachUserPolicyOperationMapOutput {
return i.ToDetachUserPolicyOperationMapOutputWithContext(context.Background())
}
func (i DetachUserPolicyOperationMap) ToDetachUserPolicyOperationMapOutputWithContext(ctx context.Context) DetachUserPolicyOperationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DetachUserPolicyOperationMapOutput)
}
type DetachUserPolicyOperationOutput struct{ *pulumi.OutputState }
func (DetachUserPolicyOperationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DetachUserPolicyOperation)(nil)).Elem()
}
func (o DetachUserPolicyOperationOutput) ToDetachUserPolicyOperationOutput() DetachUserPolicyOperationOutput {
return o
}
func (o DetachUserPolicyOperationOutput) ToDetachUserPolicyOperationOutputWithContext(ctx context.Context) DetachUserPolicyOperationOutput {
return o
}
// Authentication policy collection.
func (o DetachUserPolicyOperationOutput) PolicySets() DetachUserPolicyOperationPolicySetArrayOutput {
return o.ApplyT(func(v *DetachUserPolicyOperation) DetachUserPolicyOperationPolicySetArrayOutput { return v.PolicySets }).(DetachUserPolicyOperationPolicySetArrayOutput)
}
// User id, the same as the sub-user uin.
func (o DetachUserPolicyOperationOutput) UserId() pulumi.StringOutput {
return o.ApplyT(func(v *DetachUserPolicyOperation) pulumi.StringOutput { return v.UserId }).(pulumi.StringOutput)
}
type DetachUserPolicyOperationArrayOutput struct{ *pulumi.OutputState }
func (DetachUserPolicyOperationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DetachUserPolicyOperation)(nil)).Elem()
}
func (o DetachUserPolicyOperationArrayOutput) ToDetachUserPolicyOperationArrayOutput() DetachUserPolicyOperationArrayOutput {
return o
}
func (o DetachUserPolicyOperationArrayOutput) ToDetachUserPolicyOperationArrayOutputWithContext(ctx context.Context) DetachUserPolicyOperationArrayOutput {
return o
}
func (o DetachUserPolicyOperationArrayOutput) Index(i pulumi.IntInput) DetachUserPolicyOperationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DetachUserPolicyOperation {
return vs[0].([]*DetachUserPolicyOperation)[vs[1].(int)]
}).(DetachUserPolicyOperationOutput)
}
type DetachUserPolicyOperationMapOutput struct{ *pulumi.OutputState }
func (DetachUserPolicyOperationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DetachUserPolicyOperation)(nil)).Elem()
}
func (o DetachUserPolicyOperationMapOutput) ToDetachUserPolicyOperationMapOutput() DetachUserPolicyOperationMapOutput {
return o
}
func (o DetachUserPolicyOperationMapOutput) ToDetachUserPolicyOperationMapOutputWithContext(ctx context.Context) DetachUserPolicyOperationMapOutput {
return o
}
func (o DetachUserPolicyOperationMapOutput) MapIndex(k pulumi.StringInput) DetachUserPolicyOperationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DetachUserPolicyOperation {
return vs[0].(map[string]*DetachUserPolicyOperation)[vs[1].(string)]
}).(DetachUserPolicyOperationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DetachUserPolicyOperationInput)(nil)).Elem(), &DetachUserPolicyOperation{})
pulumi.RegisterInputType(reflect.TypeOf((*DetachUserPolicyOperationArrayInput)(nil)).Elem(), DetachUserPolicyOperationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DetachUserPolicyOperationMapInput)(nil)).Elem(), DetachUserPolicyOperationMap{})
pulumi.RegisterOutputType(DetachUserPolicyOperationOutput{})
pulumi.RegisterOutputType(DetachUserPolicyOperationArrayOutput{})
pulumi.RegisterOutputType(DetachUserPolicyOperationMapOutput{})
}