-
Notifications
You must be signed in to change notification settings - Fork 50
/
mLServicesCluster.go
227 lines (205 loc) · 9.53 KB
/
mLServicesCluster.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
// *** 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 hdinsight
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages a HDInsight ML Services Cluster.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/hdinsight_ml_services_cluster.html.markdown.
type MLServicesCluster struct {
s *pulumi.ResourceState
}
// NewMLServicesCluster registers a new resource with the given unique name, arguments, and options.
func NewMLServicesCluster(ctx *pulumi.Context,
name string, args *MLServicesClusterArgs, opts ...pulumi.ResourceOpt) (*MLServicesCluster, error) {
if args == nil || args.ClusterVersion == nil {
return nil, errors.New("missing required argument 'ClusterVersion'")
}
if args == nil || args.Gateway == nil {
return nil, errors.New("missing required argument 'Gateway'")
}
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil || args.Roles == nil {
return nil, errors.New("missing required argument 'Roles'")
}
if args == nil || args.Rstudio == nil {
return nil, errors.New("missing required argument 'Rstudio'")
}
if args == nil || args.Tier == nil {
return nil, errors.New("missing required argument 'Tier'")
}
inputs := make(map[string]interface{})
if args == nil {
inputs["clusterVersion"] = nil
inputs["gateway"] = nil
inputs["location"] = nil
inputs["name"] = nil
inputs["resourceGroupName"] = nil
inputs["roles"] = nil
inputs["rstudio"] = nil
inputs["storageAccounts"] = nil
inputs["tags"] = nil
inputs["tier"] = nil
} else {
inputs["clusterVersion"] = args.ClusterVersion
inputs["gateway"] = args.Gateway
inputs["location"] = args.Location
inputs["name"] = args.Name
inputs["resourceGroupName"] = args.ResourceGroupName
inputs["roles"] = args.Roles
inputs["rstudio"] = args.Rstudio
inputs["storageAccounts"] = args.StorageAccounts
inputs["tags"] = args.Tags
inputs["tier"] = args.Tier
}
inputs["edgeSshEndpoint"] = nil
inputs["httpsEndpoint"] = nil
inputs["sshEndpoint"] = nil
s, err := ctx.RegisterResource("azure:hdinsight/mLServicesCluster:MLServicesCluster", name, true, inputs, opts...)
if err != nil {
return nil, err
}
return &MLServicesCluster{s: s}, nil
}
// GetMLServicesCluster gets an existing MLServicesCluster 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 GetMLServicesCluster(ctx *pulumi.Context,
name string, id pulumi.ID, state *MLServicesClusterState, opts ...pulumi.ResourceOpt) (*MLServicesCluster, error) {
inputs := make(map[string]interface{})
if state != nil {
inputs["clusterVersion"] = state.ClusterVersion
inputs["edgeSshEndpoint"] = state.EdgeSshEndpoint
inputs["gateway"] = state.Gateway
inputs["httpsEndpoint"] = state.HttpsEndpoint
inputs["location"] = state.Location
inputs["name"] = state.Name
inputs["resourceGroupName"] = state.ResourceGroupName
inputs["roles"] = state.Roles
inputs["rstudio"] = state.Rstudio
inputs["sshEndpoint"] = state.SshEndpoint
inputs["storageAccounts"] = state.StorageAccounts
inputs["tags"] = state.Tags
inputs["tier"] = state.Tier
}
s, err := ctx.ReadResource("azure:hdinsight/mLServicesCluster:MLServicesCluster", name, id, inputs, opts...)
if err != nil {
return nil, err
}
return &MLServicesCluster{s: s}, nil
}
// URN is this resource's unique name assigned by Pulumi.
func (r *MLServicesCluster) URN() pulumi.URNOutput {
return r.s.URN()
}
// ID is this resource's unique identifier assigned by its provider.
func (r *MLServicesCluster) ID() pulumi.IDOutput {
return r.s.ID()
}
// Specifies the Version of HDInsights which should be used for this Cluster. Changing this forces a new resource to be created.
func (r *MLServicesCluster) ClusterVersion() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["clusterVersion"])
}
// The SSH Connectivity Endpoint for the Edge Node of the HDInsight ML Cluster.
func (r *MLServicesCluster) EdgeSshEndpoint() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["edgeSshEndpoint"])
}
// A `gateway` block as defined below.
func (r *MLServicesCluster) Gateway() pulumi.Output {
return r.s.State["gateway"]
}
// The HTTPS Connectivity Endpoint for this HDInsight ML Services Cluster.
func (r *MLServicesCluster) HttpsEndpoint() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["httpsEndpoint"])
}
// Specifies the Azure Region which this HDInsight ML Services Cluster should exist. Changing this forces a new resource to be created.
func (r *MLServicesCluster) Location() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["location"])
}
// Specifies the name for this HDInsight ML Services Cluster. Changing this forces a new resource to be created.
func (r *MLServicesCluster) Name() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["name"])
}
// Specifies the name of the Resource Group in which this HDInsight ML Services Cluster should exist. Changing this forces a new resource to be created.
func (r *MLServicesCluster) ResourceGroupName() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["resourceGroupName"])
}
// A `roles` block as defined below.
func (r *MLServicesCluster) Roles() pulumi.Output {
return r.s.State["roles"]
}
// Should R Studio community edition for ML Services be installed? Changing this forces a new resource to be created.
func (r *MLServicesCluster) Rstudio() pulumi.BoolOutput {
return (pulumi.BoolOutput)(r.s.State["rstudio"])
}
// The SSH Connectivity Endpoint for this HDInsight ML Services Cluster.
func (r *MLServicesCluster) SshEndpoint() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["sshEndpoint"])
}
// One or more `storageAccount` block as defined below.
func (r *MLServicesCluster) StorageAccounts() pulumi.ArrayOutput {
return (pulumi.ArrayOutput)(r.s.State["storageAccounts"])
}
// A map of Tags which should be assigned to this HDInsight ML Services Cluster.
func (r *MLServicesCluster) Tags() pulumi.MapOutput {
return (pulumi.MapOutput)(r.s.State["tags"])
}
// Specifies the Tier which should be used for this HDInsight ML Services Cluster. Possible values are `Standard` or `Premium`. Changing this forces a new resource to be created.
func (r *MLServicesCluster) Tier() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["tier"])
}
// Input properties used for looking up and filtering MLServicesCluster resources.
type MLServicesClusterState struct {
// Specifies the Version of HDInsights which should be used for this Cluster. Changing this forces a new resource to be created.
ClusterVersion interface{}
// The SSH Connectivity Endpoint for the Edge Node of the HDInsight ML Cluster.
EdgeSshEndpoint interface{}
// A `gateway` block as defined below.
Gateway interface{}
// The HTTPS Connectivity Endpoint for this HDInsight ML Services Cluster.
HttpsEndpoint interface{}
// Specifies the Azure Region which this HDInsight ML Services Cluster should exist. Changing this forces a new resource to be created.
Location interface{}
// Specifies the name for this HDInsight ML Services Cluster. Changing this forces a new resource to be created.
Name interface{}
// Specifies the name of the Resource Group in which this HDInsight ML Services Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName interface{}
// A `roles` block as defined below.
Roles interface{}
// Should R Studio community edition for ML Services be installed? Changing this forces a new resource to be created.
Rstudio interface{}
// The SSH Connectivity Endpoint for this HDInsight ML Services Cluster.
SshEndpoint interface{}
// One or more `storageAccount` block as defined below.
StorageAccounts interface{}
// A map of Tags which should be assigned to this HDInsight ML Services Cluster.
Tags interface{}
// Specifies the Tier which should be used for this HDInsight ML Services Cluster. Possible values are `Standard` or `Premium`. Changing this forces a new resource to be created.
Tier interface{}
}
// The set of arguments for constructing a MLServicesCluster resource.
type MLServicesClusterArgs struct {
// Specifies the Version of HDInsights which should be used for this Cluster. Changing this forces a new resource to be created.
ClusterVersion interface{}
// A `gateway` block as defined below.
Gateway interface{}
// Specifies the Azure Region which this HDInsight ML Services Cluster should exist. Changing this forces a new resource to be created.
Location interface{}
// Specifies the name for this HDInsight ML Services Cluster. Changing this forces a new resource to be created.
Name interface{}
// Specifies the name of the Resource Group in which this HDInsight ML Services Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName interface{}
// A `roles` block as defined below.
Roles interface{}
// Should R Studio community edition for ML Services be installed? Changing this forces a new resource to be created.
Rstudio interface{}
// One or more `storageAccount` block as defined below.
StorageAccounts interface{}
// A map of Tags which should be assigned to this HDInsight ML Services Cluster.
Tags interface{}
// Specifies the Tier which should be used for this HDInsight ML Services Cluster. Possible values are `Standard` or `Premium`. Changing this forces a new resource to be created.
Tier interface{}
}