generated from pulumi/pulumi-tf-provider-boilerplate
/
customConnectorPlugin.go
361 lines (308 loc) · 20.9 KB
/
customConnectorPlugin.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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
// 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 confluentcloud
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-confluentcloud/sdk/go/confluentcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-confluentcloud/sdk/go/confluentcloud"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := confluentcloud.NewCustomConnectorPlugin(ctx, "source", &confluentcloud.CustomConnectorPluginArgs{
// DisplayName: pulumi.String("Datagen Source Connector Plugin"),
// DocumentationLink: pulumi.String("https://www.confluent.io/hub/confluentinc/kafka-connect-datagen"),
// ConnectorClass: pulumi.String("io.confluent.kafka.connect.datagen.DatagenConnector"),
// ConnectorType: pulumi.String("SOURCE"),
// SensitiveConfigProperties: pulumi.StringArray{},
// Filename: pulumi.String("confluentinc-kafka-connect-datagen-0.6.2.zip"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// You can import a Custom Connector Plugin by using a Custom Connector Plugin ID, in the format `<Custom Connector Plugin>`. The following example shows how to import a Custom Connector Plugin:
//
// $ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"
//
// $ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"
//
// ```sh
// $ pulumi import confluentcloud:index/customConnectorPlugin:CustomConnectorPlugin main ccp-abc123xyz
// ```
//
// !> **Warning:** Do not forget to delete terminal command history afterwards for security purposes.
type CustomConnectorPlugin struct {
pulumi.CustomResourceState
// The Java class or alias for the connector. You can get the connector class from the connector documentation provided by the developer.
ConnectorClass pulumi.StringOutput `pulumi:"connectorClass"`
// The type of the Custom Connector Plugin. Accepted values are: `SOURCE`, `SINK`.
ConnectorType pulumi.StringOutput `pulumi:"connectorType"`
// The description of the Custom Connector Plugin.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The name of the Custom Connector Plugin.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The documentation link of the Custom Connector Plugin.
DocumentationLink pulumi.StringPtrOutput `pulumi:"documentationLink"`
// The path to the Custom Connector Plugin archive to be uploaded. Accepted archive formats are: `.jar`, `.zip`.
Filename pulumi.StringOutput `pulumi:"filename"`
// The list of sensitive properties. A sensitive property is a connector configuration property that must be hidden after a user enters the property value when setting up the connector, for example, passwords, keys, and tokens. Refer to the developer documentation and add all required and optional sensitive properties that a user could potentially configure for the connector. Marking a property as sensitive ensures that these fields are handled appropriately within the Confluent infrastructure. This includes masking fields, for example in exception logging, and encrypting field values in the underlying data store. You must identify all sensitive properties. Failure to identify sensitive properties can result in the sensitive property value being stored in plain text rather than in encrypted format. Only add connector-specific sensitive properties. Kafka keys, passwords, and service account information should not be entered here.
SensitiveConfigProperties pulumi.StringArrayOutput `pulumi:"sensitiveConfigProperties"`
}
// NewCustomConnectorPlugin registers a new resource with the given unique name, arguments, and options.
func NewCustomConnectorPlugin(ctx *pulumi.Context,
name string, args *CustomConnectorPluginArgs, opts ...pulumi.ResourceOption) (*CustomConnectorPlugin, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ConnectorClass == nil {
return nil, errors.New("invalid value for required argument 'ConnectorClass'")
}
if args.ConnectorType == nil {
return nil, errors.New("invalid value for required argument 'ConnectorType'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.Filename == nil {
return nil, errors.New("invalid value for required argument 'Filename'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CustomConnectorPlugin
err := ctx.RegisterResource("confluentcloud:index/customConnectorPlugin:CustomConnectorPlugin", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCustomConnectorPlugin gets an existing CustomConnectorPlugin 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 GetCustomConnectorPlugin(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CustomConnectorPluginState, opts ...pulumi.ResourceOption) (*CustomConnectorPlugin, error) {
var resource CustomConnectorPlugin
err := ctx.ReadResource("confluentcloud:index/customConnectorPlugin:CustomConnectorPlugin", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CustomConnectorPlugin resources.
type customConnectorPluginState struct {
// The Java class or alias for the connector. You can get the connector class from the connector documentation provided by the developer.
ConnectorClass *string `pulumi:"connectorClass"`
// The type of the Custom Connector Plugin. Accepted values are: `SOURCE`, `SINK`.
ConnectorType *string `pulumi:"connectorType"`
// The description of the Custom Connector Plugin.
Description *string `pulumi:"description"`
// The name of the Custom Connector Plugin.
DisplayName *string `pulumi:"displayName"`
// The documentation link of the Custom Connector Plugin.
DocumentationLink *string `pulumi:"documentationLink"`
// The path to the Custom Connector Plugin archive to be uploaded. Accepted archive formats are: `.jar`, `.zip`.
Filename *string `pulumi:"filename"`
// The list of sensitive properties. A sensitive property is a connector configuration property that must be hidden after a user enters the property value when setting up the connector, for example, passwords, keys, and tokens. Refer to the developer documentation and add all required and optional sensitive properties that a user could potentially configure for the connector. Marking a property as sensitive ensures that these fields are handled appropriately within the Confluent infrastructure. This includes masking fields, for example in exception logging, and encrypting field values in the underlying data store. You must identify all sensitive properties. Failure to identify sensitive properties can result in the sensitive property value being stored in plain text rather than in encrypted format. Only add connector-specific sensitive properties. Kafka keys, passwords, and service account information should not be entered here.
SensitiveConfigProperties []string `pulumi:"sensitiveConfigProperties"`
}
type CustomConnectorPluginState struct {
// The Java class or alias for the connector. You can get the connector class from the connector documentation provided by the developer.
ConnectorClass pulumi.StringPtrInput
// The type of the Custom Connector Plugin. Accepted values are: `SOURCE`, `SINK`.
ConnectorType pulumi.StringPtrInput
// The description of the Custom Connector Plugin.
Description pulumi.StringPtrInput
// The name of the Custom Connector Plugin.
DisplayName pulumi.StringPtrInput
// The documentation link of the Custom Connector Plugin.
DocumentationLink pulumi.StringPtrInput
// The path to the Custom Connector Plugin archive to be uploaded. Accepted archive formats are: `.jar`, `.zip`.
Filename pulumi.StringPtrInput
// The list of sensitive properties. A sensitive property is a connector configuration property that must be hidden after a user enters the property value when setting up the connector, for example, passwords, keys, and tokens. Refer to the developer documentation and add all required and optional sensitive properties that a user could potentially configure for the connector. Marking a property as sensitive ensures that these fields are handled appropriately within the Confluent infrastructure. This includes masking fields, for example in exception logging, and encrypting field values in the underlying data store. You must identify all sensitive properties. Failure to identify sensitive properties can result in the sensitive property value being stored in plain text rather than in encrypted format. Only add connector-specific sensitive properties. Kafka keys, passwords, and service account information should not be entered here.
SensitiveConfigProperties pulumi.StringArrayInput
}
func (CustomConnectorPluginState) ElementType() reflect.Type {
return reflect.TypeOf((*customConnectorPluginState)(nil)).Elem()
}
type customConnectorPluginArgs struct {
// The Java class or alias for the connector. You can get the connector class from the connector documentation provided by the developer.
ConnectorClass string `pulumi:"connectorClass"`
// The type of the Custom Connector Plugin. Accepted values are: `SOURCE`, `SINK`.
ConnectorType string `pulumi:"connectorType"`
// The description of the Custom Connector Plugin.
Description *string `pulumi:"description"`
// The name of the Custom Connector Plugin.
DisplayName string `pulumi:"displayName"`
// The documentation link of the Custom Connector Plugin.
DocumentationLink *string `pulumi:"documentationLink"`
// The path to the Custom Connector Plugin archive to be uploaded. Accepted archive formats are: `.jar`, `.zip`.
Filename string `pulumi:"filename"`
// The list of sensitive properties. A sensitive property is a connector configuration property that must be hidden after a user enters the property value when setting up the connector, for example, passwords, keys, and tokens. Refer to the developer documentation and add all required and optional sensitive properties that a user could potentially configure for the connector. Marking a property as sensitive ensures that these fields are handled appropriately within the Confluent infrastructure. This includes masking fields, for example in exception logging, and encrypting field values in the underlying data store. You must identify all sensitive properties. Failure to identify sensitive properties can result in the sensitive property value being stored in plain text rather than in encrypted format. Only add connector-specific sensitive properties. Kafka keys, passwords, and service account information should not be entered here.
SensitiveConfigProperties []string `pulumi:"sensitiveConfigProperties"`
}
// The set of arguments for constructing a CustomConnectorPlugin resource.
type CustomConnectorPluginArgs struct {
// The Java class or alias for the connector. You can get the connector class from the connector documentation provided by the developer.
ConnectorClass pulumi.StringInput
// The type of the Custom Connector Plugin. Accepted values are: `SOURCE`, `SINK`.
ConnectorType pulumi.StringInput
// The description of the Custom Connector Plugin.
Description pulumi.StringPtrInput
// The name of the Custom Connector Plugin.
DisplayName pulumi.StringInput
// The documentation link of the Custom Connector Plugin.
DocumentationLink pulumi.StringPtrInput
// The path to the Custom Connector Plugin archive to be uploaded. Accepted archive formats are: `.jar`, `.zip`.
Filename pulumi.StringInput
// The list of sensitive properties. A sensitive property is a connector configuration property that must be hidden after a user enters the property value when setting up the connector, for example, passwords, keys, and tokens. Refer to the developer documentation and add all required and optional sensitive properties that a user could potentially configure for the connector. Marking a property as sensitive ensures that these fields are handled appropriately within the Confluent infrastructure. This includes masking fields, for example in exception logging, and encrypting field values in the underlying data store. You must identify all sensitive properties. Failure to identify sensitive properties can result in the sensitive property value being stored in plain text rather than in encrypted format. Only add connector-specific sensitive properties. Kafka keys, passwords, and service account information should not be entered here.
SensitiveConfigProperties pulumi.StringArrayInput
}
func (CustomConnectorPluginArgs) ElementType() reflect.Type {
return reflect.TypeOf((*customConnectorPluginArgs)(nil)).Elem()
}
type CustomConnectorPluginInput interface {
pulumi.Input
ToCustomConnectorPluginOutput() CustomConnectorPluginOutput
ToCustomConnectorPluginOutputWithContext(ctx context.Context) CustomConnectorPluginOutput
}
func (*CustomConnectorPlugin) ElementType() reflect.Type {
return reflect.TypeOf((**CustomConnectorPlugin)(nil)).Elem()
}
func (i *CustomConnectorPlugin) ToCustomConnectorPluginOutput() CustomConnectorPluginOutput {
return i.ToCustomConnectorPluginOutputWithContext(context.Background())
}
func (i *CustomConnectorPlugin) ToCustomConnectorPluginOutputWithContext(ctx context.Context) CustomConnectorPluginOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomConnectorPluginOutput)
}
// CustomConnectorPluginArrayInput is an input type that accepts CustomConnectorPluginArray and CustomConnectorPluginArrayOutput values.
// You can construct a concrete instance of `CustomConnectorPluginArrayInput` via:
//
// CustomConnectorPluginArray{ CustomConnectorPluginArgs{...} }
type CustomConnectorPluginArrayInput interface {
pulumi.Input
ToCustomConnectorPluginArrayOutput() CustomConnectorPluginArrayOutput
ToCustomConnectorPluginArrayOutputWithContext(context.Context) CustomConnectorPluginArrayOutput
}
type CustomConnectorPluginArray []CustomConnectorPluginInput
func (CustomConnectorPluginArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CustomConnectorPlugin)(nil)).Elem()
}
func (i CustomConnectorPluginArray) ToCustomConnectorPluginArrayOutput() CustomConnectorPluginArrayOutput {
return i.ToCustomConnectorPluginArrayOutputWithContext(context.Background())
}
func (i CustomConnectorPluginArray) ToCustomConnectorPluginArrayOutputWithContext(ctx context.Context) CustomConnectorPluginArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomConnectorPluginArrayOutput)
}
// CustomConnectorPluginMapInput is an input type that accepts CustomConnectorPluginMap and CustomConnectorPluginMapOutput values.
// You can construct a concrete instance of `CustomConnectorPluginMapInput` via:
//
// CustomConnectorPluginMap{ "key": CustomConnectorPluginArgs{...} }
type CustomConnectorPluginMapInput interface {
pulumi.Input
ToCustomConnectorPluginMapOutput() CustomConnectorPluginMapOutput
ToCustomConnectorPluginMapOutputWithContext(context.Context) CustomConnectorPluginMapOutput
}
type CustomConnectorPluginMap map[string]CustomConnectorPluginInput
func (CustomConnectorPluginMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CustomConnectorPlugin)(nil)).Elem()
}
func (i CustomConnectorPluginMap) ToCustomConnectorPluginMapOutput() CustomConnectorPluginMapOutput {
return i.ToCustomConnectorPluginMapOutputWithContext(context.Background())
}
func (i CustomConnectorPluginMap) ToCustomConnectorPluginMapOutputWithContext(ctx context.Context) CustomConnectorPluginMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomConnectorPluginMapOutput)
}
type CustomConnectorPluginOutput struct{ *pulumi.OutputState }
func (CustomConnectorPluginOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CustomConnectorPlugin)(nil)).Elem()
}
func (o CustomConnectorPluginOutput) ToCustomConnectorPluginOutput() CustomConnectorPluginOutput {
return o
}
func (o CustomConnectorPluginOutput) ToCustomConnectorPluginOutputWithContext(ctx context.Context) CustomConnectorPluginOutput {
return o
}
// The Java class or alias for the connector. You can get the connector class from the connector documentation provided by the developer.
func (o CustomConnectorPluginOutput) ConnectorClass() pulumi.StringOutput {
return o.ApplyT(func(v *CustomConnectorPlugin) pulumi.StringOutput { return v.ConnectorClass }).(pulumi.StringOutput)
}
// The type of the Custom Connector Plugin. Accepted values are: `SOURCE`, `SINK`.
func (o CustomConnectorPluginOutput) ConnectorType() pulumi.StringOutput {
return o.ApplyT(func(v *CustomConnectorPlugin) pulumi.StringOutput { return v.ConnectorType }).(pulumi.StringOutput)
}
// The description of the Custom Connector Plugin.
func (o CustomConnectorPluginOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomConnectorPlugin) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The name of the Custom Connector Plugin.
func (o CustomConnectorPluginOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *CustomConnectorPlugin) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The documentation link of the Custom Connector Plugin.
func (o CustomConnectorPluginOutput) DocumentationLink() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomConnectorPlugin) pulumi.StringPtrOutput { return v.DocumentationLink }).(pulumi.StringPtrOutput)
}
// The path to the Custom Connector Plugin archive to be uploaded. Accepted archive formats are: `.jar`, `.zip`.
func (o CustomConnectorPluginOutput) Filename() pulumi.StringOutput {
return o.ApplyT(func(v *CustomConnectorPlugin) pulumi.StringOutput { return v.Filename }).(pulumi.StringOutput)
}
// The list of sensitive properties. A sensitive property is a connector configuration property that must be hidden after a user enters the property value when setting up the connector, for example, passwords, keys, and tokens. Refer to the developer documentation and add all required and optional sensitive properties that a user could potentially configure for the connector. Marking a property as sensitive ensures that these fields are handled appropriately within the Confluent infrastructure. This includes masking fields, for example in exception logging, and encrypting field values in the underlying data store. You must identify all sensitive properties. Failure to identify sensitive properties can result in the sensitive property value being stored in plain text rather than in encrypted format. Only add connector-specific sensitive properties. Kafka keys, passwords, and service account information should not be entered here.
func (o CustomConnectorPluginOutput) SensitiveConfigProperties() pulumi.StringArrayOutput {
return o.ApplyT(func(v *CustomConnectorPlugin) pulumi.StringArrayOutput { return v.SensitiveConfigProperties }).(pulumi.StringArrayOutput)
}
type CustomConnectorPluginArrayOutput struct{ *pulumi.OutputState }
func (CustomConnectorPluginArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CustomConnectorPlugin)(nil)).Elem()
}
func (o CustomConnectorPluginArrayOutput) ToCustomConnectorPluginArrayOutput() CustomConnectorPluginArrayOutput {
return o
}
func (o CustomConnectorPluginArrayOutput) ToCustomConnectorPluginArrayOutputWithContext(ctx context.Context) CustomConnectorPluginArrayOutput {
return o
}
func (o CustomConnectorPluginArrayOutput) Index(i pulumi.IntInput) CustomConnectorPluginOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CustomConnectorPlugin {
return vs[0].([]*CustomConnectorPlugin)[vs[1].(int)]
}).(CustomConnectorPluginOutput)
}
type CustomConnectorPluginMapOutput struct{ *pulumi.OutputState }
func (CustomConnectorPluginMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CustomConnectorPlugin)(nil)).Elem()
}
func (o CustomConnectorPluginMapOutput) ToCustomConnectorPluginMapOutput() CustomConnectorPluginMapOutput {
return o
}
func (o CustomConnectorPluginMapOutput) ToCustomConnectorPluginMapOutputWithContext(ctx context.Context) CustomConnectorPluginMapOutput {
return o
}
func (o CustomConnectorPluginMapOutput) MapIndex(k pulumi.StringInput) CustomConnectorPluginOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CustomConnectorPlugin {
return vs[0].(map[string]*CustomConnectorPlugin)[vs[1].(string)]
}).(CustomConnectorPluginOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CustomConnectorPluginInput)(nil)).Elem(), &CustomConnectorPlugin{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomConnectorPluginArrayInput)(nil)).Elem(), CustomConnectorPluginArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomConnectorPluginMapInput)(nil)).Elem(), CustomConnectorPluginMap{})
pulumi.RegisterOutputType(CustomConnectorPluginOutput{})
pulumi.RegisterOutputType(CustomConnectorPluginArrayOutput{})
pulumi.RegisterOutputType(CustomConnectorPluginMapOutput{})
}