generated from pulumi/pulumi-tf-provider-boilerplate
/
generalCloudInstance.go
632 lines (565 loc) · 33.2 KB
/
generalCloudInstance.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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
// 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 sqlserver
import (
"context"
"reflect"
"errors"
"github.com/mergtil/pulumi-tencentcloud/sdk/go/tencentcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type GeneralCloudInstance struct {
pulumi.CustomResourceState
// Automatic renewal flag: 0-normal renewal 1-automatic renewal, the default is 1 automatic renewal. Valid only when
// purchasing a prepaid instance. Valid only when the 'instance_charge_type' parameter value is 'PREPAID'.
AutoRenewFlag pulumi.IntPtrOutput `pulumi:"autoRenewFlag"`
// System character set collation, default: Chinese_PRC_CI_AS.
Collation pulumi.StringPtrOutput `pulumi:"collation"`
// Cpu, unit: CORE.
Cpu pulumi.IntOutput `pulumi:"cpu"`
// sqlserver version, currently all supported versions are: 2008R2 (SQL Server 2008 R2 Enterprise), 2012SP3 (SQL Server
// 2012 Enterprise), 201202 (SQL Server 2012 Standard), 2014SP2 (SQL Server 2014 Enterprise), 201402 (SQL Server 2014
// Standard), 2016SP1 (SQL Server 2016 Enterprise), 201602 (SQL Server 2016 Standard), 2017 (SQL Server 2017 Enterprise),
// 201702 (SQL Server 2017 Standard), 2019 (SQL Server 2019 Enterprise), 201902 (SQL Server 2019 Standard). Each region
// supports different versions for sale, and the version information that can be sold in each region can be pulled through
// the DescribeProductConfig interface. If left blank, the default version is 2008R2.
DbVersion pulumi.StringPtrOutput `pulumi:"dbVersion"`
// Upgrade the high-availability architecture of sqlserver, upgrade from mirror disaster recovery to always on cluster
// disaster recovery, only support 2017 and above and support always on high-availability instances, do not support
// downgrading to mirror disaster recovery, CLUSTER-upgrade to always on capacity Disaster, if not filled, the
// high-availability architecture will not be modified.
//
// Deprecated: It has been deprecated from version 1.81.2.
HaType pulumi.StringPtrOutput `pulumi:"haType"`
// Payment mode, the value supports PREPAID (prepaid), POSTPAID (postpaid).
InstanceChargeType pulumi.StringPtrOutput `pulumi:"instanceChargeType"`
// The host disk type of the purchased instance, CLOUD_HSSD-enhanced SSD cloud disk for virtual machines,
// CLOUD_TSSD-extremely fast SSD cloud disk for virtual machines, CLOUD_BSSD-universal SSD cloud disk for virtual machines.
MachineType pulumi.StringOutput `pulumi:"machineType"`
// Memory, unit: GB.
Memory pulumi.IntOutput `pulumi:"memory"`
// Name of the SQL Server instance.
Name pulumi.StringOutput `pulumi:"name"`
// Purchase instance period, the default value is 1, which means one month. The value cannot exceed 48. Valid only when the
// 'instance_charge_type' parameter value is 'PREPAID'.
Period pulumi.IntPtrOutput `pulumi:"period"`
// project ID.
ProjectId pulumi.IntPtrOutput `pulumi:"projectId"`
// A collection of tags bound to the new instance.
ResourceTags GeneralCloudInstanceResourceTagArrayOutput `pulumi:"resourceTags"`
// Security group list, fill in the security group ID in the form of sg-xxx.
SecurityGroupLists pulumi.StringArrayOutput `pulumi:"securityGroupLists"`
// Maintainable time window configuration, duration, unit: hour.
Span pulumi.IntPtrOutput `pulumi:"span"`
// Maintainable time window configuration, daily maintainable start time.
StartTime pulumi.StringPtrOutput `pulumi:"startTime"`
// instance disk storage, unit: GB.
Storage pulumi.IntOutput `pulumi:"storage"`
// VPC subnet ID, in the form of subnet-bdoe83fa; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
// System time zone, default: China Standard Time.
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// VPC network ID, in the form of vpc-dsp338hz; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
VpcId pulumi.StringPtrOutput `pulumi:"vpcId"`
// Maintainable time window configuration, in weeks, indicates the days of the week that allow maintenance, 1-7 represent
// Monday to weekend respectively.
Weeklies pulumi.IntArrayOutput `pulumi:"weeklies"`
// Instance AZ, such as ap-guangzhou-1 (Guangzhou Zone 1). Purchasable AZs for an instance can be obtained through the
// DescribeZones API.
Zone pulumi.StringOutput `pulumi:"zone"`
}
// NewGeneralCloudInstance registers a new resource with the given unique name, arguments, and options.
func NewGeneralCloudInstance(ctx *pulumi.Context,
name string, args *GeneralCloudInstanceArgs, opts ...pulumi.ResourceOption) (*GeneralCloudInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Cpu == nil {
return nil, errors.New("invalid value for required argument 'Cpu'")
}
if args.MachineType == nil {
return nil, errors.New("invalid value for required argument 'MachineType'")
}
if args.Memory == nil {
return nil, errors.New("invalid value for required argument 'Memory'")
}
if args.Storage == nil {
return nil, errors.New("invalid value for required argument 'Storage'")
}
if args.Zone == nil {
return nil, errors.New("invalid value for required argument 'Zone'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GeneralCloudInstance
err := ctx.RegisterResource("tencentcloud:Sqlserver/generalCloudInstance:GeneralCloudInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGeneralCloudInstance gets an existing GeneralCloudInstance 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 GetGeneralCloudInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GeneralCloudInstanceState, opts ...pulumi.ResourceOption) (*GeneralCloudInstance, error) {
var resource GeneralCloudInstance
err := ctx.ReadResource("tencentcloud:Sqlserver/generalCloudInstance:GeneralCloudInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GeneralCloudInstance resources.
type generalCloudInstanceState struct {
// Automatic renewal flag: 0-normal renewal 1-automatic renewal, the default is 1 automatic renewal. Valid only when
// purchasing a prepaid instance. Valid only when the 'instance_charge_type' parameter value is 'PREPAID'.
AutoRenewFlag *int `pulumi:"autoRenewFlag"`
// System character set collation, default: Chinese_PRC_CI_AS.
Collation *string `pulumi:"collation"`
// Cpu, unit: CORE.
Cpu *int `pulumi:"cpu"`
// sqlserver version, currently all supported versions are: 2008R2 (SQL Server 2008 R2 Enterprise), 2012SP3 (SQL Server
// 2012 Enterprise), 201202 (SQL Server 2012 Standard), 2014SP2 (SQL Server 2014 Enterprise), 201402 (SQL Server 2014
// Standard), 2016SP1 (SQL Server 2016 Enterprise), 201602 (SQL Server 2016 Standard), 2017 (SQL Server 2017 Enterprise),
// 201702 (SQL Server 2017 Standard), 2019 (SQL Server 2019 Enterprise), 201902 (SQL Server 2019 Standard). Each region
// supports different versions for sale, and the version information that can be sold in each region can be pulled through
// the DescribeProductConfig interface. If left blank, the default version is 2008R2.
DbVersion *string `pulumi:"dbVersion"`
// Upgrade the high-availability architecture of sqlserver, upgrade from mirror disaster recovery to always on cluster
// disaster recovery, only support 2017 and above and support always on high-availability instances, do not support
// downgrading to mirror disaster recovery, CLUSTER-upgrade to always on capacity Disaster, if not filled, the
// high-availability architecture will not be modified.
//
// Deprecated: It has been deprecated from version 1.81.2.
HaType *string `pulumi:"haType"`
// Payment mode, the value supports PREPAID (prepaid), POSTPAID (postpaid).
InstanceChargeType *string `pulumi:"instanceChargeType"`
// The host disk type of the purchased instance, CLOUD_HSSD-enhanced SSD cloud disk for virtual machines,
// CLOUD_TSSD-extremely fast SSD cloud disk for virtual machines, CLOUD_BSSD-universal SSD cloud disk for virtual machines.
MachineType *string `pulumi:"machineType"`
// Memory, unit: GB.
Memory *int `pulumi:"memory"`
// Name of the SQL Server instance.
Name *string `pulumi:"name"`
// Purchase instance period, the default value is 1, which means one month. The value cannot exceed 48. Valid only when the
// 'instance_charge_type' parameter value is 'PREPAID'.
Period *int `pulumi:"period"`
// project ID.
ProjectId *int `pulumi:"projectId"`
// A collection of tags bound to the new instance.
ResourceTags []GeneralCloudInstanceResourceTag `pulumi:"resourceTags"`
// Security group list, fill in the security group ID in the form of sg-xxx.
SecurityGroupLists []string `pulumi:"securityGroupLists"`
// Maintainable time window configuration, duration, unit: hour.
Span *int `pulumi:"span"`
// Maintainable time window configuration, daily maintainable start time.
StartTime *string `pulumi:"startTime"`
// instance disk storage, unit: GB.
Storage *int `pulumi:"storage"`
// VPC subnet ID, in the form of subnet-bdoe83fa; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
SubnetId *string `pulumi:"subnetId"`
// System time zone, default: China Standard Time.
TimeZone *string `pulumi:"timeZone"`
// VPC network ID, in the form of vpc-dsp338hz; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
VpcId *string `pulumi:"vpcId"`
// Maintainable time window configuration, in weeks, indicates the days of the week that allow maintenance, 1-7 represent
// Monday to weekend respectively.
Weeklies []int `pulumi:"weeklies"`
// Instance AZ, such as ap-guangzhou-1 (Guangzhou Zone 1). Purchasable AZs for an instance can be obtained through the
// DescribeZones API.
Zone *string `pulumi:"zone"`
}
type GeneralCloudInstanceState struct {
// Automatic renewal flag: 0-normal renewal 1-automatic renewal, the default is 1 automatic renewal. Valid only when
// purchasing a prepaid instance. Valid only when the 'instance_charge_type' parameter value is 'PREPAID'.
AutoRenewFlag pulumi.IntPtrInput
// System character set collation, default: Chinese_PRC_CI_AS.
Collation pulumi.StringPtrInput
// Cpu, unit: CORE.
Cpu pulumi.IntPtrInput
// sqlserver version, currently all supported versions are: 2008R2 (SQL Server 2008 R2 Enterprise), 2012SP3 (SQL Server
// 2012 Enterprise), 201202 (SQL Server 2012 Standard), 2014SP2 (SQL Server 2014 Enterprise), 201402 (SQL Server 2014
// Standard), 2016SP1 (SQL Server 2016 Enterprise), 201602 (SQL Server 2016 Standard), 2017 (SQL Server 2017 Enterprise),
// 201702 (SQL Server 2017 Standard), 2019 (SQL Server 2019 Enterprise), 201902 (SQL Server 2019 Standard). Each region
// supports different versions for sale, and the version information that can be sold in each region can be pulled through
// the DescribeProductConfig interface. If left blank, the default version is 2008R2.
DbVersion pulumi.StringPtrInput
// Upgrade the high-availability architecture of sqlserver, upgrade from mirror disaster recovery to always on cluster
// disaster recovery, only support 2017 and above and support always on high-availability instances, do not support
// downgrading to mirror disaster recovery, CLUSTER-upgrade to always on capacity Disaster, if not filled, the
// high-availability architecture will not be modified.
//
// Deprecated: It has been deprecated from version 1.81.2.
HaType pulumi.StringPtrInput
// Payment mode, the value supports PREPAID (prepaid), POSTPAID (postpaid).
InstanceChargeType pulumi.StringPtrInput
// The host disk type of the purchased instance, CLOUD_HSSD-enhanced SSD cloud disk for virtual machines,
// CLOUD_TSSD-extremely fast SSD cloud disk for virtual machines, CLOUD_BSSD-universal SSD cloud disk for virtual machines.
MachineType pulumi.StringPtrInput
// Memory, unit: GB.
Memory pulumi.IntPtrInput
// Name of the SQL Server instance.
Name pulumi.StringPtrInput
// Purchase instance period, the default value is 1, which means one month. The value cannot exceed 48. Valid only when the
// 'instance_charge_type' parameter value is 'PREPAID'.
Period pulumi.IntPtrInput
// project ID.
ProjectId pulumi.IntPtrInput
// A collection of tags bound to the new instance.
ResourceTags GeneralCloudInstanceResourceTagArrayInput
// Security group list, fill in the security group ID in the form of sg-xxx.
SecurityGroupLists pulumi.StringArrayInput
// Maintainable time window configuration, duration, unit: hour.
Span pulumi.IntPtrInput
// Maintainable time window configuration, daily maintainable start time.
StartTime pulumi.StringPtrInput
// instance disk storage, unit: GB.
Storage pulumi.IntPtrInput
// VPC subnet ID, in the form of subnet-bdoe83fa; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
SubnetId pulumi.StringPtrInput
// System time zone, default: China Standard Time.
TimeZone pulumi.StringPtrInput
// VPC network ID, in the form of vpc-dsp338hz; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
VpcId pulumi.StringPtrInput
// Maintainable time window configuration, in weeks, indicates the days of the week that allow maintenance, 1-7 represent
// Monday to weekend respectively.
Weeklies pulumi.IntArrayInput
// Instance AZ, such as ap-guangzhou-1 (Guangzhou Zone 1). Purchasable AZs for an instance can be obtained through the
// DescribeZones API.
Zone pulumi.StringPtrInput
}
func (GeneralCloudInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*generalCloudInstanceState)(nil)).Elem()
}
type generalCloudInstanceArgs struct {
// Automatic renewal flag: 0-normal renewal 1-automatic renewal, the default is 1 automatic renewal. Valid only when
// purchasing a prepaid instance. Valid only when the 'instance_charge_type' parameter value is 'PREPAID'.
AutoRenewFlag *int `pulumi:"autoRenewFlag"`
// System character set collation, default: Chinese_PRC_CI_AS.
Collation *string `pulumi:"collation"`
// Cpu, unit: CORE.
Cpu int `pulumi:"cpu"`
// sqlserver version, currently all supported versions are: 2008R2 (SQL Server 2008 R2 Enterprise), 2012SP3 (SQL Server
// 2012 Enterprise), 201202 (SQL Server 2012 Standard), 2014SP2 (SQL Server 2014 Enterprise), 201402 (SQL Server 2014
// Standard), 2016SP1 (SQL Server 2016 Enterprise), 201602 (SQL Server 2016 Standard), 2017 (SQL Server 2017 Enterprise),
// 201702 (SQL Server 2017 Standard), 2019 (SQL Server 2019 Enterprise), 201902 (SQL Server 2019 Standard). Each region
// supports different versions for sale, and the version information that can be sold in each region can be pulled through
// the DescribeProductConfig interface. If left blank, the default version is 2008R2.
DbVersion *string `pulumi:"dbVersion"`
// Upgrade the high-availability architecture of sqlserver, upgrade from mirror disaster recovery to always on cluster
// disaster recovery, only support 2017 and above and support always on high-availability instances, do not support
// downgrading to mirror disaster recovery, CLUSTER-upgrade to always on capacity Disaster, if not filled, the
// high-availability architecture will not be modified.
//
// Deprecated: It has been deprecated from version 1.81.2.
HaType *string `pulumi:"haType"`
// Payment mode, the value supports PREPAID (prepaid), POSTPAID (postpaid).
InstanceChargeType *string `pulumi:"instanceChargeType"`
// The host disk type of the purchased instance, CLOUD_HSSD-enhanced SSD cloud disk for virtual machines,
// CLOUD_TSSD-extremely fast SSD cloud disk for virtual machines, CLOUD_BSSD-universal SSD cloud disk for virtual machines.
MachineType string `pulumi:"machineType"`
// Memory, unit: GB.
Memory int `pulumi:"memory"`
// Name of the SQL Server instance.
Name *string `pulumi:"name"`
// Purchase instance period, the default value is 1, which means one month. The value cannot exceed 48. Valid only when the
// 'instance_charge_type' parameter value is 'PREPAID'.
Period *int `pulumi:"period"`
// project ID.
ProjectId *int `pulumi:"projectId"`
// A collection of tags bound to the new instance.
ResourceTags []GeneralCloudInstanceResourceTag `pulumi:"resourceTags"`
// Security group list, fill in the security group ID in the form of sg-xxx.
SecurityGroupLists []string `pulumi:"securityGroupLists"`
// Maintainable time window configuration, duration, unit: hour.
Span *int `pulumi:"span"`
// Maintainable time window configuration, daily maintainable start time.
StartTime *string `pulumi:"startTime"`
// instance disk storage, unit: GB.
Storage int `pulumi:"storage"`
// VPC subnet ID, in the form of subnet-bdoe83fa; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
SubnetId *string `pulumi:"subnetId"`
// System time zone, default: China Standard Time.
TimeZone *string `pulumi:"timeZone"`
// VPC network ID, in the form of vpc-dsp338hz; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
VpcId *string `pulumi:"vpcId"`
// Maintainable time window configuration, in weeks, indicates the days of the week that allow maintenance, 1-7 represent
// Monday to weekend respectively.
Weeklies []int `pulumi:"weeklies"`
// Instance AZ, such as ap-guangzhou-1 (Guangzhou Zone 1). Purchasable AZs for an instance can be obtained through the
// DescribeZones API.
Zone string `pulumi:"zone"`
}
// The set of arguments for constructing a GeneralCloudInstance resource.
type GeneralCloudInstanceArgs struct {
// Automatic renewal flag: 0-normal renewal 1-automatic renewal, the default is 1 automatic renewal. Valid only when
// purchasing a prepaid instance. Valid only when the 'instance_charge_type' parameter value is 'PREPAID'.
AutoRenewFlag pulumi.IntPtrInput
// System character set collation, default: Chinese_PRC_CI_AS.
Collation pulumi.StringPtrInput
// Cpu, unit: CORE.
Cpu pulumi.IntInput
// sqlserver version, currently all supported versions are: 2008R2 (SQL Server 2008 R2 Enterprise), 2012SP3 (SQL Server
// 2012 Enterprise), 201202 (SQL Server 2012 Standard), 2014SP2 (SQL Server 2014 Enterprise), 201402 (SQL Server 2014
// Standard), 2016SP1 (SQL Server 2016 Enterprise), 201602 (SQL Server 2016 Standard), 2017 (SQL Server 2017 Enterprise),
// 201702 (SQL Server 2017 Standard), 2019 (SQL Server 2019 Enterprise), 201902 (SQL Server 2019 Standard). Each region
// supports different versions for sale, and the version information that can be sold in each region can be pulled through
// the DescribeProductConfig interface. If left blank, the default version is 2008R2.
DbVersion pulumi.StringPtrInput
// Upgrade the high-availability architecture of sqlserver, upgrade from mirror disaster recovery to always on cluster
// disaster recovery, only support 2017 and above and support always on high-availability instances, do not support
// downgrading to mirror disaster recovery, CLUSTER-upgrade to always on capacity Disaster, if not filled, the
// high-availability architecture will not be modified.
//
// Deprecated: It has been deprecated from version 1.81.2.
HaType pulumi.StringPtrInput
// Payment mode, the value supports PREPAID (prepaid), POSTPAID (postpaid).
InstanceChargeType pulumi.StringPtrInput
// The host disk type of the purchased instance, CLOUD_HSSD-enhanced SSD cloud disk for virtual machines,
// CLOUD_TSSD-extremely fast SSD cloud disk for virtual machines, CLOUD_BSSD-universal SSD cloud disk for virtual machines.
MachineType pulumi.StringInput
// Memory, unit: GB.
Memory pulumi.IntInput
// Name of the SQL Server instance.
Name pulumi.StringPtrInput
// Purchase instance period, the default value is 1, which means one month. The value cannot exceed 48. Valid only when the
// 'instance_charge_type' parameter value is 'PREPAID'.
Period pulumi.IntPtrInput
// project ID.
ProjectId pulumi.IntPtrInput
// A collection of tags bound to the new instance.
ResourceTags GeneralCloudInstanceResourceTagArrayInput
// Security group list, fill in the security group ID in the form of sg-xxx.
SecurityGroupLists pulumi.StringArrayInput
// Maintainable time window configuration, duration, unit: hour.
Span pulumi.IntPtrInput
// Maintainable time window configuration, daily maintainable start time.
StartTime pulumi.StringPtrInput
// instance disk storage, unit: GB.
Storage pulumi.IntInput
// VPC subnet ID, in the form of subnet-bdoe83fa; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
SubnetId pulumi.StringPtrInput
// System time zone, default: China Standard Time.
TimeZone pulumi.StringPtrInput
// VPC network ID, in the form of vpc-dsp338hz; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
VpcId pulumi.StringPtrInput
// Maintainable time window configuration, in weeks, indicates the days of the week that allow maintenance, 1-7 represent
// Monday to weekend respectively.
Weeklies pulumi.IntArrayInput
// Instance AZ, such as ap-guangzhou-1 (Guangzhou Zone 1). Purchasable AZs for an instance can be obtained through the
// DescribeZones API.
Zone pulumi.StringInput
}
func (GeneralCloudInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*generalCloudInstanceArgs)(nil)).Elem()
}
type GeneralCloudInstanceInput interface {
pulumi.Input
ToGeneralCloudInstanceOutput() GeneralCloudInstanceOutput
ToGeneralCloudInstanceOutputWithContext(ctx context.Context) GeneralCloudInstanceOutput
}
func (*GeneralCloudInstance) ElementType() reflect.Type {
return reflect.TypeOf((**GeneralCloudInstance)(nil)).Elem()
}
func (i *GeneralCloudInstance) ToGeneralCloudInstanceOutput() GeneralCloudInstanceOutput {
return i.ToGeneralCloudInstanceOutputWithContext(context.Background())
}
func (i *GeneralCloudInstance) ToGeneralCloudInstanceOutputWithContext(ctx context.Context) GeneralCloudInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(GeneralCloudInstanceOutput)
}
// GeneralCloudInstanceArrayInput is an input type that accepts GeneralCloudInstanceArray and GeneralCloudInstanceArrayOutput values.
// You can construct a concrete instance of `GeneralCloudInstanceArrayInput` via:
//
// GeneralCloudInstanceArray{ GeneralCloudInstanceArgs{...} }
type GeneralCloudInstanceArrayInput interface {
pulumi.Input
ToGeneralCloudInstanceArrayOutput() GeneralCloudInstanceArrayOutput
ToGeneralCloudInstanceArrayOutputWithContext(context.Context) GeneralCloudInstanceArrayOutput
}
type GeneralCloudInstanceArray []GeneralCloudInstanceInput
func (GeneralCloudInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GeneralCloudInstance)(nil)).Elem()
}
func (i GeneralCloudInstanceArray) ToGeneralCloudInstanceArrayOutput() GeneralCloudInstanceArrayOutput {
return i.ToGeneralCloudInstanceArrayOutputWithContext(context.Background())
}
func (i GeneralCloudInstanceArray) ToGeneralCloudInstanceArrayOutputWithContext(ctx context.Context) GeneralCloudInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GeneralCloudInstanceArrayOutput)
}
// GeneralCloudInstanceMapInput is an input type that accepts GeneralCloudInstanceMap and GeneralCloudInstanceMapOutput values.
// You can construct a concrete instance of `GeneralCloudInstanceMapInput` via:
//
// GeneralCloudInstanceMap{ "key": GeneralCloudInstanceArgs{...} }
type GeneralCloudInstanceMapInput interface {
pulumi.Input
ToGeneralCloudInstanceMapOutput() GeneralCloudInstanceMapOutput
ToGeneralCloudInstanceMapOutputWithContext(context.Context) GeneralCloudInstanceMapOutput
}
type GeneralCloudInstanceMap map[string]GeneralCloudInstanceInput
func (GeneralCloudInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GeneralCloudInstance)(nil)).Elem()
}
func (i GeneralCloudInstanceMap) ToGeneralCloudInstanceMapOutput() GeneralCloudInstanceMapOutput {
return i.ToGeneralCloudInstanceMapOutputWithContext(context.Background())
}
func (i GeneralCloudInstanceMap) ToGeneralCloudInstanceMapOutputWithContext(ctx context.Context) GeneralCloudInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GeneralCloudInstanceMapOutput)
}
type GeneralCloudInstanceOutput struct{ *pulumi.OutputState }
func (GeneralCloudInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GeneralCloudInstance)(nil)).Elem()
}
func (o GeneralCloudInstanceOutput) ToGeneralCloudInstanceOutput() GeneralCloudInstanceOutput {
return o
}
func (o GeneralCloudInstanceOutput) ToGeneralCloudInstanceOutputWithContext(ctx context.Context) GeneralCloudInstanceOutput {
return o
}
// Automatic renewal flag: 0-normal renewal 1-automatic renewal, the default is 1 automatic renewal. Valid only when
// purchasing a prepaid instance. Valid only when the 'instance_charge_type' parameter value is 'PREPAID'.
func (o GeneralCloudInstanceOutput) AutoRenewFlag() pulumi.IntPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.IntPtrOutput { return v.AutoRenewFlag }).(pulumi.IntPtrOutput)
}
// System character set collation, default: Chinese_PRC_CI_AS.
func (o GeneralCloudInstanceOutput) Collation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringPtrOutput { return v.Collation }).(pulumi.StringPtrOutput)
}
// Cpu, unit: CORE.
func (o GeneralCloudInstanceOutput) Cpu() pulumi.IntOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.IntOutput { return v.Cpu }).(pulumi.IntOutput)
}
// sqlserver version, currently all supported versions are: 2008R2 (SQL Server 2008 R2 Enterprise), 2012SP3 (SQL Server
// 2012 Enterprise), 201202 (SQL Server 2012 Standard), 2014SP2 (SQL Server 2014 Enterprise), 201402 (SQL Server 2014
// Standard), 2016SP1 (SQL Server 2016 Enterprise), 201602 (SQL Server 2016 Standard), 2017 (SQL Server 2017 Enterprise),
// 201702 (SQL Server 2017 Standard), 2019 (SQL Server 2019 Enterprise), 201902 (SQL Server 2019 Standard). Each region
// supports different versions for sale, and the version information that can be sold in each region can be pulled through
// the DescribeProductConfig interface. If left blank, the default version is 2008R2.
func (o GeneralCloudInstanceOutput) DbVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringPtrOutput { return v.DbVersion }).(pulumi.StringPtrOutput)
}
// Upgrade the high-availability architecture of sqlserver, upgrade from mirror disaster recovery to always on cluster
// disaster recovery, only support 2017 and above and support always on high-availability instances, do not support
// downgrading to mirror disaster recovery, CLUSTER-upgrade to always on capacity Disaster, if not filled, the
// high-availability architecture will not be modified.
//
// Deprecated: It has been deprecated from version 1.81.2.
func (o GeneralCloudInstanceOutput) HaType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringPtrOutput { return v.HaType }).(pulumi.StringPtrOutput)
}
// Payment mode, the value supports PREPAID (prepaid), POSTPAID (postpaid).
func (o GeneralCloudInstanceOutput) InstanceChargeType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringPtrOutput { return v.InstanceChargeType }).(pulumi.StringPtrOutput)
}
// The host disk type of the purchased instance, CLOUD_HSSD-enhanced SSD cloud disk for virtual machines,
// CLOUD_TSSD-extremely fast SSD cloud disk for virtual machines, CLOUD_BSSD-universal SSD cloud disk for virtual machines.
func (o GeneralCloudInstanceOutput) MachineType() pulumi.StringOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringOutput { return v.MachineType }).(pulumi.StringOutput)
}
// Memory, unit: GB.
func (o GeneralCloudInstanceOutput) Memory() pulumi.IntOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.IntOutput { return v.Memory }).(pulumi.IntOutput)
}
// Name of the SQL Server instance.
func (o GeneralCloudInstanceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Purchase instance period, the default value is 1, which means one month. The value cannot exceed 48. Valid only when the
// 'instance_charge_type' parameter value is 'PREPAID'.
func (o GeneralCloudInstanceOutput) Period() pulumi.IntPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.IntPtrOutput { return v.Period }).(pulumi.IntPtrOutput)
}
// project ID.
func (o GeneralCloudInstanceOutput) ProjectId() pulumi.IntPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.IntPtrOutput { return v.ProjectId }).(pulumi.IntPtrOutput)
}
// A collection of tags bound to the new instance.
func (o GeneralCloudInstanceOutput) ResourceTags() GeneralCloudInstanceResourceTagArrayOutput {
return o.ApplyT(func(v *GeneralCloudInstance) GeneralCloudInstanceResourceTagArrayOutput { return v.ResourceTags }).(GeneralCloudInstanceResourceTagArrayOutput)
}
// Security group list, fill in the security group ID in the form of sg-xxx.
func (o GeneralCloudInstanceOutput) SecurityGroupLists() pulumi.StringArrayOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringArrayOutput { return v.SecurityGroupLists }).(pulumi.StringArrayOutput)
}
// Maintainable time window configuration, duration, unit: hour.
func (o GeneralCloudInstanceOutput) Span() pulumi.IntPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.IntPtrOutput { return v.Span }).(pulumi.IntPtrOutput)
}
// Maintainable time window configuration, daily maintainable start time.
func (o GeneralCloudInstanceOutput) StartTime() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringPtrOutput { return v.StartTime }).(pulumi.StringPtrOutput)
}
// instance disk storage, unit: GB.
func (o GeneralCloudInstanceOutput) Storage() pulumi.IntOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.IntOutput { return v.Storage }).(pulumi.IntOutput)
}
// VPC subnet ID, in the form of subnet-bdoe83fa; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
func (o GeneralCloudInstanceOutput) SubnetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringPtrOutput { return v.SubnetId }).(pulumi.StringPtrOutput)
}
// System time zone, default: China Standard Time.
func (o GeneralCloudInstanceOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringPtrOutput { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// VPC network ID, in the form of vpc-dsp338hz; SubnetId and VpcId need to be set at the same time or not set at the same
// time.
func (o GeneralCloudInstanceOutput) VpcId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringPtrOutput { return v.VpcId }).(pulumi.StringPtrOutput)
}
// Maintainable time window configuration, in weeks, indicates the days of the week that allow maintenance, 1-7 represent
// Monday to weekend respectively.
func (o GeneralCloudInstanceOutput) Weeklies() pulumi.IntArrayOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.IntArrayOutput { return v.Weeklies }).(pulumi.IntArrayOutput)
}
// Instance AZ, such as ap-guangzhou-1 (Guangzhou Zone 1). Purchasable AZs for an instance can be obtained through the
// DescribeZones API.
func (o GeneralCloudInstanceOutput) Zone() pulumi.StringOutput {
return o.ApplyT(func(v *GeneralCloudInstance) pulumi.StringOutput { return v.Zone }).(pulumi.StringOutput)
}
type GeneralCloudInstanceArrayOutput struct{ *pulumi.OutputState }
func (GeneralCloudInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GeneralCloudInstance)(nil)).Elem()
}
func (o GeneralCloudInstanceArrayOutput) ToGeneralCloudInstanceArrayOutput() GeneralCloudInstanceArrayOutput {
return o
}
func (o GeneralCloudInstanceArrayOutput) ToGeneralCloudInstanceArrayOutputWithContext(ctx context.Context) GeneralCloudInstanceArrayOutput {
return o
}
func (o GeneralCloudInstanceArrayOutput) Index(i pulumi.IntInput) GeneralCloudInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GeneralCloudInstance {
return vs[0].([]*GeneralCloudInstance)[vs[1].(int)]
}).(GeneralCloudInstanceOutput)
}
type GeneralCloudInstanceMapOutput struct{ *pulumi.OutputState }
func (GeneralCloudInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GeneralCloudInstance)(nil)).Elem()
}
func (o GeneralCloudInstanceMapOutput) ToGeneralCloudInstanceMapOutput() GeneralCloudInstanceMapOutput {
return o
}
func (o GeneralCloudInstanceMapOutput) ToGeneralCloudInstanceMapOutputWithContext(ctx context.Context) GeneralCloudInstanceMapOutput {
return o
}
func (o GeneralCloudInstanceMapOutput) MapIndex(k pulumi.StringInput) GeneralCloudInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GeneralCloudInstance {
return vs[0].(map[string]*GeneralCloudInstance)[vs[1].(string)]
}).(GeneralCloudInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GeneralCloudInstanceInput)(nil)).Elem(), &GeneralCloudInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*GeneralCloudInstanceArrayInput)(nil)).Elem(), GeneralCloudInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GeneralCloudInstanceMapInput)(nil)).Elem(), GeneralCloudInstanceMap{})
pulumi.RegisterOutputType(GeneralCloudInstanceOutput{})
pulumi.RegisterOutputType(GeneralCloudInstanceArrayOutput{})
pulumi.RegisterOutputType(GeneralCloudInstanceMapOutput{})
}