/
squotaPreference.go
513 lines (454 loc) · 27.5 KB
/
squotaPreference.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
// 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 cloudquota
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// QuotaPreference represents the preferred quota configuration specified for a project, folder or organization. There is only one QuotaPreference resource for a quota value targeting a unique set of dimensions.
//
// To get more information about QuotaPreference, see:
//
// * [API documentation](https://cloud.google.com/docs/quotas/reference/rest/v1/projects.locations.quotaPreferences)
// * How-to Guides
// - [Cloud Quotas Overview](https://cloud.google.com/docs/quotas/overview)
//
// ## Example Usage
//
// ### Cloudquotas Quota Preference Basic
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudquota"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := cloudquota.NewSQuotaPreference(ctx, "preference", &cloudquota.SQuotaPreferenceArgs{
// Parent: pulumi.String("projects/my-project-name"),
// Name: pulumi.String("compute_googleapis_com-CPUS-per-project_us-east1"),
// Dimensions: pulumi.StringMap{
// "region": pulumi.String("us-east1"),
// },
// Service: pulumi.String("compute.googleapis.com"),
// QuotaId: pulumi.String("CPUS-per-project-region"),
// ContactEmail: pulumi.String("testuser@gmail.com"),
// QuotaConfig: &cloudquota.SQuotaPreferenceQuotaConfigArgs{
// PreferredValue: pulumi.String("200"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// QuotaPreference can be imported using any of these accepted formats:
//
// * `{{parent}}/locations/global/quotaPreferences/{{name}}`
//
// When using the `pulumi import` command, QuotaPreference can be imported using one of the formats above. For example:
//
// ```sh
// $ pulumi import gcp:cloudquota/sQuotaPreference:SQuotaPreference default {{parent}}/locations/global/quotaPreferences/{{name}}
// ```
type SQuotaPreference struct {
pulumi.CustomResourceState
// An email address that can be used for quota related communication between the Google Cloud and the user in case the
// Google Cloud needs further information to make a decision on whether the user preferred quota can be granted. The Google
// account for the email address must have quota update permission for the project, folder or organization this quota
// preference is for.
ContactEmail pulumi.StringPtrOutput `pulumi:"contactEmail"`
// Create time stamp.
// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as
// "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from
// the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota
// preferences configured for the specific value. NOTE: QuotaPreferences can only be applied across all values of "user"
// and "resource" dimension. Do not set values for "user" or "resource" in the dimension map. Example: '{"provider": "Foo
// Inc"}' where "provider" is a service specific dimension.
Dimensions pulumi.StringMapOutput `pulumi:"dimensions"`
// The current etag of the quota preference. If an etag is provided on update and does not match the current server's etag of the quota preference, the request will be blocked and an ABORTED error will be returned. See https://google.aip.dev/134#etags for more details on etags.
Etag pulumi.StringOutput `pulumi:"etag"`
// The list of quota safety checks to be ignored. Default value: "QUOTA_SAFETY_CHECK_UNSPECIFIED" Possible values:
// ["QUOTA_SAFETY_CHECK_UNSPECIFIED", "QUOTA_DECREASE_BELOW_USAGE", "QUOTA_DECREASE_PERCENTAGE_TOO_HIGH"]
IgnoreSafetyChecks pulumi.StringPtrOutput `pulumi:"ignoreSafetyChecks"`
// The reason / justification for this quota preference.
Justification pulumi.StringPtrOutput `pulumi:"justification"`
// The resource name of the quota preference. Required except in the CREATE requests.
Name pulumi.StringOutput `pulumi:"name"`
// The parent of the quota preference. Allowed parents are "projects/[project-id / number]" or "folders/[folder-id / number]" or "organizations/[org-id / number]".
Parent pulumi.StringOutput `pulumi:"parent"`
// The preferred quota configuration.
// Structure is documented below.
QuotaConfig SQuotaPreferenceQuotaConfigOutput `pulumi:"quotaConfig"`
// The id of the quota to which the quota preference is applied. A quota id is unique in the service.
// Example: `CPUS-per-project-region`.
QuotaId pulumi.StringOutput `pulumi:"quotaId"`
// Is the quota preference pending Google Cloud approval and fulfillment.
Reconciling pulumi.BoolOutput `pulumi:"reconciling"`
// The name of the service to which the quota preference is applied.
Service pulumi.StringOutput `pulumi:"service"`
// Update time stamp.
// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}
// NewSQuotaPreference registers a new resource with the given unique name, arguments, and options.
func NewSQuotaPreference(ctx *pulumi.Context,
name string, args *SQuotaPreferenceArgs, opts ...pulumi.ResourceOption) (*SQuotaPreference, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.QuotaConfig == nil {
return nil, errors.New("invalid value for required argument 'QuotaConfig'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SQuotaPreference
err := ctx.RegisterResource("gcp:cloudquota/sQuotaPreference:SQuotaPreference", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSQuotaPreference gets an existing SQuotaPreference 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 GetSQuotaPreference(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SQuotaPreferenceState, opts ...pulumi.ResourceOption) (*SQuotaPreference, error) {
var resource SQuotaPreference
err := ctx.ReadResource("gcp:cloudquota/sQuotaPreference:SQuotaPreference", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SQuotaPreference resources.
type squotaPreferenceState struct {
// An email address that can be used for quota related communication between the Google Cloud and the user in case the
// Google Cloud needs further information to make a decision on whether the user preferred quota can be granted. The Google
// account for the email address must have quota update permission for the project, folder or organization this quota
// preference is for.
ContactEmail *string `pulumi:"contactEmail"`
// Create time stamp.
// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`.
CreateTime *string `pulumi:"createTime"`
// The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as
// "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from
// the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota
// preferences configured for the specific value. NOTE: QuotaPreferences can only be applied across all values of "user"
// and "resource" dimension. Do not set values for "user" or "resource" in the dimension map. Example: '{"provider": "Foo
// Inc"}' where "provider" is a service specific dimension.
Dimensions map[string]string `pulumi:"dimensions"`
// The current etag of the quota preference. If an etag is provided on update and does not match the current server's etag of the quota preference, the request will be blocked and an ABORTED error will be returned. See https://google.aip.dev/134#etags for more details on etags.
Etag *string `pulumi:"etag"`
// The list of quota safety checks to be ignored. Default value: "QUOTA_SAFETY_CHECK_UNSPECIFIED" Possible values:
// ["QUOTA_SAFETY_CHECK_UNSPECIFIED", "QUOTA_DECREASE_BELOW_USAGE", "QUOTA_DECREASE_PERCENTAGE_TOO_HIGH"]
IgnoreSafetyChecks *string `pulumi:"ignoreSafetyChecks"`
// The reason / justification for this quota preference.
Justification *string `pulumi:"justification"`
// The resource name of the quota preference. Required except in the CREATE requests.
Name *string `pulumi:"name"`
// The parent of the quota preference. Allowed parents are "projects/[project-id / number]" or "folders/[folder-id / number]" or "organizations/[org-id / number]".
Parent *string `pulumi:"parent"`
// The preferred quota configuration.
// Structure is documented below.
QuotaConfig *SQuotaPreferenceQuotaConfig `pulumi:"quotaConfig"`
// The id of the quota to which the quota preference is applied. A quota id is unique in the service.
// Example: `CPUS-per-project-region`.
QuotaId *string `pulumi:"quotaId"`
// Is the quota preference pending Google Cloud approval and fulfillment.
Reconciling *bool `pulumi:"reconciling"`
// The name of the service to which the quota preference is applied.
Service *string `pulumi:"service"`
// Update time stamp.
// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`.
UpdateTime *string `pulumi:"updateTime"`
}
type SQuotaPreferenceState struct {
// An email address that can be used for quota related communication between the Google Cloud and the user in case the
// Google Cloud needs further information to make a decision on whether the user preferred quota can be granted. The Google
// account for the email address must have quota update permission for the project, folder or organization this quota
// preference is for.
ContactEmail pulumi.StringPtrInput
// Create time stamp.
// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`.
CreateTime pulumi.StringPtrInput
// The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as
// "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from
// the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota
// preferences configured for the specific value. NOTE: QuotaPreferences can only be applied across all values of "user"
// and "resource" dimension. Do not set values for "user" or "resource" in the dimension map. Example: '{"provider": "Foo
// Inc"}' where "provider" is a service specific dimension.
Dimensions pulumi.StringMapInput
// The current etag of the quota preference. If an etag is provided on update and does not match the current server's etag of the quota preference, the request will be blocked and an ABORTED error will be returned. See https://google.aip.dev/134#etags for more details on etags.
Etag pulumi.StringPtrInput
// The list of quota safety checks to be ignored. Default value: "QUOTA_SAFETY_CHECK_UNSPECIFIED" Possible values:
// ["QUOTA_SAFETY_CHECK_UNSPECIFIED", "QUOTA_DECREASE_BELOW_USAGE", "QUOTA_DECREASE_PERCENTAGE_TOO_HIGH"]
IgnoreSafetyChecks pulumi.StringPtrInput
// The reason / justification for this quota preference.
Justification pulumi.StringPtrInput
// The resource name of the quota preference. Required except in the CREATE requests.
Name pulumi.StringPtrInput
// The parent of the quota preference. Allowed parents are "projects/[project-id / number]" or "folders/[folder-id / number]" or "organizations/[org-id / number]".
Parent pulumi.StringPtrInput
// The preferred quota configuration.
// Structure is documented below.
QuotaConfig SQuotaPreferenceQuotaConfigPtrInput
// The id of the quota to which the quota preference is applied. A quota id is unique in the service.
// Example: `CPUS-per-project-region`.
QuotaId pulumi.StringPtrInput
// Is the quota preference pending Google Cloud approval and fulfillment.
Reconciling pulumi.BoolPtrInput
// The name of the service to which the quota preference is applied.
Service pulumi.StringPtrInput
// Update time stamp.
// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`.
UpdateTime pulumi.StringPtrInput
}
func (SQuotaPreferenceState) ElementType() reflect.Type {
return reflect.TypeOf((*squotaPreferenceState)(nil)).Elem()
}
type squotaPreferenceArgs struct {
// An email address that can be used for quota related communication between the Google Cloud and the user in case the
// Google Cloud needs further information to make a decision on whether the user preferred quota can be granted. The Google
// account for the email address must have quota update permission for the project, folder or organization this quota
// preference is for.
ContactEmail *string `pulumi:"contactEmail"`
// The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as
// "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from
// the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota
// preferences configured for the specific value. NOTE: QuotaPreferences can only be applied across all values of "user"
// and "resource" dimension. Do not set values for "user" or "resource" in the dimension map. Example: '{"provider": "Foo
// Inc"}' where "provider" is a service specific dimension.
Dimensions map[string]string `pulumi:"dimensions"`
// The list of quota safety checks to be ignored. Default value: "QUOTA_SAFETY_CHECK_UNSPECIFIED" Possible values:
// ["QUOTA_SAFETY_CHECK_UNSPECIFIED", "QUOTA_DECREASE_BELOW_USAGE", "QUOTA_DECREASE_PERCENTAGE_TOO_HIGH"]
IgnoreSafetyChecks *string `pulumi:"ignoreSafetyChecks"`
// The reason / justification for this quota preference.
Justification *string `pulumi:"justification"`
// The resource name of the quota preference. Required except in the CREATE requests.
Name *string `pulumi:"name"`
// The parent of the quota preference. Allowed parents are "projects/[project-id / number]" or "folders/[folder-id / number]" or "organizations/[org-id / number]".
Parent *string `pulumi:"parent"`
// The preferred quota configuration.
// Structure is documented below.
QuotaConfig SQuotaPreferenceQuotaConfig `pulumi:"quotaConfig"`
// The id of the quota to which the quota preference is applied. A quota id is unique in the service.
// Example: `CPUS-per-project-region`.
QuotaId *string `pulumi:"quotaId"`
// The name of the service to which the quota preference is applied.
Service *string `pulumi:"service"`
}
// The set of arguments for constructing a SQuotaPreference resource.
type SQuotaPreferenceArgs struct {
// An email address that can be used for quota related communication between the Google Cloud and the user in case the
// Google Cloud needs further information to make a decision on whether the user preferred quota can be granted. The Google
// account for the email address must have quota update permission for the project, folder or organization this quota
// preference is for.
ContactEmail pulumi.StringPtrInput
// The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as
// "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from
// the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota
// preferences configured for the specific value. NOTE: QuotaPreferences can only be applied across all values of "user"
// and "resource" dimension. Do not set values for "user" or "resource" in the dimension map. Example: '{"provider": "Foo
// Inc"}' where "provider" is a service specific dimension.
Dimensions pulumi.StringMapInput
// The list of quota safety checks to be ignored. Default value: "QUOTA_SAFETY_CHECK_UNSPECIFIED" Possible values:
// ["QUOTA_SAFETY_CHECK_UNSPECIFIED", "QUOTA_DECREASE_BELOW_USAGE", "QUOTA_DECREASE_PERCENTAGE_TOO_HIGH"]
IgnoreSafetyChecks pulumi.StringPtrInput
// The reason / justification for this quota preference.
Justification pulumi.StringPtrInput
// The resource name of the quota preference. Required except in the CREATE requests.
Name pulumi.StringPtrInput
// The parent of the quota preference. Allowed parents are "projects/[project-id / number]" or "folders/[folder-id / number]" or "organizations/[org-id / number]".
Parent pulumi.StringPtrInput
// The preferred quota configuration.
// Structure is documented below.
QuotaConfig SQuotaPreferenceQuotaConfigInput
// The id of the quota to which the quota preference is applied. A quota id is unique in the service.
// Example: `CPUS-per-project-region`.
QuotaId pulumi.StringPtrInput
// The name of the service to which the quota preference is applied.
Service pulumi.StringPtrInput
}
func (SQuotaPreferenceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*squotaPreferenceArgs)(nil)).Elem()
}
type SQuotaPreferenceInput interface {
pulumi.Input
ToSQuotaPreferenceOutput() SQuotaPreferenceOutput
ToSQuotaPreferenceOutputWithContext(ctx context.Context) SQuotaPreferenceOutput
}
func (*SQuotaPreference) ElementType() reflect.Type {
return reflect.TypeOf((**SQuotaPreference)(nil)).Elem()
}
func (i *SQuotaPreference) ToSQuotaPreferenceOutput() SQuotaPreferenceOutput {
return i.ToSQuotaPreferenceOutputWithContext(context.Background())
}
func (i *SQuotaPreference) ToSQuotaPreferenceOutputWithContext(ctx context.Context) SQuotaPreferenceOutput {
return pulumi.ToOutputWithContext(ctx, i).(SQuotaPreferenceOutput)
}
// SQuotaPreferenceArrayInput is an input type that accepts SQuotaPreferenceArray and SQuotaPreferenceArrayOutput values.
// You can construct a concrete instance of `SQuotaPreferenceArrayInput` via:
//
// SQuotaPreferenceArray{ SQuotaPreferenceArgs{...} }
type SQuotaPreferenceArrayInput interface {
pulumi.Input
ToSQuotaPreferenceArrayOutput() SQuotaPreferenceArrayOutput
ToSQuotaPreferenceArrayOutputWithContext(context.Context) SQuotaPreferenceArrayOutput
}
type SQuotaPreferenceArray []SQuotaPreferenceInput
func (SQuotaPreferenceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SQuotaPreference)(nil)).Elem()
}
func (i SQuotaPreferenceArray) ToSQuotaPreferenceArrayOutput() SQuotaPreferenceArrayOutput {
return i.ToSQuotaPreferenceArrayOutputWithContext(context.Background())
}
func (i SQuotaPreferenceArray) ToSQuotaPreferenceArrayOutputWithContext(ctx context.Context) SQuotaPreferenceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SQuotaPreferenceArrayOutput)
}
// SQuotaPreferenceMapInput is an input type that accepts SQuotaPreferenceMap and SQuotaPreferenceMapOutput values.
// You can construct a concrete instance of `SQuotaPreferenceMapInput` via:
//
// SQuotaPreferenceMap{ "key": SQuotaPreferenceArgs{...} }
type SQuotaPreferenceMapInput interface {
pulumi.Input
ToSQuotaPreferenceMapOutput() SQuotaPreferenceMapOutput
ToSQuotaPreferenceMapOutputWithContext(context.Context) SQuotaPreferenceMapOutput
}
type SQuotaPreferenceMap map[string]SQuotaPreferenceInput
func (SQuotaPreferenceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SQuotaPreference)(nil)).Elem()
}
func (i SQuotaPreferenceMap) ToSQuotaPreferenceMapOutput() SQuotaPreferenceMapOutput {
return i.ToSQuotaPreferenceMapOutputWithContext(context.Background())
}
func (i SQuotaPreferenceMap) ToSQuotaPreferenceMapOutputWithContext(ctx context.Context) SQuotaPreferenceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SQuotaPreferenceMapOutput)
}
type SQuotaPreferenceOutput struct{ *pulumi.OutputState }
func (SQuotaPreferenceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SQuotaPreference)(nil)).Elem()
}
func (o SQuotaPreferenceOutput) ToSQuotaPreferenceOutput() SQuotaPreferenceOutput {
return o
}
func (o SQuotaPreferenceOutput) ToSQuotaPreferenceOutputWithContext(ctx context.Context) SQuotaPreferenceOutput {
return o
}
// An email address that can be used for quota related communication between the Google Cloud and the user in case the
// Google Cloud needs further information to make a decision on whether the user preferred quota can be granted. The Google
// account for the email address must have quota update permission for the project, folder or organization this quota
// preference is for.
func (o SQuotaPreferenceOutput) ContactEmail() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringPtrOutput { return v.ContactEmail }).(pulumi.StringPtrOutput)
}
// Create time stamp.
// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`.
func (o SQuotaPreferenceOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as
// "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from
// the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota
// preferences configured for the specific value. NOTE: QuotaPreferences can only be applied across all values of "user"
// and "resource" dimension. Do not set values for "user" or "resource" in the dimension map. Example: '{"provider": "Foo
// Inc"}' where "provider" is a service specific dimension.
func (o SQuotaPreferenceOutput) Dimensions() pulumi.StringMapOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringMapOutput { return v.Dimensions }).(pulumi.StringMapOutput)
}
// The current etag of the quota preference. If an etag is provided on update and does not match the current server's etag of the quota preference, the request will be blocked and an ABORTED error will be returned. See https://google.aip.dev/134#etags for more details on etags.
func (o SQuotaPreferenceOutput) Etag() pulumi.StringOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput)
}
// The list of quota safety checks to be ignored. Default value: "QUOTA_SAFETY_CHECK_UNSPECIFIED" Possible values:
// ["QUOTA_SAFETY_CHECK_UNSPECIFIED", "QUOTA_DECREASE_BELOW_USAGE", "QUOTA_DECREASE_PERCENTAGE_TOO_HIGH"]
func (o SQuotaPreferenceOutput) IgnoreSafetyChecks() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringPtrOutput { return v.IgnoreSafetyChecks }).(pulumi.StringPtrOutput)
}
// The reason / justification for this quota preference.
func (o SQuotaPreferenceOutput) Justification() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringPtrOutput { return v.Justification }).(pulumi.StringPtrOutput)
}
// The resource name of the quota preference. Required except in the CREATE requests.
func (o SQuotaPreferenceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The parent of the quota preference. Allowed parents are "projects/[project-id / number]" or "folders/[folder-id / number]" or "organizations/[org-id / number]".
func (o SQuotaPreferenceOutput) Parent() pulumi.StringOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringOutput { return v.Parent }).(pulumi.StringOutput)
}
// The preferred quota configuration.
// Structure is documented below.
func (o SQuotaPreferenceOutput) QuotaConfig() SQuotaPreferenceQuotaConfigOutput {
return o.ApplyT(func(v *SQuotaPreference) SQuotaPreferenceQuotaConfigOutput { return v.QuotaConfig }).(SQuotaPreferenceQuotaConfigOutput)
}
// The id of the quota to which the quota preference is applied. A quota id is unique in the service.
// Example: `CPUS-per-project-region`.
func (o SQuotaPreferenceOutput) QuotaId() pulumi.StringOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringOutput { return v.QuotaId }).(pulumi.StringOutput)
}
// Is the quota preference pending Google Cloud approval and fulfillment.
func (o SQuotaPreferenceOutput) Reconciling() pulumi.BoolOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.BoolOutput { return v.Reconciling }).(pulumi.BoolOutput)
}
// The name of the service to which the quota preference is applied.
func (o SQuotaPreferenceOutput) Service() pulumi.StringOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringOutput { return v.Service }).(pulumi.StringOutput)
}
// Update time stamp.
// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `2014-10-02T15:01:23Z` and `2014-10-02T15:01:23.045123456Z`.
func (o SQuotaPreferenceOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *SQuotaPreference) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
type SQuotaPreferenceArrayOutput struct{ *pulumi.OutputState }
func (SQuotaPreferenceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SQuotaPreference)(nil)).Elem()
}
func (o SQuotaPreferenceArrayOutput) ToSQuotaPreferenceArrayOutput() SQuotaPreferenceArrayOutput {
return o
}
func (o SQuotaPreferenceArrayOutput) ToSQuotaPreferenceArrayOutputWithContext(ctx context.Context) SQuotaPreferenceArrayOutput {
return o
}
func (o SQuotaPreferenceArrayOutput) Index(i pulumi.IntInput) SQuotaPreferenceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SQuotaPreference {
return vs[0].([]*SQuotaPreference)[vs[1].(int)]
}).(SQuotaPreferenceOutput)
}
type SQuotaPreferenceMapOutput struct{ *pulumi.OutputState }
func (SQuotaPreferenceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SQuotaPreference)(nil)).Elem()
}
func (o SQuotaPreferenceMapOutput) ToSQuotaPreferenceMapOutput() SQuotaPreferenceMapOutput {
return o
}
func (o SQuotaPreferenceMapOutput) ToSQuotaPreferenceMapOutputWithContext(ctx context.Context) SQuotaPreferenceMapOutput {
return o
}
func (o SQuotaPreferenceMapOutput) MapIndex(k pulumi.StringInput) SQuotaPreferenceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SQuotaPreference {
return vs[0].(map[string]*SQuotaPreference)[vs[1].(string)]
}).(SQuotaPreferenceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SQuotaPreferenceInput)(nil)).Elem(), &SQuotaPreference{})
pulumi.RegisterInputType(reflect.TypeOf((*SQuotaPreferenceArrayInput)(nil)).Elem(), SQuotaPreferenceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SQuotaPreferenceMapInput)(nil)).Elem(), SQuotaPreferenceMap{})
pulumi.RegisterOutputType(SQuotaPreferenceOutput{})
pulumi.RegisterOutputType(SQuotaPreferenceArrayOutput{})
pulumi.RegisterOutputType(SQuotaPreferenceMapOutput{})
}