generated from pulumi/pulumi-tf-provider-boilerplate
/
enrollmentStatus.go
320 lines (267 loc) · 12.6 KB
/
enrollmentStatus.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
// 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 optimizer
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This resource provides the Enrollment Status resource in Oracle Cloud Infrastructure Optimizer service.
//
// Updates the enrollment status of the tenancy.
//
// ## Import
//
// EnrollmentStatus can be imported using the `id`, e.g.
//
// ```sh
// $ pulumi import oci:Optimizer/enrollmentStatus:EnrollmentStatus test_enrollment_status "id"
// ```
type EnrollmentStatus struct {
pulumi.CustomResourceState
// The OCID of the compartment.
CompartmentId pulumi.StringOutput `pulumi:"compartmentId"`
// The unique OCID associated with the enrollment status.
EnrollmentStatusId pulumi.StringOutput `pulumi:"enrollmentStatusId"`
// The enrollment status' current state.
State pulumi.StringOutput `pulumi:"state"`
// (Updatable) The Cloud Advisor enrollment status.
//
// ** IMPORTANT **
// Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Status pulumi.StringOutput `pulumi:"status"`
// The reason for the enrollment status of the tenancy.
StatusReason pulumi.StringOutput `pulumi:"statusReason"`
// The date and time the enrollment status was created, in the format defined by RFC3339.
TimeCreated pulumi.StringOutput `pulumi:"timeCreated"`
// The date and time the enrollment status was last updated, in the format defined by RFC3339.
TimeUpdated pulumi.StringOutput `pulumi:"timeUpdated"`
}
// NewEnrollmentStatus registers a new resource with the given unique name, arguments, and options.
func NewEnrollmentStatus(ctx *pulumi.Context,
name string, args *EnrollmentStatusArgs, opts ...pulumi.ResourceOption) (*EnrollmentStatus, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EnrollmentStatusId == nil {
return nil, errors.New("invalid value for required argument 'EnrollmentStatusId'")
}
if args.Status == nil {
return nil, errors.New("invalid value for required argument 'Status'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EnrollmentStatus
err := ctx.RegisterResource("oci:Optimizer/enrollmentStatus:EnrollmentStatus", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEnrollmentStatus gets an existing EnrollmentStatus 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 GetEnrollmentStatus(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EnrollmentStatusState, opts ...pulumi.ResourceOption) (*EnrollmentStatus, error) {
var resource EnrollmentStatus
err := ctx.ReadResource("oci:Optimizer/enrollmentStatus:EnrollmentStatus", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EnrollmentStatus resources.
type enrollmentStatusState struct {
// The OCID of the compartment.
CompartmentId *string `pulumi:"compartmentId"`
// The unique OCID associated with the enrollment status.
EnrollmentStatusId *string `pulumi:"enrollmentStatusId"`
// The enrollment status' current state.
State *string `pulumi:"state"`
// (Updatable) The Cloud Advisor enrollment status.
//
// ** IMPORTANT **
// Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Status *string `pulumi:"status"`
// The reason for the enrollment status of the tenancy.
StatusReason *string `pulumi:"statusReason"`
// The date and time the enrollment status was created, in the format defined by RFC3339.
TimeCreated *string `pulumi:"timeCreated"`
// The date and time the enrollment status was last updated, in the format defined by RFC3339.
TimeUpdated *string `pulumi:"timeUpdated"`
}
type EnrollmentStatusState struct {
// The OCID of the compartment.
CompartmentId pulumi.StringPtrInput
// The unique OCID associated with the enrollment status.
EnrollmentStatusId pulumi.StringPtrInput
// The enrollment status' current state.
State pulumi.StringPtrInput
// (Updatable) The Cloud Advisor enrollment status.
//
// ** IMPORTANT **
// Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Status pulumi.StringPtrInput
// The reason for the enrollment status of the tenancy.
StatusReason pulumi.StringPtrInput
// The date and time the enrollment status was created, in the format defined by RFC3339.
TimeCreated pulumi.StringPtrInput
// The date and time the enrollment status was last updated, in the format defined by RFC3339.
TimeUpdated pulumi.StringPtrInput
}
func (EnrollmentStatusState) ElementType() reflect.Type {
return reflect.TypeOf((*enrollmentStatusState)(nil)).Elem()
}
type enrollmentStatusArgs struct {
// The unique OCID associated with the enrollment status.
EnrollmentStatusId string `pulumi:"enrollmentStatusId"`
// (Updatable) The Cloud Advisor enrollment status.
//
// ** IMPORTANT **
// Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Status string `pulumi:"status"`
}
// The set of arguments for constructing a EnrollmentStatus resource.
type EnrollmentStatusArgs struct {
// The unique OCID associated with the enrollment status.
EnrollmentStatusId pulumi.StringInput
// (Updatable) The Cloud Advisor enrollment status.
//
// ** IMPORTANT **
// Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Status pulumi.StringInput
}
func (EnrollmentStatusArgs) ElementType() reflect.Type {
return reflect.TypeOf((*enrollmentStatusArgs)(nil)).Elem()
}
type EnrollmentStatusInput interface {
pulumi.Input
ToEnrollmentStatusOutput() EnrollmentStatusOutput
ToEnrollmentStatusOutputWithContext(ctx context.Context) EnrollmentStatusOutput
}
func (*EnrollmentStatus) ElementType() reflect.Type {
return reflect.TypeOf((**EnrollmentStatus)(nil)).Elem()
}
func (i *EnrollmentStatus) ToEnrollmentStatusOutput() EnrollmentStatusOutput {
return i.ToEnrollmentStatusOutputWithContext(context.Background())
}
func (i *EnrollmentStatus) ToEnrollmentStatusOutputWithContext(ctx context.Context) EnrollmentStatusOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnrollmentStatusOutput)
}
// EnrollmentStatusArrayInput is an input type that accepts EnrollmentStatusArray and EnrollmentStatusArrayOutput values.
// You can construct a concrete instance of `EnrollmentStatusArrayInput` via:
//
// EnrollmentStatusArray{ EnrollmentStatusArgs{...} }
type EnrollmentStatusArrayInput interface {
pulumi.Input
ToEnrollmentStatusArrayOutput() EnrollmentStatusArrayOutput
ToEnrollmentStatusArrayOutputWithContext(context.Context) EnrollmentStatusArrayOutput
}
type EnrollmentStatusArray []EnrollmentStatusInput
func (EnrollmentStatusArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EnrollmentStatus)(nil)).Elem()
}
func (i EnrollmentStatusArray) ToEnrollmentStatusArrayOutput() EnrollmentStatusArrayOutput {
return i.ToEnrollmentStatusArrayOutputWithContext(context.Background())
}
func (i EnrollmentStatusArray) ToEnrollmentStatusArrayOutputWithContext(ctx context.Context) EnrollmentStatusArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnrollmentStatusArrayOutput)
}
// EnrollmentStatusMapInput is an input type that accepts EnrollmentStatusMap and EnrollmentStatusMapOutput values.
// You can construct a concrete instance of `EnrollmentStatusMapInput` via:
//
// EnrollmentStatusMap{ "key": EnrollmentStatusArgs{...} }
type EnrollmentStatusMapInput interface {
pulumi.Input
ToEnrollmentStatusMapOutput() EnrollmentStatusMapOutput
ToEnrollmentStatusMapOutputWithContext(context.Context) EnrollmentStatusMapOutput
}
type EnrollmentStatusMap map[string]EnrollmentStatusInput
func (EnrollmentStatusMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EnrollmentStatus)(nil)).Elem()
}
func (i EnrollmentStatusMap) ToEnrollmentStatusMapOutput() EnrollmentStatusMapOutput {
return i.ToEnrollmentStatusMapOutputWithContext(context.Background())
}
func (i EnrollmentStatusMap) ToEnrollmentStatusMapOutputWithContext(ctx context.Context) EnrollmentStatusMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnrollmentStatusMapOutput)
}
type EnrollmentStatusOutput struct{ *pulumi.OutputState }
func (EnrollmentStatusOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EnrollmentStatus)(nil)).Elem()
}
func (o EnrollmentStatusOutput) ToEnrollmentStatusOutput() EnrollmentStatusOutput {
return o
}
func (o EnrollmentStatusOutput) ToEnrollmentStatusOutputWithContext(ctx context.Context) EnrollmentStatusOutput {
return o
}
// The OCID of the compartment.
func (o EnrollmentStatusOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v *EnrollmentStatus) pulumi.StringOutput { return v.CompartmentId }).(pulumi.StringOutput)
}
// The unique OCID associated with the enrollment status.
func (o EnrollmentStatusOutput) EnrollmentStatusId() pulumi.StringOutput {
return o.ApplyT(func(v *EnrollmentStatus) pulumi.StringOutput { return v.EnrollmentStatusId }).(pulumi.StringOutput)
}
// The enrollment status' current state.
func (o EnrollmentStatusOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *EnrollmentStatus) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// (Updatable) The Cloud Advisor enrollment status.
//
// ** IMPORTANT **
// Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
func (o EnrollmentStatusOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *EnrollmentStatus) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// The reason for the enrollment status of the tenancy.
func (o EnrollmentStatusOutput) StatusReason() pulumi.StringOutput {
return o.ApplyT(func(v *EnrollmentStatus) pulumi.StringOutput { return v.StatusReason }).(pulumi.StringOutput)
}
// The date and time the enrollment status was created, in the format defined by RFC3339.
func (o EnrollmentStatusOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v *EnrollmentStatus) pulumi.StringOutput { return v.TimeCreated }).(pulumi.StringOutput)
}
// The date and time the enrollment status was last updated, in the format defined by RFC3339.
func (o EnrollmentStatusOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v *EnrollmentStatus) pulumi.StringOutput { return v.TimeUpdated }).(pulumi.StringOutput)
}
type EnrollmentStatusArrayOutput struct{ *pulumi.OutputState }
func (EnrollmentStatusArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EnrollmentStatus)(nil)).Elem()
}
func (o EnrollmentStatusArrayOutput) ToEnrollmentStatusArrayOutput() EnrollmentStatusArrayOutput {
return o
}
func (o EnrollmentStatusArrayOutput) ToEnrollmentStatusArrayOutputWithContext(ctx context.Context) EnrollmentStatusArrayOutput {
return o
}
func (o EnrollmentStatusArrayOutput) Index(i pulumi.IntInput) EnrollmentStatusOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EnrollmentStatus {
return vs[0].([]*EnrollmentStatus)[vs[1].(int)]
}).(EnrollmentStatusOutput)
}
type EnrollmentStatusMapOutput struct{ *pulumi.OutputState }
func (EnrollmentStatusMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EnrollmentStatus)(nil)).Elem()
}
func (o EnrollmentStatusMapOutput) ToEnrollmentStatusMapOutput() EnrollmentStatusMapOutput {
return o
}
func (o EnrollmentStatusMapOutput) ToEnrollmentStatusMapOutputWithContext(ctx context.Context) EnrollmentStatusMapOutput {
return o
}
func (o EnrollmentStatusMapOutput) MapIndex(k pulumi.StringInput) EnrollmentStatusOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EnrollmentStatus {
return vs[0].(map[string]*EnrollmentStatus)[vs[1].(string)]
}).(EnrollmentStatusOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EnrollmentStatusInput)(nil)).Elem(), &EnrollmentStatus{})
pulumi.RegisterInputType(reflect.TypeOf((*EnrollmentStatusArrayInput)(nil)).Elem(), EnrollmentStatusArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EnrollmentStatusMapInput)(nil)).Elem(), EnrollmentStatusMap{})
pulumi.RegisterOutputType(EnrollmentStatusOutput{})
pulumi.RegisterOutputType(EnrollmentStatusArrayOutput{})
pulumi.RegisterOutputType(EnrollmentStatusMapOutput{})
}