generated from pulumi/pulumi-tf-provider-boilerplate
/
metricExtension.go
577 lines (511 loc) · 29.6 KB
/
metricExtension.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
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
// 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 stackmonitoring
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 Metric Extension resource in Oracle Cloud Infrastructure Stack Monitoring service.
//
// # Creates a new metric extension resource for a given compartment
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/StackMonitoring"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := StackMonitoring.NewMetricExtension(ctx, "test_metric_extension", &StackMonitoring.MetricExtensionArgs{
// CollectionRecurrences: pulumi.Any(metricExtensionCollectionRecurrences),
// CompartmentId: pulumi.Any(compartmentId),
// DisplayName: pulumi.Any(metricExtensionDisplayName),
// MetricLists: stackmonitoring.MetricExtensionMetricListArray{
// &stackmonitoring.MetricExtensionMetricListArgs{
// DataType: pulumi.Any(metricExtensionMetricListDataType),
// Name: pulumi.Any(metricExtensionMetricListName),
// ComputeExpression: pulumi.Any(metricExtensionMetricListComputeExpression),
// DisplayName: pulumi.Any(metricExtensionMetricListDisplayName),
// IsDimension: pulumi.Any(metricExtensionMetricListIsDimension),
// IsHidden: pulumi.Any(metricExtensionMetricListIsHidden),
// MetricCategory: pulumi.Any(metricExtensionMetricListMetricCategory),
// Unit: pulumi.Any(metricExtensionMetricListUnit),
// },
// },
// Name: pulumi.Any(metricExtensionName),
// QueryProperties: &stackmonitoring.MetricExtensionQueryPropertiesArgs{
// CollectionMethod: pulumi.Any(metricExtensionQueryPropertiesCollectionMethod),
// Arguments: pulumi.Any(metricExtensionQueryPropertiesArguments),
// AutoRowPrefix: pulumi.Any(metricExtensionQueryPropertiesAutoRowPrefix),
// Command: pulumi.Any(metricExtensionQueryPropertiesCommand),
// Delimiter: pulumi.Any(metricExtensionQueryPropertiesDelimiter),
// IdentityMetric: pulumi.Any(metricExtensionQueryPropertiesIdentityMetric),
// InParamDetails: stackmonitoring.MetricExtensionQueryPropertiesInParamDetailArray{
// &stackmonitoring.MetricExtensionQueryPropertiesInParamDetailArgs{
// InParamPosition: pulumi.Any(metricExtensionQueryPropertiesInParamDetailsInParamPosition),
// InParamValue: pulumi.Any(metricExtensionQueryPropertiesInParamDetailsInParamValue),
// },
// },
// IsMetricServiceEnabled: pulumi.Any(metricExtensionQueryPropertiesIsMetricServiceEnabled),
// JmxAttributes: pulumi.Any(metricExtensionQueryPropertiesJmxAttributes),
// ManagedBeanQuery: pulumi.Any(metricExtensionQueryPropertiesManagedBeanQuery),
// OutParamDetails: &stackmonitoring.MetricExtensionQueryPropertiesOutParamDetailsArgs{
// OutParamPosition: pulumi.Any(metricExtensionQueryPropertiesOutParamDetailsOutParamPosition),
// OutParamType: pulumi.Any(metricExtensionQueryPropertiesOutParamDetailsOutParamType),
// },
// ScriptDetails: &stackmonitoring.MetricExtensionQueryPropertiesScriptDetailsArgs{
// Content: pulumi.Any(metricExtensionQueryPropertiesScriptDetailsContent),
// Name: pulumi.Any(metricExtensionQueryPropertiesScriptDetailsName),
// },
// SqlDetails: &stackmonitoring.MetricExtensionQueryPropertiesSqlDetailsArgs{
// Content: pulumi.Any(metricExtensionQueryPropertiesSqlDetailsContent),
// ScriptFileName: pulumi.Any(metricExtensionQueryPropertiesSqlDetailsScriptFileName),
// },
// SqlType: pulumi.Any(metricExtensionQueryPropertiesSqlType),
// StartsWith: pulumi.Any(metricExtensionQueryPropertiesStartsWith),
// },
// ResourceType: pulumi.Any(metricExtensionResourceType),
// Description: pulumi.Any(metricExtensionDescription),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// MetricExtensions can be imported using the `id`, e.g.
//
// ```sh
// $ pulumi import oci:StackMonitoring/metricExtension:MetricExtension test_metric_extension "id"
// ```
type MetricExtension struct {
pulumi.CustomResourceState
// (Updatable) Type of possible collection methods.
CollectionMethod pulumi.StringOutput `pulumi:"collectionMethod"`
// (Updatable) Schedule of metric extension should use RFC 5545 format i.e. recur-rule-part = "FREQ";INTERVAL where FREQ rule part identifies the type of recurrence rule. Valid values are "MINUTELY","HOURLY","DAILY" to specify repeating events based on an interval of a minute, an hour and a day or more. Example- FREQ=DAILY;INTERVAL=1
CollectionRecurrences pulumi.StringOutput `pulumi:"collectionRecurrences"`
// (Updatable) Compartment Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
CompartmentId pulumi.StringOutput `pulumi:"compartmentId"`
// Created by user
CreatedBy pulumi.StringOutput `pulumi:"createdBy"`
// (Updatable) Description of the metric extension.
Description pulumi.StringOutput `pulumi:"description"`
// (Updatable) Display name of the metric.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// List of resource objects on which this metric extension is enabled.
EnabledOnResources MetricExtensionEnabledOnResourceArrayOutput `pulumi:"enabledOnResources"`
// Count of resources on which this metric extension is enabled.
EnabledOnResourcesCount pulumi.IntOutput `pulumi:"enabledOnResourcesCount"`
// Last updated by user
LastUpdatedBy pulumi.StringOutput `pulumi:"lastUpdatedBy"`
// (Updatable) List of metrics which are part of this metric extension
MetricLists MetricExtensionMetricListArrayOutput `pulumi:"metricLists"`
// (Updatable) Name of the script file
Name pulumi.StringOutput `pulumi:"name"`
// (Updatable) An optional property when set to `true` triggers Publish of a metric extension. Once set to `true`, it cannot be changed back to `false`. Update of publishTrigger cannot be combined with other updates in the same request. A metric extension cannot be tested and its definition cannot be updated once it is marked published or publishTrigger is updated to `true`.
//
// ** 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
PublishTrigger pulumi.BoolPtrOutput `pulumi:"publishTrigger"`
// (Updatable) Collection method and query properties details of metric extension
QueryProperties MetricExtensionQueryPropertiesOutput `pulumi:"queryProperties"`
// Resource type to which Metric Extension applies
ResourceType pulumi.StringOutput `pulumi:"resourceType"`
// The URI path that the user can do a GET on to access the metric extension metadata
ResourceUri pulumi.StringOutput `pulumi:"resourceUri"`
// The current lifecycle state of the metric extension
State pulumi.StringOutput `pulumi:"state"`
// The current status of the metric extension i.e. whether it is Draft or Published
Status pulumi.StringOutput `pulumi:"status"`
// Tenant Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
TenantId pulumi.StringOutput `pulumi:"tenantId"`
// Metric Extension creation time. An RFC3339 formatted datetime string.
TimeCreated pulumi.StringOutput `pulumi:"timeCreated"`
// Metric Extension update time. An RFC3339 formatted datetime string.
TimeUpdated pulumi.StringOutput `pulumi:"timeUpdated"`
}
// NewMetricExtension registers a new resource with the given unique name, arguments, and options.
func NewMetricExtension(ctx *pulumi.Context,
name string, args *MetricExtensionArgs, opts ...pulumi.ResourceOption) (*MetricExtension, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CollectionRecurrences == nil {
return nil, errors.New("invalid value for required argument 'CollectionRecurrences'")
}
if args.CompartmentId == nil {
return nil, errors.New("invalid value for required argument 'CompartmentId'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.MetricLists == nil {
return nil, errors.New("invalid value for required argument 'MetricLists'")
}
if args.QueryProperties == nil {
return nil, errors.New("invalid value for required argument 'QueryProperties'")
}
if args.ResourceType == nil {
return nil, errors.New("invalid value for required argument 'ResourceType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource MetricExtension
err := ctx.RegisterResource("oci:StackMonitoring/metricExtension:MetricExtension", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMetricExtension gets an existing MetricExtension 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 GetMetricExtension(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MetricExtensionState, opts ...pulumi.ResourceOption) (*MetricExtension, error) {
var resource MetricExtension
err := ctx.ReadResource("oci:StackMonitoring/metricExtension:MetricExtension", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MetricExtension resources.
type metricExtensionState struct {
// (Updatable) Type of possible collection methods.
CollectionMethod *string `pulumi:"collectionMethod"`
// (Updatable) Schedule of metric extension should use RFC 5545 format i.e. recur-rule-part = "FREQ";INTERVAL where FREQ rule part identifies the type of recurrence rule. Valid values are "MINUTELY","HOURLY","DAILY" to specify repeating events based on an interval of a minute, an hour and a day or more. Example- FREQ=DAILY;INTERVAL=1
CollectionRecurrences *string `pulumi:"collectionRecurrences"`
// (Updatable) Compartment Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
CompartmentId *string `pulumi:"compartmentId"`
// Created by user
CreatedBy *string `pulumi:"createdBy"`
// (Updatable) Description of the metric extension.
Description *string `pulumi:"description"`
// (Updatable) Display name of the metric.
DisplayName *string `pulumi:"displayName"`
// List of resource objects on which this metric extension is enabled.
EnabledOnResources []MetricExtensionEnabledOnResource `pulumi:"enabledOnResources"`
// Count of resources on which this metric extension is enabled.
EnabledOnResourcesCount *int `pulumi:"enabledOnResourcesCount"`
// Last updated by user
LastUpdatedBy *string `pulumi:"lastUpdatedBy"`
// (Updatable) List of metrics which are part of this metric extension
MetricLists []MetricExtensionMetricList `pulumi:"metricLists"`
// (Updatable) Name of the script file
Name *string `pulumi:"name"`
// (Updatable) An optional property when set to `true` triggers Publish of a metric extension. Once set to `true`, it cannot be changed back to `false`. Update of publishTrigger cannot be combined with other updates in the same request. A metric extension cannot be tested and its definition cannot be updated once it is marked published or publishTrigger is updated to `true`.
//
// ** 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
PublishTrigger *bool `pulumi:"publishTrigger"`
// (Updatable) Collection method and query properties details of metric extension
QueryProperties *MetricExtensionQueryProperties `pulumi:"queryProperties"`
// Resource type to which Metric Extension applies
ResourceType *string `pulumi:"resourceType"`
// The URI path that the user can do a GET on to access the metric extension metadata
ResourceUri *string `pulumi:"resourceUri"`
// The current lifecycle state of the metric extension
State *string `pulumi:"state"`
// The current status of the metric extension i.e. whether it is Draft or Published
Status *string `pulumi:"status"`
// Tenant Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
TenantId *string `pulumi:"tenantId"`
// Metric Extension creation time. An RFC3339 formatted datetime string.
TimeCreated *string `pulumi:"timeCreated"`
// Metric Extension update time. An RFC3339 formatted datetime string.
TimeUpdated *string `pulumi:"timeUpdated"`
}
type MetricExtensionState struct {
// (Updatable) Type of possible collection methods.
CollectionMethod pulumi.StringPtrInput
// (Updatable) Schedule of metric extension should use RFC 5545 format i.e. recur-rule-part = "FREQ";INTERVAL where FREQ rule part identifies the type of recurrence rule. Valid values are "MINUTELY","HOURLY","DAILY" to specify repeating events based on an interval of a minute, an hour and a day or more. Example- FREQ=DAILY;INTERVAL=1
CollectionRecurrences pulumi.StringPtrInput
// (Updatable) Compartment Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
CompartmentId pulumi.StringPtrInput
// Created by user
CreatedBy pulumi.StringPtrInput
// (Updatable) Description of the metric extension.
Description pulumi.StringPtrInput
// (Updatable) Display name of the metric.
DisplayName pulumi.StringPtrInput
// List of resource objects on which this metric extension is enabled.
EnabledOnResources MetricExtensionEnabledOnResourceArrayInput
// Count of resources on which this metric extension is enabled.
EnabledOnResourcesCount pulumi.IntPtrInput
// Last updated by user
LastUpdatedBy pulumi.StringPtrInput
// (Updatable) List of metrics which are part of this metric extension
MetricLists MetricExtensionMetricListArrayInput
// (Updatable) Name of the script file
Name pulumi.StringPtrInput
// (Updatable) An optional property when set to `true` triggers Publish of a metric extension. Once set to `true`, it cannot be changed back to `false`. Update of publishTrigger cannot be combined with other updates in the same request. A metric extension cannot be tested and its definition cannot be updated once it is marked published or publishTrigger is updated to `true`.
//
// ** 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
PublishTrigger pulumi.BoolPtrInput
// (Updatable) Collection method and query properties details of metric extension
QueryProperties MetricExtensionQueryPropertiesPtrInput
// Resource type to which Metric Extension applies
ResourceType pulumi.StringPtrInput
// The URI path that the user can do a GET on to access the metric extension metadata
ResourceUri pulumi.StringPtrInput
// The current lifecycle state of the metric extension
State pulumi.StringPtrInput
// The current status of the metric extension i.e. whether it is Draft or Published
Status pulumi.StringPtrInput
// Tenant Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
TenantId pulumi.StringPtrInput
// Metric Extension creation time. An RFC3339 formatted datetime string.
TimeCreated pulumi.StringPtrInput
// Metric Extension update time. An RFC3339 formatted datetime string.
TimeUpdated pulumi.StringPtrInput
}
func (MetricExtensionState) ElementType() reflect.Type {
return reflect.TypeOf((*metricExtensionState)(nil)).Elem()
}
type metricExtensionArgs struct {
// (Updatable) Schedule of metric extension should use RFC 5545 format i.e. recur-rule-part = "FREQ";INTERVAL where FREQ rule part identifies the type of recurrence rule. Valid values are "MINUTELY","HOURLY","DAILY" to specify repeating events based on an interval of a minute, an hour and a day or more. Example- FREQ=DAILY;INTERVAL=1
CollectionRecurrences string `pulumi:"collectionRecurrences"`
// (Updatable) Compartment Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
CompartmentId string `pulumi:"compartmentId"`
// (Updatable) Description of the metric extension.
Description *string `pulumi:"description"`
// (Updatable) Display name of the metric.
DisplayName string `pulumi:"displayName"`
// (Updatable) List of metrics which are part of this metric extension
MetricLists []MetricExtensionMetricList `pulumi:"metricLists"`
// (Updatable) Name of the script file
Name *string `pulumi:"name"`
// (Updatable) An optional property when set to `true` triggers Publish of a metric extension. Once set to `true`, it cannot be changed back to `false`. Update of publishTrigger cannot be combined with other updates in the same request. A metric extension cannot be tested and its definition cannot be updated once it is marked published or publishTrigger is updated to `true`.
//
// ** 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
PublishTrigger *bool `pulumi:"publishTrigger"`
// (Updatable) Collection method and query properties details of metric extension
QueryProperties MetricExtensionQueryProperties `pulumi:"queryProperties"`
// Resource type to which Metric Extension applies
ResourceType string `pulumi:"resourceType"`
}
// The set of arguments for constructing a MetricExtension resource.
type MetricExtensionArgs struct {
// (Updatable) Schedule of metric extension should use RFC 5545 format i.e. recur-rule-part = "FREQ";INTERVAL where FREQ rule part identifies the type of recurrence rule. Valid values are "MINUTELY","HOURLY","DAILY" to specify repeating events based on an interval of a minute, an hour and a day or more. Example- FREQ=DAILY;INTERVAL=1
CollectionRecurrences pulumi.StringInput
// (Updatable) Compartment Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
CompartmentId pulumi.StringInput
// (Updatable) Description of the metric extension.
Description pulumi.StringPtrInput
// (Updatable) Display name of the metric.
DisplayName pulumi.StringInput
// (Updatable) List of metrics which are part of this metric extension
MetricLists MetricExtensionMetricListArrayInput
// (Updatable) Name of the script file
Name pulumi.StringPtrInput
// (Updatable) An optional property when set to `true` triggers Publish of a metric extension. Once set to `true`, it cannot be changed back to `false`. Update of publishTrigger cannot be combined with other updates in the same request. A metric extension cannot be tested and its definition cannot be updated once it is marked published or publishTrigger is updated to `true`.
//
// ** 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
PublishTrigger pulumi.BoolPtrInput
// (Updatable) Collection method and query properties details of metric extension
QueryProperties MetricExtensionQueryPropertiesInput
// Resource type to which Metric Extension applies
ResourceType pulumi.StringInput
}
func (MetricExtensionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*metricExtensionArgs)(nil)).Elem()
}
type MetricExtensionInput interface {
pulumi.Input
ToMetricExtensionOutput() MetricExtensionOutput
ToMetricExtensionOutputWithContext(ctx context.Context) MetricExtensionOutput
}
func (*MetricExtension) ElementType() reflect.Type {
return reflect.TypeOf((**MetricExtension)(nil)).Elem()
}
func (i *MetricExtension) ToMetricExtensionOutput() MetricExtensionOutput {
return i.ToMetricExtensionOutputWithContext(context.Background())
}
func (i *MetricExtension) ToMetricExtensionOutputWithContext(ctx context.Context) MetricExtensionOutput {
return pulumi.ToOutputWithContext(ctx, i).(MetricExtensionOutput)
}
// MetricExtensionArrayInput is an input type that accepts MetricExtensionArray and MetricExtensionArrayOutput values.
// You can construct a concrete instance of `MetricExtensionArrayInput` via:
//
// MetricExtensionArray{ MetricExtensionArgs{...} }
type MetricExtensionArrayInput interface {
pulumi.Input
ToMetricExtensionArrayOutput() MetricExtensionArrayOutput
ToMetricExtensionArrayOutputWithContext(context.Context) MetricExtensionArrayOutput
}
type MetricExtensionArray []MetricExtensionInput
func (MetricExtensionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MetricExtension)(nil)).Elem()
}
func (i MetricExtensionArray) ToMetricExtensionArrayOutput() MetricExtensionArrayOutput {
return i.ToMetricExtensionArrayOutputWithContext(context.Background())
}
func (i MetricExtensionArray) ToMetricExtensionArrayOutputWithContext(ctx context.Context) MetricExtensionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MetricExtensionArrayOutput)
}
// MetricExtensionMapInput is an input type that accepts MetricExtensionMap and MetricExtensionMapOutput values.
// You can construct a concrete instance of `MetricExtensionMapInput` via:
//
// MetricExtensionMap{ "key": MetricExtensionArgs{...} }
type MetricExtensionMapInput interface {
pulumi.Input
ToMetricExtensionMapOutput() MetricExtensionMapOutput
ToMetricExtensionMapOutputWithContext(context.Context) MetricExtensionMapOutput
}
type MetricExtensionMap map[string]MetricExtensionInput
func (MetricExtensionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MetricExtension)(nil)).Elem()
}
func (i MetricExtensionMap) ToMetricExtensionMapOutput() MetricExtensionMapOutput {
return i.ToMetricExtensionMapOutputWithContext(context.Background())
}
func (i MetricExtensionMap) ToMetricExtensionMapOutputWithContext(ctx context.Context) MetricExtensionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MetricExtensionMapOutput)
}
type MetricExtensionOutput struct{ *pulumi.OutputState }
func (MetricExtensionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MetricExtension)(nil)).Elem()
}
func (o MetricExtensionOutput) ToMetricExtensionOutput() MetricExtensionOutput {
return o
}
func (o MetricExtensionOutput) ToMetricExtensionOutputWithContext(ctx context.Context) MetricExtensionOutput {
return o
}
// (Updatable) Type of possible collection methods.
func (o MetricExtensionOutput) CollectionMethod() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.CollectionMethod }).(pulumi.StringOutput)
}
// (Updatable) Schedule of metric extension should use RFC 5545 format i.e. recur-rule-part = "FREQ";INTERVAL where FREQ rule part identifies the type of recurrence rule. Valid values are "MINUTELY","HOURLY","DAILY" to specify repeating events based on an interval of a minute, an hour and a day or more. Example- FREQ=DAILY;INTERVAL=1
func (o MetricExtensionOutput) CollectionRecurrences() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.CollectionRecurrences }).(pulumi.StringOutput)
}
// (Updatable) Compartment Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
func (o MetricExtensionOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.CompartmentId }).(pulumi.StringOutput)
}
// Created by user
func (o MetricExtensionOutput) CreatedBy() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.CreatedBy }).(pulumi.StringOutput)
}
// (Updatable) Description of the metric extension.
func (o MetricExtensionOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// (Updatable) Display name of the metric.
func (o MetricExtensionOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// List of resource objects on which this metric extension is enabled.
func (o MetricExtensionOutput) EnabledOnResources() MetricExtensionEnabledOnResourceArrayOutput {
return o.ApplyT(func(v *MetricExtension) MetricExtensionEnabledOnResourceArrayOutput { return v.EnabledOnResources }).(MetricExtensionEnabledOnResourceArrayOutput)
}
// Count of resources on which this metric extension is enabled.
func (o MetricExtensionOutput) EnabledOnResourcesCount() pulumi.IntOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.IntOutput { return v.EnabledOnResourcesCount }).(pulumi.IntOutput)
}
// Last updated by user
func (o MetricExtensionOutput) LastUpdatedBy() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.LastUpdatedBy }).(pulumi.StringOutput)
}
// (Updatable) List of metrics which are part of this metric extension
func (o MetricExtensionOutput) MetricLists() MetricExtensionMetricListArrayOutput {
return o.ApplyT(func(v *MetricExtension) MetricExtensionMetricListArrayOutput { return v.MetricLists }).(MetricExtensionMetricListArrayOutput)
}
// (Updatable) Name of the script file
func (o MetricExtensionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// (Updatable) An optional property when set to `true` triggers Publish of a metric extension. Once set to `true`, it cannot be changed back to `false`. Update of publishTrigger cannot be combined with other updates in the same request. A metric extension cannot be tested and its definition cannot be updated once it is marked published or publishTrigger is updated to `true`.
//
// ** 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 MetricExtensionOutput) PublishTrigger() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.BoolPtrOutput { return v.PublishTrigger }).(pulumi.BoolPtrOutput)
}
// (Updatable) Collection method and query properties details of metric extension
func (o MetricExtensionOutput) QueryProperties() MetricExtensionQueryPropertiesOutput {
return o.ApplyT(func(v *MetricExtension) MetricExtensionQueryPropertiesOutput { return v.QueryProperties }).(MetricExtensionQueryPropertiesOutput)
}
// Resource type to which Metric Extension applies
func (o MetricExtensionOutput) ResourceType() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.ResourceType }).(pulumi.StringOutput)
}
// The URI path that the user can do a GET on to access the metric extension metadata
func (o MetricExtensionOutput) ResourceUri() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.ResourceUri }).(pulumi.StringOutput)
}
// The current lifecycle state of the metric extension
func (o MetricExtensionOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// The current status of the metric extension i.e. whether it is Draft or Published
func (o MetricExtensionOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// Tenant Identifier [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
func (o MetricExtensionOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput)
}
// Metric Extension creation time. An RFC3339 formatted datetime string.
func (o MetricExtensionOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.TimeCreated }).(pulumi.StringOutput)
}
// Metric Extension update time. An RFC3339 formatted datetime string.
func (o MetricExtensionOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v *MetricExtension) pulumi.StringOutput { return v.TimeUpdated }).(pulumi.StringOutput)
}
type MetricExtensionArrayOutput struct{ *pulumi.OutputState }
func (MetricExtensionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MetricExtension)(nil)).Elem()
}
func (o MetricExtensionArrayOutput) ToMetricExtensionArrayOutput() MetricExtensionArrayOutput {
return o
}
func (o MetricExtensionArrayOutput) ToMetricExtensionArrayOutputWithContext(ctx context.Context) MetricExtensionArrayOutput {
return o
}
func (o MetricExtensionArrayOutput) Index(i pulumi.IntInput) MetricExtensionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MetricExtension {
return vs[0].([]*MetricExtension)[vs[1].(int)]
}).(MetricExtensionOutput)
}
type MetricExtensionMapOutput struct{ *pulumi.OutputState }
func (MetricExtensionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MetricExtension)(nil)).Elem()
}
func (o MetricExtensionMapOutput) ToMetricExtensionMapOutput() MetricExtensionMapOutput {
return o
}
func (o MetricExtensionMapOutput) ToMetricExtensionMapOutputWithContext(ctx context.Context) MetricExtensionMapOutput {
return o
}
func (o MetricExtensionMapOutput) MapIndex(k pulumi.StringInput) MetricExtensionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MetricExtension {
return vs[0].(map[string]*MetricExtension)[vs[1].(string)]
}).(MetricExtensionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MetricExtensionInput)(nil)).Elem(), &MetricExtension{})
pulumi.RegisterInputType(reflect.TypeOf((*MetricExtensionArrayInput)(nil)).Elem(), MetricExtensionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MetricExtensionMapInput)(nil)).Elem(), MetricExtensionMap{})
pulumi.RegisterOutputType(MetricExtensionOutput{})
pulumi.RegisterOutputType(MetricExtensionArrayOutput{})
pulumi.RegisterOutputType(MetricExtensionMapOutput{})
}