generated from pulumi/pulumi-tf-provider-boilerplate
/
upgradeProxyVersion.go
236 lines (188 loc) · 8.6 KB
/
upgradeProxyVersion.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
// 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 cynosdb
import (
"context"
"reflect"
"errors"
"github.com/mergtil/pulumi-tencentcloud/sdk/go/tencentcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type UpgradeProxyVersion struct {
pulumi.CustomResourceState
// Cluster ID.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// Database Agent Upgrade Version.
DstProxyVersion pulumi.StringOutput `pulumi:"dstProxyVersion"`
}
// NewUpgradeProxyVersion registers a new resource with the given unique name, arguments, and options.
func NewUpgradeProxyVersion(ctx *pulumi.Context,
name string, args *UpgradeProxyVersionArgs, opts ...pulumi.ResourceOption) (*UpgradeProxyVersion, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterId == nil {
return nil, errors.New("invalid value for required argument 'ClusterId'")
}
if args.DstProxyVersion == nil {
return nil, errors.New("invalid value for required argument 'DstProxyVersion'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource UpgradeProxyVersion
err := ctx.RegisterResource("tencentcloud:Cynosdb/upgradeProxyVersion:UpgradeProxyVersion", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetUpgradeProxyVersion gets an existing UpgradeProxyVersion 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 GetUpgradeProxyVersion(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *UpgradeProxyVersionState, opts ...pulumi.ResourceOption) (*UpgradeProxyVersion, error) {
var resource UpgradeProxyVersion
err := ctx.ReadResource("tencentcloud:Cynosdb/upgradeProxyVersion:UpgradeProxyVersion", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering UpgradeProxyVersion resources.
type upgradeProxyVersionState struct {
// Cluster ID.
ClusterId *string `pulumi:"clusterId"`
// Database Agent Upgrade Version.
DstProxyVersion *string `pulumi:"dstProxyVersion"`
}
type UpgradeProxyVersionState struct {
// Cluster ID.
ClusterId pulumi.StringPtrInput
// Database Agent Upgrade Version.
DstProxyVersion pulumi.StringPtrInput
}
func (UpgradeProxyVersionState) ElementType() reflect.Type {
return reflect.TypeOf((*upgradeProxyVersionState)(nil)).Elem()
}
type upgradeProxyVersionArgs struct {
// Cluster ID.
ClusterId string `pulumi:"clusterId"`
// Database Agent Upgrade Version.
DstProxyVersion string `pulumi:"dstProxyVersion"`
}
// The set of arguments for constructing a UpgradeProxyVersion resource.
type UpgradeProxyVersionArgs struct {
// Cluster ID.
ClusterId pulumi.StringInput
// Database Agent Upgrade Version.
DstProxyVersion pulumi.StringInput
}
func (UpgradeProxyVersionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*upgradeProxyVersionArgs)(nil)).Elem()
}
type UpgradeProxyVersionInput interface {
pulumi.Input
ToUpgradeProxyVersionOutput() UpgradeProxyVersionOutput
ToUpgradeProxyVersionOutputWithContext(ctx context.Context) UpgradeProxyVersionOutput
}
func (*UpgradeProxyVersion) ElementType() reflect.Type {
return reflect.TypeOf((**UpgradeProxyVersion)(nil)).Elem()
}
func (i *UpgradeProxyVersion) ToUpgradeProxyVersionOutput() UpgradeProxyVersionOutput {
return i.ToUpgradeProxyVersionOutputWithContext(context.Background())
}
func (i *UpgradeProxyVersion) ToUpgradeProxyVersionOutputWithContext(ctx context.Context) UpgradeProxyVersionOutput {
return pulumi.ToOutputWithContext(ctx, i).(UpgradeProxyVersionOutput)
}
// UpgradeProxyVersionArrayInput is an input type that accepts UpgradeProxyVersionArray and UpgradeProxyVersionArrayOutput values.
// You can construct a concrete instance of `UpgradeProxyVersionArrayInput` via:
//
// UpgradeProxyVersionArray{ UpgradeProxyVersionArgs{...} }
type UpgradeProxyVersionArrayInput interface {
pulumi.Input
ToUpgradeProxyVersionArrayOutput() UpgradeProxyVersionArrayOutput
ToUpgradeProxyVersionArrayOutputWithContext(context.Context) UpgradeProxyVersionArrayOutput
}
type UpgradeProxyVersionArray []UpgradeProxyVersionInput
func (UpgradeProxyVersionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*UpgradeProxyVersion)(nil)).Elem()
}
func (i UpgradeProxyVersionArray) ToUpgradeProxyVersionArrayOutput() UpgradeProxyVersionArrayOutput {
return i.ToUpgradeProxyVersionArrayOutputWithContext(context.Background())
}
func (i UpgradeProxyVersionArray) ToUpgradeProxyVersionArrayOutputWithContext(ctx context.Context) UpgradeProxyVersionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(UpgradeProxyVersionArrayOutput)
}
// UpgradeProxyVersionMapInput is an input type that accepts UpgradeProxyVersionMap and UpgradeProxyVersionMapOutput values.
// You can construct a concrete instance of `UpgradeProxyVersionMapInput` via:
//
// UpgradeProxyVersionMap{ "key": UpgradeProxyVersionArgs{...} }
type UpgradeProxyVersionMapInput interface {
pulumi.Input
ToUpgradeProxyVersionMapOutput() UpgradeProxyVersionMapOutput
ToUpgradeProxyVersionMapOutputWithContext(context.Context) UpgradeProxyVersionMapOutput
}
type UpgradeProxyVersionMap map[string]UpgradeProxyVersionInput
func (UpgradeProxyVersionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*UpgradeProxyVersion)(nil)).Elem()
}
func (i UpgradeProxyVersionMap) ToUpgradeProxyVersionMapOutput() UpgradeProxyVersionMapOutput {
return i.ToUpgradeProxyVersionMapOutputWithContext(context.Background())
}
func (i UpgradeProxyVersionMap) ToUpgradeProxyVersionMapOutputWithContext(ctx context.Context) UpgradeProxyVersionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(UpgradeProxyVersionMapOutput)
}
type UpgradeProxyVersionOutput struct{ *pulumi.OutputState }
func (UpgradeProxyVersionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**UpgradeProxyVersion)(nil)).Elem()
}
func (o UpgradeProxyVersionOutput) ToUpgradeProxyVersionOutput() UpgradeProxyVersionOutput {
return o
}
func (o UpgradeProxyVersionOutput) ToUpgradeProxyVersionOutputWithContext(ctx context.Context) UpgradeProxyVersionOutput {
return o
}
// Cluster ID.
func (o UpgradeProxyVersionOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *UpgradeProxyVersion) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput)
}
// Database Agent Upgrade Version.
func (o UpgradeProxyVersionOutput) DstProxyVersion() pulumi.StringOutput {
return o.ApplyT(func(v *UpgradeProxyVersion) pulumi.StringOutput { return v.DstProxyVersion }).(pulumi.StringOutput)
}
type UpgradeProxyVersionArrayOutput struct{ *pulumi.OutputState }
func (UpgradeProxyVersionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*UpgradeProxyVersion)(nil)).Elem()
}
func (o UpgradeProxyVersionArrayOutput) ToUpgradeProxyVersionArrayOutput() UpgradeProxyVersionArrayOutput {
return o
}
func (o UpgradeProxyVersionArrayOutput) ToUpgradeProxyVersionArrayOutputWithContext(ctx context.Context) UpgradeProxyVersionArrayOutput {
return o
}
func (o UpgradeProxyVersionArrayOutput) Index(i pulumi.IntInput) UpgradeProxyVersionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *UpgradeProxyVersion {
return vs[0].([]*UpgradeProxyVersion)[vs[1].(int)]
}).(UpgradeProxyVersionOutput)
}
type UpgradeProxyVersionMapOutput struct{ *pulumi.OutputState }
func (UpgradeProxyVersionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*UpgradeProxyVersion)(nil)).Elem()
}
func (o UpgradeProxyVersionMapOutput) ToUpgradeProxyVersionMapOutput() UpgradeProxyVersionMapOutput {
return o
}
func (o UpgradeProxyVersionMapOutput) ToUpgradeProxyVersionMapOutputWithContext(ctx context.Context) UpgradeProxyVersionMapOutput {
return o
}
func (o UpgradeProxyVersionMapOutput) MapIndex(k pulumi.StringInput) UpgradeProxyVersionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *UpgradeProxyVersion {
return vs[0].(map[string]*UpgradeProxyVersion)[vs[1].(string)]
}).(UpgradeProxyVersionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*UpgradeProxyVersionInput)(nil)).Elem(), &UpgradeProxyVersion{})
pulumi.RegisterInputType(reflect.TypeOf((*UpgradeProxyVersionArrayInput)(nil)).Elem(), UpgradeProxyVersionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*UpgradeProxyVersionMapInput)(nil)).Elem(), UpgradeProxyVersionMap{})
pulumi.RegisterOutputType(UpgradeProxyVersionOutput{})
pulumi.RegisterOutputType(UpgradeProxyVersionArrayOutput{})
pulumi.RegisterOutputType(UpgradeProxyVersionMapOutput{})
}