This repository has been archived by the owner on Aug 3, 2022. It is now read-only.
forked from pulumi/pulumi-tf-provider-boilerplate
/
ovh_dedicated_server_reboot_task.go
321 lines (260 loc) · 13.5 KB
/
ovh_dedicated_server_reboot_task.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ovh
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Ovh_dedicated_server_reboot_task struct {
pulumi.CustomResourceState
// Details of this task
Comment pulumi.StringOutput `pulumi:"comment"`
// Completion date
DoneDate pulumi.StringOutput `pulumi:"doneDate"`
// Function name
Function pulumi.StringOutput `pulumi:"function"`
// Change this value to recreate a reboot task.
Keepers pulumi.StringArrayOutput `pulumi:"keepers"`
// Last update
LastUpdate pulumi.StringOutput `pulumi:"lastUpdate"`
// The internal name of your dedicated server.
ServiceName pulumi.StringOutput `pulumi:"serviceName"`
// Task Creation date
StartDate pulumi.StringOutput `pulumi:"startDate"`
// Task status
Status pulumi.StringOutput `pulumi:"status"`
}
// NewOvh_dedicated_server_reboot_task registers a new resource with the given unique name, arguments, and options.
func NewOvh_dedicated_server_reboot_task(ctx *pulumi.Context,
name string, args *Ovh_dedicated_server_reboot_taskArgs, opts ...pulumi.ResourceOption) (*Ovh_dedicated_server_reboot_task, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Keepers == nil {
return nil, errors.New("invalid value for required argument 'Keepers'")
}
if args.ServiceName == nil {
return nil, errors.New("invalid value for required argument 'ServiceName'")
}
var resource Ovh_dedicated_server_reboot_task
err := ctx.RegisterResource("ovh:index/ovh_dedicated_server_reboot_task:ovh_dedicated_server_reboot_task", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOvh_dedicated_server_reboot_task gets an existing Ovh_dedicated_server_reboot_task 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 GetOvh_dedicated_server_reboot_task(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *Ovh_dedicated_server_reboot_taskState, opts ...pulumi.ResourceOption) (*Ovh_dedicated_server_reboot_task, error) {
var resource Ovh_dedicated_server_reboot_task
err := ctx.ReadResource("ovh:index/ovh_dedicated_server_reboot_task:ovh_dedicated_server_reboot_task", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Ovh_dedicated_server_reboot_task resources.
type ovh_dedicated_server_reboot_taskState struct {
// Details of this task
Comment *string `pulumi:"comment"`
// Completion date
DoneDate *string `pulumi:"doneDate"`
// Function name
Function *string `pulumi:"function"`
// Change this value to recreate a reboot task.
Keepers []string `pulumi:"keepers"`
// Last update
LastUpdate *string `pulumi:"lastUpdate"`
// The internal name of your dedicated server.
ServiceName *string `pulumi:"serviceName"`
// Task Creation date
StartDate *string `pulumi:"startDate"`
// Task status
Status *string `pulumi:"status"`
}
type Ovh_dedicated_server_reboot_taskState struct {
// Details of this task
Comment pulumi.StringPtrInput
// Completion date
DoneDate pulumi.StringPtrInput
// Function name
Function pulumi.StringPtrInput
// Change this value to recreate a reboot task.
Keepers pulumi.StringArrayInput
// Last update
LastUpdate pulumi.StringPtrInput
// The internal name of your dedicated server.
ServiceName pulumi.StringPtrInput
// Task Creation date
StartDate pulumi.StringPtrInput
// Task status
Status pulumi.StringPtrInput
}
func (Ovh_dedicated_server_reboot_taskState) ElementType() reflect.Type {
return reflect.TypeOf((*ovh_dedicated_server_reboot_taskState)(nil)).Elem()
}
type ovh_dedicated_server_reboot_taskArgs struct {
// Change this value to recreate a reboot task.
Keepers []string `pulumi:"keepers"`
// The internal name of your dedicated server.
ServiceName string `pulumi:"serviceName"`
}
// The set of arguments for constructing a Ovh_dedicated_server_reboot_task resource.
type Ovh_dedicated_server_reboot_taskArgs struct {
// Change this value to recreate a reboot task.
Keepers pulumi.StringArrayInput
// The internal name of your dedicated server.
ServiceName pulumi.StringInput
}
func (Ovh_dedicated_server_reboot_taskArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ovh_dedicated_server_reboot_taskArgs)(nil)).Elem()
}
type Ovh_dedicated_server_reboot_taskInput interface {
pulumi.Input
ToOvh_dedicated_server_reboot_taskOutput() Ovh_dedicated_server_reboot_taskOutput
ToOvh_dedicated_server_reboot_taskOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskOutput
}
func (*Ovh_dedicated_server_reboot_task) ElementType() reflect.Type {
return reflect.TypeOf((*Ovh_dedicated_server_reboot_task)(nil))
}
func (i *Ovh_dedicated_server_reboot_task) ToOvh_dedicated_server_reboot_taskOutput() Ovh_dedicated_server_reboot_taskOutput {
return i.ToOvh_dedicated_server_reboot_taskOutputWithContext(context.Background())
}
func (i *Ovh_dedicated_server_reboot_task) ToOvh_dedicated_server_reboot_taskOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskOutput {
return pulumi.ToOutputWithContext(ctx, i).(Ovh_dedicated_server_reboot_taskOutput)
}
func (i *Ovh_dedicated_server_reboot_task) ToOvh_dedicated_server_reboot_taskPtrOutput() Ovh_dedicated_server_reboot_taskPtrOutput {
return i.ToOvh_dedicated_server_reboot_taskPtrOutputWithContext(context.Background())
}
func (i *Ovh_dedicated_server_reboot_task) ToOvh_dedicated_server_reboot_taskPtrOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(Ovh_dedicated_server_reboot_taskPtrOutput)
}
type Ovh_dedicated_server_reboot_taskPtrInput interface {
pulumi.Input
ToOvh_dedicated_server_reboot_taskPtrOutput() Ovh_dedicated_server_reboot_taskPtrOutput
ToOvh_dedicated_server_reboot_taskPtrOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskPtrOutput
}
type ovh_dedicated_server_reboot_taskPtrType Ovh_dedicated_server_reboot_taskArgs
func (*ovh_dedicated_server_reboot_taskPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**Ovh_dedicated_server_reboot_task)(nil))
}
func (i *ovh_dedicated_server_reboot_taskPtrType) ToOvh_dedicated_server_reboot_taskPtrOutput() Ovh_dedicated_server_reboot_taskPtrOutput {
return i.ToOvh_dedicated_server_reboot_taskPtrOutputWithContext(context.Background())
}
func (i *ovh_dedicated_server_reboot_taskPtrType) ToOvh_dedicated_server_reboot_taskPtrOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(Ovh_dedicated_server_reboot_taskPtrOutput)
}
// Ovh_dedicated_server_reboot_taskArrayInput is an input type that accepts Ovh_dedicated_server_reboot_taskArray and Ovh_dedicated_server_reboot_taskArrayOutput values.
// You can construct a concrete instance of `Ovh_dedicated_server_reboot_taskArrayInput` via:
//
// Ovh_dedicated_server_reboot_taskArray{ Ovh_dedicated_server_reboot_taskArgs{...} }
type Ovh_dedicated_server_reboot_taskArrayInput interface {
pulumi.Input
ToOvh_dedicated_server_reboot_taskArrayOutput() Ovh_dedicated_server_reboot_taskArrayOutput
ToOvh_dedicated_server_reboot_taskArrayOutputWithContext(context.Context) Ovh_dedicated_server_reboot_taskArrayOutput
}
type Ovh_dedicated_server_reboot_taskArray []Ovh_dedicated_server_reboot_taskInput
func (Ovh_dedicated_server_reboot_taskArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Ovh_dedicated_server_reboot_task)(nil)).Elem()
}
func (i Ovh_dedicated_server_reboot_taskArray) ToOvh_dedicated_server_reboot_taskArrayOutput() Ovh_dedicated_server_reboot_taskArrayOutput {
return i.ToOvh_dedicated_server_reboot_taskArrayOutputWithContext(context.Background())
}
func (i Ovh_dedicated_server_reboot_taskArray) ToOvh_dedicated_server_reboot_taskArrayOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(Ovh_dedicated_server_reboot_taskArrayOutput)
}
// Ovh_dedicated_server_reboot_taskMapInput is an input type that accepts Ovh_dedicated_server_reboot_taskMap and Ovh_dedicated_server_reboot_taskMapOutput values.
// You can construct a concrete instance of `Ovh_dedicated_server_reboot_taskMapInput` via:
//
// Ovh_dedicated_server_reboot_taskMap{ "key": Ovh_dedicated_server_reboot_taskArgs{...} }
type Ovh_dedicated_server_reboot_taskMapInput interface {
pulumi.Input
ToOvh_dedicated_server_reboot_taskMapOutput() Ovh_dedicated_server_reboot_taskMapOutput
ToOvh_dedicated_server_reboot_taskMapOutputWithContext(context.Context) Ovh_dedicated_server_reboot_taskMapOutput
}
type Ovh_dedicated_server_reboot_taskMap map[string]Ovh_dedicated_server_reboot_taskInput
func (Ovh_dedicated_server_reboot_taskMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Ovh_dedicated_server_reboot_task)(nil)).Elem()
}
func (i Ovh_dedicated_server_reboot_taskMap) ToOvh_dedicated_server_reboot_taskMapOutput() Ovh_dedicated_server_reboot_taskMapOutput {
return i.ToOvh_dedicated_server_reboot_taskMapOutputWithContext(context.Background())
}
func (i Ovh_dedicated_server_reboot_taskMap) ToOvh_dedicated_server_reboot_taskMapOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(Ovh_dedicated_server_reboot_taskMapOutput)
}
type Ovh_dedicated_server_reboot_taskOutput struct{ *pulumi.OutputState }
func (Ovh_dedicated_server_reboot_taskOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Ovh_dedicated_server_reboot_task)(nil))
}
func (o Ovh_dedicated_server_reboot_taskOutput) ToOvh_dedicated_server_reboot_taskOutput() Ovh_dedicated_server_reboot_taskOutput {
return o
}
func (o Ovh_dedicated_server_reboot_taskOutput) ToOvh_dedicated_server_reboot_taskOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskOutput {
return o
}
func (o Ovh_dedicated_server_reboot_taskOutput) ToOvh_dedicated_server_reboot_taskPtrOutput() Ovh_dedicated_server_reboot_taskPtrOutput {
return o.ToOvh_dedicated_server_reboot_taskPtrOutputWithContext(context.Background())
}
func (o Ovh_dedicated_server_reboot_taskOutput) ToOvh_dedicated_server_reboot_taskPtrOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v Ovh_dedicated_server_reboot_task) *Ovh_dedicated_server_reboot_task {
return &v
}).(Ovh_dedicated_server_reboot_taskPtrOutput)
}
type Ovh_dedicated_server_reboot_taskPtrOutput struct{ *pulumi.OutputState }
func (Ovh_dedicated_server_reboot_taskPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Ovh_dedicated_server_reboot_task)(nil))
}
func (o Ovh_dedicated_server_reboot_taskPtrOutput) ToOvh_dedicated_server_reboot_taskPtrOutput() Ovh_dedicated_server_reboot_taskPtrOutput {
return o
}
func (o Ovh_dedicated_server_reboot_taskPtrOutput) ToOvh_dedicated_server_reboot_taskPtrOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskPtrOutput {
return o
}
func (o Ovh_dedicated_server_reboot_taskPtrOutput) Elem() Ovh_dedicated_server_reboot_taskOutput {
return o.ApplyT(func(v *Ovh_dedicated_server_reboot_task) Ovh_dedicated_server_reboot_task {
if v != nil {
return *v
}
var ret Ovh_dedicated_server_reboot_task
return ret
}).(Ovh_dedicated_server_reboot_taskOutput)
}
type Ovh_dedicated_server_reboot_taskArrayOutput struct{ *pulumi.OutputState }
func (Ovh_dedicated_server_reboot_taskArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]Ovh_dedicated_server_reboot_task)(nil))
}
func (o Ovh_dedicated_server_reboot_taskArrayOutput) ToOvh_dedicated_server_reboot_taskArrayOutput() Ovh_dedicated_server_reboot_taskArrayOutput {
return o
}
func (o Ovh_dedicated_server_reboot_taskArrayOutput) ToOvh_dedicated_server_reboot_taskArrayOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskArrayOutput {
return o
}
func (o Ovh_dedicated_server_reboot_taskArrayOutput) Index(i pulumi.IntInput) Ovh_dedicated_server_reboot_taskOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) Ovh_dedicated_server_reboot_task {
return vs[0].([]Ovh_dedicated_server_reboot_task)[vs[1].(int)]
}).(Ovh_dedicated_server_reboot_taskOutput)
}
type Ovh_dedicated_server_reboot_taskMapOutput struct{ *pulumi.OutputState }
func (Ovh_dedicated_server_reboot_taskMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]Ovh_dedicated_server_reboot_task)(nil))
}
func (o Ovh_dedicated_server_reboot_taskMapOutput) ToOvh_dedicated_server_reboot_taskMapOutput() Ovh_dedicated_server_reboot_taskMapOutput {
return o
}
func (o Ovh_dedicated_server_reboot_taskMapOutput) ToOvh_dedicated_server_reboot_taskMapOutputWithContext(ctx context.Context) Ovh_dedicated_server_reboot_taskMapOutput {
return o
}
func (o Ovh_dedicated_server_reboot_taskMapOutput) MapIndex(k pulumi.StringInput) Ovh_dedicated_server_reboot_taskOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) Ovh_dedicated_server_reboot_task {
return vs[0].(map[string]Ovh_dedicated_server_reboot_task)[vs[1].(string)]
}).(Ovh_dedicated_server_reboot_taskOutput)
}
func init() {
pulumi.RegisterOutputType(Ovh_dedicated_server_reboot_taskOutput{})
pulumi.RegisterOutputType(Ovh_dedicated_server_reboot_taskPtrOutput{})
pulumi.RegisterOutputType(Ovh_dedicated_server_reboot_taskArrayOutput{})
pulumi.RegisterOutputType(Ovh_dedicated_server_reboot_taskMapOutput{})
}