-
Notifications
You must be signed in to change notification settings - Fork 52
/
capacityCommitment.go
477 lines (419 loc) · 22.6 KB
/
capacityCommitment.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
// 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 bigquery
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes.
//
// In order to remove annual commitment, its plan needs to be changed to monthly or flex first.
//
// To get more information about CapacityCommitment, see:
//
// * [API documentation](https://cloud.google.com/bigquery/docs/reference/reservations/rest/v1/projects.locations.capacityCommitments)
// * How-to Guides
// - [Introduction to Reservations](https://cloud.google.com/bigquery/docs/reservations-intro)
//
// ## Example Usage
//
// ### Bigquery Reservation Capacity Commitment Docs
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := bigquery.NewCapacityCommitment(ctx, "example", &bigquery.CapacityCommitmentArgs{
// CapacityCommitmentId: pulumi.String("example-commitment"),
// Location: pulumi.String("us-west2"),
// SlotCount: pulumi.Int(100),
// Plan: pulumi.String("FLEX_FLAT_RATE"),
// Edition: pulumi.String("ENTERPRISE"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// CapacityCommitment can be imported using any of these accepted formats:
//
// * `projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}`
//
// * `{{project}}/{{location}}/{{capacity_commitment_id}}`
//
// * `{{location}}/{{capacity_commitment_id}}`
//
// When using the `pulumi import` command, CapacityCommitment can be imported using one of the formats above. For example:
//
// ```sh
// $ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}
// ```
//
// ```sh
// $ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default {{project}}/{{location}}/{{capacity_commitment_id}}
// ```
//
// ```sh
// $ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default {{location}}/{{capacity_commitment_id}}
// ```
type CapacityCommitment struct {
pulumi.CustomResourceState
// The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is
// empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character
// cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split
// or merged.
CapacityCommitmentId pulumi.StringPtrOutput `pulumi:"capacityCommitmentId"`
// The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
CommitmentEndTime pulumi.StringOutput `pulumi:"commitmentEndTime"`
// The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
CommitmentStartTime pulumi.StringOutput `pulumi:"commitmentStartTime"`
// The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
Edition pulumi.StringPtrOutput `pulumi:"edition"`
// If true, fail the request if another project in the organization has a capacity commitment.
EnforceSingleAdminProjectPerOrg pulumi.StringPtrOutput `pulumi:"enforceSingleAdminProjectPerOrg"`
// The geographic location where the transfer config should reside.
// Examples: US, EU, asia-northeast1. The default value is US.
Location pulumi.StringPtrOutput `pulumi:"location"`
// The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
Name pulumi.StringOutput `pulumi:"name"`
// Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
//
// ***
Plan pulumi.StringOutput `pulumi:"plan"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// The plan this capacity commitment is converted to after commitmentEndTime passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for some commitment plans.
RenewalPlan pulumi.StringPtrOutput `pulumi:"renewalPlan"`
// Number of slots in this commitment.
SlotCount pulumi.IntOutput `pulumi:"slotCount"`
// State of the commitment
State pulumi.StringOutput `pulumi:"state"`
}
// NewCapacityCommitment registers a new resource with the given unique name, arguments, and options.
func NewCapacityCommitment(ctx *pulumi.Context,
name string, args *CapacityCommitmentArgs, opts ...pulumi.ResourceOption) (*CapacityCommitment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Plan == nil {
return nil, errors.New("invalid value for required argument 'Plan'")
}
if args.SlotCount == nil {
return nil, errors.New("invalid value for required argument 'SlotCount'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CapacityCommitment
err := ctx.RegisterResource("gcp:bigquery/capacityCommitment:CapacityCommitment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCapacityCommitment gets an existing CapacityCommitment 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 GetCapacityCommitment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CapacityCommitmentState, opts ...pulumi.ResourceOption) (*CapacityCommitment, error) {
var resource CapacityCommitment
err := ctx.ReadResource("gcp:bigquery/capacityCommitment:CapacityCommitment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CapacityCommitment resources.
type capacityCommitmentState struct {
// The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is
// empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character
// cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split
// or merged.
CapacityCommitmentId *string `pulumi:"capacityCommitmentId"`
// The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
CommitmentEndTime *string `pulumi:"commitmentEndTime"`
// The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
CommitmentStartTime *string `pulumi:"commitmentStartTime"`
// The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
Edition *string `pulumi:"edition"`
// If true, fail the request if another project in the organization has a capacity commitment.
EnforceSingleAdminProjectPerOrg *string `pulumi:"enforceSingleAdminProjectPerOrg"`
// The geographic location where the transfer config should reside.
// Examples: US, EU, asia-northeast1. The default value is US.
Location *string `pulumi:"location"`
// The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
Name *string `pulumi:"name"`
// Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
//
// ***
Plan *string `pulumi:"plan"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// The plan this capacity commitment is converted to after commitmentEndTime passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for some commitment plans.
RenewalPlan *string `pulumi:"renewalPlan"`
// Number of slots in this commitment.
SlotCount *int `pulumi:"slotCount"`
// State of the commitment
State *string `pulumi:"state"`
}
type CapacityCommitmentState struct {
// The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is
// empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character
// cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split
// or merged.
CapacityCommitmentId pulumi.StringPtrInput
// The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
CommitmentEndTime pulumi.StringPtrInput
// The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
CommitmentStartTime pulumi.StringPtrInput
// The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
Edition pulumi.StringPtrInput
// If true, fail the request if another project in the organization has a capacity commitment.
EnforceSingleAdminProjectPerOrg pulumi.StringPtrInput
// The geographic location where the transfer config should reside.
// Examples: US, EU, asia-northeast1. The default value is US.
Location pulumi.StringPtrInput
// The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
Name pulumi.StringPtrInput
// Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
//
// ***
Plan pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// The plan this capacity commitment is converted to after commitmentEndTime passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for some commitment plans.
RenewalPlan pulumi.StringPtrInput
// Number of slots in this commitment.
SlotCount pulumi.IntPtrInput
// State of the commitment
State pulumi.StringPtrInput
}
func (CapacityCommitmentState) ElementType() reflect.Type {
return reflect.TypeOf((*capacityCommitmentState)(nil)).Elem()
}
type capacityCommitmentArgs struct {
// The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is
// empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character
// cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split
// or merged.
CapacityCommitmentId *string `pulumi:"capacityCommitmentId"`
// The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
Edition *string `pulumi:"edition"`
// If true, fail the request if another project in the organization has a capacity commitment.
EnforceSingleAdminProjectPerOrg *string `pulumi:"enforceSingleAdminProjectPerOrg"`
// The geographic location where the transfer config should reside.
// Examples: US, EU, asia-northeast1. The default value is US.
Location *string `pulumi:"location"`
// Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
//
// ***
Plan string `pulumi:"plan"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// The plan this capacity commitment is converted to after commitmentEndTime passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for some commitment plans.
RenewalPlan *string `pulumi:"renewalPlan"`
// Number of slots in this commitment.
SlotCount int `pulumi:"slotCount"`
}
// The set of arguments for constructing a CapacityCommitment resource.
type CapacityCommitmentArgs struct {
// The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is
// empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character
// cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split
// or merged.
CapacityCommitmentId pulumi.StringPtrInput
// The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
Edition pulumi.StringPtrInput
// If true, fail the request if another project in the organization has a capacity commitment.
EnforceSingleAdminProjectPerOrg pulumi.StringPtrInput
// The geographic location where the transfer config should reside.
// Examples: US, EU, asia-northeast1. The default value is US.
Location pulumi.StringPtrInput
// Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
//
// ***
Plan pulumi.StringInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// The plan this capacity commitment is converted to after commitmentEndTime passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for some commitment plans.
RenewalPlan pulumi.StringPtrInput
// Number of slots in this commitment.
SlotCount pulumi.IntInput
}
func (CapacityCommitmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*capacityCommitmentArgs)(nil)).Elem()
}
type CapacityCommitmentInput interface {
pulumi.Input
ToCapacityCommitmentOutput() CapacityCommitmentOutput
ToCapacityCommitmentOutputWithContext(ctx context.Context) CapacityCommitmentOutput
}
func (*CapacityCommitment) ElementType() reflect.Type {
return reflect.TypeOf((**CapacityCommitment)(nil)).Elem()
}
func (i *CapacityCommitment) ToCapacityCommitmentOutput() CapacityCommitmentOutput {
return i.ToCapacityCommitmentOutputWithContext(context.Background())
}
func (i *CapacityCommitment) ToCapacityCommitmentOutputWithContext(ctx context.Context) CapacityCommitmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacityCommitmentOutput)
}
// CapacityCommitmentArrayInput is an input type that accepts CapacityCommitmentArray and CapacityCommitmentArrayOutput values.
// You can construct a concrete instance of `CapacityCommitmentArrayInput` via:
//
// CapacityCommitmentArray{ CapacityCommitmentArgs{...} }
type CapacityCommitmentArrayInput interface {
pulumi.Input
ToCapacityCommitmentArrayOutput() CapacityCommitmentArrayOutput
ToCapacityCommitmentArrayOutputWithContext(context.Context) CapacityCommitmentArrayOutput
}
type CapacityCommitmentArray []CapacityCommitmentInput
func (CapacityCommitmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CapacityCommitment)(nil)).Elem()
}
func (i CapacityCommitmentArray) ToCapacityCommitmentArrayOutput() CapacityCommitmentArrayOutput {
return i.ToCapacityCommitmentArrayOutputWithContext(context.Background())
}
func (i CapacityCommitmentArray) ToCapacityCommitmentArrayOutputWithContext(ctx context.Context) CapacityCommitmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacityCommitmentArrayOutput)
}
// CapacityCommitmentMapInput is an input type that accepts CapacityCommitmentMap and CapacityCommitmentMapOutput values.
// You can construct a concrete instance of `CapacityCommitmentMapInput` via:
//
// CapacityCommitmentMap{ "key": CapacityCommitmentArgs{...} }
type CapacityCommitmentMapInput interface {
pulumi.Input
ToCapacityCommitmentMapOutput() CapacityCommitmentMapOutput
ToCapacityCommitmentMapOutputWithContext(context.Context) CapacityCommitmentMapOutput
}
type CapacityCommitmentMap map[string]CapacityCommitmentInput
func (CapacityCommitmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CapacityCommitment)(nil)).Elem()
}
func (i CapacityCommitmentMap) ToCapacityCommitmentMapOutput() CapacityCommitmentMapOutput {
return i.ToCapacityCommitmentMapOutputWithContext(context.Background())
}
func (i CapacityCommitmentMap) ToCapacityCommitmentMapOutputWithContext(ctx context.Context) CapacityCommitmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacityCommitmentMapOutput)
}
type CapacityCommitmentOutput struct{ *pulumi.OutputState }
func (CapacityCommitmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CapacityCommitment)(nil)).Elem()
}
func (o CapacityCommitmentOutput) ToCapacityCommitmentOutput() CapacityCommitmentOutput {
return o
}
func (o CapacityCommitmentOutput) ToCapacityCommitmentOutputWithContext(ctx context.Context) CapacityCommitmentOutput {
return o
}
// The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is
// empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character
// cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split
// or merged.
func (o CapacityCommitmentOutput) CapacityCommitmentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringPtrOutput { return v.CapacityCommitmentId }).(pulumi.StringPtrOutput)
}
// The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
func (o CapacityCommitmentOutput) CommitmentEndTime() pulumi.StringOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringOutput { return v.CommitmentEndTime }).(pulumi.StringOutput)
}
// The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
func (o CapacityCommitmentOutput) CommitmentStartTime() pulumi.StringOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringOutput { return v.CommitmentStartTime }).(pulumi.StringOutput)
}
// The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
func (o CapacityCommitmentOutput) Edition() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringPtrOutput { return v.Edition }).(pulumi.StringPtrOutput)
}
// If true, fail the request if another project in the organization has a capacity commitment.
func (o CapacityCommitmentOutput) EnforceSingleAdminProjectPerOrg() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringPtrOutput { return v.EnforceSingleAdminProjectPerOrg }).(pulumi.StringPtrOutput)
}
// The geographic location where the transfer config should reside.
// Examples: US, EU, asia-northeast1. The default value is US.
func (o CapacityCommitmentOutput) Location() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringPtrOutput { return v.Location }).(pulumi.StringPtrOutput)
}
// The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
func (o CapacityCommitmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
//
// ***
func (o CapacityCommitmentOutput) Plan() pulumi.StringOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringOutput { return v.Plan }).(pulumi.StringOutput)
}
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
func (o CapacityCommitmentOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The plan this capacity commitment is converted to after commitmentEndTime passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for some commitment plans.
func (o CapacityCommitmentOutput) RenewalPlan() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringPtrOutput { return v.RenewalPlan }).(pulumi.StringPtrOutput)
}
// Number of slots in this commitment.
func (o CapacityCommitmentOutput) SlotCount() pulumi.IntOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.IntOutput { return v.SlotCount }).(pulumi.IntOutput)
}
// State of the commitment
func (o CapacityCommitmentOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *CapacityCommitment) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
type CapacityCommitmentArrayOutput struct{ *pulumi.OutputState }
func (CapacityCommitmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CapacityCommitment)(nil)).Elem()
}
func (o CapacityCommitmentArrayOutput) ToCapacityCommitmentArrayOutput() CapacityCommitmentArrayOutput {
return o
}
func (o CapacityCommitmentArrayOutput) ToCapacityCommitmentArrayOutputWithContext(ctx context.Context) CapacityCommitmentArrayOutput {
return o
}
func (o CapacityCommitmentArrayOutput) Index(i pulumi.IntInput) CapacityCommitmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CapacityCommitment {
return vs[0].([]*CapacityCommitment)[vs[1].(int)]
}).(CapacityCommitmentOutput)
}
type CapacityCommitmentMapOutput struct{ *pulumi.OutputState }
func (CapacityCommitmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CapacityCommitment)(nil)).Elem()
}
func (o CapacityCommitmentMapOutput) ToCapacityCommitmentMapOutput() CapacityCommitmentMapOutput {
return o
}
func (o CapacityCommitmentMapOutput) ToCapacityCommitmentMapOutputWithContext(ctx context.Context) CapacityCommitmentMapOutput {
return o
}
func (o CapacityCommitmentMapOutput) MapIndex(k pulumi.StringInput) CapacityCommitmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CapacityCommitment {
return vs[0].(map[string]*CapacityCommitment)[vs[1].(string)]
}).(CapacityCommitmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CapacityCommitmentInput)(nil)).Elem(), &CapacityCommitment{})
pulumi.RegisterInputType(reflect.TypeOf((*CapacityCommitmentArrayInput)(nil)).Elem(), CapacityCommitmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CapacityCommitmentMapInput)(nil)).Elem(), CapacityCommitmentMap{})
pulumi.RegisterOutputType(CapacityCommitmentOutput{})
pulumi.RegisterOutputType(CapacityCommitmentArrayOutput{})
pulumi.RegisterOutputType(CapacityCommitmentMapOutput{})
}