/
models.go
429 lines (321 loc) · 13 KB
/
models.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
//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 armdeploymentscripts
import "time"
// AzureCliScript - Object model for the Azure CLI script.
type AzureCliScript struct {
// REQUIRED; Type of the script.
Kind *ScriptType
// REQUIRED; The location of the ACI and the storage account for the deployment script.
Location *string
// REQUIRED; Properties of the Azure CLI script object.
Properties *AzureCliScriptProperties
// Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.
Identity *ManagedServiceIdentity
// Resource tags.
Tags map[string]*string
// READ-ONLY; String Id used to locate any resource on Azure.
ID *string
// READ-ONLY; Name of this resource.
Name *string
// READ-ONLY; The system metadata related to this resource.
SystemData *SystemData
// READ-ONLY; Type of this resource.
Type *string
}
// GetDeploymentScript implements the DeploymentScriptClassification interface for type AzureCliScript.
func (a *AzureCliScript) GetDeploymentScript() *DeploymentScript {
return &DeploymentScript{
ID: a.ID,
Identity: a.Identity,
Kind: a.Kind,
Location: a.Location,
Name: a.Name,
SystemData: a.SystemData,
Tags: a.Tags,
Type: a.Type,
}
}
// AzureCliScriptProperties - Properties of the Azure CLI script object.
type AzureCliScriptProperties struct {
// REQUIRED; Azure CLI module version to be used.
AzCliVersion *string
// REQUIRED; Interval for which the service retains the script resource after it reaches a terminal state. Resource will be
// deleted when this duration expires. Duration is based on ISO 8601 pattern (for example
// P1D means one day).
RetentionInterval *string
// Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2'
Arguments *string
// The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
CleanupPreference *CleanupOptions
// Container settings.
ContainerSettings *ContainerConfiguration
// The environment variables to pass over to the script.
EnvironmentVariables []*EnvironmentVariable
// Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be
// current time stamp or a GUID.
ForceUpdateTag *string
// Uri for the script. This is the entry point for the external script.
PrimaryScriptURI *string
// Script body.
ScriptContent *string
// Storage Account settings.
StorageAccountSettings *StorageAccountConfiguration
// Supporting files for the external script.
SupportingScriptUris []*string
// Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D
Timeout *string
// READ-ONLY; List of script outputs.
Outputs map[string]any
// READ-ONLY; State of the script execution. This only appears in the response.
ProvisioningState *ScriptProvisioningState
// READ-ONLY; Contains the results of script execution.
Status *ScriptStatus
}
// AzurePowerShellScript - Object model for the Azure PowerShell script.
type AzurePowerShellScript struct {
// REQUIRED; Type of the script.
Kind *ScriptType
// REQUIRED; The location of the ACI and the storage account for the deployment script.
Location *string
// REQUIRED; Properties of the Azure PowerShell script object.
Properties *AzurePowerShellScriptProperties
// Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.
Identity *ManagedServiceIdentity
// Resource tags.
Tags map[string]*string
// READ-ONLY; String Id used to locate any resource on Azure.
ID *string
// READ-ONLY; Name of this resource.
Name *string
// READ-ONLY; The system metadata related to this resource.
SystemData *SystemData
// READ-ONLY; Type of this resource.
Type *string
}
// GetDeploymentScript implements the DeploymentScriptClassification interface for type AzurePowerShellScript.
func (a *AzurePowerShellScript) GetDeploymentScript() *DeploymentScript {
return &DeploymentScript{
ID: a.ID,
Identity: a.Identity,
Kind: a.Kind,
Location: a.Location,
Name: a.Name,
SystemData: a.SystemData,
Tags: a.Tags,
Type: a.Type,
}
}
// AzurePowerShellScriptProperties - Properties of the Azure PowerShell script object.
type AzurePowerShellScriptProperties struct {
// REQUIRED; Azure PowerShell module version to be used.
AzPowerShellVersion *string
// REQUIRED; Interval for which the service retains the script resource after it reaches a terminal state. Resource will be
// deleted when this duration expires. Duration is based on ISO 8601 pattern (for example
// P1D means one day).
RetentionInterval *string
// Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2'
Arguments *string
// The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
CleanupPreference *CleanupOptions
// Container settings.
ContainerSettings *ContainerConfiguration
// The environment variables to pass over to the script.
EnvironmentVariables []*EnvironmentVariable
// Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be
// current time stamp or a GUID.
ForceUpdateTag *string
// Uri for the script. This is the entry point for the external script.
PrimaryScriptURI *string
// Script body.
ScriptContent *string
// Storage Account settings.
StorageAccountSettings *StorageAccountConfiguration
// Supporting files for the external script.
SupportingScriptUris []*string
// Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D
Timeout *string
// READ-ONLY; List of script outputs.
Outputs map[string]any
// READ-ONLY; State of the script execution. This only appears in the response.
ProvisioningState *ScriptProvisioningState
// READ-ONLY; Contains the results of script execution.
Status *ScriptStatus
}
// AzureResourceBase - Common properties for all Azure resources.
type AzureResourceBase struct {
// READ-ONLY; String Id used to locate any resource on Azure.
ID *string
// READ-ONLY; Name of this resource.
Name *string
// READ-ONLY; Type of this resource.
Type *string
}
// ContainerConfiguration - Settings to customize ACI container instance.
type ContainerConfiguration struct {
// Container group name, if not specified then the name will get auto-generated. Not specifying a 'containerGroupName' indicates
// the system to generate a unique name which might end up flagging an Azure
// Policy as non-compliant. Use 'containerGroupName' when you have an Azure Policy that expects a specific naming convention
// or when you want to fully control the name. 'containerGroupName' property must
// be between 1 and 63 characters long, must contain only lowercase letters, numbers, and dashes and it cannot start or end
// with a dash and consecutive dashes are not allowed. To specify a
// 'containerGroupName', add the following object to properties: { "containerSettings": { "containerGroupName": "contoso-container"
// } }. If you do not want to specify a 'containerGroupName' then do not
// add 'containerSettings' property.
ContainerGroupName *string
}
// DeploymentScript - Deployment script object.
type DeploymentScript struct {
// REQUIRED; Type of the script.
Kind *ScriptType
// REQUIRED; The location of the ACI and the storage account for the deployment script.
Location *string
// Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.
Identity *ManagedServiceIdentity
// Resource tags.
Tags map[string]*string
// READ-ONLY; String Id used to locate any resource on Azure.
ID *string
// READ-ONLY; Name of this resource.
Name *string
// READ-ONLY; The system metadata related to this resource.
SystemData *SystemData
// READ-ONLY; Type of this resource.
Type *string
}
// GetDeploymentScript implements the DeploymentScriptClassification interface for type DeploymentScript.
func (d *DeploymentScript) GetDeploymentScript() *DeploymentScript { return d }
// DeploymentScriptListResult - List of deployment scripts.
type DeploymentScriptListResult struct {
// An array of deployment scripts.
Value []DeploymentScriptClassification
// READ-ONLY; The URL to use for getting the next set of results.
NextLink *string
}
// DeploymentScriptUpdateParameter - Deployment script parameters to be updated.
type DeploymentScriptUpdateParameter struct {
// Resource tags to be updated.
Tags map[string]*string
// READ-ONLY; String Id used to locate any resource on Azure.
ID *string
// READ-ONLY; Name of this resource.
Name *string
// READ-ONLY; Type of this resource.
Type *string
}
// EnvironmentVariable - The environment variable to pass to the script in the container instance.
type EnvironmentVariable struct {
// REQUIRED; The name of the environment variable.
Name *string
// The value of the secure environment variable.
SecureValue *string
// The value of the environment variable.
Value *string
}
// Error - Deployment scripts error response.
type Error struct {
// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
// the OData error response format.)
Error *ErrorResponse
}
// ErrorAdditionalInfo - The resource management error additional info.
type ErrorAdditionalInfo struct {
// READ-ONLY; The additional info.
Info any
// READ-ONLY; The additional info type.
Type *string
}
// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations.
// (This also follows the OData error response format.)
type ErrorResponse struct {
// READ-ONLY; The error additional info.
AdditionalInfo []*ErrorAdditionalInfo
// READ-ONLY; The error code.
Code *string
// READ-ONLY; The error details.
Details []*ErrorResponse
// READ-ONLY; The error message.
Message *string
// READ-ONLY; The error target.
Target *string
}
// LogProperties - Script log properties.
type LogProperties struct {
// READ-ONLY; Script execution logs in text format.
Log *string
}
// ManagedServiceIdentity - Managed identity generic object.
type ManagedServiceIdentity struct {
// Type of the managed identity.
Type *ManagedServiceIdentityType
// The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed
// identity.
UserAssignedIdentities map[string]*UserAssignedIdentity
// READ-ONLY; ID of the Azure Active Directory.
TenantID *string
}
// ScriptLog - Script execution log object.
type ScriptLog struct {
// Script log properties.
Properties *LogProperties
// READ-ONLY; String Id used to locate any resource on Azure.
ID *string
// READ-ONLY; Name of this resource.
Name *string
// READ-ONLY; Type of this resource.
Type *string
}
// ScriptLogsList - Deployment script execution logs.
type ScriptLogsList struct {
// Deployment scripts logs.
Value []*ScriptLog
}
// ScriptStatus - Generic object modeling results of script execution.
type ScriptStatus struct {
// Error that is relayed from the script execution.
Error *ErrorResponse
// READ-ONLY; ACI resource Id.
ContainerInstanceID *string
// READ-ONLY; End time of the script execution.
EndTime *time.Time
// READ-ONLY; Time the deployment script resource will expire.
ExpirationTime *time.Time
// READ-ONLY; Start time of the script execution.
StartTime *time.Time
// READ-ONLY; Storage account resource Id.
StorageAccountID *string
}
// StorageAccountConfiguration - Settings to use an existing storage account. Valid storage account kinds are: Storage, StorageV2
// and FileStorage
type StorageAccountConfiguration struct {
// The storage account access key.
StorageAccountKey *string
// The storage account name.
StorageAccountName *string
}
// SystemData - Metadata pertaining to creation and last modification of the resource.
type SystemData struct {
// The timestamp of resource creation (UTC).
CreatedAt *time.Time
// The identity that created the resource.
CreatedBy *string
// The type of identity that created the resource.
CreatedByType *CreatedByType
// The timestamp of resource last modification (UTC)
LastModifiedAt *time.Time
// The identity that last modified the resource.
LastModifiedBy *string
// The type of identity that last modified the resource.
LastModifiedByType *CreatedByType
}
// UserAssignedIdentity - User-assigned managed identity.
type UserAssignedIdentity struct {
// READ-ONLY; Client App Id associated with this identity.
ClientID *string
// READ-ONLY; Azure Active Directory principal ID associated with this identity.
PrincipalID *string
}