/
constants.go
470 lines (401 loc) · 17.3 KB
/
constants.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
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package armiothub
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub"
moduleVersion = "v1.3.0"
)
// AccessRights - The permissions assigned to the shared access policy.
type AccessRights string
const (
AccessRightsDeviceConnect AccessRights = "DeviceConnect"
AccessRightsRegistryRead AccessRights = "RegistryRead"
AccessRightsRegistryReadDeviceConnect AccessRights = "RegistryRead, DeviceConnect"
AccessRightsRegistryReadRegistryWrite AccessRights = "RegistryRead, RegistryWrite"
AccessRightsRegistryReadRegistryWriteDeviceConnect AccessRights = "RegistryRead, RegistryWrite, DeviceConnect"
AccessRightsRegistryReadRegistryWriteServiceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect"
AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect"
AccessRightsRegistryReadServiceConnect AccessRights = "RegistryRead, ServiceConnect"
AccessRightsRegistryReadServiceConnectDeviceConnect AccessRights = "RegistryRead, ServiceConnect, DeviceConnect"
AccessRightsRegistryWrite AccessRights = "RegistryWrite"
AccessRightsRegistryWriteDeviceConnect AccessRights = "RegistryWrite, DeviceConnect"
AccessRightsRegistryWriteServiceConnect AccessRights = "RegistryWrite, ServiceConnect"
AccessRightsRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryWrite, ServiceConnect, DeviceConnect"
AccessRightsServiceConnect AccessRights = "ServiceConnect"
AccessRightsServiceConnectDeviceConnect AccessRights = "ServiceConnect, DeviceConnect"
)
// PossibleAccessRightsValues returns the possible values for the AccessRights const type.
func PossibleAccessRightsValues() []AccessRights {
return []AccessRights{
AccessRightsDeviceConnect,
AccessRightsRegistryRead,
AccessRightsRegistryReadDeviceConnect,
AccessRightsRegistryReadRegistryWrite,
AccessRightsRegistryReadRegistryWriteDeviceConnect,
AccessRightsRegistryReadRegistryWriteServiceConnect,
AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect,
AccessRightsRegistryReadServiceConnect,
AccessRightsRegistryReadServiceConnectDeviceConnect,
AccessRightsRegistryWrite,
AccessRightsRegistryWriteDeviceConnect,
AccessRightsRegistryWriteServiceConnect,
AccessRightsRegistryWriteServiceConnectDeviceConnect,
AccessRightsServiceConnect,
AccessRightsServiceConnectDeviceConnect,
}
}
// AuthenticationType - Specifies authentication type being used for connecting to the storage account.
type AuthenticationType string
const (
AuthenticationTypeIdentityBased AuthenticationType = "identityBased"
AuthenticationTypeKeyBased AuthenticationType = "keyBased"
)
// PossibleAuthenticationTypeValues returns the possible values for the AuthenticationType const type.
func PossibleAuthenticationTypeValues() []AuthenticationType {
return []AuthenticationType{
AuthenticationTypeIdentityBased,
AuthenticationTypeKeyBased,
}
}
// Capabilities - The capabilities and features enabled for the IoT hub.
type Capabilities string
const (
CapabilitiesDeviceManagement Capabilities = "DeviceManagement"
CapabilitiesNone Capabilities = "None"
)
// PossibleCapabilitiesValues returns the possible values for the Capabilities const type.
func PossibleCapabilitiesValues() []Capabilities {
return []Capabilities{
CapabilitiesDeviceManagement,
CapabilitiesNone,
}
}
// CreatedByType - The type of identity that created the resource.
type CreatedByType string
const (
CreatedByTypeApplication CreatedByType = "Application"
CreatedByTypeKey CreatedByType = "Key"
CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
CreatedByTypeUser CreatedByType = "User"
)
// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
func PossibleCreatedByTypeValues() []CreatedByType {
return []CreatedByType{
CreatedByTypeApplication,
CreatedByTypeKey,
CreatedByTypeManagedIdentity,
CreatedByTypeUser,
}
}
// DefaultAction - Default Action for Network Rule Set
type DefaultAction string
const (
DefaultActionAllow DefaultAction = "Allow"
DefaultActionDeny DefaultAction = "Deny"
)
// PossibleDefaultActionValues returns the possible values for the DefaultAction const type.
func PossibleDefaultActionValues() []DefaultAction {
return []DefaultAction{
DefaultActionAllow,
DefaultActionDeny,
}
}
// EndpointHealthStatus - Health statuses have following meanings. The 'healthy' status shows that the endpoint is accepting
// messages as expected. The 'unhealthy' status shows that the endpoint is not accepting messages as
// expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint will be updated to
// healthy when IoT Hub has established an eventually consistent state of health.
// The 'dead' status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial
// period. See IoT Hub metrics to identify errors and monitor issues with
// endpoints. The 'unknown' status shows that the IoT Hub has not established a connection with the endpoint. No messages
// have been delivered to or rejected from this endpoint
type EndpointHealthStatus string
const (
EndpointHealthStatusDead EndpointHealthStatus = "dead"
EndpointHealthStatusDegraded EndpointHealthStatus = "degraded"
EndpointHealthStatusHealthy EndpointHealthStatus = "healthy"
EndpointHealthStatusUnhealthy EndpointHealthStatus = "unhealthy"
EndpointHealthStatusUnknown EndpointHealthStatus = "unknown"
)
// PossibleEndpointHealthStatusValues returns the possible values for the EndpointHealthStatus const type.
func PossibleEndpointHealthStatusValues() []EndpointHealthStatus {
return []EndpointHealthStatus{
EndpointHealthStatusDead,
EndpointHealthStatusDegraded,
EndpointHealthStatusHealthy,
EndpointHealthStatusUnhealthy,
EndpointHealthStatusUnknown,
}
}
// IPFilterActionType - The desired action for requests captured by this rule.
type IPFilterActionType string
const (
IPFilterActionTypeAccept IPFilterActionType = "Accept"
IPFilterActionTypeReject IPFilterActionType = "Reject"
)
// PossibleIPFilterActionTypeValues returns the possible values for the IPFilterActionType const type.
func PossibleIPFilterActionTypeValues() []IPFilterActionType {
return []IPFilterActionType{
IPFilterActionTypeAccept,
IPFilterActionTypeReject,
}
}
// IotHubNameUnavailabilityReason - The reason for unavailability.
type IotHubNameUnavailabilityReason string
const (
IotHubNameUnavailabilityReasonAlreadyExists IotHubNameUnavailabilityReason = "AlreadyExists"
IotHubNameUnavailabilityReasonInvalid IotHubNameUnavailabilityReason = "Invalid"
)
// PossibleIotHubNameUnavailabilityReasonValues returns the possible values for the IotHubNameUnavailabilityReason const type.
func PossibleIotHubNameUnavailabilityReasonValues() []IotHubNameUnavailabilityReason {
return []IotHubNameUnavailabilityReason{
IotHubNameUnavailabilityReasonAlreadyExists,
IotHubNameUnavailabilityReasonInvalid,
}
}
// IotHubReplicaRoleType - The role of the region, can be either primary or secondary. The primary region is where the IoT
// hub is currently provisioned. The secondary region is the Azure disaster recovery (DR) paired region and
// also the region where the IoT hub can failover to.
type IotHubReplicaRoleType string
const (
IotHubReplicaRoleTypePrimary IotHubReplicaRoleType = "primary"
IotHubReplicaRoleTypeSecondary IotHubReplicaRoleType = "secondary"
)
// PossibleIotHubReplicaRoleTypeValues returns the possible values for the IotHubReplicaRoleType const type.
func PossibleIotHubReplicaRoleTypeValues() []IotHubReplicaRoleType {
return []IotHubReplicaRoleType{
IotHubReplicaRoleTypePrimary,
IotHubReplicaRoleTypeSecondary,
}
}
// IotHubSKU - The name of the SKU.
type IotHubSKU string
const (
IotHubSKUB1 IotHubSKU = "B1"
IotHubSKUB2 IotHubSKU = "B2"
IotHubSKUB3 IotHubSKU = "B3"
IotHubSKUF1 IotHubSKU = "F1"
IotHubSKUS1 IotHubSKU = "S1"
IotHubSKUS2 IotHubSKU = "S2"
IotHubSKUS3 IotHubSKU = "S3"
)
// PossibleIotHubSKUValues returns the possible values for the IotHubSKU const type.
func PossibleIotHubSKUValues() []IotHubSKU {
return []IotHubSKU{
IotHubSKUB1,
IotHubSKUB2,
IotHubSKUB3,
IotHubSKUF1,
IotHubSKUS1,
IotHubSKUS2,
IotHubSKUS3,
}
}
// IotHubSKUTier - The billing tier for the IoT hub.
type IotHubSKUTier string
const (
IotHubSKUTierBasic IotHubSKUTier = "Basic"
IotHubSKUTierFree IotHubSKUTier = "Free"
IotHubSKUTierStandard IotHubSKUTier = "Standard"
)
// PossibleIotHubSKUTierValues returns the possible values for the IotHubSKUTier const type.
func PossibleIotHubSKUTierValues() []IotHubSKUTier {
return []IotHubSKUTier{
IotHubSKUTierBasic,
IotHubSKUTierFree,
IotHubSKUTierStandard,
}
}
// IotHubScaleType - The type of the scaling enabled.
type IotHubScaleType string
const (
IotHubScaleTypeAutomatic IotHubScaleType = "Automatic"
IotHubScaleTypeManual IotHubScaleType = "Manual"
IotHubScaleTypeNone IotHubScaleType = "None"
)
// PossibleIotHubScaleTypeValues returns the possible values for the IotHubScaleType const type.
func PossibleIotHubScaleTypeValues() []IotHubScaleType {
return []IotHubScaleType{
IotHubScaleTypeAutomatic,
IotHubScaleTypeManual,
IotHubScaleTypeNone,
}
}
// JobStatus - The status of the job.
type JobStatus string
const (
JobStatusCancelled JobStatus = "cancelled"
JobStatusCompleted JobStatus = "completed"
JobStatusEnqueued JobStatus = "enqueued"
JobStatusFailed JobStatus = "failed"
JobStatusRunning JobStatus = "running"
JobStatusUnknown JobStatus = "unknown"
)
// PossibleJobStatusValues returns the possible values for the JobStatus const type.
func PossibleJobStatusValues() []JobStatus {
return []JobStatus{
JobStatusCancelled,
JobStatusCompleted,
JobStatusEnqueued,
JobStatusFailed,
JobStatusRunning,
JobStatusUnknown,
}
}
// JobType - The type of the job.
type JobType string
const (
JobTypeBackup JobType = "backup"
JobTypeExport JobType = "export"
JobTypeFactoryResetDevice JobType = "factoryResetDevice"
JobTypeFirmwareUpdate JobType = "firmwareUpdate"
JobTypeImport JobType = "import"
JobTypeReadDeviceProperties JobType = "readDeviceProperties"
JobTypeRebootDevice JobType = "rebootDevice"
JobTypeUnknown JobType = "unknown"
JobTypeUpdateDeviceConfiguration JobType = "updateDeviceConfiguration"
JobTypeWriteDeviceProperties JobType = "writeDeviceProperties"
)
// PossibleJobTypeValues returns the possible values for the JobType const type.
func PossibleJobTypeValues() []JobType {
return []JobType{
JobTypeBackup,
JobTypeExport,
JobTypeFactoryResetDevice,
JobTypeFirmwareUpdate,
JobTypeImport,
JobTypeReadDeviceProperties,
JobTypeRebootDevice,
JobTypeUnknown,
JobTypeUpdateDeviceConfiguration,
JobTypeWriteDeviceProperties,
}
}
// NetworkRuleIPAction - IP Filter Action
type NetworkRuleIPAction string
const (
NetworkRuleIPActionAllow NetworkRuleIPAction = "Allow"
)
// PossibleNetworkRuleIPActionValues returns the possible values for the NetworkRuleIPAction const type.
func PossibleNetworkRuleIPActionValues() []NetworkRuleIPAction {
return []NetworkRuleIPAction{
NetworkRuleIPActionAllow,
}
}
// PrivateLinkServiceConnectionStatus - The status of a private endpoint connection
type PrivateLinkServiceConnectionStatus string
const (
PrivateLinkServiceConnectionStatusApproved PrivateLinkServiceConnectionStatus = "Approved"
PrivateLinkServiceConnectionStatusDisconnected PrivateLinkServiceConnectionStatus = "Disconnected"
PrivateLinkServiceConnectionStatusPending PrivateLinkServiceConnectionStatus = "Pending"
PrivateLinkServiceConnectionStatusRejected PrivateLinkServiceConnectionStatus = "Rejected"
)
// PossiblePrivateLinkServiceConnectionStatusValues returns the possible values for the PrivateLinkServiceConnectionStatus const type.
func PossiblePrivateLinkServiceConnectionStatusValues() []PrivateLinkServiceConnectionStatus {
return []PrivateLinkServiceConnectionStatus{
PrivateLinkServiceConnectionStatusApproved,
PrivateLinkServiceConnectionStatusDisconnected,
PrivateLinkServiceConnectionStatusPending,
PrivateLinkServiceConnectionStatusRejected,
}
}
// PublicNetworkAccess - Whether requests from Public Network are allowed
type PublicNetworkAccess string
const (
PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled"
)
// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess {
return []PublicNetworkAccess{
PublicNetworkAccessDisabled,
PublicNetworkAccessEnabled,
}
}
// ResourceIdentityType - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both
// an implicitly created identity and a set of user assigned identities. The type 'None' will remove any
// identities from the service.
type ResourceIdentityType string
const (
ResourceIdentityTypeNone ResourceIdentityType = "None"
ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
)
// PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
return []ResourceIdentityType{
ResourceIdentityTypeNone,
ResourceIdentityTypeSystemAssigned,
ResourceIdentityTypeSystemAssignedUserAssigned,
ResourceIdentityTypeUserAssigned,
}
}
// RouteErrorSeverity - Severity of the route error
type RouteErrorSeverity string
const (
RouteErrorSeverityError RouteErrorSeverity = "error"
RouteErrorSeverityWarning RouteErrorSeverity = "warning"
)
// PossibleRouteErrorSeverityValues returns the possible values for the RouteErrorSeverity const type.
func PossibleRouteErrorSeverityValues() []RouteErrorSeverity {
return []RouteErrorSeverity{
RouteErrorSeverityError,
RouteErrorSeverityWarning,
}
}
// RoutingSource - The source that the routing rule is to be applied to, such as DeviceMessages.
type RoutingSource string
const (
RoutingSourceDeviceConnectionStateEvents RoutingSource = "DeviceConnectionStateEvents"
RoutingSourceDeviceJobLifecycleEvents RoutingSource = "DeviceJobLifecycleEvents"
RoutingSourceDeviceLifecycleEvents RoutingSource = "DeviceLifecycleEvents"
RoutingSourceDeviceMessages RoutingSource = "DeviceMessages"
RoutingSourceInvalid RoutingSource = "Invalid"
RoutingSourceTwinChangeEvents RoutingSource = "TwinChangeEvents"
)
// PossibleRoutingSourceValues returns the possible values for the RoutingSource const type.
func PossibleRoutingSourceValues() []RoutingSource {
return []RoutingSource{
RoutingSourceDeviceConnectionStateEvents,
RoutingSourceDeviceJobLifecycleEvents,
RoutingSourceDeviceLifecycleEvents,
RoutingSourceDeviceMessages,
RoutingSourceInvalid,
RoutingSourceTwinChangeEvents,
}
}
// RoutingStorageContainerPropertiesEncoding - Encoding that is used to serialize messages to blobs. Supported values are
// 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'.
type RoutingStorageContainerPropertiesEncoding string
const (
RoutingStorageContainerPropertiesEncodingAvro RoutingStorageContainerPropertiesEncoding = "Avro"
RoutingStorageContainerPropertiesEncodingAvroDeflate RoutingStorageContainerPropertiesEncoding = "AvroDeflate"
RoutingStorageContainerPropertiesEncodingJSON RoutingStorageContainerPropertiesEncoding = "JSON"
)
// PossibleRoutingStorageContainerPropertiesEncodingValues returns the possible values for the RoutingStorageContainerPropertiesEncoding const type.
func PossibleRoutingStorageContainerPropertiesEncodingValues() []RoutingStorageContainerPropertiesEncoding {
return []RoutingStorageContainerPropertiesEncoding{
RoutingStorageContainerPropertiesEncodingAvro,
RoutingStorageContainerPropertiesEncodingAvroDeflate,
RoutingStorageContainerPropertiesEncodingJSON,
}
}
// TestResultStatus - Result of testing route
type TestResultStatus string
const (
TestResultStatusFalse TestResultStatus = "false"
TestResultStatusTrue TestResultStatus = "true"
TestResultStatusUndefined TestResultStatus = "undefined"
)
// PossibleTestResultStatusValues returns the possible values for the TestResultStatus const type.
func PossibleTestResultStatusValues() []TestResultStatus {
return []TestResultStatus{
TestResultStatusFalse,
TestResultStatusTrue,
TestResultStatusUndefined,
}
}