-
Notifications
You must be signed in to change notification settings - Fork 51
/
timeSeriesInsightsReferenceDataSet.go
177 lines (164 loc) · 9.39 KB
/
timeSeriesInsightsReferenceDataSet.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package iot
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Manages an Azure IoT Time Series Insights Reference Data Set.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/iot"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
// Location: pulumi.String("northeurope"),
// })
// if err != nil {
// return err
// }
// exampleTimeSeriesInsightsStandardEnvironment, err := iot.NewTimeSeriesInsightsStandardEnvironment(ctx, "exampleTimeSeriesInsightsStandardEnvironment", &iot.TimeSeriesInsightsStandardEnvironmentArgs{
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// SkuName: pulumi.String("S1_1"),
// DataRetentionTime: pulumi.String("P30D"),
// })
// if err != nil {
// return err
// }
// _, err = iot.NewTimeSeriesInsightsReferenceDataSet(ctx, "exampleTimeSeriesInsightsReferenceDataSet", &iot.TimeSeriesInsightsReferenceDataSetArgs{
// TimeSeriesInsightsEnvironmentId: exampleTimeSeriesInsightsStandardEnvironment.ID(),
// Location: exampleResourceGroup.Location,
// KeyProperties: iot.TimeSeriesInsightsReferenceDataSetKeyPropertyArray{
// &iot.TimeSeriesInsightsReferenceDataSetKeyPropertyArgs{
// Name: pulumi.String("keyProperty1"),
// Type: pulumi.String("String"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
type TimeSeriesInsightsReferenceDataSet struct {
pulumi.CustomResourceState
// The comparison behavior that will be used to compare keys. Valid values include `Ordinal` and `OrdinalIgnoreCase`. Defaults to `Ordinal`.
DataStringComparisonBehavior pulumi.StringPtrOutput `pulumi:"dataStringComparisonBehavior"`
// A `keyProperty` block as defined below.
KeyProperties TimeSeriesInsightsReferenceDataSetKeyPropertyArrayOutput `pulumi:"keyProperties"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringOutput `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
TimeSeriesInsightsEnvironmentId pulumi.StringOutput `pulumi:"timeSeriesInsightsEnvironmentId"`
}
// NewTimeSeriesInsightsReferenceDataSet registers a new resource with the given unique name, arguments, and options.
func NewTimeSeriesInsightsReferenceDataSet(ctx *pulumi.Context,
name string, args *TimeSeriesInsightsReferenceDataSetArgs, opts ...pulumi.ResourceOption) (*TimeSeriesInsightsReferenceDataSet, error) {
if args == nil || args.KeyProperties == nil {
return nil, errors.New("missing required argument 'KeyProperties'")
}
if args == nil || args.TimeSeriesInsightsEnvironmentId == nil {
return nil, errors.New("missing required argument 'TimeSeriesInsightsEnvironmentId'")
}
if args == nil {
args = &TimeSeriesInsightsReferenceDataSetArgs{}
}
var resource TimeSeriesInsightsReferenceDataSet
err := ctx.RegisterResource("azure:iot/timeSeriesInsightsReferenceDataSet:TimeSeriesInsightsReferenceDataSet", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTimeSeriesInsightsReferenceDataSet gets an existing TimeSeriesInsightsReferenceDataSet 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 GetTimeSeriesInsightsReferenceDataSet(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TimeSeriesInsightsReferenceDataSetState, opts ...pulumi.ResourceOption) (*TimeSeriesInsightsReferenceDataSet, error) {
var resource TimeSeriesInsightsReferenceDataSet
err := ctx.ReadResource("azure:iot/timeSeriesInsightsReferenceDataSet:TimeSeriesInsightsReferenceDataSet", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TimeSeriesInsightsReferenceDataSet resources.
type timeSeriesInsightsReferenceDataSetState struct {
// The comparison behavior that will be used to compare keys. Valid values include `Ordinal` and `OrdinalIgnoreCase`. Defaults to `Ordinal`.
DataStringComparisonBehavior *string `pulumi:"dataStringComparisonBehavior"`
// A `keyProperty` block as defined below.
KeyProperties []TimeSeriesInsightsReferenceDataSetKeyProperty `pulumi:"keyProperties"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. Must be globally unique.
Name *string `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
TimeSeriesInsightsEnvironmentId *string `pulumi:"timeSeriesInsightsEnvironmentId"`
}
type TimeSeriesInsightsReferenceDataSetState struct {
// The comparison behavior that will be used to compare keys. Valid values include `Ordinal` and `OrdinalIgnoreCase`. Defaults to `Ordinal`.
DataStringComparisonBehavior pulumi.StringPtrInput
// A `keyProperty` block as defined below.
KeyProperties TimeSeriesInsightsReferenceDataSetKeyPropertyArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
TimeSeriesInsightsEnvironmentId pulumi.StringPtrInput
}
func (TimeSeriesInsightsReferenceDataSetState) ElementType() reflect.Type {
return reflect.TypeOf((*timeSeriesInsightsReferenceDataSetState)(nil)).Elem()
}
type timeSeriesInsightsReferenceDataSetArgs struct {
// The comparison behavior that will be used to compare keys. Valid values include `Ordinal` and `OrdinalIgnoreCase`. Defaults to `Ordinal`.
DataStringComparisonBehavior *string `pulumi:"dataStringComparisonBehavior"`
// A `keyProperty` block as defined below.
KeyProperties []TimeSeriesInsightsReferenceDataSetKeyProperty `pulumi:"keyProperties"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. Must be globally unique.
Name *string `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
TimeSeriesInsightsEnvironmentId string `pulumi:"timeSeriesInsightsEnvironmentId"`
}
// The set of arguments for constructing a TimeSeriesInsightsReferenceDataSet resource.
type TimeSeriesInsightsReferenceDataSetArgs struct {
// The comparison behavior that will be used to compare keys. Valid values include `Ordinal` and `OrdinalIgnoreCase`. Defaults to `Ordinal`.
DataStringComparisonBehavior pulumi.StringPtrInput
// A `keyProperty` block as defined below.
KeyProperties TimeSeriesInsightsReferenceDataSetKeyPropertyArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created.
TimeSeriesInsightsEnvironmentId pulumi.StringInput
}
func (TimeSeriesInsightsReferenceDataSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*timeSeriesInsightsReferenceDataSetArgs)(nil)).Elem()
}