generated from pulumi/pulumi-tf-provider-boilerplate
/
rocketmqCluster.go
332 lines (275 loc) · 12.2 KB
/
rocketmqCluster.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
// 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 tdmq
import (
"context"
"reflect"
"errors"
"github.com/mergtil/pulumi-tencentcloud/sdk/go/tencentcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type RocketmqCluster struct {
pulumi.CustomResourceState
// Cluster ID.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// Cluster name, which can contain 3-64 letters, digits, hyphens, and underscores.
ClusterName pulumi.StringOutput `pulumi:"clusterName"`
// Creation time in milliseconds.
CreateTime pulumi.IntOutput `pulumi:"createTime"`
// Whether it is an exclusive instance.
IsVip pulumi.BoolOutput `pulumi:"isVip"`
// Public network access address.
PublicEndPoint pulumi.StringOutput `pulumi:"publicEndPoint"`
// Region information.
Region pulumi.StringOutput `pulumi:"region"`
// Cluster description (up to 128 characters).
Remark pulumi.StringPtrOutput `pulumi:"remark"`
// Rocketmq cluster identification.
RocketMQFlag pulumi.BoolOutput `pulumi:"rocketMQFlag"`
// Whether the namespace access point is supported.
SupportNamespaceEndpoint pulumi.BoolOutput `pulumi:"supportNamespaceEndpoint"`
// VPC access address.
VpcEndPoint pulumi.StringOutput `pulumi:"vpcEndPoint"`
// Vpc list.
Vpcs RocketmqClusterVpcArrayOutput `pulumi:"vpcs"`
}
// NewRocketmqCluster registers a new resource with the given unique name, arguments, and options.
func NewRocketmqCluster(ctx *pulumi.Context,
name string, args *RocketmqClusterArgs, opts ...pulumi.ResourceOption) (*RocketmqCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterName == nil {
return nil, errors.New("invalid value for required argument 'ClusterName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource RocketmqCluster
err := ctx.RegisterResource("tencentcloud:Tdmq/rocketmqCluster:RocketmqCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRocketmqCluster gets an existing RocketmqCluster 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 GetRocketmqCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RocketmqClusterState, opts ...pulumi.ResourceOption) (*RocketmqCluster, error) {
var resource RocketmqCluster
err := ctx.ReadResource("tencentcloud:Tdmq/rocketmqCluster:RocketmqCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RocketmqCluster resources.
type rocketmqClusterState struct {
// Cluster ID.
ClusterId *string `pulumi:"clusterId"`
// Cluster name, which can contain 3-64 letters, digits, hyphens, and underscores.
ClusterName *string `pulumi:"clusterName"`
// Creation time in milliseconds.
CreateTime *int `pulumi:"createTime"`
// Whether it is an exclusive instance.
IsVip *bool `pulumi:"isVip"`
// Public network access address.
PublicEndPoint *string `pulumi:"publicEndPoint"`
// Region information.
Region *string `pulumi:"region"`
// Cluster description (up to 128 characters).
Remark *string `pulumi:"remark"`
// Rocketmq cluster identification.
RocketMQFlag *bool `pulumi:"rocketMQFlag"`
// Whether the namespace access point is supported.
SupportNamespaceEndpoint *bool `pulumi:"supportNamespaceEndpoint"`
// VPC access address.
VpcEndPoint *string `pulumi:"vpcEndPoint"`
// Vpc list.
Vpcs []RocketmqClusterVpc `pulumi:"vpcs"`
}
type RocketmqClusterState struct {
// Cluster ID.
ClusterId pulumi.StringPtrInput
// Cluster name, which can contain 3-64 letters, digits, hyphens, and underscores.
ClusterName pulumi.StringPtrInput
// Creation time in milliseconds.
CreateTime pulumi.IntPtrInput
// Whether it is an exclusive instance.
IsVip pulumi.BoolPtrInput
// Public network access address.
PublicEndPoint pulumi.StringPtrInput
// Region information.
Region pulumi.StringPtrInput
// Cluster description (up to 128 characters).
Remark pulumi.StringPtrInput
// Rocketmq cluster identification.
RocketMQFlag pulumi.BoolPtrInput
// Whether the namespace access point is supported.
SupportNamespaceEndpoint pulumi.BoolPtrInput
// VPC access address.
VpcEndPoint pulumi.StringPtrInput
// Vpc list.
Vpcs RocketmqClusterVpcArrayInput
}
func (RocketmqClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*rocketmqClusterState)(nil)).Elem()
}
type rocketmqClusterArgs struct {
// Cluster name, which can contain 3-64 letters, digits, hyphens, and underscores.
ClusterName string `pulumi:"clusterName"`
// Cluster description (up to 128 characters).
Remark *string `pulumi:"remark"`
}
// The set of arguments for constructing a RocketmqCluster resource.
type RocketmqClusterArgs struct {
// Cluster name, which can contain 3-64 letters, digits, hyphens, and underscores.
ClusterName pulumi.StringInput
// Cluster description (up to 128 characters).
Remark pulumi.StringPtrInput
}
func (RocketmqClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*rocketmqClusterArgs)(nil)).Elem()
}
type RocketmqClusterInput interface {
pulumi.Input
ToRocketmqClusterOutput() RocketmqClusterOutput
ToRocketmqClusterOutputWithContext(ctx context.Context) RocketmqClusterOutput
}
func (*RocketmqCluster) ElementType() reflect.Type {
return reflect.TypeOf((**RocketmqCluster)(nil)).Elem()
}
func (i *RocketmqCluster) ToRocketmqClusterOutput() RocketmqClusterOutput {
return i.ToRocketmqClusterOutputWithContext(context.Background())
}
func (i *RocketmqCluster) ToRocketmqClusterOutputWithContext(ctx context.Context) RocketmqClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(RocketmqClusterOutput)
}
// RocketmqClusterArrayInput is an input type that accepts RocketmqClusterArray and RocketmqClusterArrayOutput values.
// You can construct a concrete instance of `RocketmqClusterArrayInput` via:
//
// RocketmqClusterArray{ RocketmqClusterArgs{...} }
type RocketmqClusterArrayInput interface {
pulumi.Input
ToRocketmqClusterArrayOutput() RocketmqClusterArrayOutput
ToRocketmqClusterArrayOutputWithContext(context.Context) RocketmqClusterArrayOutput
}
type RocketmqClusterArray []RocketmqClusterInput
func (RocketmqClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RocketmqCluster)(nil)).Elem()
}
func (i RocketmqClusterArray) ToRocketmqClusterArrayOutput() RocketmqClusterArrayOutput {
return i.ToRocketmqClusterArrayOutputWithContext(context.Background())
}
func (i RocketmqClusterArray) ToRocketmqClusterArrayOutputWithContext(ctx context.Context) RocketmqClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RocketmqClusterArrayOutput)
}
// RocketmqClusterMapInput is an input type that accepts RocketmqClusterMap and RocketmqClusterMapOutput values.
// You can construct a concrete instance of `RocketmqClusterMapInput` via:
//
// RocketmqClusterMap{ "key": RocketmqClusterArgs{...} }
type RocketmqClusterMapInput interface {
pulumi.Input
ToRocketmqClusterMapOutput() RocketmqClusterMapOutput
ToRocketmqClusterMapOutputWithContext(context.Context) RocketmqClusterMapOutput
}
type RocketmqClusterMap map[string]RocketmqClusterInput
func (RocketmqClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RocketmqCluster)(nil)).Elem()
}
func (i RocketmqClusterMap) ToRocketmqClusterMapOutput() RocketmqClusterMapOutput {
return i.ToRocketmqClusterMapOutputWithContext(context.Background())
}
func (i RocketmqClusterMap) ToRocketmqClusterMapOutputWithContext(ctx context.Context) RocketmqClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RocketmqClusterMapOutput)
}
type RocketmqClusterOutput struct{ *pulumi.OutputState }
func (RocketmqClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RocketmqCluster)(nil)).Elem()
}
func (o RocketmqClusterOutput) ToRocketmqClusterOutput() RocketmqClusterOutput {
return o
}
func (o RocketmqClusterOutput) ToRocketmqClusterOutputWithContext(ctx context.Context) RocketmqClusterOutput {
return o
}
// Cluster ID.
func (o RocketmqClusterOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput)
}
// Cluster name, which can contain 3-64 letters, digits, hyphens, and underscores.
func (o RocketmqClusterOutput) ClusterName() pulumi.StringOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput)
}
// Creation time in milliseconds.
func (o RocketmqClusterOutput) CreateTime() pulumi.IntOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.IntOutput { return v.CreateTime }).(pulumi.IntOutput)
}
// Whether it is an exclusive instance.
func (o RocketmqClusterOutput) IsVip() pulumi.BoolOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.BoolOutput { return v.IsVip }).(pulumi.BoolOutput)
}
// Public network access address.
func (o RocketmqClusterOutput) PublicEndPoint() pulumi.StringOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.StringOutput { return v.PublicEndPoint }).(pulumi.StringOutput)
}
// Region information.
func (o RocketmqClusterOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// Cluster description (up to 128 characters).
func (o RocketmqClusterOutput) Remark() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.StringPtrOutput { return v.Remark }).(pulumi.StringPtrOutput)
}
// Rocketmq cluster identification.
func (o RocketmqClusterOutput) RocketMQFlag() pulumi.BoolOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.BoolOutput { return v.RocketMQFlag }).(pulumi.BoolOutput)
}
// Whether the namespace access point is supported.
func (o RocketmqClusterOutput) SupportNamespaceEndpoint() pulumi.BoolOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.BoolOutput { return v.SupportNamespaceEndpoint }).(pulumi.BoolOutput)
}
// VPC access address.
func (o RocketmqClusterOutput) VpcEndPoint() pulumi.StringOutput {
return o.ApplyT(func(v *RocketmqCluster) pulumi.StringOutput { return v.VpcEndPoint }).(pulumi.StringOutput)
}
// Vpc list.
func (o RocketmqClusterOutput) Vpcs() RocketmqClusterVpcArrayOutput {
return o.ApplyT(func(v *RocketmqCluster) RocketmqClusterVpcArrayOutput { return v.Vpcs }).(RocketmqClusterVpcArrayOutput)
}
type RocketmqClusterArrayOutput struct{ *pulumi.OutputState }
func (RocketmqClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RocketmqCluster)(nil)).Elem()
}
func (o RocketmqClusterArrayOutput) ToRocketmqClusterArrayOutput() RocketmqClusterArrayOutput {
return o
}
func (o RocketmqClusterArrayOutput) ToRocketmqClusterArrayOutputWithContext(ctx context.Context) RocketmqClusterArrayOutput {
return o
}
func (o RocketmqClusterArrayOutput) Index(i pulumi.IntInput) RocketmqClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RocketmqCluster {
return vs[0].([]*RocketmqCluster)[vs[1].(int)]
}).(RocketmqClusterOutput)
}
type RocketmqClusterMapOutput struct{ *pulumi.OutputState }
func (RocketmqClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RocketmqCluster)(nil)).Elem()
}
func (o RocketmqClusterMapOutput) ToRocketmqClusterMapOutput() RocketmqClusterMapOutput {
return o
}
func (o RocketmqClusterMapOutput) ToRocketmqClusterMapOutputWithContext(ctx context.Context) RocketmqClusterMapOutput {
return o
}
func (o RocketmqClusterMapOutput) MapIndex(k pulumi.StringInput) RocketmqClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RocketmqCluster {
return vs[0].(map[string]*RocketmqCluster)[vs[1].(string)]
}).(RocketmqClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RocketmqClusterInput)(nil)).Elem(), &RocketmqCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*RocketmqClusterArrayInput)(nil)).Elem(), RocketmqClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RocketmqClusterMapInput)(nil)).Elem(), RocketmqClusterMap{})
pulumi.RegisterOutputType(RocketmqClusterOutput{})
pulumi.RegisterOutputType(RocketmqClusterArrayOutput{})
pulumi.RegisterOutputType(RocketmqClusterMapOutput{})
}