-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnector.ts
More file actions
302 lines (294 loc) · 14.1 KB
/
connector.ts
File metadata and controls
302 lines (294 loc) · 14.1 KB
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
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";
export class Connector extends pulumi.CustomResource {
/**
* Get an existing Connector resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ConnectorState, opts?: pulumi.CustomResourceOptions): Connector {
return new Connector(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'fivetran:index/connector:Connector';
/**
* Returns true if the given object is an instance of Connector. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is Connector {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Connector.__pulumiType;
}
declare public readonly auth: pulumi.Output<outputs.ConnectorAuth | undefined>;
declare public readonly config: pulumi.Output<outputs.ConnectorConfig | undefined>;
/**
* The unique identifier of the user who has created the connector in your account.
*/
declare public /*out*/ readonly connectedBy: pulumi.Output<string>;
/**
* The timestamp of the time the connector was created in your account.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* The level of data delay notification threshold. Possible values: LOW, NORMAL, HIGH, CUSTOM. The default value NORMAL.
* CUSTOM is only available for customers using the Enterprise plan or above.
*/
declare public readonly dataDelaySensitivity: pulumi.Output<string | undefined>;
/**
* Custom sync delay notification threshold in minutes. The default value is 0. This parameter is only used when
* data_delay_sensitivity set to CUSTOM.
*/
declare public readonly dataDelayThreshold: pulumi.Output<number>;
declare public readonly destinationSchema: pulumi.Output<outputs.ConnectorDestinationSchema | undefined>;
/**
* The unique identifier for the Group (Destination) within the Fivetran system.
*/
declare public readonly groupId: pulumi.Output<string>;
/**
* The hybrid deployment agent ID that refers to the controller created for the group the connection belongs to. If the
* value is specified, the system will try to associate the connection with an existing agent.
*/
declare public readonly hybridDeploymentAgentId: pulumi.Output<string | undefined>;
/**
* The name used both as the connector's name within the Fivetran system and as the source schema's name within your
* destination.
*/
declare public /*out*/ readonly name: pulumi.Output<string>;
/**
* Possible values: Directly, SshTunnel, ProxyAgent, PrivateLink.
*/
declare public readonly networkingMethod: pulumi.Output<string>;
/**
* The private link ID.
*/
declare public readonly privateLinkId: pulumi.Output<string | undefined>;
/**
* The proxy agent ID.
*/
declare public readonly proxyAgentId: pulumi.Output<string | undefined>;
/**
* Specifies whether the setup tests should be run automatically. The default value is FALSE.
*/
declare public readonly runSetupTests: pulumi.Output<boolean>;
/**
* The connector type id within the Fivetran system.
*/
declare public readonly service: pulumi.Output<string>;
declare public readonly timeouts: pulumi.Output<outputs.ConnectorTimeouts | undefined>;
/**
* Specifies whether we should trust the certificate automatically. The default value is FALSE. If a certificate is not
* trusted automatically, it has to be approved with [Certificates Management API Approve a destination
* certificate](https://fivetran.com/docs/rest-api/certificates#approveadestinationcertificate).
*/
declare public readonly trustCertificates: pulumi.Output<boolean>;
/**
* Specifies whether we should trust the SSH fingerprint automatically. The default value is FALSE. If a fingerprint is not
* trusted automatically, it has to be approved with [Certificates Management API Approve a destination
* fingerprint](https://fivetran.com/docs/rest-api/certificates#approveadestinationfingerprint).
*/
declare public readonly trustFingerprints: pulumi.Output<boolean>;
/**
* Create a Connector resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ConnectorArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: ConnectorArgs | ConnectorState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as ConnectorState | undefined;
resourceInputs["auth"] = state?.auth;
resourceInputs["config"] = state?.config;
resourceInputs["connectedBy"] = state?.connectedBy;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["dataDelaySensitivity"] = state?.dataDelaySensitivity;
resourceInputs["dataDelayThreshold"] = state?.dataDelayThreshold;
resourceInputs["destinationSchema"] = state?.destinationSchema;
resourceInputs["groupId"] = state?.groupId;
resourceInputs["hybridDeploymentAgentId"] = state?.hybridDeploymentAgentId;
resourceInputs["name"] = state?.name;
resourceInputs["networkingMethod"] = state?.networkingMethod;
resourceInputs["privateLinkId"] = state?.privateLinkId;
resourceInputs["proxyAgentId"] = state?.proxyAgentId;
resourceInputs["runSetupTests"] = state?.runSetupTests;
resourceInputs["service"] = state?.service;
resourceInputs["timeouts"] = state?.timeouts;
resourceInputs["trustCertificates"] = state?.trustCertificates;
resourceInputs["trustFingerprints"] = state?.trustFingerprints;
} else {
const args = argsOrState as ConnectorArgs | undefined;
if (args?.groupId === undefined && !opts.urn) {
throw new Error("Missing required property 'groupId'");
}
if (args?.service === undefined && !opts.urn) {
throw new Error("Missing required property 'service'");
}
resourceInputs["auth"] = args?.auth;
resourceInputs["config"] = args?.config;
resourceInputs["dataDelaySensitivity"] = args?.dataDelaySensitivity;
resourceInputs["dataDelayThreshold"] = args?.dataDelayThreshold;
resourceInputs["destinationSchema"] = args?.destinationSchema;
resourceInputs["groupId"] = args?.groupId;
resourceInputs["hybridDeploymentAgentId"] = args?.hybridDeploymentAgentId;
resourceInputs["networkingMethod"] = args?.networkingMethod;
resourceInputs["privateLinkId"] = args?.privateLinkId;
resourceInputs["proxyAgentId"] = args?.proxyAgentId;
resourceInputs["runSetupTests"] = args?.runSetupTests;
resourceInputs["service"] = args?.service;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["trustCertificates"] = args?.trustCertificates;
resourceInputs["trustFingerprints"] = args?.trustFingerprints;
resourceInputs["connectedBy"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Connector.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
}
}
/**
* Input properties used for looking up and filtering Connector resources.
*/
export interface ConnectorState {
auth?: pulumi.Input<inputs.ConnectorAuth>;
config?: pulumi.Input<inputs.ConnectorConfig>;
/**
* The unique identifier of the user who has created the connector in your account.
*/
connectedBy?: pulumi.Input<string>;
/**
* The timestamp of the time the connector was created in your account.
*/
createdAt?: pulumi.Input<string>;
/**
* The level of data delay notification threshold. Possible values: LOW, NORMAL, HIGH, CUSTOM. The default value NORMAL.
* CUSTOM is only available for customers using the Enterprise plan or above.
*/
dataDelaySensitivity?: pulumi.Input<string>;
/**
* Custom sync delay notification threshold in minutes. The default value is 0. This parameter is only used when
* data_delay_sensitivity set to CUSTOM.
*/
dataDelayThreshold?: pulumi.Input<number>;
destinationSchema?: pulumi.Input<inputs.ConnectorDestinationSchema>;
/**
* The unique identifier for the Group (Destination) within the Fivetran system.
*/
groupId?: pulumi.Input<string>;
/**
* The hybrid deployment agent ID that refers to the controller created for the group the connection belongs to. If the
* value is specified, the system will try to associate the connection with an existing agent.
*/
hybridDeploymentAgentId?: pulumi.Input<string>;
/**
* The name used both as the connector's name within the Fivetran system and as the source schema's name within your
* destination.
*/
name?: pulumi.Input<string>;
/**
* Possible values: Directly, SshTunnel, ProxyAgent, PrivateLink.
*/
networkingMethod?: pulumi.Input<string>;
/**
* The private link ID.
*/
privateLinkId?: pulumi.Input<string>;
/**
* The proxy agent ID.
*/
proxyAgentId?: pulumi.Input<string>;
/**
* Specifies whether the setup tests should be run automatically. The default value is FALSE.
*/
runSetupTests?: pulumi.Input<boolean>;
/**
* The connector type id within the Fivetran system.
*/
service?: pulumi.Input<string>;
timeouts?: pulumi.Input<inputs.ConnectorTimeouts>;
/**
* Specifies whether we should trust the certificate automatically. The default value is FALSE. If a certificate is not
* trusted automatically, it has to be approved with [Certificates Management API Approve a destination
* certificate](https://fivetran.com/docs/rest-api/certificates#approveadestinationcertificate).
*/
trustCertificates?: pulumi.Input<boolean>;
/**
* Specifies whether we should trust the SSH fingerprint automatically. The default value is FALSE. If a fingerprint is not
* trusted automatically, it has to be approved with [Certificates Management API Approve a destination
* fingerprint](https://fivetran.com/docs/rest-api/certificates#approveadestinationfingerprint).
*/
trustFingerprints?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a Connector resource.
*/
export interface ConnectorArgs {
auth?: pulumi.Input<inputs.ConnectorAuth>;
config?: pulumi.Input<inputs.ConnectorConfig>;
/**
* The level of data delay notification threshold. Possible values: LOW, NORMAL, HIGH, CUSTOM. The default value NORMAL.
* CUSTOM is only available for customers using the Enterprise plan or above.
*/
dataDelaySensitivity?: pulumi.Input<string>;
/**
* Custom sync delay notification threshold in minutes. The default value is 0. This parameter is only used when
* data_delay_sensitivity set to CUSTOM.
*/
dataDelayThreshold?: pulumi.Input<number>;
destinationSchema?: pulumi.Input<inputs.ConnectorDestinationSchema>;
/**
* The unique identifier for the Group (Destination) within the Fivetran system.
*/
groupId: pulumi.Input<string>;
/**
* The hybrid deployment agent ID that refers to the controller created for the group the connection belongs to. If the
* value is specified, the system will try to associate the connection with an existing agent.
*/
hybridDeploymentAgentId?: pulumi.Input<string>;
/**
* Possible values: Directly, SshTunnel, ProxyAgent, PrivateLink.
*/
networkingMethod?: pulumi.Input<string>;
/**
* The private link ID.
*/
privateLinkId?: pulumi.Input<string>;
/**
* The proxy agent ID.
*/
proxyAgentId?: pulumi.Input<string>;
/**
* Specifies whether the setup tests should be run automatically. The default value is FALSE.
*/
runSetupTests?: pulumi.Input<boolean>;
/**
* The connector type id within the Fivetran system.
*/
service: pulumi.Input<string>;
timeouts?: pulumi.Input<inputs.ConnectorTimeouts>;
/**
* Specifies whether we should trust the certificate automatically. The default value is FALSE. If a certificate is not
* trusted automatically, it has to be approved with [Certificates Management API Approve a destination
* certificate](https://fivetran.com/docs/rest-api/certificates#approveadestinationcertificate).
*/
trustCertificates?: pulumi.Input<boolean>;
/**
* Specifies whether we should trust the SSH fingerprint automatically. The default value is FALSE. If a fingerprint is not
* trusted automatically, it has to be approved with [Certificates Management API Approve a destination
* fingerprint](https://fivetran.com/docs/rest-api/certificates#approveadestinationfingerprint).
*/
trustFingerprints?: pulumi.Input<boolean>;
}