1// +build go1.13 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// Code generated by Microsoft (R) AutoRest Code Generator. 6// Changes may cause incorrect behavior and will be lost if the code is regenerated. 7 8package armcompute 9 10import ( 11 "encoding/json" 12 "github.com/Azure/azure-sdk-for-go/sdk/azcore" 13 "reflect" 14 "time" 15) 16 17// APIEntityReference - The API entity reference. 18type APIEntityReference struct { 19 // The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/… 20 ID *string `json:"id,omitempty"` 21} 22 23// APIError - Api error. 24type APIError struct { 25 // The error code. 26 Code *string `json:"code,omitempty"` 27 28 // The Api error details 29 Details []*APIErrorBase `json:"details,omitempty"` 30 31 // The Api inner error 32 Innererror *InnerError `json:"innererror,omitempty"` 33 34 // The error message. 35 Message *string `json:"message,omitempty"` 36 37 // The target of the particular error. 38 Target *string `json:"target,omitempty"` 39} 40 41// MarshalJSON implements the json.Marshaller interface for type APIError. 42func (a APIError) MarshalJSON() ([]byte, error) { 43 objectMap := make(map[string]interface{}) 44 populate(objectMap, "code", a.Code) 45 populate(objectMap, "details", a.Details) 46 populate(objectMap, "innererror", a.Innererror) 47 populate(objectMap, "message", a.Message) 48 populate(objectMap, "target", a.Target) 49 return json.Marshal(objectMap) 50} 51 52// APIErrorBase - Api error base. 53type APIErrorBase struct { 54 // The error code. 55 Code *string `json:"code,omitempty"` 56 57 // The error message. 58 Message *string `json:"message,omitempty"` 59 60 // The target of the particular error. 61 Target *string `json:"target,omitempty"` 62} 63 64// AccessURI - A disk access SAS uri. 65type AccessURI struct { 66 // READ-ONLY; A SAS uri for accessing a disk. 67 AccessSAS *string `json:"accessSAS,omitempty" azure:"ro"` 68} 69 70// AdditionalCapabilities - Enables or disables a capability on the virtual machine or virtual machine scale set. 71type AdditionalCapabilities struct { 72 // The flag that enables or disables a capability to have one or more managed data disks with UltraSSDLRS storage account type on the VM or VMSS. Managed 73 // disks with storage account type UltraSSDLRS can 74 // be added to a virtual machine or virtual machine scale set only if this property is enabled. 75 UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"` 76} 77 78// AdditionalUnattendContent - Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. 79// Contents are defined by setting name, component name, and the pass in 80// which the content is applied. 81type AdditionalUnattendContent struct { 82 // The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. 83 ComponentName *string `json:"componentName,omitempty"` 84 85 // Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must 86 // include the root element for the setting or 87 // feature that is being inserted. 88 Content *string `json:"content,omitempty"` 89 90 // The pass name. Currently, the only allowable value is OobeSystem. 91 PassName *string `json:"passName,omitempty"` 92 93 // Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. 94 SettingName *SettingNames `json:"settingName,omitempty"` 95} 96 97// AutomaticOSUpgradePolicy - The configuration parameters used for performing automatic OS upgrade. 98type AutomaticOSUpgradePolicy struct { 99 // Whether OS image rollback feature should be disabled. Default value is false. 100 DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"` 101 102 // Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes 103 // available. Default value is false. 104 // If this is set to true for Windows based scale sets, enableAutomaticUpdates 105 // [https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet] is automatically 106 // set to false and cannot be set to true. 107 EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"` 108} 109 110// AutomaticOSUpgradeProperties - Describes automatic OS upgrade properties on the image. 111type AutomaticOSUpgradeProperties struct { 112 // REQUIRED; Specifies whether automatic OS upgrade is supported on the image. 113 AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"` 114} 115 116// AutomaticRepairsPolicy - Specifies the configuration parameters for automatic repairs on the virtual machine scale set. 117type AutomaticRepairsPolicy struct { 118 // Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false. 119 Enabled *bool `json:"enabled,omitempty"` 120 121 // The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. 122 // This helps avoid premature or accidental repairs. 123 // The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The 124 // maximum allowed grace period is 90 minutes 125 // (PT90M). 126 GracePeriod *string `json:"gracePeriod,omitempty"` 127} 128 129// AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the 130// same availability set are allocated to different nodes to maximize 131// availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview]. 132// For more information on Azure planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates] 133// Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. 134type AvailabilitySet struct { 135 Resource 136 // The instance view of a resource. 137 Properties *AvailabilitySetProperties `json:"properties,omitempty"` 138 139 // Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines 140 // with managed disks and 'Classic' for virtual 141 // machines with unmanaged disks. Default value is 'Classic'. 142 SKU *SKU `json:"sku,omitempty"` 143} 144 145// MarshalJSON implements the json.Marshaller interface for type AvailabilitySet. 146func (a AvailabilitySet) MarshalJSON() ([]byte, error) { 147 objectMap := a.Resource.marshalInternal() 148 populate(objectMap, "properties", a.Properties) 149 populate(objectMap, "sku", a.SKU) 150 return json.Marshal(objectMap) 151} 152 153// AvailabilitySetListResult - The List Availability Set operation response. 154type AvailabilitySetListResult struct { 155 // REQUIRED; The list of availability sets 156 Value []*AvailabilitySet `json:"value,omitempty"` 157 158 // The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets. 159 NextLink *string `json:"nextLink,omitempty"` 160} 161 162// MarshalJSON implements the json.Marshaller interface for type AvailabilitySetListResult. 163func (a AvailabilitySetListResult) MarshalJSON() ([]byte, error) { 164 objectMap := make(map[string]interface{}) 165 populate(objectMap, "nextLink", a.NextLink) 166 populate(objectMap, "value", a.Value) 167 return json.Marshal(objectMap) 168} 169 170// AvailabilitySetProperties - The instance view of a resource. 171type AvailabilitySetProperties struct { 172 // Fault Domain count. 173 PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` 174 175 // Update Domain count. 176 PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"` 177 178 // Specifies information about the proximity placement group that the availability set should be assigned to. 179 // Minimum api-version: 2018-04-01. 180 ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` 181 182 // A list of references to all virtual machines in the availability set. 183 VirtualMachines []*SubResource `json:"virtualMachines,omitempty"` 184 185 // READ-ONLY; The resource status information. 186 Statuses []*InstanceViewStatus `json:"statuses,omitempty" azure:"ro"` 187} 188 189// MarshalJSON implements the json.Marshaller interface for type AvailabilitySetProperties. 190func (a AvailabilitySetProperties) MarshalJSON() ([]byte, error) { 191 objectMap := make(map[string]interface{}) 192 populate(objectMap, "platformFaultDomainCount", a.PlatformFaultDomainCount) 193 populate(objectMap, "platformUpdateDomainCount", a.PlatformUpdateDomainCount) 194 populate(objectMap, "proximityPlacementGroup", a.ProximityPlacementGroup) 195 populate(objectMap, "statuses", a.Statuses) 196 populate(objectMap, "virtualMachines", a.VirtualMachines) 197 return json.Marshal(objectMap) 198} 199 200// AvailabilitySetUpdate - Specifies information about the availability set that the virtual machine should be assigned to. Only tags may be updated. 201type AvailabilitySetUpdate struct { 202 UpdateResource 203 // The instance view of a resource. 204 Properties *AvailabilitySetProperties `json:"properties,omitempty"` 205 206 // Sku of the availability set 207 SKU *SKU `json:"sku,omitempty"` 208} 209 210// MarshalJSON implements the json.Marshaller interface for type AvailabilitySetUpdate. 211func (a AvailabilitySetUpdate) MarshalJSON() ([]byte, error) { 212 objectMap := a.UpdateResource.marshalInternal() 213 populate(objectMap, "properties", a.Properties) 214 populate(objectMap, "sku", a.SKU) 215 return json.Marshal(objectMap) 216} 217 218// AvailabilitySetsCreateOrUpdateOptions contains the optional parameters for the AvailabilitySets.CreateOrUpdate method. 219type AvailabilitySetsCreateOrUpdateOptions struct { 220 // placeholder for future optional parameters 221} 222 223// AvailabilitySetsDeleteOptions contains the optional parameters for the AvailabilitySets.Delete method. 224type AvailabilitySetsDeleteOptions struct { 225 // placeholder for future optional parameters 226} 227 228// AvailabilitySetsGetOptions contains the optional parameters for the AvailabilitySets.Get method. 229type AvailabilitySetsGetOptions struct { 230 // placeholder for future optional parameters 231} 232 233// AvailabilitySetsListAvailableSizesOptions contains the optional parameters for the AvailabilitySets.ListAvailableSizes method. 234type AvailabilitySetsListAvailableSizesOptions struct { 235 // placeholder for future optional parameters 236} 237 238// AvailabilitySetsListBySubscriptionOptions contains the optional parameters for the AvailabilitySets.ListBySubscription method. 239type AvailabilitySetsListBySubscriptionOptions struct { 240 // The expand expression to apply to the operation. Allowed values are 'instanceView'. 241 Expand *string 242} 243 244// AvailabilitySetsListOptions contains the optional parameters for the AvailabilitySets.List method. 245type AvailabilitySetsListOptions struct { 246 // placeholder for future optional parameters 247} 248 249// AvailabilitySetsUpdateOptions contains the optional parameters for the AvailabilitySets.Update method. 250type AvailabilitySetsUpdateOptions struct { 251 // placeholder for future optional parameters 252} 253 254// AvailablePatchSummary - Describes the properties of an virtual machine instance view for available patch summary. 255type AvailablePatchSummary struct { 256 // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. 257 AssessmentActivityID *string `json:"assessmentActivityId,omitempty" azure:"ro"` 258 259 // READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed. 260 CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty" azure:"ro"` 261 262 // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. 263 Error *APIError `json:"error,omitempty" azure:"ro"` 264 265 // READ-ONLY; The UTC timestamp when the operation began. 266 LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"` 267 268 // READ-ONLY; The number of all available patches excluding critical and security. 269 OtherPatchCount *int32 `json:"otherPatchCount,omitempty" azure:"ro"` 270 271 // READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot 272 // has not yet occurred. 273 RebootPending *bool `json:"rebootPending,omitempty" azure:"ro"` 274 275 // READ-ONLY; The UTC timestamp when the operation began. 276 StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` 277 278 // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become 279 // "Unknown", "Failed", "Succeeded", or 280 // "CompletedWithWarnings." 281 Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"` 282} 283 284// MarshalJSON implements the json.Marshaller interface for type AvailablePatchSummary. 285func (a AvailablePatchSummary) MarshalJSON() ([]byte, error) { 286 objectMap := make(map[string]interface{}) 287 populate(objectMap, "assessmentActivityId", a.AssessmentActivityID) 288 populate(objectMap, "criticalAndSecurityPatchCount", a.CriticalAndSecurityPatchCount) 289 populate(objectMap, "error", a.Error) 290 populate(objectMap, "lastModifiedTime", (*timeRFC3339)(a.LastModifiedTime)) 291 populate(objectMap, "otherPatchCount", a.OtherPatchCount) 292 populate(objectMap, "rebootPending", a.RebootPending) 293 populate(objectMap, "startTime", (*timeRFC3339)(a.StartTime)) 294 populate(objectMap, "status", a.Status) 295 return json.Marshal(objectMap) 296} 297 298// UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePatchSummary. 299func (a *AvailablePatchSummary) UnmarshalJSON(data []byte) error { 300 var rawMsg map[string]json.RawMessage 301 if err := json.Unmarshal(data, &rawMsg); err != nil { 302 return err 303 } 304 for key, val := range rawMsg { 305 var err error 306 switch key { 307 case "assessmentActivityId": 308 err = unpopulate(val, &a.AssessmentActivityID) 309 delete(rawMsg, key) 310 case "criticalAndSecurityPatchCount": 311 err = unpopulate(val, &a.CriticalAndSecurityPatchCount) 312 delete(rawMsg, key) 313 case "error": 314 err = unpopulate(val, &a.Error) 315 delete(rawMsg, key) 316 case "lastModifiedTime": 317 var aux timeRFC3339 318 err = unpopulate(val, &aux) 319 a.LastModifiedTime = (*time.Time)(&aux) 320 delete(rawMsg, key) 321 case "otherPatchCount": 322 err = unpopulate(val, &a.OtherPatchCount) 323 delete(rawMsg, key) 324 case "rebootPending": 325 err = unpopulate(val, &a.RebootPending) 326 delete(rawMsg, key) 327 case "startTime": 328 var aux timeRFC3339 329 err = unpopulate(val, &aux) 330 a.StartTime = (*time.Time)(&aux) 331 delete(rawMsg, key) 332 case "status": 333 err = unpopulate(val, &a.Status) 334 delete(rawMsg, key) 335 } 336 if err != nil { 337 return err 338 } 339 } 340 return nil 341} 342 343// BillingProfile - Specifies the billing related details of a Azure Spot VM or VMSS. 344// Minimum api-version: 2019-03-01. 345type BillingProfile struct { 346 // Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. 347 // This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot 348 // VM/VMSS and the operation will only succeed if 349 // the maxPrice is greater than the current Azure Spot price. 350 // The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. 351 // Possible values are: 352 // - Any decimal value greater than zero. Example: 0.01538 353 // -1 – indicates default price to be up-to on-demand. 354 // You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if 355 // it is not provided by you. 356 // Minimum api-version: 2019-03-01. 357 MaxPrice *float64 `json:"maxPrice,omitempty"` 358} 359 360// BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. 361// You can easily view the output of your console log. 362// Azure also enables you to see a screenshot of the VM from the hypervisor. 363type BootDiagnostics struct { 364 // Whether boot diagnostics should be enabled on the Virtual Machine. 365 Enabled *bool `json:"enabled,omitempty"` 366 367 // Uri of the storage account to use for placing the console output and screenshot. 368 // If storageUri is not specified while enabling boot diagnostics, managed storage will be used. 369 StorageURI *string `json:"storageUri,omitempty"` 370} 371 372// BootDiagnosticsInstanceView - The instance view of a virtual machine boot diagnostics. 373type BootDiagnosticsInstanceView struct { 374 // READ-ONLY; The console screenshot blob URI. 375 // NOTE: This will not be set if boot diagnostics is currently enabled with managed storage. 376 ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty" azure:"ro"` 377 378 // READ-ONLY; The serial console log blob Uri. 379 // NOTE: This will not be set if boot diagnostics is currently enabled with managed storage. 380 SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty" azure:"ro"` 381 382 // READ-ONLY; The boot diagnostics status information for the VM. 383 // NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. 384 Status *InstanceViewStatus `json:"status,omitempty" azure:"ro"` 385} 386 387// CloudError - An error response from the Compute service. 388// Implements the error and azcore.HTTPResponse interfaces. 389type CloudError struct { 390 raw string 391 // Api error. 392 InnerError *APIError `json:"error,omitempty"` 393} 394 395// Error implements the error interface for type CloudError. 396// The contents of the error text are not contractual and subject to change. 397func (e CloudError) Error() string { 398 return e.raw 399} 400 401// CloudService - Describes the cloud service. 402type CloudService struct { 403 // REQUIRED; Resource location. 404 Location *string `json:"location,omitempty"` 405 406 // Cloud service properties 407 Properties *CloudServiceProperties `json:"properties,omitempty"` 408 409 // Resource tags. 410 Tags map[string]*string `json:"tags,omitempty"` 411 412 // READ-ONLY; Resource Id. 413 ID *string `json:"id,omitempty" azure:"ro"` 414 415 // READ-ONLY; Resource name. 416 Name *string `json:"name,omitempty" azure:"ro"` 417 418 // READ-ONLY; Resource type. 419 Type *string `json:"type,omitempty" azure:"ro"` 420} 421 422// MarshalJSON implements the json.Marshaller interface for type CloudService. 423func (c CloudService) MarshalJSON() ([]byte, error) { 424 objectMap := make(map[string]interface{}) 425 populate(objectMap, "id", c.ID) 426 populate(objectMap, "location", c.Location) 427 populate(objectMap, "name", c.Name) 428 populate(objectMap, "properties", c.Properties) 429 populate(objectMap, "tags", c.Tags) 430 populate(objectMap, "type", c.Type) 431 return json.Marshal(objectMap) 432} 433 434// CloudServiceExtensionProfile - Describes a cloud service extension profile. 435type CloudServiceExtensionProfile struct { 436 // List of extensions for the cloud service. 437 Extensions []*Extension `json:"extensions,omitempty"` 438} 439 440// MarshalJSON implements the json.Marshaller interface for type CloudServiceExtensionProfile. 441func (c CloudServiceExtensionProfile) MarshalJSON() ([]byte, error) { 442 objectMap := make(map[string]interface{}) 443 populate(objectMap, "extensions", c.Extensions) 444 return json.Marshal(objectMap) 445} 446 447// CloudServiceExtensionProperties - Extension Properties. 448type CloudServiceExtensionProperties struct { 449 // Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. 450 AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` 451 452 // Tag to force apply the provided public and protected settings. Changing the tag value allows for re-running the extension without changing any of the 453 // public or protected settings. If forceUpdateTag is 454 // not changed, updates to public or protected settings would still be applied by the handler. If neither forceUpdateTag nor any of public or protected 455 // settings change, extension would flow to the role 456 // instance with the same sequence-number, and it is up to handler implementation whether to re-run it or not 457 ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` 458 459 // Protected settings for the extension which are encrypted before sent to the role instance. 460 ProtectedSettings *string `json:"protectedSettings,omitempty"` 461 ProtectedSettingsFromKeyVault *CloudServiceVaultAndSecretReference `json:"protectedSettingsFromKeyVault,omitempty"` 462 463 // The name of the extension handler publisher. 464 Publisher *string `json:"publisher,omitempty"` 465 466 // Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. 467 RolesAppliedTo []*string `json:"rolesAppliedTo,omitempty"` 468 469 // Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting 470 // for the extension. 471 Settings *string `json:"settings,omitempty"` 472 473 // Specifies the type of the extension. 474 Type *string `json:"type,omitempty"` 475 476 // Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, 477 // the latest version of the extension is used. 478 // If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major 479 // version is selected. If a major version number 480 // and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on 481 // the role instance. 482 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 483 484 // READ-ONLY; The provisioning state, which only appears in the response. 485 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 486} 487 488// MarshalJSON implements the json.Marshaller interface for type CloudServiceExtensionProperties. 489func (c CloudServiceExtensionProperties) MarshalJSON() ([]byte, error) { 490 objectMap := make(map[string]interface{}) 491 populate(objectMap, "autoUpgradeMinorVersion", c.AutoUpgradeMinorVersion) 492 populate(objectMap, "forceUpdateTag", c.ForceUpdateTag) 493 populate(objectMap, "protectedSettings", c.ProtectedSettings) 494 populate(objectMap, "protectedSettingsFromKeyVault", c.ProtectedSettingsFromKeyVault) 495 populate(objectMap, "provisioningState", c.ProvisioningState) 496 populate(objectMap, "publisher", c.Publisher) 497 populate(objectMap, "rolesAppliedTo", c.RolesAppliedTo) 498 populate(objectMap, "settings", c.Settings) 499 populate(objectMap, "type", c.Type) 500 populate(objectMap, "typeHandlerVersion", c.TypeHandlerVersion) 501 return json.Marshal(objectMap) 502} 503 504// CloudServiceInstanceView - InstanceView of CloudService as a whole 505type CloudServiceInstanceView struct { 506 // Instance view statuses. 507 RoleInstance *InstanceViewStatusesSummary `json:"roleInstance,omitempty"` 508 509 // READ-ONLY; Specifies a list of unique identifiers generated internally for the cloud service. 510 // NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. 511 PrivateIDs []*string `json:"privateIds,omitempty" azure:"ro"` 512 513 // READ-ONLY; The version of the SDK that was used to generate the package for the cloud service. 514 SdkVersion *string `json:"sdkVersion,omitempty" azure:"ro"` 515 516 // READ-ONLY 517 Statuses []*ResourceInstanceViewStatus `json:"statuses,omitempty" azure:"ro"` 518} 519 520// MarshalJSON implements the json.Marshaller interface for type CloudServiceInstanceView. 521func (c CloudServiceInstanceView) MarshalJSON() ([]byte, error) { 522 objectMap := make(map[string]interface{}) 523 populate(objectMap, "privateIds", c.PrivateIDs) 524 populate(objectMap, "roleInstance", c.RoleInstance) 525 populate(objectMap, "sdkVersion", c.SdkVersion) 526 populate(objectMap, "statuses", c.Statuses) 527 return json.Marshal(objectMap) 528} 529 530type CloudServiceListResult struct { 531 // REQUIRED 532 Value []*CloudService `json:"value,omitempty"` 533 NextLink *string `json:"nextLink,omitempty"` 534} 535 536// MarshalJSON implements the json.Marshaller interface for type CloudServiceListResult. 537func (c CloudServiceListResult) MarshalJSON() ([]byte, error) { 538 objectMap := make(map[string]interface{}) 539 populate(objectMap, "nextLink", c.NextLink) 540 populate(objectMap, "value", c.Value) 541 return json.Marshal(objectMap) 542} 543 544// CloudServiceNetworkProfile - Network Profile for the cloud service. 545type CloudServiceNetworkProfile struct { 546 // List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal 547 // Load Balancer. 548 LoadBalancerConfigurations []*LoadBalancerConfiguration `json:"loadBalancerConfigurations,omitempty"` 549 550 // The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated 551 // once it is set. The swappable cloud service 552 // referred by this id must be present otherwise an error will be thrown. 553 SwappableCloudService *SubResource `json:"swappableCloudService,omitempty"` 554} 555 556// MarshalJSON implements the json.Marshaller interface for type CloudServiceNetworkProfile. 557func (c CloudServiceNetworkProfile) MarshalJSON() ([]byte, error) { 558 objectMap := make(map[string]interface{}) 559 populate(objectMap, "loadBalancerConfigurations", c.LoadBalancerConfigurations) 560 populate(objectMap, "swappableCloudService", c.SwappableCloudService) 561 return json.Marshal(objectMap) 562} 563 564// CloudServiceOperatingSystemsGetOSFamilyOptions contains the optional parameters for the CloudServiceOperatingSystems.GetOSFamily method. 565type CloudServiceOperatingSystemsGetOSFamilyOptions struct { 566 // placeholder for future optional parameters 567} 568 569// CloudServiceOperatingSystemsGetOSVersionOptions contains the optional parameters for the CloudServiceOperatingSystems.GetOSVersion method. 570type CloudServiceOperatingSystemsGetOSVersionOptions struct { 571 // placeholder for future optional parameters 572} 573 574// CloudServiceOperatingSystemsListOSFamiliesOptions contains the optional parameters for the CloudServiceOperatingSystems.ListOSFamilies method. 575type CloudServiceOperatingSystemsListOSFamiliesOptions struct { 576 // placeholder for future optional parameters 577} 578 579// CloudServiceOperatingSystemsListOSVersionsOptions contains the optional parameters for the CloudServiceOperatingSystems.ListOSVersions method. 580type CloudServiceOperatingSystemsListOSVersionsOptions struct { 581 // placeholder for future optional parameters 582} 583 584// CloudServiceOsProfile - Describes the OS profile for the cloud service. 585type CloudServiceOsProfile struct { 586 // Specifies set of certificates that should be installed onto the role instances. 587 Secrets []*CloudServiceVaultSecretGroup `json:"secrets,omitempty"` 588} 589 590// MarshalJSON implements the json.Marshaller interface for type CloudServiceOsProfile. 591func (c CloudServiceOsProfile) MarshalJSON() ([]byte, error) { 592 objectMap := make(map[string]interface{}) 593 populate(objectMap, "secrets", c.Secrets) 594 return json.Marshal(objectMap) 595} 596 597// CloudServiceProperties - Cloud service properties 598type CloudServiceProperties struct { 599 // (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count 600 // and vm size specified in the .cscfg and .csdef 601 // respectively. The default value is false. 602 AllowModelOverride *bool `json:"allowModelOverride,omitempty"` 603 604 // Specifies the XML service configuration (.cscfg) for the cloud service. 605 Configuration *string `json:"configuration,omitempty"` 606 607 // Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature 608 // (SAS) URI from any storage account. This is a 609 // write-only property and is not returned in GET calls. 610 ConfigurationURL *string `json:"configurationUrl,omitempty"` 611 612 // Describes a cloud service extension profile. 613 ExtensionProfile *CloudServiceExtensionProfile `json:"extensionProfile,omitempty"` 614 615 // Network Profile for the cloud service. 616 NetworkProfile *CloudServiceNetworkProfile `json:"networkProfile,omitempty"` 617 618 // Describes the OS profile for the cloud service. 619 OSProfile *CloudServiceOsProfile `json:"osProfile,omitempty"` 620 621 // Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) 622 // URI from any storage account. This is a write-only 623 // property and is not returned in GET calls. 624 PackageURL *string `json:"packageUrl,omitempty"` 625 626 // Describes the role profile for the cloud service. 627 RoleProfile *CloudServiceRoleProfile `json:"roleProfile,omitempty"` 628 629 // (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is true. If false, the service model is still 630 // deployed, but the code is not run immediately. 631 // Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if 632 // it is poweredoff. 633 StartCloudService *bool `json:"startCloudService,omitempty"` 634 635 // Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in 636 // each update domain or initiated automatically in 637 // all update domains. Possible Values are 638 // Auto 639 // Manual 640 // Simultaneous 641 // If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically 642 // applied to each update domain in 643 // sequence. 644 UpgradeMode *CloudServiceUpgradeMode `json:"upgradeMode,omitempty"` 645 646 // READ-ONLY; The provisioning state, which only appears in the response. 647 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 648 649 // READ-ONLY; The unique identifier for the cloud service. 650 UniqueID *string `json:"uniqueId,omitempty" azure:"ro"` 651} 652 653// CloudServiceRole - Describes a role of the cloud service. 654type CloudServiceRole struct { 655 Properties *CloudServiceRoleProperties `json:"properties,omitempty"` 656 657 // Describes the cloud service role sku. 658 SKU *CloudServiceRoleSKU `json:"sku,omitempty"` 659 660 // READ-ONLY; Resource id 661 ID *string `json:"id,omitempty" azure:"ro"` 662 663 // READ-ONLY; Resource location 664 Location *string `json:"location,omitempty" azure:"ro"` 665 666 // READ-ONLY; Resource name 667 Name *string `json:"name,omitempty" azure:"ro"` 668 669 // READ-ONLY; Resource type 670 Type *string `json:"type,omitempty" azure:"ro"` 671} 672 673// CloudServiceRoleInstancesBeginDeleteOptions contains the optional parameters for the CloudServiceRoleInstances.BeginDelete method. 674type CloudServiceRoleInstancesBeginDeleteOptions struct { 675 // placeholder for future optional parameters 676} 677 678// CloudServiceRoleInstancesBeginRebuildOptions contains the optional parameters for the CloudServiceRoleInstances.BeginRebuild method. 679type CloudServiceRoleInstancesBeginRebuildOptions struct { 680 // placeholder for future optional parameters 681} 682 683// CloudServiceRoleInstancesBeginReimageOptions contains the optional parameters for the CloudServiceRoleInstances.BeginReimage method. 684type CloudServiceRoleInstancesBeginReimageOptions struct { 685 // placeholder for future optional parameters 686} 687 688// CloudServiceRoleInstancesBeginRestartOptions contains the optional parameters for the CloudServiceRoleInstances.BeginRestart method. 689type CloudServiceRoleInstancesBeginRestartOptions struct { 690 // placeholder for future optional parameters 691} 692 693// CloudServiceRoleInstancesGetInstanceViewOptions contains the optional parameters for the CloudServiceRoleInstances.GetInstanceView method. 694type CloudServiceRoleInstancesGetInstanceViewOptions struct { 695 // placeholder for future optional parameters 696} 697 698// CloudServiceRoleInstancesGetOptions contains the optional parameters for the CloudServiceRoleInstances.Get method. 699type CloudServiceRoleInstancesGetOptions struct { 700 // The expand expression to apply to the operation. 'UserData' is not supported for cloud services. 701 Expand *InstanceViewTypes 702} 703 704// CloudServiceRoleInstancesGetRemoteDesktopFileOptions contains the optional parameters for the CloudServiceRoleInstances.GetRemoteDesktopFile method. 705type CloudServiceRoleInstancesGetRemoteDesktopFileOptions struct { 706 // placeholder for future optional parameters 707} 708 709// CloudServiceRoleInstancesListOptions contains the optional parameters for the CloudServiceRoleInstances.List method. 710type CloudServiceRoleInstancesListOptions struct { 711 // The expand expression to apply to the operation. 'UserData' is not supported for cloud services. 712 Expand *InstanceViewTypes 713} 714 715type CloudServiceRoleListResult struct { 716 // REQUIRED 717 Value []*CloudServiceRole `json:"value,omitempty"` 718 NextLink *string `json:"nextLink,omitempty"` 719} 720 721// MarshalJSON implements the json.Marshaller interface for type CloudServiceRoleListResult. 722func (c CloudServiceRoleListResult) MarshalJSON() ([]byte, error) { 723 objectMap := make(map[string]interface{}) 724 populate(objectMap, "nextLink", c.NextLink) 725 populate(objectMap, "value", c.Value) 726 return json.Marshal(objectMap) 727} 728 729// CloudServiceRoleProfile - Describes the role profile for the cloud service. 730type CloudServiceRoleProfile struct { 731 // List of roles for the cloud service. 732 Roles []*CloudServiceRoleProfileProperties `json:"roles,omitempty"` 733} 734 735// MarshalJSON implements the json.Marshaller interface for type CloudServiceRoleProfile. 736func (c CloudServiceRoleProfile) MarshalJSON() ([]byte, error) { 737 objectMap := make(map[string]interface{}) 738 populate(objectMap, "roles", c.Roles) 739 return json.Marshal(objectMap) 740} 741 742// CloudServiceRoleProfileProperties - Describes the role properties. 743type CloudServiceRoleProfileProperties struct { 744 // Resource name. 745 Name *string `json:"name,omitempty"` 746 747 // Describes the cloud service role sku. 748 SKU *CloudServiceRoleSKU `json:"sku,omitempty"` 749} 750 751type CloudServiceRoleProperties struct { 752 // READ-ONLY; Specifies the ID which uniquely identifies a cloud service role. 753 UniqueID *string `json:"uniqueId,omitempty" azure:"ro"` 754} 755 756// CloudServiceRoleSKU - Describes the cloud service role sku. 757type CloudServiceRoleSKU struct { 758 // Specifies the number of role instances in the cloud service. 759 Capacity *int64 `json:"capacity,omitempty"` 760 761 // The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service 762 // or move back to the old sku. 763 Name *string `json:"name,omitempty"` 764 765 // Specifies the tier of the cloud service. Possible Values are 766 // Standard 767 // Basic 768 Tier *string `json:"tier,omitempty"` 769} 770 771// CloudServiceRolesGetOptions contains the optional parameters for the CloudServiceRoles.Get method. 772type CloudServiceRolesGetOptions struct { 773 // placeholder for future optional parameters 774} 775 776// CloudServiceRolesListOptions contains the optional parameters for the CloudServiceRoles.List method. 777type CloudServiceRolesListOptions struct { 778 // placeholder for future optional parameters 779} 780 781type CloudServiceUpdate struct { 782 // Resource tags 783 Tags map[string]*string `json:"tags,omitempty"` 784} 785 786// MarshalJSON implements the json.Marshaller interface for type CloudServiceUpdate. 787func (c CloudServiceUpdate) MarshalJSON() ([]byte, error) { 788 objectMap := make(map[string]interface{}) 789 populate(objectMap, "tags", c.Tags) 790 return json.Marshal(objectMap) 791} 792 793type CloudServiceVaultAndSecretReference struct { 794 SecretURL *string `json:"secretUrl,omitempty"` 795 SourceVault *SubResource `json:"sourceVault,omitempty"` 796} 797 798// CloudServiceVaultCertificate - Describes a single certificate reference in a Key Vault, and where the certificate should reside on the role instance. 799type CloudServiceVaultCertificate struct { 800 // This is the URL of a certificate that has been uploaded to Key Vault as a secret. 801 CertificateURL *string `json:"certificateUrl,omitempty"` 802} 803 804// CloudServiceVaultSecretGroup - Describes a set of certificates which are all in the same Key Vault. 805type CloudServiceVaultSecretGroup struct { 806 // The relative URL of the Key Vault containing all of the certificates in VaultCertificates. 807 SourceVault *SubResource `json:"sourceVault,omitempty"` 808 809 // The list of key vault references in SourceVault which contain certificates. 810 VaultCertificates []*CloudServiceVaultCertificate `json:"vaultCertificates,omitempty"` 811} 812 813// MarshalJSON implements the json.Marshaller interface for type CloudServiceVaultSecretGroup. 814func (c CloudServiceVaultSecretGroup) MarshalJSON() ([]byte, error) { 815 objectMap := make(map[string]interface{}) 816 populate(objectMap, "sourceVault", c.SourceVault) 817 populate(objectMap, "vaultCertificates", c.VaultCertificates) 818 return json.Marshal(objectMap) 819} 820 821// CloudServicesBeginCreateOrUpdateOptions contains the optional parameters for the CloudServices.BeginCreateOrUpdate method. 822type CloudServicesBeginCreateOrUpdateOptions struct { 823 // The cloud service object. 824 Parameters *CloudService 825} 826 827// CloudServicesBeginDeleteInstancesOptions contains the optional parameters for the CloudServices.BeginDeleteInstances method. 828type CloudServicesBeginDeleteInstancesOptions struct { 829 // List of cloud service role instance names. 830 Parameters *RoleInstances 831} 832 833// CloudServicesBeginDeleteOptions contains the optional parameters for the CloudServices.BeginDelete method. 834type CloudServicesBeginDeleteOptions struct { 835 // placeholder for future optional parameters 836} 837 838// CloudServicesBeginPowerOffOptions contains the optional parameters for the CloudServices.BeginPowerOff method. 839type CloudServicesBeginPowerOffOptions struct { 840 // placeholder for future optional parameters 841} 842 843// CloudServicesBeginRebuildOptions contains the optional parameters for the CloudServices.BeginRebuild method. 844type CloudServicesBeginRebuildOptions struct { 845 // List of cloud service role instance names. 846 Parameters *RoleInstances 847} 848 849// CloudServicesBeginReimageOptions contains the optional parameters for the CloudServices.BeginReimage method. 850type CloudServicesBeginReimageOptions struct { 851 // List of cloud service role instance names. 852 Parameters *RoleInstances 853} 854 855// CloudServicesBeginRestartOptions contains the optional parameters for the CloudServices.BeginRestart method. 856type CloudServicesBeginRestartOptions struct { 857 // List of cloud service role instance names. 858 Parameters *RoleInstances 859} 860 861// CloudServicesBeginStartOptions contains the optional parameters for the CloudServices.BeginStart method. 862type CloudServicesBeginStartOptions struct { 863 // placeholder for future optional parameters 864} 865 866// CloudServicesBeginUpdateOptions contains the optional parameters for the CloudServices.BeginUpdate method. 867type CloudServicesBeginUpdateOptions struct { 868 // The cloud service object. 869 Parameters *CloudServiceUpdate 870} 871 872// CloudServicesGetInstanceViewOptions contains the optional parameters for the CloudServices.GetInstanceView method. 873type CloudServicesGetInstanceViewOptions struct { 874 // placeholder for future optional parameters 875} 876 877// CloudServicesGetOptions contains the optional parameters for the CloudServices.Get method. 878type CloudServicesGetOptions struct { 879 // placeholder for future optional parameters 880} 881 882// CloudServicesListAllOptions contains the optional parameters for the CloudServices.ListAll method. 883type CloudServicesListAllOptions struct { 884 // placeholder for future optional parameters 885} 886 887// CloudServicesListOptions contains the optional parameters for the CloudServices.List method. 888type CloudServicesListOptions struct { 889 // placeholder for future optional parameters 890} 891 892// CloudServicesUpdateDomainBeginWalkUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomain.BeginWalkUpdateDomain method. 893type CloudServicesUpdateDomainBeginWalkUpdateDomainOptions struct { 894 // The update domain object. 895 Parameters *UpdateDomain 896} 897 898// CloudServicesUpdateDomainGetUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomain.GetUpdateDomain method. 899type CloudServicesUpdateDomainGetUpdateDomainOptions struct { 900 // placeholder for future optional parameters 901} 902 903// CloudServicesUpdateDomainListUpdateDomainsOptions contains the optional parameters for the CloudServicesUpdateDomain.ListUpdateDomains method. 904type CloudServicesUpdateDomainListUpdateDomainsOptions struct { 905 // placeholder for future optional parameters 906} 907 908// ComputeOperationListResult - The List Compute Operation operation response. 909type ComputeOperationListResult struct { 910 // READ-ONLY; The list of compute operations 911 Value []*ComputeOperationValue `json:"value,omitempty" azure:"ro"` 912} 913 914// MarshalJSON implements the json.Marshaller interface for type ComputeOperationListResult. 915func (c ComputeOperationListResult) MarshalJSON() ([]byte, error) { 916 objectMap := make(map[string]interface{}) 917 populate(objectMap, "value", c.Value) 918 return json.Marshal(objectMap) 919} 920 921// ComputeOperationValue - Describes the properties of a Compute Operation value. 922type ComputeOperationValue struct { 923 // Describes the properties of a Compute Operation Value Display. 924 Display *ComputeOperationValueDisplay `json:"display,omitempty"` 925 926 // READ-ONLY; The name of the compute operation. 927 Name *string `json:"name,omitempty" azure:"ro"` 928 929 // READ-ONLY; The origin of the compute operation. 930 Origin *string `json:"origin,omitempty" azure:"ro"` 931} 932 933// ComputeOperationValueDisplay - Describes the properties of a Compute Operation Value Display. 934type ComputeOperationValueDisplay struct { 935 // READ-ONLY; The description of the operation. 936 Description *string `json:"description,omitempty" azure:"ro"` 937 938 // READ-ONLY; The display name of the compute operation. 939 Operation *string `json:"operation,omitempty" azure:"ro"` 940 941 // READ-ONLY; The resource provider for the operation. 942 Provider *string `json:"provider,omitempty" azure:"ro"` 943 944 // READ-ONLY; The display name of the resource the operation applies to. 945 Resource *string `json:"resource,omitempty" azure:"ro"` 946} 947 948// CreationData - Data used when creating a disk. 949type CreationData struct { 950 // REQUIRED; This enumerates the possible sources of a disk's creation. 951 CreateOption *DiskCreateOption `json:"createOption,omitempty"` 952 953 // Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create 954 // a disk. 955 GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"` 956 957 // Disk source information. 958 ImageReference *ImageDiskReference `json:"imageReference,omitempty"` 959 960 // Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. 961 LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"` 962 963 // If createOption is Copy, this is the ARM id of the source snapshot or disk. 964 SourceResourceID *string `json:"sourceResourceId,omitempty"` 965 966 // If createOption is Import, this is the URI of a blob to be imported into a managed disk. 967 SourceURI *string `json:"sourceUri,omitempty"` 968 969 // Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. 970 StorageAccountID *string `json:"storageAccountId,omitempty"` 971 972 // If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 973 // bytes for the VHD footer) and 35183298347520 974 // bytes (32 TiB + 512 bytes for the VHD footer). 975 UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"` 976 977 // READ-ONLY; If this field is set, this is the unique id identifying the source of this resource. 978 SourceUniqueID *string `json:"sourceUniqueId,omitempty" azure:"ro"` 979} 980 981// DataDisk - Describes a data disk. 982type DataDisk struct { 983 // REQUIRED; Specifies how the virtual machine should be created. 984 // Possible values are: 985 // Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine. 986 // FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference 987 // element described above. If you are 988 // using a marketplace image, you also use the plan element previously described. 989 CreateOption *DiskCreateOptionTypes `json:"createOption,omitempty"` 990 991 // REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for 992 // each data disk attached to a VM. 993 Lun *int32 `json:"lun,omitempty"` 994 995 // Specifies the caching requirements. 996 // Possible values are: 997 // None 998 // ReadOnly 999 // ReadWrite 1000 // Default: None for Standard storage. ReadOnly for Premium storage 1001 Caching *CachingTypes `json:"caching,omitempty"` 1002 1003 // Specifies whether data disk should be deleted or detached upon VM deletion. 1004 // Possible values: 1005 // Delete If this value is used, the data disk is deleted when VM is deleted. 1006 // Detach If this value is used, the data disk is retained after VM is deleted. 1007 // The default value is set to detach 1008 DeleteOption *DiskDeleteOptionTypes `json:"deleteOption,omitempty"` 1009 1010 // Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported 1011 // values: ForceDetach. 1012 // detachOption: ForceDetach is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected 1013 // failure from the virtual machine and the 1014 // disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed 1015 // when using this detach behavior. 1016 // This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along 1017 // with setting detachOption: 'ForceDetach'. 1018 DetachOption *DiskDetachOptionTypes `json:"detachOption,omitempty"` 1019 1020 // Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. 1021 // This value cannot be larger than 1023 GB 1022 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 1023 1024 // The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, 1025 // the destination virtual hard drive must not 1026 // exist. 1027 Image *VirtualHardDisk `json:"image,omitempty"` 1028 1029 // The managed disk parameters. 1030 ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` 1031 1032 // The disk name. 1033 Name *string `json:"name,omitempty"` 1034 1035 // Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset 1036 ToBeDetached *bool `json:"toBeDetached,omitempty"` 1037 1038 // The virtual hard disk. 1039 Vhd *VirtualHardDisk `json:"vhd,omitempty"` 1040 1041 // Specifies whether writeAccelerator should be enabled or disabled on the disk. 1042 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 1043 1044 // READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. 1045 // Can be updated only via updates to the VirtualMachine 1046 // Scale Set. 1047 DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty" azure:"ro"` 1048 1049 // READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet 1050 // VM disks. Can be updated only via updates to the 1051 // VirtualMachine Scale Set. 1052 DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty" azure:"ro"` 1053} 1054 1055// DataDiskImage - Contains the data disk images information. 1056type DataDiskImage struct { 1057 // READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for 1058 // each data disk attached to a VM. 1059 Lun *int32 `json:"lun,omitempty" azure:"ro"` 1060} 1061 1062// DataDiskImageEncryption - Contains encryption settings for a data disk image. 1063type DataDiskImageEncryption struct { 1064 DiskImageEncryption 1065 // REQUIRED; This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and 1066 // therefore must be unique for each data disk attached to the 1067 // Virtual Machine. 1068 Lun *int32 `json:"lun,omitempty"` 1069} 1070 1071// DedicatedHost - Specifies information about the Dedicated host. 1072type DedicatedHost struct { 1073 Resource 1074 // REQUIRED; SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of 1075 // possible values. 1076 SKU *SKU `json:"sku,omitempty"` 1077 1078 // Properties of the dedicated host. 1079 Properties *DedicatedHostProperties `json:"properties,omitempty"` 1080} 1081 1082// MarshalJSON implements the json.Marshaller interface for type DedicatedHost. 1083func (d DedicatedHost) MarshalJSON() ([]byte, error) { 1084 objectMap := d.Resource.marshalInternal() 1085 populate(objectMap, "properties", d.Properties) 1086 populate(objectMap, "sku", d.SKU) 1087 return json.Marshal(objectMap) 1088} 1089 1090// DedicatedHostAllocatableVM - Represents the dedicated host unutilized capacity in terms of a specific VM size. 1091type DedicatedHostAllocatableVM struct { 1092 // Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity. 1093 Count *float64 `json:"count,omitempty"` 1094 1095 // VM size in terms of which the unutilized capacity is represented. 1096 VMSize *string `json:"vmSize,omitempty"` 1097} 1098 1099// DedicatedHostAvailableCapacity - Dedicated host unutilized capacity. 1100type DedicatedHostAvailableCapacity struct { 1101 // The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host. 1102 AllocatableVMs []*DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"` 1103} 1104 1105// MarshalJSON implements the json.Marshaller interface for type DedicatedHostAvailableCapacity. 1106func (d DedicatedHostAvailableCapacity) MarshalJSON() ([]byte, error) { 1107 objectMap := make(map[string]interface{}) 1108 populate(objectMap, "allocatableVMs", d.AllocatableVMs) 1109 return json.Marshal(objectMap) 1110} 1111 1112// DedicatedHostGroup - Specifies information about the dedicated host group that the dedicated hosts should be assigned to. 1113// Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated 1114// host group. 1115type DedicatedHostGroup struct { 1116 Resource 1117 // Dedicated Host Group Properties. 1118 Properties *DedicatedHostGroupProperties `json:"properties,omitempty"` 1119 1120 // Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group 1121 // supports all zones in the region. If provided, 1122 // enforces each host in the group to be in the same zone. 1123 Zones []*string `json:"zones,omitempty"` 1124} 1125 1126// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroup. 1127func (d DedicatedHostGroup) MarshalJSON() ([]byte, error) { 1128 objectMap := d.Resource.marshalInternal() 1129 populate(objectMap, "properties", d.Properties) 1130 populate(objectMap, "zones", d.Zones) 1131 return json.Marshal(objectMap) 1132} 1133 1134type DedicatedHostGroupInstanceView struct { 1135 // List of instance view of the dedicated hosts under the dedicated host group. 1136 Hosts []*DedicatedHostInstanceViewWithName `json:"hosts,omitempty"` 1137} 1138 1139// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupInstanceView. 1140func (d DedicatedHostGroupInstanceView) MarshalJSON() ([]byte, error) { 1141 objectMap := make(map[string]interface{}) 1142 populate(objectMap, "hosts", d.Hosts) 1143 return json.Marshal(objectMap) 1144} 1145 1146// DedicatedHostGroupListResult - The List Dedicated Host Group with resource group response. 1147type DedicatedHostGroupListResult struct { 1148 // REQUIRED; The list of dedicated host groups 1149 Value []*DedicatedHostGroup `json:"value,omitempty"` 1150 1151 // The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups. 1152 NextLink *string `json:"nextLink,omitempty"` 1153} 1154 1155// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupListResult. 1156func (d DedicatedHostGroupListResult) MarshalJSON() ([]byte, error) { 1157 objectMap := make(map[string]interface{}) 1158 populate(objectMap, "nextLink", d.NextLink) 1159 populate(objectMap, "value", d.Value) 1160 return json.Marshal(objectMap) 1161} 1162 1163// DedicatedHostGroupProperties - Dedicated Host Group Properties. 1164type DedicatedHostGroupProperties struct { 1165 // REQUIRED; Number of fault domains that the host group can span. 1166 PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` 1167 1168 // Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources 1169 // are allocated on dedicated hosts, that are 1170 // chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. 1171 // Minimum api-version: 2020-06-01. 1172 SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"` 1173 1174 // READ-ONLY; A list of references to all dedicated hosts in the dedicated host group. 1175 Hosts []*SubResourceReadOnly `json:"hosts,omitempty" azure:"ro"` 1176 1177 // READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. 1178 InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty" azure:"ro"` 1179} 1180 1181// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupProperties. 1182func (d DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) { 1183 objectMap := make(map[string]interface{}) 1184 populate(objectMap, "hosts", d.Hosts) 1185 populate(objectMap, "instanceView", d.InstanceView) 1186 populate(objectMap, "platformFaultDomainCount", d.PlatformFaultDomainCount) 1187 populate(objectMap, "supportAutomaticPlacement", d.SupportAutomaticPlacement) 1188 return json.Marshal(objectMap) 1189} 1190 1191// DedicatedHostGroupUpdate - Specifies information about the dedicated host group that the dedicated host should be assigned to. Only tags may be updated. 1192type DedicatedHostGroupUpdate struct { 1193 UpdateResource 1194 // Dedicated Host Group Properties. 1195 Properties *DedicatedHostGroupProperties `json:"properties,omitempty"` 1196 1197 // Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group 1198 // supports all zones in the region. If provided, 1199 // enforces each host in the group to be in the same zone. 1200 Zones []*string `json:"zones,omitempty"` 1201} 1202 1203// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupUpdate. 1204func (d DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) { 1205 objectMap := d.UpdateResource.marshalInternal() 1206 populate(objectMap, "properties", d.Properties) 1207 populate(objectMap, "zones", d.Zones) 1208 return json.Marshal(objectMap) 1209} 1210 1211// DedicatedHostGroupsCreateOrUpdateOptions contains the optional parameters for the DedicatedHostGroups.CreateOrUpdate method. 1212type DedicatedHostGroupsCreateOrUpdateOptions struct { 1213 // placeholder for future optional parameters 1214} 1215 1216// DedicatedHostGroupsDeleteOptions contains the optional parameters for the DedicatedHostGroups.Delete method. 1217type DedicatedHostGroupsDeleteOptions struct { 1218 // placeholder for future optional parameters 1219} 1220 1221// DedicatedHostGroupsGetOptions contains the optional parameters for the DedicatedHostGroups.Get method. 1222type DedicatedHostGroupsGetOptions struct { 1223 // The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated hosts under the dedicated host 1224 // group. 'UserData' is not supported for dedicated host group. 1225 Expand *InstanceViewTypes 1226} 1227 1228// DedicatedHostGroupsListByResourceGroupOptions contains the optional parameters for the DedicatedHostGroups.ListByResourceGroup method. 1229type DedicatedHostGroupsListByResourceGroupOptions struct { 1230 // placeholder for future optional parameters 1231} 1232 1233// DedicatedHostGroupsListBySubscriptionOptions contains the optional parameters for the DedicatedHostGroups.ListBySubscription method. 1234type DedicatedHostGroupsListBySubscriptionOptions struct { 1235 // placeholder for future optional parameters 1236} 1237 1238// DedicatedHostGroupsUpdateOptions contains the optional parameters for the DedicatedHostGroups.Update method. 1239type DedicatedHostGroupsUpdateOptions struct { 1240 // placeholder for future optional parameters 1241} 1242 1243// DedicatedHostInstanceView - The instance view of a dedicated host. 1244type DedicatedHostInstanceView struct { 1245 // Unutilized capacity of the dedicated host. 1246 AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"` 1247 1248 // The resource status information. 1249 Statuses []*InstanceViewStatus `json:"statuses,omitempty"` 1250 1251 // READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides. 1252 AssetID *string `json:"assetId,omitempty" azure:"ro"` 1253} 1254 1255// MarshalJSON implements the json.Marshaller interface for type DedicatedHostInstanceView. 1256func (d DedicatedHostInstanceView) MarshalJSON() ([]byte, error) { 1257 objectMap := d.marshalInternal() 1258 return json.Marshal(objectMap) 1259} 1260 1261func (d DedicatedHostInstanceView) marshalInternal() map[string]interface{} { 1262 objectMap := make(map[string]interface{}) 1263 populate(objectMap, "assetId", d.AssetID) 1264 populate(objectMap, "availableCapacity", d.AvailableCapacity) 1265 populate(objectMap, "statuses", d.Statuses) 1266 return objectMap 1267} 1268 1269// DedicatedHostInstanceViewWithName - The instance view of a dedicated host that includes the name of the dedicated host. It is used for the response to 1270// the instance view of a dedicated host group. 1271type DedicatedHostInstanceViewWithName struct { 1272 DedicatedHostInstanceView 1273 // READ-ONLY; The name of the dedicated host. 1274 Name *string `json:"name,omitempty" azure:"ro"` 1275} 1276 1277// MarshalJSON implements the json.Marshaller interface for type DedicatedHostInstanceViewWithName. 1278func (d DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) { 1279 objectMap := d.DedicatedHostInstanceView.marshalInternal() 1280 populate(objectMap, "name", d.Name) 1281 return json.Marshal(objectMap) 1282} 1283 1284// DedicatedHostListResult - The list dedicated host operation response. 1285type DedicatedHostListResult struct { 1286 // REQUIRED; The list of dedicated hosts 1287 Value []*DedicatedHost `json:"value,omitempty"` 1288 1289 // The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts. 1290 NextLink *string `json:"nextLink,omitempty"` 1291} 1292 1293// MarshalJSON implements the json.Marshaller interface for type DedicatedHostListResult. 1294func (d DedicatedHostListResult) MarshalJSON() ([]byte, error) { 1295 objectMap := make(map[string]interface{}) 1296 populate(objectMap, "nextLink", d.NextLink) 1297 populate(objectMap, "value", d.Value) 1298 return json.Marshal(objectMap) 1299} 1300 1301// DedicatedHostProperties - Properties of the dedicated host. 1302type DedicatedHostProperties struct { 1303 // Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. 1304 AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"` 1305 1306 // Specifies the software license type that will be applied to the VMs deployed on the dedicated host. 1307 // Possible values are: 1308 // None 1309 // WindowsServerHybrid 1310 // WindowsServerPerpetual 1311 // Default: None 1312 LicenseType *DedicatedHostLicenseTypes `json:"licenseType,omitempty"` 1313 1314 // Fault domain of the dedicated host within a dedicated host group. 1315 PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` 1316 1317 // READ-ONLY; A unique id generated and assigned to the dedicated host by the platform. 1318 // Does not change throughout the lifetime of the host. 1319 HostID *string `json:"hostId,omitempty" azure:"ro"` 1320 1321 // READ-ONLY; The dedicated host instance view. 1322 InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty" azure:"ro"` 1323 1324 // READ-ONLY; The provisioning state, which only appears in the response. 1325 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 1326 1327 // READ-ONLY; The date when the host was first provisioned. 1328 ProvisioningTime *time.Time `json:"provisioningTime,omitempty" azure:"ro"` 1329 1330 // READ-ONLY; A list of references to all virtual machines in the Dedicated Host. 1331 VirtualMachines []*SubResourceReadOnly `json:"virtualMachines,omitempty" azure:"ro"` 1332} 1333 1334// MarshalJSON implements the json.Marshaller interface for type DedicatedHostProperties. 1335func (d DedicatedHostProperties) MarshalJSON() ([]byte, error) { 1336 objectMap := make(map[string]interface{}) 1337 populate(objectMap, "autoReplaceOnFailure", d.AutoReplaceOnFailure) 1338 populate(objectMap, "hostId", d.HostID) 1339 populate(objectMap, "instanceView", d.InstanceView) 1340 populate(objectMap, "licenseType", d.LicenseType) 1341 populate(objectMap, "platformFaultDomain", d.PlatformFaultDomain) 1342 populate(objectMap, "provisioningState", d.ProvisioningState) 1343 populate(objectMap, "provisioningTime", (*timeRFC3339)(d.ProvisioningTime)) 1344 populate(objectMap, "virtualMachines", d.VirtualMachines) 1345 return json.Marshal(objectMap) 1346} 1347 1348// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostProperties. 1349func (d *DedicatedHostProperties) UnmarshalJSON(data []byte) error { 1350 var rawMsg map[string]json.RawMessage 1351 if err := json.Unmarshal(data, &rawMsg); err != nil { 1352 return err 1353 } 1354 for key, val := range rawMsg { 1355 var err error 1356 switch key { 1357 case "autoReplaceOnFailure": 1358 err = unpopulate(val, &d.AutoReplaceOnFailure) 1359 delete(rawMsg, key) 1360 case "hostId": 1361 err = unpopulate(val, &d.HostID) 1362 delete(rawMsg, key) 1363 case "instanceView": 1364 err = unpopulate(val, &d.InstanceView) 1365 delete(rawMsg, key) 1366 case "licenseType": 1367 err = unpopulate(val, &d.LicenseType) 1368 delete(rawMsg, key) 1369 case "platformFaultDomain": 1370 err = unpopulate(val, &d.PlatformFaultDomain) 1371 delete(rawMsg, key) 1372 case "provisioningState": 1373 err = unpopulate(val, &d.ProvisioningState) 1374 delete(rawMsg, key) 1375 case "provisioningTime": 1376 var aux timeRFC3339 1377 err = unpopulate(val, &aux) 1378 d.ProvisioningTime = (*time.Time)(&aux) 1379 delete(rawMsg, key) 1380 case "virtualMachines": 1381 err = unpopulate(val, &d.VirtualMachines) 1382 delete(rawMsg, key) 1383 } 1384 if err != nil { 1385 return err 1386 } 1387 } 1388 return nil 1389} 1390 1391// DedicatedHostUpdate - Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. 1392type DedicatedHostUpdate struct { 1393 UpdateResource 1394 // Properties of the dedicated host. 1395 Properties *DedicatedHostProperties `json:"properties,omitempty"` 1396} 1397 1398// MarshalJSON implements the json.Marshaller interface for type DedicatedHostUpdate. 1399func (d DedicatedHostUpdate) MarshalJSON() ([]byte, error) { 1400 objectMap := d.UpdateResource.marshalInternal() 1401 populate(objectMap, "properties", d.Properties) 1402 return json.Marshal(objectMap) 1403} 1404 1405// DedicatedHostsBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedHosts.BeginCreateOrUpdate method. 1406type DedicatedHostsBeginCreateOrUpdateOptions struct { 1407 // placeholder for future optional parameters 1408} 1409 1410// DedicatedHostsBeginDeleteOptions contains the optional parameters for the DedicatedHosts.BeginDelete method. 1411type DedicatedHostsBeginDeleteOptions struct { 1412 // placeholder for future optional parameters 1413} 1414 1415// DedicatedHostsBeginUpdateOptions contains the optional parameters for the DedicatedHosts.BeginUpdate method. 1416type DedicatedHostsBeginUpdateOptions struct { 1417 // placeholder for future optional parameters 1418} 1419 1420// DedicatedHostsGetOptions contains the optional parameters for the DedicatedHosts.Get method. 1421type DedicatedHostsGetOptions struct { 1422 // The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported 1423 // for dedicated host. 1424 Expand *InstanceViewTypes 1425} 1426 1427// DedicatedHostsListByHostGroupOptions contains the optional parameters for the DedicatedHosts.ListByHostGroup method. 1428type DedicatedHostsListByHostGroupOptions struct { 1429 // placeholder for future optional parameters 1430} 1431 1432// DiagnosticsProfile - Specifies the boot diagnostic settings state. 1433// Minimum api-version: 2015-06-15. 1434type DiagnosticsProfile struct { 1435 // Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. 1436 // You can easily view the output of your console log. 1437 // Azure also enables you to see a screenshot of the VM from the hypervisor. 1438 BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"` 1439} 1440 1441// DiffDiskSettings - Describes the parameters of ephemeral disk settings that can be specified for operating system disk. 1442// NOTE: The ephemeral disk settings can only be specified for managed disk. 1443type DiffDiskSettings struct { 1444 // Specifies the ephemeral disk settings for operating system disk. 1445 Option *DiffDiskOptions `json:"option,omitempty"` 1446 1447 // Specifies the ephemeral disk placement for operating system disk. 1448 // Possible values are: 1449 // CacheDisk 1450 // ResourceDisk 1451 // Default: CacheDisk if one is configured for the VM size otherwise ResourceDisk is used. 1452 // Refer to VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes 1453 // to check 1454 // which VM sizes exposes a cache disk. 1455 Placement *DiffDiskPlacement `json:"placement,omitempty"` 1456} 1457 1458// Disallowed - Describes the disallowed disk types. 1459type Disallowed struct { 1460 // A list of disk types. 1461 DiskTypes []*string `json:"diskTypes,omitempty"` 1462} 1463 1464// MarshalJSON implements the json.Marshaller interface for type Disallowed. 1465func (d Disallowed) MarshalJSON() ([]byte, error) { 1466 objectMap := make(map[string]interface{}) 1467 populate(objectMap, "diskTypes", d.DiskTypes) 1468 return json.Marshal(objectMap) 1469} 1470 1471// DisallowedConfiguration - Specifies the disallowed configuration for a virtual machine image. 1472type DisallowedConfiguration struct { 1473 // VM disk types which are disallowed. 1474 VMDiskType *VMDiskTypes `json:"vmDiskType,omitempty"` 1475} 1476 1477// Disk resource. 1478type Disk struct { 1479 Resource 1480 // The extended location where the disk will be created. Extended location cannot be changed. 1481 ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` 1482 1483 // Disk resource properties. 1484 Properties *DiskProperties `json:"properties,omitempty"` 1485 1486 // The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, or StandardSSDZRS. 1487 SKU *DiskSKU `json:"sku,omitempty"` 1488 1489 // The Logical zone list for Disk. 1490 Zones []*string `json:"zones,omitempty"` 1491 1492 // READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. 1493 ManagedBy *string `json:"managedBy,omitempty" azure:"ro"` 1494 1495 // READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks 1496 // to allow attaching them to multiple VMs. 1497 ManagedByExtended []*string `json:"managedByExtended,omitempty" azure:"ro"` 1498} 1499 1500// MarshalJSON implements the json.Marshaller interface for type Disk. 1501func (d Disk) MarshalJSON() ([]byte, error) { 1502 objectMap := d.Resource.marshalInternal() 1503 populate(objectMap, "extendedLocation", d.ExtendedLocation) 1504 populate(objectMap, "managedBy", d.ManagedBy) 1505 populate(objectMap, "managedByExtended", d.ManagedByExtended) 1506 populate(objectMap, "properties", d.Properties) 1507 populate(objectMap, "sku", d.SKU) 1508 populate(objectMap, "zones", d.Zones) 1509 return json.Marshal(objectMap) 1510} 1511 1512// DiskAccess - disk access resource. 1513type DiskAccess struct { 1514 Resource 1515 Properties *DiskAccessProperties `json:"properties,omitempty"` 1516} 1517 1518// MarshalJSON implements the json.Marshaller interface for type DiskAccess. 1519func (d DiskAccess) MarshalJSON() ([]byte, error) { 1520 objectMap := d.Resource.marshalInternal() 1521 populate(objectMap, "properties", d.Properties) 1522 return json.Marshal(objectMap) 1523} 1524 1525// DiskAccessList - The List disk access operation response. 1526type DiskAccessList struct { 1527 // REQUIRED; A list of disk access resources. 1528 Value []*DiskAccess `json:"value,omitempty"` 1529 1530 // The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access resources. 1531 NextLink *string `json:"nextLink,omitempty"` 1532} 1533 1534// MarshalJSON implements the json.Marshaller interface for type DiskAccessList. 1535func (d DiskAccessList) MarshalJSON() ([]byte, error) { 1536 objectMap := make(map[string]interface{}) 1537 populate(objectMap, "nextLink", d.NextLink) 1538 populate(objectMap, "value", d.Value) 1539 return json.Marshal(objectMap) 1540} 1541 1542type DiskAccessProperties struct { 1543 // READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported. 1544 PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` 1545 1546 // READ-ONLY; The disk access resource provisioning state. 1547 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 1548 1549 // READ-ONLY; The time when the disk access was created. 1550 TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"` 1551} 1552 1553// MarshalJSON implements the json.Marshaller interface for type DiskAccessProperties. 1554func (d DiskAccessProperties) MarshalJSON() ([]byte, error) { 1555 objectMap := make(map[string]interface{}) 1556 populate(objectMap, "privateEndpointConnections", d.PrivateEndpointConnections) 1557 populate(objectMap, "provisioningState", d.ProvisioningState) 1558 populate(objectMap, "timeCreated", (*timeRFC3339)(d.TimeCreated)) 1559 return json.Marshal(objectMap) 1560} 1561 1562// UnmarshalJSON implements the json.Unmarshaller interface for type DiskAccessProperties. 1563func (d *DiskAccessProperties) UnmarshalJSON(data []byte) error { 1564 var rawMsg map[string]json.RawMessage 1565 if err := json.Unmarshal(data, &rawMsg); err != nil { 1566 return err 1567 } 1568 for key, val := range rawMsg { 1569 var err error 1570 switch key { 1571 case "privateEndpointConnections": 1572 err = unpopulate(val, &d.PrivateEndpointConnections) 1573 delete(rawMsg, key) 1574 case "provisioningState": 1575 err = unpopulate(val, &d.ProvisioningState) 1576 delete(rawMsg, key) 1577 case "timeCreated": 1578 var aux timeRFC3339 1579 err = unpopulate(val, &aux) 1580 d.TimeCreated = (*time.Time)(&aux) 1581 delete(rawMsg, key) 1582 } 1583 if err != nil { 1584 return err 1585 } 1586 } 1587 return nil 1588} 1589 1590// DiskAccessUpdate - Used for updating a disk access resource. 1591type DiskAccessUpdate struct { 1592 // Resource tags 1593 Tags map[string]*string `json:"tags,omitempty"` 1594} 1595 1596// MarshalJSON implements the json.Marshaller interface for type DiskAccessUpdate. 1597func (d DiskAccessUpdate) MarshalJSON() ([]byte, error) { 1598 objectMap := make(map[string]interface{}) 1599 populate(objectMap, "tags", d.Tags) 1600 return json.Marshal(objectMap) 1601} 1602 1603// DiskAccessesBeginCreateOrUpdateOptions contains the optional parameters for the DiskAccesses.BeginCreateOrUpdate method. 1604type DiskAccessesBeginCreateOrUpdateOptions struct { 1605 // placeholder for future optional parameters 1606} 1607 1608// DiskAccessesBeginDeleteAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccesses.BeginDeleteAPrivateEndpointConnection 1609// method. 1610type DiskAccessesBeginDeleteAPrivateEndpointConnectionOptions struct { 1611 // placeholder for future optional parameters 1612} 1613 1614// DiskAccessesBeginDeleteOptions contains the optional parameters for the DiskAccesses.BeginDelete method. 1615type DiskAccessesBeginDeleteOptions struct { 1616 // placeholder for future optional parameters 1617} 1618 1619// DiskAccessesBeginUpdateAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccesses.BeginUpdateAPrivateEndpointConnection 1620// method. 1621type DiskAccessesBeginUpdateAPrivateEndpointConnectionOptions struct { 1622 // placeholder for future optional parameters 1623} 1624 1625// DiskAccessesBeginUpdateOptions contains the optional parameters for the DiskAccesses.BeginUpdate method. 1626type DiskAccessesBeginUpdateOptions struct { 1627 // placeholder for future optional parameters 1628} 1629 1630// DiskAccessesGetAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccesses.GetAPrivateEndpointConnection method. 1631type DiskAccessesGetAPrivateEndpointConnectionOptions struct { 1632 // placeholder for future optional parameters 1633} 1634 1635// DiskAccessesGetOptions contains the optional parameters for the DiskAccesses.Get method. 1636type DiskAccessesGetOptions struct { 1637 // placeholder for future optional parameters 1638} 1639 1640// DiskAccessesGetPrivateLinkResourcesOptions contains the optional parameters for the DiskAccesses.GetPrivateLinkResources method. 1641type DiskAccessesGetPrivateLinkResourcesOptions struct { 1642 // placeholder for future optional parameters 1643} 1644 1645// DiskAccessesListByResourceGroupOptions contains the optional parameters for the DiskAccesses.ListByResourceGroup method. 1646type DiskAccessesListByResourceGroupOptions struct { 1647 // placeholder for future optional parameters 1648} 1649 1650// DiskAccessesListOptions contains the optional parameters for the DiskAccesses.List method. 1651type DiskAccessesListOptions struct { 1652 // placeholder for future optional parameters 1653} 1654 1655// DiskAccessesListPrivateEndpointConnectionsOptions contains the optional parameters for the DiskAccesses.ListPrivateEndpointConnections method. 1656type DiskAccessesListPrivateEndpointConnectionsOptions struct { 1657 // placeholder for future optional parameters 1658} 1659 1660// DiskEncryptionSet - disk encryption set resource. 1661type DiskEncryptionSet struct { 1662 Resource 1663 // The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. 1664 Identity *EncryptionSetIdentity `json:"identity,omitempty"` 1665 Properties *EncryptionSetProperties `json:"properties,omitempty"` 1666} 1667 1668// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSet. 1669func (d DiskEncryptionSet) MarshalJSON() ([]byte, error) { 1670 objectMap := d.Resource.marshalInternal() 1671 populate(objectMap, "identity", d.Identity) 1672 populate(objectMap, "properties", d.Properties) 1673 return json.Marshal(objectMap) 1674} 1675 1676// DiskEncryptionSetList - The List disk encryption set operation response. 1677type DiskEncryptionSetList struct { 1678 // REQUIRED; A list of disk encryption sets. 1679 Value []*DiskEncryptionSet `json:"value,omitempty"` 1680 1681 // The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets. 1682 NextLink *string `json:"nextLink,omitempty"` 1683} 1684 1685// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSetList. 1686func (d DiskEncryptionSetList) MarshalJSON() ([]byte, error) { 1687 objectMap := make(map[string]interface{}) 1688 populate(objectMap, "nextLink", d.NextLink) 1689 populate(objectMap, "value", d.Value) 1690 return json.Marshal(objectMap) 1691} 1692 1693// DiskEncryptionSetParameters - Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. 1694// NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. 1695type DiskEncryptionSetParameters struct { 1696 SubResource 1697} 1698 1699// DiskEncryptionSetUpdate - disk encryption set update resource. 1700type DiskEncryptionSetUpdate struct { 1701 // The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. 1702 Identity *EncryptionSetIdentity `json:"identity,omitempty"` 1703 1704 // disk encryption set resource update properties. 1705 Properties *DiskEncryptionSetUpdateProperties `json:"properties,omitempty"` 1706 1707 // Resource tags 1708 Tags map[string]*string `json:"tags,omitempty"` 1709} 1710 1711// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSetUpdate. 1712func (d DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) { 1713 objectMap := make(map[string]interface{}) 1714 populate(objectMap, "identity", d.Identity) 1715 populate(objectMap, "properties", d.Properties) 1716 populate(objectMap, "tags", d.Tags) 1717 return json.Marshal(objectMap) 1718} 1719 1720// DiskEncryptionSetUpdateProperties - disk encryption set resource update properties. 1721type DiskEncryptionSetUpdateProperties struct { 1722 // Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots 1723 ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"` 1724 1725 // The type of key used to encrypt the data of the disk. 1726 EncryptionType *DiskEncryptionSetType `json:"encryptionType,omitempty"` 1727 1728 // Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. 1729 RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` 1730} 1731 1732// DiskEncryptionSetsBeginCreateOrUpdateOptions contains the optional parameters for the DiskEncryptionSets.BeginCreateOrUpdate method. 1733type DiskEncryptionSetsBeginCreateOrUpdateOptions struct { 1734 // placeholder for future optional parameters 1735} 1736 1737// DiskEncryptionSetsBeginDeleteOptions contains the optional parameters for the DiskEncryptionSets.BeginDelete method. 1738type DiskEncryptionSetsBeginDeleteOptions struct { 1739 // placeholder for future optional parameters 1740} 1741 1742// DiskEncryptionSetsBeginUpdateOptions contains the optional parameters for the DiskEncryptionSets.BeginUpdate method. 1743type DiskEncryptionSetsBeginUpdateOptions struct { 1744 // placeholder for future optional parameters 1745} 1746 1747// DiskEncryptionSetsGetOptions contains the optional parameters for the DiskEncryptionSets.Get method. 1748type DiskEncryptionSetsGetOptions struct { 1749 // placeholder for future optional parameters 1750} 1751 1752// DiskEncryptionSetsListAssociatedResourcesOptions contains the optional parameters for the DiskEncryptionSets.ListAssociatedResources method. 1753type DiskEncryptionSetsListAssociatedResourcesOptions struct { 1754 // placeholder for future optional parameters 1755} 1756 1757// DiskEncryptionSetsListByResourceGroupOptions contains the optional parameters for the DiskEncryptionSets.ListByResourceGroup method. 1758type DiskEncryptionSetsListByResourceGroupOptions struct { 1759 // placeholder for future optional parameters 1760} 1761 1762// DiskEncryptionSetsListOptions contains the optional parameters for the DiskEncryptionSets.List method. 1763type DiskEncryptionSetsListOptions struct { 1764 // placeholder for future optional parameters 1765} 1766 1767// DiskEncryptionSettings - Describes a Encryption Settings for a Disk 1768type DiskEncryptionSettings struct { 1769 // Specifies the location of the disk encryption key, which is a Key Vault Secret. 1770 DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"` 1771 1772 // Specifies whether disk encryption should be enabled on the virtual machine. 1773 Enabled *bool `json:"enabled,omitempty"` 1774 1775 // Specifies the location of the key encryption key in Key Vault. 1776 KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"` 1777} 1778 1779// DiskImageEncryption - This is the disk image encryption base class. 1780type DiskImageEncryption struct { 1781 // A relative URI containing the resource ID of the disk encryption set. 1782 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` 1783} 1784 1785// DiskInstanceView - The instance view of the disk. 1786type DiskInstanceView struct { 1787 // Specifies the encryption settings for the OS Disk. 1788 // Minimum api-version: 2015-06-15 1789 EncryptionSettings []*DiskEncryptionSettings `json:"encryptionSettings,omitempty"` 1790 1791 // The disk name. 1792 Name *string `json:"name,omitempty"` 1793 1794 // The resource status information. 1795 Statuses []*InstanceViewStatus `json:"statuses,omitempty"` 1796} 1797 1798// MarshalJSON implements the json.Marshaller interface for type DiskInstanceView. 1799func (d DiskInstanceView) MarshalJSON() ([]byte, error) { 1800 objectMap := make(map[string]interface{}) 1801 populate(objectMap, "encryptionSettings", d.EncryptionSettings) 1802 populate(objectMap, "name", d.Name) 1803 populate(objectMap, "statuses", d.Statuses) 1804 return json.Marshal(objectMap) 1805} 1806 1807// DiskList - The List Disks operation response. 1808type DiskList struct { 1809 // REQUIRED; A list of disks. 1810 Value []*Disk `json:"value,omitempty"` 1811 1812 // The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks. 1813 NextLink *string `json:"nextLink,omitempty"` 1814} 1815 1816// MarshalJSON implements the json.Marshaller interface for type DiskList. 1817func (d DiskList) MarshalJSON() ([]byte, error) { 1818 objectMap := make(map[string]interface{}) 1819 populate(objectMap, "nextLink", d.NextLink) 1820 populate(objectMap, "value", d.Value) 1821 return json.Marshal(objectMap) 1822} 1823 1824// DiskProperties - Disk resource properties. 1825type DiskProperties struct { 1826 // REQUIRED; Disk source information. CreationData information cannot be changed after the disk has been created. 1827 CreationData *CreationData `json:"creationData,omitempty"` 1828 1829 // Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. 1830 BurstingEnabled *bool `json:"burstingEnabled,omitempty"` 1831 1832 // ARM id of the DiskAccess resource for using private endpoints on disks. 1833 DiskAccessID *string `json:"diskAccessId,omitempty"` 1834 1835 // The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. 1836 DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` 1837 1838 // The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. 1839 DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` 1840 1841 // The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here 1842 // uses the ISO notation, of powers of 10. 1843 DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` 1844 1845 // The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers 1846 // of 10. 1847 DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` 1848 1849 // If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates 1850 // or creation with other options, it indicates a 1851 // resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. 1852 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 1853 1854 // Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. 1855 Encryption *Encryption `json:"encryption,omitempty"` 1856 1857 // Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. 1858 EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` 1859 1860 // The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 1861 HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"` 1862 1863 // The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at 1864 // the same time. 1865 MaxShares *int32 `json:"maxShares,omitempty"` 1866 1867 // Policy for accessing the disk via network. 1868 NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` 1869 1870 // The Operating System type. 1871 OSType *OperatingSystemTypes `json:"osType,omitempty"` 1872 1873 // Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: 1874 // WindowsServer} 1875 PurchasePlan *DiskPurchasePlan `json:"purchasePlan,omitempty"` 1876 1877 // Contains the security related information for the resource. 1878 SecurityProfile *DiskSecurityProfile `json:"securityProfile,omitempty"` 1879 1880 // Indicates the OS on a disk supports hibernation. 1881 SupportsHibernation *bool `json:"supportsHibernation,omitempty"` 1882 1883 // Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra 1884 // disks. 1885 Tier *string `json:"tier,omitempty"` 1886 1887 // READ-ONLY; The size of the disk in bytes. This field is read only. 1888 DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty" azure:"ro"` 1889 1890 // READ-ONLY; The state of the disk. 1891 DiskState *DiskState `json:"diskState,omitempty" azure:"ro"` 1892 1893 // READ-ONLY; Properties of the disk for which update is pending. 1894 PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty" azure:"ro"` 1895 1896 // READ-ONLY; The disk provisioning state. 1897 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 1898 1899 // READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching 1900 // them to multiple VMs. 1901 ShareInfo []*ShareInfoElement `json:"shareInfo,omitempty" azure:"ro"` 1902 1903 // READ-ONLY; The time when the disk was created. 1904 TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"` 1905 1906 // READ-ONLY; Unique Guid identifying the resource. 1907 UniqueID *string `json:"uniqueId,omitempty" azure:"ro"` 1908} 1909 1910// MarshalJSON implements the json.Marshaller interface for type DiskProperties. 1911func (d DiskProperties) MarshalJSON() ([]byte, error) { 1912 objectMap := make(map[string]interface{}) 1913 populate(objectMap, "burstingEnabled", d.BurstingEnabled) 1914 populate(objectMap, "creationData", d.CreationData) 1915 populate(objectMap, "diskAccessId", d.DiskAccessID) 1916 populate(objectMap, "diskIOPSReadOnly", d.DiskIOPSReadOnly) 1917 populate(objectMap, "diskIOPSReadWrite", d.DiskIOPSReadWrite) 1918 populate(objectMap, "diskMBpsReadOnly", d.DiskMBpsReadOnly) 1919 populate(objectMap, "diskMBpsReadWrite", d.DiskMBpsReadWrite) 1920 populate(objectMap, "diskSizeBytes", d.DiskSizeBytes) 1921 populate(objectMap, "diskSizeGB", d.DiskSizeGB) 1922 populate(objectMap, "diskState", d.DiskState) 1923 populate(objectMap, "encryption", d.Encryption) 1924 populate(objectMap, "encryptionSettingsCollection", d.EncryptionSettingsCollection) 1925 populate(objectMap, "hyperVGeneration", d.HyperVGeneration) 1926 populate(objectMap, "maxShares", d.MaxShares) 1927 populate(objectMap, "networkAccessPolicy", d.NetworkAccessPolicy) 1928 populate(objectMap, "osType", d.OSType) 1929 populate(objectMap, "propertyUpdatesInProgress", d.PropertyUpdatesInProgress) 1930 populate(objectMap, "provisioningState", d.ProvisioningState) 1931 populate(objectMap, "purchasePlan", d.PurchasePlan) 1932 populate(objectMap, "securityProfile", d.SecurityProfile) 1933 populate(objectMap, "shareInfo", d.ShareInfo) 1934 populate(objectMap, "supportsHibernation", d.SupportsHibernation) 1935 populate(objectMap, "tier", d.Tier) 1936 populate(objectMap, "timeCreated", (*timeRFC3339)(d.TimeCreated)) 1937 populate(objectMap, "uniqueId", d.UniqueID) 1938 return json.Marshal(objectMap) 1939} 1940 1941// UnmarshalJSON implements the json.Unmarshaller interface for type DiskProperties. 1942func (d *DiskProperties) UnmarshalJSON(data []byte) error { 1943 var rawMsg map[string]json.RawMessage 1944 if err := json.Unmarshal(data, &rawMsg); err != nil { 1945 return err 1946 } 1947 for key, val := range rawMsg { 1948 var err error 1949 switch key { 1950 case "burstingEnabled": 1951 err = unpopulate(val, &d.BurstingEnabled) 1952 delete(rawMsg, key) 1953 case "creationData": 1954 err = unpopulate(val, &d.CreationData) 1955 delete(rawMsg, key) 1956 case "diskAccessId": 1957 err = unpopulate(val, &d.DiskAccessID) 1958 delete(rawMsg, key) 1959 case "diskIOPSReadOnly": 1960 err = unpopulate(val, &d.DiskIOPSReadOnly) 1961 delete(rawMsg, key) 1962 case "diskIOPSReadWrite": 1963 err = unpopulate(val, &d.DiskIOPSReadWrite) 1964 delete(rawMsg, key) 1965 case "diskMBpsReadOnly": 1966 err = unpopulate(val, &d.DiskMBpsReadOnly) 1967 delete(rawMsg, key) 1968 case "diskMBpsReadWrite": 1969 err = unpopulate(val, &d.DiskMBpsReadWrite) 1970 delete(rawMsg, key) 1971 case "diskSizeBytes": 1972 err = unpopulate(val, &d.DiskSizeBytes) 1973 delete(rawMsg, key) 1974 case "diskSizeGB": 1975 err = unpopulate(val, &d.DiskSizeGB) 1976 delete(rawMsg, key) 1977 case "diskState": 1978 err = unpopulate(val, &d.DiskState) 1979 delete(rawMsg, key) 1980 case "encryption": 1981 err = unpopulate(val, &d.Encryption) 1982 delete(rawMsg, key) 1983 case "encryptionSettingsCollection": 1984 err = unpopulate(val, &d.EncryptionSettingsCollection) 1985 delete(rawMsg, key) 1986 case "hyperVGeneration": 1987 err = unpopulate(val, &d.HyperVGeneration) 1988 delete(rawMsg, key) 1989 case "maxShares": 1990 err = unpopulate(val, &d.MaxShares) 1991 delete(rawMsg, key) 1992 case "networkAccessPolicy": 1993 err = unpopulate(val, &d.NetworkAccessPolicy) 1994 delete(rawMsg, key) 1995 case "osType": 1996 err = unpopulate(val, &d.OSType) 1997 delete(rawMsg, key) 1998 case "propertyUpdatesInProgress": 1999 err = unpopulate(val, &d.PropertyUpdatesInProgress) 2000 delete(rawMsg, key) 2001 case "provisioningState": 2002 err = unpopulate(val, &d.ProvisioningState) 2003 delete(rawMsg, key) 2004 case "purchasePlan": 2005 err = unpopulate(val, &d.PurchasePlan) 2006 delete(rawMsg, key) 2007 case "securityProfile": 2008 err = unpopulate(val, &d.SecurityProfile) 2009 delete(rawMsg, key) 2010 case "shareInfo": 2011 err = unpopulate(val, &d.ShareInfo) 2012 delete(rawMsg, key) 2013 case "supportsHibernation": 2014 err = unpopulate(val, &d.SupportsHibernation) 2015 delete(rawMsg, key) 2016 case "tier": 2017 err = unpopulate(val, &d.Tier) 2018 delete(rawMsg, key) 2019 case "timeCreated": 2020 var aux timeRFC3339 2021 err = unpopulate(val, &aux) 2022 d.TimeCreated = (*time.Time)(&aux) 2023 delete(rawMsg, key) 2024 case "uniqueId": 2025 err = unpopulate(val, &d.UniqueID) 2026 delete(rawMsg, key) 2027 } 2028 if err != nil { 2029 return err 2030 } 2031 } 2032 return nil 2033} 2034 2035// DiskPurchasePlan - Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. 2036type DiskPurchasePlan struct { 2037 // REQUIRED; The plan ID. 2038 Name *string `json:"name,omitempty"` 2039 2040 // REQUIRED; Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. 2041 Product *string `json:"product,omitempty"` 2042 2043 // REQUIRED; The publisher ID. 2044 Publisher *string `json:"publisher,omitempty"` 2045 2046 // The Offer Promotion Code. 2047 PromotionCode *string `json:"promotionCode,omitempty"` 2048} 2049 2050// DiskRestorePoint - Properties of disk restore point 2051type DiskRestorePoint struct { 2052 ProxyOnlyResource 2053 // Properties of an incremental disk restore point 2054 Properties *DiskRestorePointProperties `json:"properties,omitempty"` 2055} 2056 2057// DiskRestorePointGetOptions contains the optional parameters for the DiskRestorePoint.Get method. 2058type DiskRestorePointGetOptions struct { 2059 // placeholder for future optional parameters 2060} 2061 2062// DiskRestorePointList - The List Disk Restore Points operation response. 2063type DiskRestorePointList struct { 2064 // REQUIRED; A list of disk restore points. 2065 Value []*DiskRestorePoint `json:"value,omitempty"` 2066 2067 // The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore points. 2068 NextLink *string `json:"nextLink,omitempty"` 2069} 2070 2071// MarshalJSON implements the json.Marshaller interface for type DiskRestorePointList. 2072func (d DiskRestorePointList) MarshalJSON() ([]byte, error) { 2073 objectMap := make(map[string]interface{}) 2074 populate(objectMap, "nextLink", d.NextLink) 2075 populate(objectMap, "value", d.Value) 2076 return json.Marshal(objectMap) 2077} 2078 2079// DiskRestorePointListByRestorePointOptions contains the optional parameters for the DiskRestorePoint.ListByRestorePoint method. 2080type DiskRestorePointListByRestorePointOptions struct { 2081 // placeholder for future optional parameters 2082} 2083 2084// DiskRestorePointProperties - Properties of an incremental disk restore point 2085type DiskRestorePointProperties struct { 2086 // The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 2087 HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"` 2088 2089 // Purchase plan information for the the image from which the OS disk was created. 2090 PurchasePlan *DiskPurchasePlan `json:"purchasePlan,omitempty"` 2091 2092 // Indicates the OS on a disk supports hibernation. 2093 SupportsHibernation *bool `json:"supportsHibernation,omitempty"` 2094 2095 // READ-ONLY; Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. 2096 Encryption *Encryption `json:"encryption,omitempty" azure:"ro"` 2097 2098 // READ-ONLY; id of the backing snapshot's MIS family 2099 FamilyID *string `json:"familyId,omitempty" azure:"ro"` 2100 2101 // READ-ONLY; The Operating System type. 2102 OSType *OperatingSystemTypes `json:"osType,omitempty" azure:"ro"` 2103 2104 // READ-ONLY; arm id of source disk 2105 SourceResourceID *string `json:"sourceResourceId,omitempty" azure:"ro"` 2106 2107 // READ-ONLY; unique incarnation id of the source disk 2108 SourceUniqueID *string `json:"sourceUniqueId,omitempty" azure:"ro"` 2109 2110 // READ-ONLY; The timestamp of restorePoint creation 2111 TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"` 2112} 2113 2114// MarshalJSON implements the json.Marshaller interface for type DiskRestorePointProperties. 2115func (d DiskRestorePointProperties) MarshalJSON() ([]byte, error) { 2116 objectMap := make(map[string]interface{}) 2117 populate(objectMap, "encryption", d.Encryption) 2118 populate(objectMap, "familyId", d.FamilyID) 2119 populate(objectMap, "hyperVGeneration", d.HyperVGeneration) 2120 populate(objectMap, "osType", d.OSType) 2121 populate(objectMap, "purchasePlan", d.PurchasePlan) 2122 populate(objectMap, "sourceResourceId", d.SourceResourceID) 2123 populate(objectMap, "sourceUniqueId", d.SourceUniqueID) 2124 populate(objectMap, "supportsHibernation", d.SupportsHibernation) 2125 populate(objectMap, "timeCreated", (*timeRFC3339)(d.TimeCreated)) 2126 return json.Marshal(objectMap) 2127} 2128 2129// UnmarshalJSON implements the json.Unmarshaller interface for type DiskRestorePointProperties. 2130func (d *DiskRestorePointProperties) UnmarshalJSON(data []byte) error { 2131 var rawMsg map[string]json.RawMessage 2132 if err := json.Unmarshal(data, &rawMsg); err != nil { 2133 return err 2134 } 2135 for key, val := range rawMsg { 2136 var err error 2137 switch key { 2138 case "encryption": 2139 err = unpopulate(val, &d.Encryption) 2140 delete(rawMsg, key) 2141 case "familyId": 2142 err = unpopulate(val, &d.FamilyID) 2143 delete(rawMsg, key) 2144 case "hyperVGeneration": 2145 err = unpopulate(val, &d.HyperVGeneration) 2146 delete(rawMsg, key) 2147 case "osType": 2148 err = unpopulate(val, &d.OSType) 2149 delete(rawMsg, key) 2150 case "purchasePlan": 2151 err = unpopulate(val, &d.PurchasePlan) 2152 delete(rawMsg, key) 2153 case "sourceResourceId": 2154 err = unpopulate(val, &d.SourceResourceID) 2155 delete(rawMsg, key) 2156 case "sourceUniqueId": 2157 err = unpopulate(val, &d.SourceUniqueID) 2158 delete(rawMsg, key) 2159 case "supportsHibernation": 2160 err = unpopulate(val, &d.SupportsHibernation) 2161 delete(rawMsg, key) 2162 case "timeCreated": 2163 var aux timeRFC3339 2164 err = unpopulate(val, &aux) 2165 d.TimeCreated = (*time.Time)(&aux) 2166 delete(rawMsg, key) 2167 } 2168 if err != nil { 2169 return err 2170 } 2171 } 2172 return nil 2173} 2174 2175// DiskSKU - The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, or StandardSSDZRS. 2176type DiskSKU struct { 2177 // The sku name. 2178 Name *DiskStorageAccountTypes `json:"name,omitempty"` 2179 2180 // READ-ONLY; The sku tier. 2181 Tier *string `json:"tier,omitempty" azure:"ro"` 2182} 2183 2184// DiskSecurityProfile - Contains the security related information for the resource. 2185type DiskSecurityProfile struct { 2186 // Specifies the SecurityType of the VM. Applicable for OS disks only. 2187 SecurityType *DiskSecurityTypes `json:"securityType,omitempty"` 2188} 2189 2190// DiskUpdate - Disk update resource. 2191type DiskUpdate struct { 2192 // Disk resource update properties. 2193 Properties *DiskUpdateProperties `json:"properties,omitempty"` 2194 2195 // The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, or StandardSSDZRS. 2196 SKU *DiskSKU `json:"sku,omitempty"` 2197 2198 // Resource tags 2199 Tags map[string]*string `json:"tags,omitempty"` 2200} 2201 2202// MarshalJSON implements the json.Marshaller interface for type DiskUpdate. 2203func (d DiskUpdate) MarshalJSON() ([]byte, error) { 2204 objectMap := make(map[string]interface{}) 2205 populate(objectMap, "properties", d.Properties) 2206 populate(objectMap, "sku", d.SKU) 2207 populate(objectMap, "tags", d.Tags) 2208 return json.Marshal(objectMap) 2209} 2210 2211// DiskUpdateProperties - Disk resource update properties. 2212type DiskUpdateProperties struct { 2213 // Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. 2214 BurstingEnabled *bool `json:"burstingEnabled,omitempty"` 2215 2216 // ARM id of the DiskAccess resource for using private endpoints on disks. 2217 DiskAccessID *string `json:"diskAccessId,omitempty"` 2218 2219 // The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. 2220 DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` 2221 2222 // The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. 2223 DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` 2224 2225 // The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here 2226 // uses the ISO notation, of powers of 10. 2227 DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` 2228 2229 // The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers 2230 // of 10. 2231 DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` 2232 2233 // If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates 2234 // or creation with other options, it indicates a 2235 // resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. 2236 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 2237 2238 // Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. 2239 Encryption *Encryption `json:"encryption,omitempty"` 2240 2241 // Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. 2242 EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` 2243 2244 // The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at 2245 // the same time. 2246 MaxShares *int32 `json:"maxShares,omitempty"` 2247 2248 // Policy for accessing the disk via network. 2249 NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` 2250 2251 // the Operating System type. 2252 OSType *OperatingSystemTypes `json:"osType,omitempty"` 2253 2254 // Purchase plan information to be added on the OS disk 2255 PurchasePlan *DiskPurchasePlan `json:"purchasePlan,omitempty"` 2256 2257 // Indicates the OS on a disk supports hibernation. 2258 SupportsHibernation *bool `json:"supportsHibernation,omitempty"` 2259 2260 // Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra 2261 // disks. 2262 Tier *string `json:"tier,omitempty"` 2263 2264 // READ-ONLY; Properties of the disk for which update is pending. 2265 PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty" azure:"ro"` 2266} 2267 2268// DisksBeginCreateOrUpdateOptions contains the optional parameters for the Disks.BeginCreateOrUpdate method. 2269type DisksBeginCreateOrUpdateOptions struct { 2270 // placeholder for future optional parameters 2271} 2272 2273// DisksBeginDeleteOptions contains the optional parameters for the Disks.BeginDelete method. 2274type DisksBeginDeleteOptions struct { 2275 // placeholder for future optional parameters 2276} 2277 2278// DisksBeginGrantAccessOptions contains the optional parameters for the Disks.BeginGrantAccess method. 2279type DisksBeginGrantAccessOptions struct { 2280 // placeholder for future optional parameters 2281} 2282 2283// DisksBeginRevokeAccessOptions contains the optional parameters for the Disks.BeginRevokeAccess method. 2284type DisksBeginRevokeAccessOptions struct { 2285 // placeholder for future optional parameters 2286} 2287 2288// DisksBeginUpdateOptions contains the optional parameters for the Disks.BeginUpdate method. 2289type DisksBeginUpdateOptions struct { 2290 // placeholder for future optional parameters 2291} 2292 2293// DisksGetOptions contains the optional parameters for the Disks.Get method. 2294type DisksGetOptions struct { 2295 // placeholder for future optional parameters 2296} 2297 2298// DisksListByResourceGroupOptions contains the optional parameters for the Disks.ListByResourceGroup method. 2299type DisksListByResourceGroupOptions struct { 2300 // placeholder for future optional parameters 2301} 2302 2303// DisksListOptions contains the optional parameters for the Disks.List method. 2304type DisksListOptions struct { 2305 // placeholder for future optional parameters 2306} 2307 2308// Encryption at rest settings for disk or snapshot 2309type Encryption struct { 2310 // ResourceId of the disk encryption set to use for enabling encryption at rest. 2311 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` 2312 2313 // The type of key used to encrypt the data of the disk. 2314 Type *EncryptionType `json:"type,omitempty"` 2315} 2316 2317// EncryptionImages - Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. 2318type EncryptionImages struct { 2319 // A list of encryption specifications for data disk images. 2320 DataDiskImages []*DataDiskImageEncryption `json:"dataDiskImages,omitempty"` 2321 2322 // Contains encryption settings for an OS disk image. 2323 OSDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"` 2324} 2325 2326// MarshalJSON implements the json.Marshaller interface for type EncryptionImages. 2327func (e EncryptionImages) MarshalJSON() ([]byte, error) { 2328 objectMap := make(map[string]interface{}) 2329 populate(objectMap, "dataDiskImages", e.DataDiskImages) 2330 populate(objectMap, "osDiskImage", e.OSDiskImage) 2331 return json.Marshal(objectMap) 2332} 2333 2334// EncryptionSetIdentity - The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt 2335// disks. 2336type EncryptionSetIdentity struct { 2337 // The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with 2338 // Identity type None during migration of 2339 // subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. 2340 Type *DiskEncryptionSetIdentityType `json:"type,omitempty"` 2341 2342 // READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT 2343 // request if the resource has a systemAssigned(implicit) 2344 // identity 2345 PrincipalID *string `json:"principalId,omitempty" azure:"ro"` 2346 2347 // READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request 2348 // if the resource has a systemAssigned(implicit) identity 2349 TenantID *string `json:"tenantId,omitempty" azure:"ro"` 2350} 2351 2352type EncryptionSetProperties struct { 2353 // The key vault key which is currently used by this disk encryption set. 2354 ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"` 2355 2356 // The type of key used to encrypt the data of the disk. 2357 EncryptionType *DiskEncryptionSetType `json:"encryptionType,omitempty"` 2358 2359 // Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. 2360 RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` 2361 2362 // READ-ONLY; The time when the active key of this disk encryption set was updated. 2363 LastKeyRotationTimestamp *time.Time `json:"lastKeyRotationTimestamp,omitempty" azure:"ro"` 2364 2365 // READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty 2366 // if there is no ongoing key rotation. 2367 PreviousKeys []*KeyForDiskEncryptionSet `json:"previousKeys,omitempty" azure:"ro"` 2368 2369 // READ-ONLY; The disk encryption set provisioning state. 2370 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 2371} 2372 2373// MarshalJSON implements the json.Marshaller interface for type EncryptionSetProperties. 2374func (e EncryptionSetProperties) MarshalJSON() ([]byte, error) { 2375 objectMap := make(map[string]interface{}) 2376 populate(objectMap, "activeKey", e.ActiveKey) 2377 populate(objectMap, "encryptionType", e.EncryptionType) 2378 populate(objectMap, "lastKeyRotationTimestamp", (*timeRFC3339)(e.LastKeyRotationTimestamp)) 2379 populate(objectMap, "previousKeys", e.PreviousKeys) 2380 populate(objectMap, "provisioningState", e.ProvisioningState) 2381 populate(objectMap, "rotationToLatestKeyVersionEnabled", e.RotationToLatestKeyVersionEnabled) 2382 return json.Marshal(objectMap) 2383} 2384 2385// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionSetProperties. 2386func (e *EncryptionSetProperties) UnmarshalJSON(data []byte) error { 2387 var rawMsg map[string]json.RawMessage 2388 if err := json.Unmarshal(data, &rawMsg); err != nil { 2389 return err 2390 } 2391 for key, val := range rawMsg { 2392 var err error 2393 switch key { 2394 case "activeKey": 2395 err = unpopulate(val, &e.ActiveKey) 2396 delete(rawMsg, key) 2397 case "encryptionType": 2398 err = unpopulate(val, &e.EncryptionType) 2399 delete(rawMsg, key) 2400 case "lastKeyRotationTimestamp": 2401 var aux timeRFC3339 2402 err = unpopulate(val, &aux) 2403 e.LastKeyRotationTimestamp = (*time.Time)(&aux) 2404 delete(rawMsg, key) 2405 case "previousKeys": 2406 err = unpopulate(val, &e.PreviousKeys) 2407 delete(rawMsg, key) 2408 case "provisioningState": 2409 err = unpopulate(val, &e.ProvisioningState) 2410 delete(rawMsg, key) 2411 case "rotationToLatestKeyVersionEnabled": 2412 err = unpopulate(val, &e.RotationToLatestKeyVersionEnabled) 2413 delete(rawMsg, key) 2414 } 2415 if err != nil { 2416 return err 2417 } 2418 } 2419 return nil 2420} 2421 2422// EncryptionSettingsCollection - Encryption settings for disk or snapshot 2423type EncryptionSettingsCollection struct { 2424 // REQUIRED; Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey 2425 // and KeyEncryptionKey to disable encryption. 2426 // If EncryptionSettings is null in the request object, the existing settings remain unchanged. 2427 Enabled *bool `json:"enabled,omitempty"` 2428 2429 // A collection of encryption settings, one for each disk volume. 2430 EncryptionSettings []*EncryptionSettingsElement `json:"encryptionSettings,omitempty"` 2431 2432 // Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption 2433 // with AAD app.'1.1' corresponds to Azure Disk 2434 // Encryption. 2435 EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"` 2436} 2437 2438// MarshalJSON implements the json.Marshaller interface for type EncryptionSettingsCollection. 2439func (e EncryptionSettingsCollection) MarshalJSON() ([]byte, error) { 2440 objectMap := make(map[string]interface{}) 2441 populate(objectMap, "enabled", e.Enabled) 2442 populate(objectMap, "encryptionSettings", e.EncryptionSettings) 2443 populate(objectMap, "encryptionSettingsVersion", e.EncryptionSettingsVersion) 2444 return json.Marshal(objectMap) 2445} 2446 2447// EncryptionSettingsElement - Encryption settings for one disk volume. 2448type EncryptionSettingsElement struct { 2449 // Key Vault Secret Url and vault id of the disk encryption key 2450 DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"` 2451 2452 // Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. 2453 KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"` 2454} 2455 2456// ExtendedLocation - The complex type of the extended location. 2457type ExtendedLocation struct { 2458 // The name of the extended location. 2459 Name *string `json:"name,omitempty"` 2460 2461 // The type of the extended location. 2462 Type *ExtendedLocationTypes `json:"type,omitempty"` 2463} 2464 2465// Extension - Describes a cloud service Extension. 2466type Extension struct { 2467 // The name of the extension. 2468 Name *string `json:"name,omitempty"` 2469 2470 // Extension Properties. 2471 Properties *CloudServiceExtensionProperties `json:"properties,omitempty"` 2472} 2473 2474// GalleriesBeginCreateOrUpdateOptions contains the optional parameters for the Galleries.BeginCreateOrUpdate method. 2475type GalleriesBeginCreateOrUpdateOptions struct { 2476 // placeholder for future optional parameters 2477} 2478 2479// GalleriesBeginDeleteOptions contains the optional parameters for the Galleries.BeginDelete method. 2480type GalleriesBeginDeleteOptions struct { 2481 // placeholder for future optional parameters 2482} 2483 2484// GalleriesBeginUpdateOptions contains the optional parameters for the Galleries.BeginUpdate method. 2485type GalleriesBeginUpdateOptions struct { 2486 // placeholder for future optional parameters 2487} 2488 2489// GalleriesGetOptions contains the optional parameters for the Galleries.Get method. 2490type GalleriesGetOptions struct { 2491 // The select expression to apply on the operation. 2492 Select *SelectPermissions 2493} 2494 2495// GalleriesListByResourceGroupOptions contains the optional parameters for the Galleries.ListByResourceGroup method. 2496type GalleriesListByResourceGroupOptions struct { 2497 // placeholder for future optional parameters 2498} 2499 2500// GalleriesListOptions contains the optional parameters for the Galleries.List method. 2501type GalleriesListOptions struct { 2502 // placeholder for future optional parameters 2503} 2504 2505// Gallery - Specifies information about the Shared Image Gallery that you want to create or update. 2506type Gallery struct { 2507 Resource 2508 // Describes the properties of a Shared Image Gallery. 2509 Properties *GalleryProperties `json:"properties,omitempty"` 2510} 2511 2512// MarshalJSON implements the json.Marshaller interface for type Gallery. 2513func (g Gallery) MarshalJSON() ([]byte, error) { 2514 objectMap := g.Resource.marshalInternal() 2515 populate(objectMap, "properties", g.Properties) 2516 return json.Marshal(objectMap) 2517} 2518 2519// GalleryApplication - Specifies information about the gallery Application Definition that you want to create or update. 2520type GalleryApplication struct { 2521 Resource 2522 // Describes the properties of a gallery Application Definition. 2523 Properties *GalleryApplicationProperties `json:"properties,omitempty"` 2524} 2525 2526// MarshalJSON implements the json.Marshaller interface for type GalleryApplication. 2527func (g GalleryApplication) MarshalJSON() ([]byte, error) { 2528 objectMap := g.Resource.marshalInternal() 2529 populate(objectMap, "properties", g.Properties) 2530 return json.Marshal(objectMap) 2531} 2532 2533// GalleryApplicationList - The List Gallery Applications operation response. 2534type GalleryApplicationList struct { 2535 // REQUIRED; A list of Gallery Applications. 2536 Value []*GalleryApplication `json:"value,omitempty"` 2537 2538 // The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application 2539 // Definitions. 2540 NextLink *string `json:"nextLink,omitempty"` 2541} 2542 2543// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationList. 2544func (g GalleryApplicationList) MarshalJSON() ([]byte, error) { 2545 objectMap := make(map[string]interface{}) 2546 populate(objectMap, "nextLink", g.NextLink) 2547 populate(objectMap, "value", g.Value) 2548 return json.Marshal(objectMap) 2549} 2550 2551// GalleryApplicationProperties - Describes the properties of a gallery Application Definition. 2552type GalleryApplicationProperties struct { 2553 // REQUIRED; This property allows you to specify the supported type of the OS that application is built for. 2554 // Possible values are: 2555 // Windows 2556 // Linux 2557 SupportedOSType *OperatingSystemTypes `json:"supportedOSType,omitempty"` 2558 2559 // The description of this gallery Application Definition resource. This property is updatable. 2560 Description *string `json:"description,omitempty"` 2561 2562 // The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable. 2563 EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"` 2564 2565 // The Eula agreement for the gallery Application Definition. 2566 Eula *string `json:"eula,omitempty"` 2567 2568 // The privacy statement uri. 2569 PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"` 2570 2571 // The release note uri. 2572 ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"` 2573} 2574 2575// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationProperties. 2576func (g GalleryApplicationProperties) MarshalJSON() ([]byte, error) { 2577 objectMap := make(map[string]interface{}) 2578 populate(objectMap, "description", g.Description) 2579 populate(objectMap, "endOfLifeDate", (*timeRFC3339)(g.EndOfLifeDate)) 2580 populate(objectMap, "eula", g.Eula) 2581 populate(objectMap, "privacyStatementUri", g.PrivacyStatementURI) 2582 populate(objectMap, "releaseNoteUri", g.ReleaseNoteURI) 2583 populate(objectMap, "supportedOSType", g.SupportedOSType) 2584 return json.Marshal(objectMap) 2585} 2586 2587// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationProperties. 2588func (g *GalleryApplicationProperties) UnmarshalJSON(data []byte) error { 2589 var rawMsg map[string]json.RawMessage 2590 if err := json.Unmarshal(data, &rawMsg); err != nil { 2591 return err 2592 } 2593 for key, val := range rawMsg { 2594 var err error 2595 switch key { 2596 case "description": 2597 err = unpopulate(val, &g.Description) 2598 delete(rawMsg, key) 2599 case "endOfLifeDate": 2600 var aux timeRFC3339 2601 err = unpopulate(val, &aux) 2602 g.EndOfLifeDate = (*time.Time)(&aux) 2603 delete(rawMsg, key) 2604 case "eula": 2605 err = unpopulate(val, &g.Eula) 2606 delete(rawMsg, key) 2607 case "privacyStatementUri": 2608 err = unpopulate(val, &g.PrivacyStatementURI) 2609 delete(rawMsg, key) 2610 case "releaseNoteUri": 2611 err = unpopulate(val, &g.ReleaseNoteURI) 2612 delete(rawMsg, key) 2613 case "supportedOSType": 2614 err = unpopulate(val, &g.SupportedOSType) 2615 delete(rawMsg, key) 2616 } 2617 if err != nil { 2618 return err 2619 } 2620 } 2621 return nil 2622} 2623 2624// GalleryApplicationUpdate - Specifies information about the gallery Application Definition that you want to update. 2625type GalleryApplicationUpdate struct { 2626 UpdateResourceDefinition 2627 // Describes the properties of a gallery Application Definition. 2628 Properties *GalleryApplicationProperties `json:"properties,omitempty"` 2629} 2630 2631// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationUpdate. 2632func (g GalleryApplicationUpdate) MarshalJSON() ([]byte, error) { 2633 objectMap := g.UpdateResourceDefinition.marshalInternal() 2634 populate(objectMap, "properties", g.Properties) 2635 return json.Marshal(objectMap) 2636} 2637 2638// GalleryApplicationVersion - Specifies information about the gallery Application Version that you want to create or update. 2639type GalleryApplicationVersion struct { 2640 Resource 2641 // Describes the properties of a gallery image version. 2642 Properties *GalleryApplicationVersionProperties `json:"properties,omitempty"` 2643} 2644 2645// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersion. 2646func (g GalleryApplicationVersion) MarshalJSON() ([]byte, error) { 2647 objectMap := g.Resource.marshalInternal() 2648 populate(objectMap, "properties", g.Properties) 2649 return json.Marshal(objectMap) 2650} 2651 2652// GalleryApplicationVersionList - The List Gallery Application version operation response. 2653type GalleryApplicationVersionList struct { 2654 // REQUIRED; A list of gallery Application Versions. 2655 Value []*GalleryApplicationVersion `json:"value,omitempty"` 2656 2657 // The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions. 2658 NextLink *string `json:"nextLink,omitempty"` 2659} 2660 2661// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionList. 2662func (g GalleryApplicationVersionList) MarshalJSON() ([]byte, error) { 2663 objectMap := make(map[string]interface{}) 2664 populate(objectMap, "nextLink", g.NextLink) 2665 populate(objectMap, "value", g.Value) 2666 return json.Marshal(objectMap) 2667} 2668 2669// GalleryApplicationVersionProperties - Describes the properties of a gallery image version. 2670type GalleryApplicationVersionProperties struct { 2671 // REQUIRED; The publishing profile of a gallery image version. 2672 PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"` 2673 2674 // READ-ONLY; The provisioning state, which only appears in the response. 2675 ProvisioningState *GalleryApplicationVersionPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"` 2676 2677 // READ-ONLY; This is the replication status of the gallery image version. 2678 ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty" azure:"ro"` 2679} 2680 2681// GalleryApplicationVersionPublishingProfile - The publishing profile of a gallery image version. 2682type GalleryApplicationVersionPublishingProfile struct { 2683 GalleryArtifactPublishingProfileBase 2684 // REQUIRED; The source image from which the Image Version is going to be created. 2685 Source *UserArtifactSource `json:"source,omitempty"` 2686 2687 // Optional. Whether or not this application reports health. 2688 EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"` 2689 ManageActions *UserArtifactManage `json:"manageActions,omitempty"` 2690} 2691 2692// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionPublishingProfile. 2693func (g GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) { 2694 objectMap := g.GalleryArtifactPublishingProfileBase.marshalInternal() 2695 populate(objectMap, "enableHealthCheck", g.EnableHealthCheck) 2696 populate(objectMap, "manageActions", g.ManageActions) 2697 populate(objectMap, "source", g.Source) 2698 return json.Marshal(objectMap) 2699} 2700 2701// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationVersionPublishingProfile. 2702func (g *GalleryApplicationVersionPublishingProfile) UnmarshalJSON(data []byte) error { 2703 var rawMsg map[string]json.RawMessage 2704 if err := json.Unmarshal(data, &rawMsg); err != nil { 2705 return err 2706 } 2707 for key, val := range rawMsg { 2708 var err error 2709 switch key { 2710 case "enableHealthCheck": 2711 err = unpopulate(val, &g.EnableHealthCheck) 2712 delete(rawMsg, key) 2713 case "manageActions": 2714 err = unpopulate(val, &g.ManageActions) 2715 delete(rawMsg, key) 2716 case "source": 2717 err = unpopulate(val, &g.Source) 2718 delete(rawMsg, key) 2719 } 2720 if err != nil { 2721 return err 2722 } 2723 } 2724 return g.GalleryArtifactPublishingProfileBase.unmarshalInternal(rawMsg) 2725} 2726 2727// GalleryApplicationVersionUpdate - Specifies information about the gallery Application Version that you want to update. 2728type GalleryApplicationVersionUpdate struct { 2729 UpdateResourceDefinition 2730 // Describes the properties of a gallery image version. 2731 Properties *GalleryApplicationVersionProperties `json:"properties,omitempty"` 2732} 2733 2734// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionUpdate. 2735func (g GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) { 2736 objectMap := g.UpdateResourceDefinition.marshalInternal() 2737 populate(objectMap, "properties", g.Properties) 2738 return json.Marshal(objectMap) 2739} 2740 2741// GalleryApplicationVersionsBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationVersions.BeginCreateOrUpdate method. 2742type GalleryApplicationVersionsBeginCreateOrUpdateOptions struct { 2743 // placeholder for future optional parameters 2744} 2745 2746// GalleryApplicationVersionsBeginDeleteOptions contains the optional parameters for the GalleryApplicationVersions.BeginDelete method. 2747type GalleryApplicationVersionsBeginDeleteOptions struct { 2748 // placeholder for future optional parameters 2749} 2750 2751// GalleryApplicationVersionsBeginUpdateOptions contains the optional parameters for the GalleryApplicationVersions.BeginUpdate method. 2752type GalleryApplicationVersionsBeginUpdateOptions struct { 2753 // placeholder for future optional parameters 2754} 2755 2756// GalleryApplicationVersionsGetOptions contains the optional parameters for the GalleryApplicationVersions.Get method. 2757type GalleryApplicationVersionsGetOptions struct { 2758 // The expand expression to apply on the operation. 2759 Expand *ReplicationStatusTypes 2760} 2761 2762// GalleryApplicationVersionsListByGalleryApplicationOptions contains the optional parameters for the GalleryApplicationVersions.ListByGalleryApplication 2763// method. 2764type GalleryApplicationVersionsListByGalleryApplicationOptions struct { 2765 // placeholder for future optional parameters 2766} 2767 2768// GalleryApplicationsBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplications.BeginCreateOrUpdate method. 2769type GalleryApplicationsBeginCreateOrUpdateOptions struct { 2770 // placeholder for future optional parameters 2771} 2772 2773// GalleryApplicationsBeginDeleteOptions contains the optional parameters for the GalleryApplications.BeginDelete method. 2774type GalleryApplicationsBeginDeleteOptions struct { 2775 // placeholder for future optional parameters 2776} 2777 2778// GalleryApplicationsBeginUpdateOptions contains the optional parameters for the GalleryApplications.BeginUpdate method. 2779type GalleryApplicationsBeginUpdateOptions struct { 2780 // placeholder for future optional parameters 2781} 2782 2783// GalleryApplicationsGetOptions contains the optional parameters for the GalleryApplications.Get method. 2784type GalleryApplicationsGetOptions struct { 2785 // placeholder for future optional parameters 2786} 2787 2788// GalleryApplicationsListByGalleryOptions contains the optional parameters for the GalleryApplications.ListByGallery method. 2789type GalleryApplicationsListByGalleryOptions struct { 2790 // placeholder for future optional parameters 2791} 2792 2793// GalleryArtifactPublishingProfileBase - Describes the basic gallery artifact publishing profile. 2794type GalleryArtifactPublishingProfileBase struct { 2795 // The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable. 2796 EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"` 2797 2798 // If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. 2799 ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"` 2800 2801 // The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. 2802 // This property is updatable. 2803 ReplicaCount *int32 `json:"replicaCount,omitempty"` 2804 2805 // Specifies the storage account type to be used to store the image. This property is not updatable. 2806 StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"` 2807 2808 // The target regions where the Image Version is going to be replicated to. This property is updatable. 2809 TargetRegions []*TargetRegion `json:"targetRegions,omitempty"` 2810 2811 // READ-ONLY; The timestamp for when the gallery image version is published. 2812 PublishedDate *time.Time `json:"publishedDate,omitempty" azure:"ro"` 2813} 2814 2815// MarshalJSON implements the json.Marshaller interface for type GalleryArtifactPublishingProfileBase. 2816func (g GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) { 2817 objectMap := g.marshalInternal() 2818 return json.Marshal(objectMap) 2819} 2820 2821// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryArtifactPublishingProfileBase. 2822func (g *GalleryArtifactPublishingProfileBase) UnmarshalJSON(data []byte) error { 2823 var rawMsg map[string]json.RawMessage 2824 if err := json.Unmarshal(data, &rawMsg); err != nil { 2825 return err 2826 } 2827 return g.unmarshalInternal(rawMsg) 2828} 2829 2830func (g GalleryArtifactPublishingProfileBase) marshalInternal() map[string]interface{} { 2831 objectMap := make(map[string]interface{}) 2832 populate(objectMap, "endOfLifeDate", (*timeRFC3339)(g.EndOfLifeDate)) 2833 populate(objectMap, "excludeFromLatest", g.ExcludeFromLatest) 2834 populate(objectMap, "publishedDate", (*timeRFC3339)(g.PublishedDate)) 2835 populate(objectMap, "replicaCount", g.ReplicaCount) 2836 populate(objectMap, "storageAccountType", g.StorageAccountType) 2837 populate(objectMap, "targetRegions", g.TargetRegions) 2838 return objectMap 2839} 2840 2841func (g *GalleryArtifactPublishingProfileBase) unmarshalInternal(rawMsg map[string]json.RawMessage) error { 2842 for key, val := range rawMsg { 2843 var err error 2844 switch key { 2845 case "endOfLifeDate": 2846 var aux timeRFC3339 2847 err = unpopulate(val, &aux) 2848 g.EndOfLifeDate = (*time.Time)(&aux) 2849 delete(rawMsg, key) 2850 case "excludeFromLatest": 2851 err = unpopulate(val, &g.ExcludeFromLatest) 2852 delete(rawMsg, key) 2853 case "publishedDate": 2854 var aux timeRFC3339 2855 err = unpopulate(val, &aux) 2856 g.PublishedDate = (*time.Time)(&aux) 2857 delete(rawMsg, key) 2858 case "replicaCount": 2859 err = unpopulate(val, &g.ReplicaCount) 2860 delete(rawMsg, key) 2861 case "storageAccountType": 2862 err = unpopulate(val, &g.StorageAccountType) 2863 delete(rawMsg, key) 2864 case "targetRegions": 2865 err = unpopulate(val, &g.TargetRegions) 2866 delete(rawMsg, key) 2867 } 2868 if err != nil { 2869 return err 2870 } 2871 } 2872 return nil 2873} 2874 2875// GalleryArtifactSource - The source image from which the Image Version is going to be created. 2876type GalleryArtifactSource struct { 2877 // REQUIRED; The managed artifact. 2878 ManagedImage *ManagedArtifact `json:"managedImage,omitempty"` 2879} 2880 2881// GalleryArtifactVersionSource - The gallery artifact version source. 2882type GalleryArtifactVersionSource struct { 2883 // The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. 2884 ID *string `json:"id,omitempty"` 2885 2886 // The uri of the gallery artifact version source. Currently used to specify vhd/blob source. 2887 URI *string `json:"uri,omitempty"` 2888} 2889 2890// GalleryDataDiskImage - This is the data disk image. 2891type GalleryDataDiskImage struct { 2892 GalleryDiskImage 2893 // REQUIRED; This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and 2894 // therefore must be unique for each data disk attached to the 2895 // Virtual Machine. 2896 Lun *int32 `json:"lun,omitempty"` 2897} 2898 2899// GalleryDiskImage - This is the disk image base class. 2900type GalleryDiskImage struct { 2901 // The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' 2902 HostCaching *HostCaching `json:"hostCaching,omitempty"` 2903 2904 // The gallery artifact version source. 2905 Source *GalleryArtifactVersionSource `json:"source,omitempty"` 2906 2907 // READ-ONLY; This property indicates the size of the VHD to be created. 2908 SizeInGB *int32 `json:"sizeInGB,omitempty" azure:"ro"` 2909} 2910 2911// GalleryIdentifier - Describes the gallery unique name. 2912type GalleryIdentifier struct { 2913 // READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure. 2914 UniqueName *string `json:"uniqueName,omitempty" azure:"ro"` 2915} 2916 2917// GalleryImage - Specifies information about the gallery image definition that you want to create or update. 2918type GalleryImage struct { 2919 Resource 2920 // Describes the properties of a gallery image definition. 2921 Properties *GalleryImageProperties `json:"properties,omitempty"` 2922} 2923 2924// MarshalJSON implements the json.Marshaller interface for type GalleryImage. 2925func (g GalleryImage) MarshalJSON() ([]byte, error) { 2926 objectMap := g.Resource.marshalInternal() 2927 populate(objectMap, "properties", g.Properties) 2928 return json.Marshal(objectMap) 2929} 2930 2931// GalleryImageFeature - A feature for gallery image. 2932type GalleryImageFeature struct { 2933 // The name of the gallery image feature. 2934 Name *string `json:"name,omitempty"` 2935 2936 // The value of the gallery image feature. 2937 Value *string `json:"value,omitempty"` 2938} 2939 2940// GalleryImageIdentifier - This is the gallery image definition identifier. 2941type GalleryImageIdentifier struct { 2942 // REQUIRED; The name of the gallery image definition offer. 2943 Offer *string `json:"offer,omitempty"` 2944 2945 // REQUIRED; The name of the gallery image definition publisher. 2946 Publisher *string `json:"publisher,omitempty"` 2947 2948 // REQUIRED; The name of the gallery image definition SKU. 2949 SKU *string `json:"sku,omitempty"` 2950} 2951 2952// GalleryImageList - The List Gallery Images operation response. 2953type GalleryImageList struct { 2954 // REQUIRED; A list of Shared Image Gallery images. 2955 Value []*GalleryImage `json:"value,omitempty"` 2956 2957 // The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery image definitions. 2958 NextLink *string `json:"nextLink,omitempty"` 2959} 2960 2961// MarshalJSON implements the json.Marshaller interface for type GalleryImageList. 2962func (g GalleryImageList) MarshalJSON() ([]byte, error) { 2963 objectMap := make(map[string]interface{}) 2964 populate(objectMap, "nextLink", g.NextLink) 2965 populate(objectMap, "value", g.Value) 2966 return json.Marshal(objectMap) 2967} 2968 2969// GalleryImageProperties - Describes the properties of a gallery image definition. 2970type GalleryImageProperties struct { 2971 // REQUIRED; This is the gallery image definition identifier. 2972 Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` 2973 2974 // REQUIRED; This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. 2975 OSState *OperatingSystemStateTypes `json:"osState,omitempty"` 2976 2977 // REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. 2978 // Possible values are: 2979 // Windows 2980 // Linux 2981 OSType *OperatingSystemTypes `json:"osType,omitempty"` 2982 2983 // The description of this gallery image definition resource. This property is updatable. 2984 Description *string `json:"description,omitempty"` 2985 2986 // Describes the disallowed disk types. 2987 Disallowed *Disallowed `json:"disallowed,omitempty"` 2988 2989 // The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. 2990 EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"` 2991 2992 // The Eula agreement for the gallery image definition. 2993 Eula *string `json:"eula,omitempty"` 2994 2995 // A list of gallery image features. 2996 Features []*GalleryImageFeature `json:"features,omitempty"` 2997 2998 // The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 2999 HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"` 3000 3001 // The privacy statement uri. 3002 PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"` 3003 3004 // Describes the gallery image definition purchase plan. This is used by marketplace images. 3005 PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"` 3006 3007 // The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. 3008 Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"` 3009 3010 // The release note uri. 3011 ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"` 3012 3013 // READ-ONLY; The provisioning state, which only appears in the response. 3014 ProvisioningState *GalleryImagePropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"` 3015} 3016 3017// MarshalJSON implements the json.Marshaller interface for type GalleryImageProperties. 3018func (g GalleryImageProperties) MarshalJSON() ([]byte, error) { 3019 objectMap := make(map[string]interface{}) 3020 populate(objectMap, "description", g.Description) 3021 populate(objectMap, "disallowed", g.Disallowed) 3022 populate(objectMap, "endOfLifeDate", (*timeRFC3339)(g.EndOfLifeDate)) 3023 populate(objectMap, "eula", g.Eula) 3024 populate(objectMap, "features", g.Features) 3025 populate(objectMap, "hyperVGeneration", g.HyperVGeneration) 3026 populate(objectMap, "identifier", g.Identifier) 3027 populate(objectMap, "osState", g.OSState) 3028 populate(objectMap, "osType", g.OSType) 3029 populate(objectMap, "privacyStatementUri", g.PrivacyStatementURI) 3030 populate(objectMap, "provisioningState", g.ProvisioningState) 3031 populate(objectMap, "purchasePlan", g.PurchasePlan) 3032 populate(objectMap, "recommended", g.Recommended) 3033 populate(objectMap, "releaseNoteUri", g.ReleaseNoteURI) 3034 return json.Marshal(objectMap) 3035} 3036 3037// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageProperties. 3038func (g *GalleryImageProperties) UnmarshalJSON(data []byte) error { 3039 var rawMsg map[string]json.RawMessage 3040 if err := json.Unmarshal(data, &rawMsg); err != nil { 3041 return err 3042 } 3043 for key, val := range rawMsg { 3044 var err error 3045 switch key { 3046 case "description": 3047 err = unpopulate(val, &g.Description) 3048 delete(rawMsg, key) 3049 case "disallowed": 3050 err = unpopulate(val, &g.Disallowed) 3051 delete(rawMsg, key) 3052 case "endOfLifeDate": 3053 var aux timeRFC3339 3054 err = unpopulate(val, &aux) 3055 g.EndOfLifeDate = (*time.Time)(&aux) 3056 delete(rawMsg, key) 3057 case "eula": 3058 err = unpopulate(val, &g.Eula) 3059 delete(rawMsg, key) 3060 case "features": 3061 err = unpopulate(val, &g.Features) 3062 delete(rawMsg, key) 3063 case "hyperVGeneration": 3064 err = unpopulate(val, &g.HyperVGeneration) 3065 delete(rawMsg, key) 3066 case "identifier": 3067 err = unpopulate(val, &g.Identifier) 3068 delete(rawMsg, key) 3069 case "osState": 3070 err = unpopulate(val, &g.OSState) 3071 delete(rawMsg, key) 3072 case "osType": 3073 err = unpopulate(val, &g.OSType) 3074 delete(rawMsg, key) 3075 case "privacyStatementUri": 3076 err = unpopulate(val, &g.PrivacyStatementURI) 3077 delete(rawMsg, key) 3078 case "provisioningState": 3079 err = unpopulate(val, &g.ProvisioningState) 3080 delete(rawMsg, key) 3081 case "purchasePlan": 3082 err = unpopulate(val, &g.PurchasePlan) 3083 delete(rawMsg, key) 3084 case "recommended": 3085 err = unpopulate(val, &g.Recommended) 3086 delete(rawMsg, key) 3087 case "releaseNoteUri": 3088 err = unpopulate(val, &g.ReleaseNoteURI) 3089 delete(rawMsg, key) 3090 } 3091 if err != nil { 3092 return err 3093 } 3094 } 3095 return nil 3096} 3097 3098// GalleryImageUpdate - Specifies information about the gallery image definition that you want to update. 3099type GalleryImageUpdate struct { 3100 UpdateResourceDefinition 3101 // Describes the properties of a gallery image definition. 3102 Properties *GalleryImageProperties `json:"properties,omitempty"` 3103} 3104 3105// MarshalJSON implements the json.Marshaller interface for type GalleryImageUpdate. 3106func (g GalleryImageUpdate) MarshalJSON() ([]byte, error) { 3107 objectMap := g.UpdateResourceDefinition.marshalInternal() 3108 populate(objectMap, "properties", g.Properties) 3109 return json.Marshal(objectMap) 3110} 3111 3112// GalleryImageVersion - Specifies information about the gallery image version that you want to create or update. 3113type GalleryImageVersion struct { 3114 Resource 3115 // Describes the properties of a gallery image version. 3116 Properties *GalleryImageVersionProperties `json:"properties,omitempty"` 3117} 3118 3119// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersion. 3120func (g GalleryImageVersion) MarshalJSON() ([]byte, error) { 3121 objectMap := g.Resource.marshalInternal() 3122 populate(objectMap, "properties", g.Properties) 3123 return json.Marshal(objectMap) 3124} 3125 3126// GalleryImageVersionList - The List Gallery Image version operation response. 3127type GalleryImageVersionList struct { 3128 // REQUIRED; A list of gallery image versions. 3129 Value []*GalleryImageVersion `json:"value,omitempty"` 3130 3131 // The uri to fetch the next page of gallery image versions. Call ListNext() with this to fetch the next page of gallery image versions. 3132 NextLink *string `json:"nextLink,omitempty"` 3133} 3134 3135// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionList. 3136func (g GalleryImageVersionList) MarshalJSON() ([]byte, error) { 3137 objectMap := make(map[string]interface{}) 3138 populate(objectMap, "nextLink", g.NextLink) 3139 populate(objectMap, "value", g.Value) 3140 return json.Marshal(objectMap) 3141} 3142 3143// GalleryImageVersionProperties - Describes the properties of a gallery image version. 3144type GalleryImageVersionProperties struct { 3145 // REQUIRED; This is the storage profile of a Gallery Image Version. 3146 StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"` 3147 3148 // The publishing profile of a gallery image Version. 3149 PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"` 3150 3151 // READ-ONLY; The provisioning state, which only appears in the response. 3152 ProvisioningState *GalleryImageVersionPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"` 3153 3154 // READ-ONLY; This is the replication status of the gallery image version. 3155 ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty" azure:"ro"` 3156} 3157 3158// GalleryImageVersionPublishingProfile - The publishing profile of a gallery image Version. 3159type GalleryImageVersionPublishingProfile struct { 3160 GalleryArtifactPublishingProfileBase 3161} 3162 3163// GalleryImageVersionStorageProfile - This is the storage profile of a Gallery Image Version. 3164type GalleryImageVersionStorageProfile struct { 3165 // A list of data disk images. 3166 DataDiskImages []*GalleryDataDiskImage `json:"dataDiskImages,omitempty"` 3167 3168 // This is the OS disk image. 3169 OSDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"` 3170 3171 // The gallery artifact version source. 3172 Source *GalleryArtifactVersionSource `json:"source,omitempty"` 3173} 3174 3175// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionStorageProfile. 3176func (g GalleryImageVersionStorageProfile) MarshalJSON() ([]byte, error) { 3177 objectMap := make(map[string]interface{}) 3178 populate(objectMap, "dataDiskImages", g.DataDiskImages) 3179 populate(objectMap, "osDiskImage", g.OSDiskImage) 3180 populate(objectMap, "source", g.Source) 3181 return json.Marshal(objectMap) 3182} 3183 3184// GalleryImageVersionUpdate - Specifies information about the gallery image version that you want to update. 3185type GalleryImageVersionUpdate struct { 3186 UpdateResourceDefinition 3187 // Describes the properties of a gallery image version. 3188 Properties *GalleryImageVersionProperties `json:"properties,omitempty"` 3189} 3190 3191// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionUpdate. 3192func (g GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) { 3193 objectMap := g.UpdateResourceDefinition.marshalInternal() 3194 populate(objectMap, "properties", g.Properties) 3195 return json.Marshal(objectMap) 3196} 3197 3198// GalleryImageVersionsBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImageVersions.BeginCreateOrUpdate method. 3199type GalleryImageVersionsBeginCreateOrUpdateOptions struct { 3200 // placeholder for future optional parameters 3201} 3202 3203// GalleryImageVersionsBeginDeleteOptions contains the optional parameters for the GalleryImageVersions.BeginDelete method. 3204type GalleryImageVersionsBeginDeleteOptions struct { 3205 // placeholder for future optional parameters 3206} 3207 3208// GalleryImageVersionsBeginUpdateOptions contains the optional parameters for the GalleryImageVersions.BeginUpdate method. 3209type GalleryImageVersionsBeginUpdateOptions struct { 3210 // placeholder for future optional parameters 3211} 3212 3213// GalleryImageVersionsGetOptions contains the optional parameters for the GalleryImageVersions.Get method. 3214type GalleryImageVersionsGetOptions struct { 3215 // The expand expression to apply on the operation. 3216 Expand *ReplicationStatusTypes 3217} 3218 3219// GalleryImageVersionsListByGalleryImageOptions contains the optional parameters for the GalleryImageVersions.ListByGalleryImage method. 3220type GalleryImageVersionsListByGalleryImageOptions struct { 3221 // placeholder for future optional parameters 3222} 3223 3224// GalleryImagesBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImages.BeginCreateOrUpdate method. 3225type GalleryImagesBeginCreateOrUpdateOptions struct { 3226 // placeholder for future optional parameters 3227} 3228 3229// GalleryImagesBeginDeleteOptions contains the optional parameters for the GalleryImages.BeginDelete method. 3230type GalleryImagesBeginDeleteOptions struct { 3231 // placeholder for future optional parameters 3232} 3233 3234// GalleryImagesBeginUpdateOptions contains the optional parameters for the GalleryImages.BeginUpdate method. 3235type GalleryImagesBeginUpdateOptions struct { 3236 // placeholder for future optional parameters 3237} 3238 3239// GalleryImagesGetOptions contains the optional parameters for the GalleryImages.Get method. 3240type GalleryImagesGetOptions struct { 3241 // placeholder for future optional parameters 3242} 3243 3244// GalleryImagesListByGalleryOptions contains the optional parameters for the GalleryImages.ListByGallery method. 3245type GalleryImagesListByGalleryOptions struct { 3246 // placeholder for future optional parameters 3247} 3248 3249// GalleryList - The List Galleries operation response. 3250type GalleryList struct { 3251 // REQUIRED; A list of galleries. 3252 Value []*Gallery `json:"value,omitempty"` 3253 3254 // The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries. 3255 NextLink *string `json:"nextLink,omitempty"` 3256} 3257 3258// MarshalJSON implements the json.Marshaller interface for type GalleryList. 3259func (g GalleryList) MarshalJSON() ([]byte, error) { 3260 objectMap := make(map[string]interface{}) 3261 populate(objectMap, "nextLink", g.NextLink) 3262 populate(objectMap, "value", g.Value) 3263 return json.Marshal(objectMap) 3264} 3265 3266// GalleryOSDiskImage - This is the OS disk image. 3267type GalleryOSDiskImage struct { 3268 GalleryDiskImage 3269} 3270 3271// GalleryProperties - Describes the properties of a Shared Image Gallery. 3272type GalleryProperties struct { 3273 // The description of this Shared Image Gallery resource. This property is updatable. 3274 Description *string `json:"description,omitempty"` 3275 3276 // Describes the gallery unique name. 3277 Identifier *GalleryIdentifier `json:"identifier,omitempty"` 3278 3279 // Profile for gallery sharing to subscription or tenant 3280 SharingProfile *SharingProfile `json:"sharingProfile,omitempty"` 3281 3282 // READ-ONLY; The provisioning state, which only appears in the response. 3283 ProvisioningState *GalleryPropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"` 3284} 3285 3286// GallerySharingProfileBeginUpdateOptions contains the optional parameters for the GallerySharingProfile.BeginUpdate method. 3287type GallerySharingProfileBeginUpdateOptions struct { 3288 // placeholder for future optional parameters 3289} 3290 3291// GalleryUpdate - Specifies information about the Shared Image Gallery that you want to update. 3292type GalleryUpdate struct { 3293 UpdateResourceDefinition 3294 // Describes the properties of a Shared Image Gallery. 3295 Properties *GalleryProperties `json:"properties,omitempty"` 3296} 3297 3298// MarshalJSON implements the json.Marshaller interface for type GalleryUpdate. 3299func (g GalleryUpdate) MarshalJSON() ([]byte, error) { 3300 objectMap := g.UpdateResourceDefinition.marshalInternal() 3301 populate(objectMap, "properties", g.Properties) 3302 return json.Marshal(objectMap) 3303} 3304 3305// GrantAccessData - Data used for requesting a SAS. 3306type GrantAccessData struct { 3307 // REQUIRED 3308 Access *AccessLevel `json:"access,omitempty"` 3309 3310 // REQUIRED; Time duration in seconds until the SAS access expires. 3311 DurationInSeconds *int32 `json:"durationInSeconds,omitempty"` 3312} 3313 3314// HardwareProfile - Specifies the hardware settings for the virtual machine. 3315type HardwareProfile struct { 3316 // Specifies the size of the virtual machine. 3317 // The enum data type is currently deprecated and will be removed by December 23rd 2023. 3318 // Recommended way to get the list of available sizes is using these APIs: 3319 // List all available virtual machine sizes in an availability set [https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes] 3320 // List all available virtual machine sizes in a region [https://docs.microsoft.com/rest/api/compute/resourceskus/list] 3321 // List all available virtual machine sizes for resizing [https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes]. For more information 3322 // about virtual machine sizes, see Sizes for 3323 // virtual machines [https://docs.microsoft.com/azure/virtual-machines/sizes]. 3324 // The available VM sizes depend on region and availability set. 3325 VMSize *VirtualMachineSizeTypes `json:"vmSize,omitempty"` 3326} 3327 3328// Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is 3329// provided, the destination virtual hard drive must not 3330// exist. 3331type Image struct { 3332 Resource 3333 // The extended location of the Image. 3334 ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` 3335 3336 // Describes the properties of an Image. 3337 Properties *ImageProperties `json:"properties,omitempty"` 3338} 3339 3340// MarshalJSON implements the json.Marshaller interface for type Image. 3341func (i Image) MarshalJSON() ([]byte, error) { 3342 objectMap := i.Resource.marshalInternal() 3343 populate(objectMap, "extendedLocation", i.ExtendedLocation) 3344 populate(objectMap, "properties", i.Properties) 3345 return json.Marshal(objectMap) 3346} 3347 3348// ImageDataDisk - Describes a data disk. 3349type ImageDataDisk struct { 3350 ImageDisk 3351 // REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for 3352 // each data disk attached to a VM. 3353 Lun *int32 `json:"lun,omitempty"` 3354} 3355 3356// ImageDisk - Describes a image disk. 3357type ImageDisk struct { 3358 // The Virtual Hard Disk. 3359 BlobURI *string `json:"blobUri,omitempty"` 3360 3361 // Specifies the caching requirements. 3362 // Possible values are: 3363 // None 3364 // ReadOnly 3365 // ReadWrite 3366 // Default: None for Standard storage. ReadOnly for Premium storage 3367 Caching *CachingTypes `json:"caching,omitempty"` 3368 3369 // Specifies the customer managed disk encryption set resource id for the managed image disk. 3370 DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` 3371 3372 // Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. 3373 // This value cannot be larger than 1023 GB 3374 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 3375 3376 // The managedDisk. 3377 ManagedDisk *SubResource `json:"managedDisk,omitempty"` 3378 3379 // The snapshot. 3380 Snapshot *SubResource `json:"snapshot,omitempty"` 3381 3382 // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. 3383 StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"` 3384} 3385 3386// ImageDiskReference - The source image used for creating the disk. 3387type ImageDiskReference struct { 3388 // REQUIRED; A relative uri containing either a Platform Image Repository or user image reference. 3389 ID *string `json:"id,omitempty"` 3390 3391 // If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field 3392 // is null. 3393 Lun *int32 `json:"lun,omitempty"` 3394} 3395 3396// ImageListResult - The List Image operation response. 3397type ImageListResult struct { 3398 // REQUIRED; The list of Images. 3399 Value []*Image `json:"value,omitempty"` 3400 3401 // The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images. 3402 NextLink *string `json:"nextLink,omitempty"` 3403} 3404 3405// MarshalJSON implements the json.Marshaller interface for type ImageListResult. 3406func (i ImageListResult) MarshalJSON() ([]byte, error) { 3407 objectMap := make(map[string]interface{}) 3408 populate(objectMap, "nextLink", i.NextLink) 3409 populate(objectMap, "value", i.Value) 3410 return json.Marshal(objectMap) 3411} 3412 3413// ImageOSDisk - Describes an Operating System disk. 3414type ImageOSDisk struct { 3415 ImageDisk 3416 // REQUIRED; The OS State. 3417 OSState *OperatingSystemStateTypes `json:"osState,omitempty"` 3418 3419 // REQUIRED; This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. 3420 // Possible values are: 3421 // Windows 3422 // Linux 3423 OSType *OperatingSystemTypes `json:"osType,omitempty"` 3424} 3425 3426// ImageProperties - Describes the properties of an Image. 3427type ImageProperties struct { 3428 // Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need 3429 // the user to specify the value, if the source is 3430 // managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. 3431 HyperVGeneration *HyperVGenerationTypes `json:"hyperVGeneration,omitempty"` 3432 3433 // The source virtual machine from which Image is created. 3434 SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"` 3435 3436 // Specifies the storage settings for the virtual machine disks. 3437 StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"` 3438 3439 // READ-ONLY; The provisioning state. 3440 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 3441} 3442 3443// ImagePurchasePlan - Describes the gallery image definition purchase plan. This is used by marketplace images. 3444type ImagePurchasePlan struct { 3445 // The plan ID. 3446 Name *string `json:"name,omitempty"` 3447 3448 // The product ID. 3449 Product *string `json:"product,omitempty"` 3450 3451 // The publisher ID. 3452 Publisher *string `json:"publisher,omitempty"` 3453} 3454 3455// ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine 3456// images. This element is required when you want to use a platform 3457// image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only 3458// be set when you create the scale set. 3459type ImageReference struct { 3460 SubResource 3461 // Specifies the offer of the platform image or marketplace image used to create the virtual machine. 3462 Offer *string `json:"offer,omitempty"` 3463 3464 // The image publisher. 3465 Publisher *string `json:"publisher,omitempty"` 3466 3467 // The image SKU. 3468 SKU *string `json:"sku,omitempty"` 3469 3470 // Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. 3471 // Major, Minor, and Build are decimal numbers. 3472 // Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update 3473 // after deploy time even if a new version becomes 3474 // available. 3475 Version *string `json:"version,omitempty"` 3476 3477 // READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs 3478 // from 'version', only if the value specified in 3479 // 'version' field is 'latest'. 3480 ExactVersion *string `json:"exactVersion,omitempty" azure:"ro"` 3481} 3482 3483// MarshalJSON implements the json.Marshaller interface for type ImageReference. 3484func (i ImageReference) MarshalJSON() ([]byte, error) { 3485 objectMap := i.SubResource.marshalInternal() 3486 populate(objectMap, "exactVersion", i.ExactVersion) 3487 populate(objectMap, "offer", i.Offer) 3488 populate(objectMap, "publisher", i.Publisher) 3489 populate(objectMap, "sku", i.SKU) 3490 populate(objectMap, "version", i.Version) 3491 return json.Marshal(objectMap) 3492} 3493 3494// ImageStorageProfile - Describes a storage profile. 3495type ImageStorageProfile struct { 3496 // Specifies the parameters that are used to add a data disk to a virtual machine. 3497 // For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview]. 3498 DataDisks []*ImageDataDisk `json:"dataDisks,omitempty"` 3499 3500 // Specifies information about the operating system disk used by the virtual machine. 3501 // For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview]. 3502 OSDisk *ImageOSDisk `json:"osDisk,omitempty"` 3503 3504 // Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant 3505 // Storage (ZRS). 3506 ZoneResilient *bool `json:"zoneResilient,omitempty"` 3507} 3508 3509// MarshalJSON implements the json.Marshaller interface for type ImageStorageProfile. 3510func (i ImageStorageProfile) MarshalJSON() ([]byte, error) { 3511 objectMap := make(map[string]interface{}) 3512 populate(objectMap, "dataDisks", i.DataDisks) 3513 populate(objectMap, "osDisk", i.OSDisk) 3514 populate(objectMap, "zoneResilient", i.ZoneResilient) 3515 return json.Marshal(objectMap) 3516} 3517 3518// ImageUpdate - The source user image virtual hard disk. Only tags may be updated. 3519type ImageUpdate struct { 3520 UpdateResource 3521 // Describes the properties of an Image. 3522 Properties *ImageProperties `json:"properties,omitempty"` 3523} 3524 3525// MarshalJSON implements the json.Marshaller interface for type ImageUpdate. 3526func (i ImageUpdate) MarshalJSON() ([]byte, error) { 3527 objectMap := i.UpdateResource.marshalInternal() 3528 populate(objectMap, "properties", i.Properties) 3529 return json.Marshal(objectMap) 3530} 3531 3532// ImagesBeginCreateOrUpdateOptions contains the optional parameters for the Images.BeginCreateOrUpdate method. 3533type ImagesBeginCreateOrUpdateOptions struct { 3534 // placeholder for future optional parameters 3535} 3536 3537// ImagesBeginDeleteOptions contains the optional parameters for the Images.BeginDelete method. 3538type ImagesBeginDeleteOptions struct { 3539 // placeholder for future optional parameters 3540} 3541 3542// ImagesBeginUpdateOptions contains the optional parameters for the Images.BeginUpdate method. 3543type ImagesBeginUpdateOptions struct { 3544 // placeholder for future optional parameters 3545} 3546 3547// ImagesGetOptions contains the optional parameters for the Images.Get method. 3548type ImagesGetOptions struct { 3549 // The expand expression to apply on the operation. 3550 Expand *string 3551} 3552 3553// ImagesListByResourceGroupOptions contains the optional parameters for the Images.ListByResourceGroup method. 3554type ImagesListByResourceGroupOptions struct { 3555 // placeholder for future optional parameters 3556} 3557 3558// ImagesListOptions contains the optional parameters for the Images.List method. 3559type ImagesListOptions struct { 3560 // placeholder for future optional parameters 3561} 3562 3563// InnerError - Inner error details. 3564type InnerError struct { 3565 // The internal error message or exception dump. 3566 Errordetail *string `json:"errordetail,omitempty"` 3567 3568 // The exception type. 3569 Exceptiontype *string `json:"exceptiontype,omitempty"` 3570} 3571 3572type InstanceSKU struct { 3573 // READ-ONLY; The sku name. 3574 Name *string `json:"name,omitempty" azure:"ro"` 3575 3576 // READ-ONLY; The tier of the cloud service role instance. 3577 Tier *string `json:"tier,omitempty" azure:"ro"` 3578} 3579 3580// InstanceViewStatus - Instance view status. 3581type InstanceViewStatus struct { 3582 // The status code. 3583 Code *string `json:"code,omitempty"` 3584 3585 // The short localizable label for the status. 3586 DisplayStatus *string `json:"displayStatus,omitempty"` 3587 3588 // The level code. 3589 Level *StatusLevelTypes `json:"level,omitempty"` 3590 3591 // The detailed status message, including for alerts and error messages. 3592 Message *string `json:"message,omitempty"` 3593 3594 // The time of the status. 3595 Time *time.Time `json:"time,omitempty"` 3596} 3597 3598// MarshalJSON implements the json.Marshaller interface for type InstanceViewStatus. 3599func (i InstanceViewStatus) MarshalJSON() ([]byte, error) { 3600 objectMap := make(map[string]interface{}) 3601 populate(objectMap, "code", i.Code) 3602 populate(objectMap, "displayStatus", i.DisplayStatus) 3603 populate(objectMap, "level", i.Level) 3604 populate(objectMap, "message", i.Message) 3605 populate(objectMap, "time", (*timeRFC3339)(i.Time)) 3606 return json.Marshal(objectMap) 3607} 3608 3609// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceViewStatus. 3610func (i *InstanceViewStatus) UnmarshalJSON(data []byte) error { 3611 var rawMsg map[string]json.RawMessage 3612 if err := json.Unmarshal(data, &rawMsg); err != nil { 3613 return err 3614 } 3615 for key, val := range rawMsg { 3616 var err error 3617 switch key { 3618 case "code": 3619 err = unpopulate(val, &i.Code) 3620 delete(rawMsg, key) 3621 case "displayStatus": 3622 err = unpopulate(val, &i.DisplayStatus) 3623 delete(rawMsg, key) 3624 case "level": 3625 err = unpopulate(val, &i.Level) 3626 delete(rawMsg, key) 3627 case "message": 3628 err = unpopulate(val, &i.Message) 3629 delete(rawMsg, key) 3630 case "time": 3631 var aux timeRFC3339 3632 err = unpopulate(val, &aux) 3633 i.Time = (*time.Time)(&aux) 3634 delete(rawMsg, key) 3635 } 3636 if err != nil { 3637 return err 3638 } 3639 } 3640 return nil 3641} 3642 3643// InstanceViewStatusesSummary - Instance view statuses. 3644type InstanceViewStatusesSummary struct { 3645 // READ-ONLY 3646 StatusesSummary []*StatusCodeCount `json:"statusesSummary,omitempty" azure:"ro"` 3647} 3648 3649// MarshalJSON implements the json.Marshaller interface for type InstanceViewStatusesSummary. 3650func (i InstanceViewStatusesSummary) MarshalJSON() ([]byte, error) { 3651 objectMap := make(map[string]interface{}) 3652 populate(objectMap, "statusesSummary", i.StatusesSummary) 3653 return json.Marshal(objectMap) 3654} 3655 3656// KeyForDiskEncryptionSet - Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots 3657type KeyForDiskEncryptionSet struct { 3658 // REQUIRED; Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled 3659 // value. 3660 KeyURL *string `json:"keyUrl,omitempty"` 3661 3662 // Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as 3663 // the Disk Encryption Set subscription. 3664 SourceVault *SourceVault `json:"sourceVault,omitempty"` 3665} 3666 3667// KeyVaultAndKeyReference - Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey 3668type KeyVaultAndKeyReference struct { 3669 // REQUIRED; Url pointing to a key or secret in KeyVault 3670 KeyURL *string `json:"keyUrl,omitempty"` 3671 3672 // REQUIRED; Resource id of the KeyVault containing the key or secret 3673 SourceVault *SourceVault `json:"sourceVault,omitempty"` 3674} 3675 3676// KeyVaultAndSecretReference - Key Vault Secret Url and vault id of the encryption key 3677type KeyVaultAndSecretReference struct { 3678 // REQUIRED; Url pointing to a key or secret in KeyVault 3679 SecretURL *string `json:"secretUrl,omitempty"` 3680 3681 // REQUIRED; Resource id of the KeyVault containing the key or secret 3682 SourceVault *SourceVault `json:"sourceVault,omitempty"` 3683} 3684 3685// KeyVaultKeyReference - Describes a reference to Key Vault Key 3686type KeyVaultKeyReference struct { 3687 // REQUIRED; The URL referencing a key encryption key in Key Vault. 3688 KeyURL *string `json:"keyUrl,omitempty"` 3689 3690 // REQUIRED; The relative URL of the Key Vault containing the key. 3691 SourceVault *SubResource `json:"sourceVault,omitempty"` 3692} 3693 3694// KeyVaultSecretReference - Describes a reference to Key Vault Secret 3695type KeyVaultSecretReference struct { 3696 // REQUIRED; The URL referencing a secret in a Key Vault. 3697 SecretURL *string `json:"secretUrl,omitempty"` 3698 3699 // REQUIRED; The relative URL of the Key Vault containing the secret. 3700 SourceVault *SubResource `json:"sourceVault,omitempty"` 3701} 3702 3703// LastPatchInstallationSummary - Describes the properties of the last installed patch summary. 3704type LastPatchInstallationSummary struct { 3705 // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. 3706 Error *APIError `json:"error,omitempty" azure:"ro"` 3707 3708 // READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match. 3709 ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty" azure:"ro"` 3710 3711 // READ-ONLY; The count of patches that failed installation. 3712 FailedPatchCount *int32 `json:"failedPatchCount,omitempty" azure:"ro"` 3713 3714 // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. 3715 InstallationActivityID *string `json:"installationActivityId,omitempty" azure:"ro"` 3716 3717 // READ-ONLY; The count of patches that successfully installed. 3718 InstalledPatchCount *int32 `json:"installedPatchCount,omitempty" azure:"ro"` 3719 3720 // READ-ONLY; The UTC timestamp when the operation began. 3721 LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"` 3722 3723 // READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions 3724 MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty" azure:"ro"` 3725 3726 // READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry. 3727 NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty" azure:"ro"` 3728 3729 // READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation. 3730 PendingPatchCount *int32 `json:"pendingPatchCount,omitempty" azure:"ro"` 3731 3732 // READ-ONLY; The UTC timestamp when the operation began. 3733 StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` 3734 3735 // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become 3736 // "Unknown", "Failed", "Succeeded", or 3737 // "CompletedWithWarnings." 3738 Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"` 3739} 3740 3741// MarshalJSON implements the json.Marshaller interface for type LastPatchInstallationSummary. 3742func (l LastPatchInstallationSummary) MarshalJSON() ([]byte, error) { 3743 objectMap := make(map[string]interface{}) 3744 populate(objectMap, "error", l.Error) 3745 populate(objectMap, "excludedPatchCount", l.ExcludedPatchCount) 3746 populate(objectMap, "failedPatchCount", l.FailedPatchCount) 3747 populate(objectMap, "installationActivityId", l.InstallationActivityID) 3748 populate(objectMap, "installedPatchCount", l.InstalledPatchCount) 3749 populate(objectMap, "lastModifiedTime", (*timeRFC3339)(l.LastModifiedTime)) 3750 populate(objectMap, "maintenanceWindowExceeded", l.MaintenanceWindowExceeded) 3751 populate(objectMap, "notSelectedPatchCount", l.NotSelectedPatchCount) 3752 populate(objectMap, "pendingPatchCount", l.PendingPatchCount) 3753 populate(objectMap, "startTime", (*timeRFC3339)(l.StartTime)) 3754 populate(objectMap, "status", l.Status) 3755 return json.Marshal(objectMap) 3756} 3757 3758// UnmarshalJSON implements the json.Unmarshaller interface for type LastPatchInstallationSummary. 3759func (l *LastPatchInstallationSummary) UnmarshalJSON(data []byte) error { 3760 var rawMsg map[string]json.RawMessage 3761 if err := json.Unmarshal(data, &rawMsg); err != nil { 3762 return err 3763 } 3764 for key, val := range rawMsg { 3765 var err error 3766 switch key { 3767 case "error": 3768 err = unpopulate(val, &l.Error) 3769 delete(rawMsg, key) 3770 case "excludedPatchCount": 3771 err = unpopulate(val, &l.ExcludedPatchCount) 3772 delete(rawMsg, key) 3773 case "failedPatchCount": 3774 err = unpopulate(val, &l.FailedPatchCount) 3775 delete(rawMsg, key) 3776 case "installationActivityId": 3777 err = unpopulate(val, &l.InstallationActivityID) 3778 delete(rawMsg, key) 3779 case "installedPatchCount": 3780 err = unpopulate(val, &l.InstalledPatchCount) 3781 delete(rawMsg, key) 3782 case "lastModifiedTime": 3783 var aux timeRFC3339 3784 err = unpopulate(val, &aux) 3785 l.LastModifiedTime = (*time.Time)(&aux) 3786 delete(rawMsg, key) 3787 case "maintenanceWindowExceeded": 3788 err = unpopulate(val, &l.MaintenanceWindowExceeded) 3789 delete(rawMsg, key) 3790 case "notSelectedPatchCount": 3791 err = unpopulate(val, &l.NotSelectedPatchCount) 3792 delete(rawMsg, key) 3793 case "pendingPatchCount": 3794 err = unpopulate(val, &l.PendingPatchCount) 3795 delete(rawMsg, key) 3796 case "startTime": 3797 var aux timeRFC3339 3798 err = unpopulate(val, &aux) 3799 l.StartTime = (*time.Time)(&aux) 3800 delete(rawMsg, key) 3801 case "status": 3802 err = unpopulate(val, &l.Status) 3803 delete(rawMsg, key) 3804 } 3805 if err != nil { 3806 return err 3807 } 3808 } 3809 return nil 3810} 3811 3812// LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine. 3813// For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions [https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros]. 3814type LinuxConfiguration struct { 3815 // Specifies whether password authentication should be disabled. 3816 DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` 3817 3818 // [Preview Feature] Specifies settings related to VM Guest Patching on Linux. 3819 PatchSettings *LinuxPatchSettings `json:"patchSettings,omitempty"` 3820 3821 // Indicates whether virtual machine agent should be provisioned on the virtual machine. 3822 // When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM 3823 // so that extensions can be added to the VM later. 3824 ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` 3825 3826 // Specifies the ssh key configuration for a Linux OS. 3827 SSH *SSHConfiguration `json:"ssh,omitempty"` 3828} 3829 3830// LinuxParameters - Input for InstallPatches on a Linux VM, as directly received by the API 3831type LinuxParameters struct { 3832 // The update classifications to select when installing patches for Linux. 3833 ClassificationsToInclude []*VMGuestPatchClassificationLinux `json:"classificationsToInclude,omitempty"` 3834 3835 // This is used as a maintenance run identifier for Auto VM Guest Patching in Linux. 3836 MaintenanceRunID *string `json:"maintenanceRunId,omitempty"` 3837 3838 // packages to exclude in the patch operation. Format: packageName_packageVersion 3839 PackageNameMasksToExclude []*string `json:"packageNameMasksToExclude,omitempty"` 3840 3841 // packages to include in the patch operation. Format: packageName_packageVersion 3842 PackageNameMasksToInclude []*string `json:"packageNameMasksToInclude,omitempty"` 3843} 3844 3845// MarshalJSON implements the json.Marshaller interface for type LinuxParameters. 3846func (l LinuxParameters) MarshalJSON() ([]byte, error) { 3847 objectMap := make(map[string]interface{}) 3848 populate(objectMap, "classificationsToInclude", l.ClassificationsToInclude) 3849 populate(objectMap, "maintenanceRunId", l.MaintenanceRunID) 3850 populate(objectMap, "packageNameMasksToExclude", l.PackageNameMasksToExclude) 3851 populate(objectMap, "packageNameMasksToInclude", l.PackageNameMasksToInclude) 3852 return json.Marshal(objectMap) 3853} 3854 3855// LinuxPatchSettings - Specifies settings related to VM Guest Patching on Linux. 3856type LinuxPatchSettings struct { 3857 // Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine. 3858 // Possible values are: 3859 // ImageDefault - You control the timing of patch assessments on a virtual machine. 3860 // AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. 3861 AssessmentMode *LinuxPatchAssessmentMode `json:"assessmentMode,omitempty"` 3862 3863 // Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as 3864 // Flexible. 3865 // Possible values are: 3866 // ImageDefault - The virtual machine's default patching configuration is used. 3867 // AutomaticByPlatform - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true 3868 PatchMode *LinuxVMGuestPatchMode `json:"patchMode,omitempty"` 3869} 3870 3871// ListUsagesResult - The List Usages operation response. 3872type ListUsagesResult struct { 3873 // REQUIRED; The list of compute resource usages. 3874 Value []*Usage `json:"value,omitempty"` 3875 3876 // The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information. 3877 NextLink *string `json:"nextLink,omitempty"` 3878} 3879 3880// MarshalJSON implements the json.Marshaller interface for type ListUsagesResult. 3881func (l ListUsagesResult) MarshalJSON() ([]byte, error) { 3882 objectMap := make(map[string]interface{}) 3883 populate(objectMap, "nextLink", l.NextLink) 3884 populate(objectMap, "value", l.Value) 3885 return json.Marshal(objectMap) 3886} 3887 3888// LoadBalancerConfiguration - Describes the load balancer configuration. 3889type LoadBalancerConfiguration struct { 3890 // REQUIRED; The name of the Load balancer 3891 Name *string `json:"name,omitempty"` 3892 3893 // REQUIRED; Properties of the load balancer configuration. 3894 Properties *LoadBalancerConfigurationProperties `json:"properties,omitempty"` 3895 3896 // Resource Id 3897 ID *string `json:"id,omitempty"` 3898} 3899 3900type LoadBalancerConfigurationProperties struct { 3901 // REQUIRED; Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must 3902 // have exactly one frontend IP configuration. 3903 FrontendIPConfigurations []*LoadBalancerFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` 3904} 3905 3906// MarshalJSON implements the json.Marshaller interface for type LoadBalancerConfigurationProperties. 3907func (l LoadBalancerConfigurationProperties) MarshalJSON() ([]byte, error) { 3908 objectMap := make(map[string]interface{}) 3909 populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) 3910 return json.Marshal(objectMap) 3911} 3912 3913type LoadBalancerFrontendIPConfiguration struct { 3914 // REQUIRED; The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access 3915 // the resource. 3916 Name *string `json:"name,omitempty"` 3917 3918 // REQUIRED; Properties of load balancer frontend ip configuration. 3919 Properties *LoadBalancerFrontendIPConfigurationProperties `json:"properties,omitempty"` 3920} 3921 3922// LoadBalancerFrontendIPConfigurationProperties - Describes a cloud service IP Configuration 3923type LoadBalancerFrontendIPConfigurationProperties struct { 3924 // The virtual network private IP address of the IP configuration. 3925 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 3926 3927 // The reference to the public ip address resource. 3928 PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` 3929 3930 // The reference to the virtual network subnet resource. 3931 Subnet *SubResource `json:"subnet,omitempty"` 3932} 3933 3934// LogAnalyticsBeginExportRequestRateByIntervalOptions contains the optional parameters for the LogAnalytics.BeginExportRequestRateByInterval method. 3935type LogAnalyticsBeginExportRequestRateByIntervalOptions struct { 3936 // placeholder for future optional parameters 3937} 3938 3939// LogAnalyticsBeginExportThrottledRequestsOptions contains the optional parameters for the LogAnalytics.BeginExportThrottledRequests method. 3940type LogAnalyticsBeginExportThrottledRequestsOptions struct { 3941 // placeholder for future optional parameters 3942} 3943 3944// LogAnalyticsInputBase - Api input base class for LogAnalytics Api. 3945type LogAnalyticsInputBase struct { 3946 // REQUIRED; SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. 3947 BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` 3948 3949 // REQUIRED; From time of the query 3950 FromTime *time.Time `json:"fromTime,omitempty"` 3951 3952 // REQUIRED; To time of the query 3953 ToTime *time.Time `json:"toTime,omitempty"` 3954 3955 // Group query result by Client Application ID. 3956 GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"` 3957 3958 // Group query result by Operation Name. 3959 GroupByOperationName *bool `json:"groupByOperationName,omitempty"` 3960 3961 // Group query result by Resource Name. 3962 GroupByResourceName *bool `json:"groupByResourceName,omitempty"` 3963 3964 // Group query result by Throttle Policy applied. 3965 GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` 3966 3967 // Group query result by User Agent. 3968 GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"` 3969} 3970 3971// MarshalJSON implements the json.Marshaller interface for type LogAnalyticsInputBase. 3972func (l LogAnalyticsInputBase) MarshalJSON() ([]byte, error) { 3973 objectMap := l.marshalInternal() 3974 return json.Marshal(objectMap) 3975} 3976 3977// UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsInputBase. 3978func (l *LogAnalyticsInputBase) UnmarshalJSON(data []byte) error { 3979 var rawMsg map[string]json.RawMessage 3980 if err := json.Unmarshal(data, &rawMsg); err != nil { 3981 return err 3982 } 3983 return l.unmarshalInternal(rawMsg) 3984} 3985 3986func (l LogAnalyticsInputBase) marshalInternal() map[string]interface{} { 3987 objectMap := make(map[string]interface{}) 3988 populate(objectMap, "blobContainerSasUri", l.BlobContainerSasURI) 3989 populate(objectMap, "fromTime", (*timeRFC3339)(l.FromTime)) 3990 populate(objectMap, "groupByClientApplicationId", l.GroupByClientApplicationID) 3991 populate(objectMap, "groupByOperationName", l.GroupByOperationName) 3992 populate(objectMap, "groupByResourceName", l.GroupByResourceName) 3993 populate(objectMap, "groupByThrottlePolicy", l.GroupByThrottlePolicy) 3994 populate(objectMap, "groupByUserAgent", l.GroupByUserAgent) 3995 populate(objectMap, "toTime", (*timeRFC3339)(l.ToTime)) 3996 return objectMap 3997} 3998 3999func (l *LogAnalyticsInputBase) unmarshalInternal(rawMsg map[string]json.RawMessage) error { 4000 for key, val := range rawMsg { 4001 var err error 4002 switch key { 4003 case "blobContainerSasUri": 4004 err = unpopulate(val, &l.BlobContainerSasURI) 4005 delete(rawMsg, key) 4006 case "fromTime": 4007 var aux timeRFC3339 4008 err = unpopulate(val, &aux) 4009 l.FromTime = (*time.Time)(&aux) 4010 delete(rawMsg, key) 4011 case "groupByClientApplicationId": 4012 err = unpopulate(val, &l.GroupByClientApplicationID) 4013 delete(rawMsg, key) 4014 case "groupByOperationName": 4015 err = unpopulate(val, &l.GroupByOperationName) 4016 delete(rawMsg, key) 4017 case "groupByResourceName": 4018 err = unpopulate(val, &l.GroupByResourceName) 4019 delete(rawMsg, key) 4020 case "groupByThrottlePolicy": 4021 err = unpopulate(val, &l.GroupByThrottlePolicy) 4022 delete(rawMsg, key) 4023 case "groupByUserAgent": 4024 err = unpopulate(val, &l.GroupByUserAgent) 4025 delete(rawMsg, key) 4026 case "toTime": 4027 var aux timeRFC3339 4028 err = unpopulate(val, &aux) 4029 l.ToTime = (*time.Time)(&aux) 4030 delete(rawMsg, key) 4031 } 4032 if err != nil { 4033 return err 4034 } 4035 } 4036 return nil 4037} 4038 4039// LogAnalyticsOperationResult - LogAnalytics operation status response 4040type LogAnalyticsOperationResult struct { 4041 // READ-ONLY; LogAnalyticsOutput 4042 Properties *LogAnalyticsOutput `json:"properties,omitempty" azure:"ro"` 4043} 4044 4045// LogAnalyticsOutput - LogAnalytics output properties 4046type LogAnalyticsOutput struct { 4047 // READ-ONLY; Output file Uri path to blob container. 4048 Output *string `json:"output,omitempty" azure:"ro"` 4049} 4050 4051// MaintenanceRedeployStatus - Maintenance Operation Status. 4052type MaintenanceRedeployStatus struct { 4053 // True, if customer is allowed to perform Maintenance. 4054 IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"` 4055 4056 // Message returned for the last Maintenance Operation. 4057 LastOperationMessage *string `json:"lastOperationMessage,omitempty"` 4058 4059 // The Last Maintenance Operation Result Code. 4060 LastOperationResultCode *MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"` 4061 4062 // End Time for the Maintenance Window. 4063 MaintenanceWindowEndTime *time.Time `json:"maintenanceWindowEndTime,omitempty"` 4064 4065 // Start Time for the Maintenance Window. 4066 MaintenanceWindowStartTime *time.Time `json:"maintenanceWindowStartTime,omitempty"` 4067 4068 // End Time for the Pre Maintenance Window. 4069 PreMaintenanceWindowEndTime *time.Time `json:"preMaintenanceWindowEndTime,omitempty"` 4070 4071 // Start Time for the Pre Maintenance Window. 4072 PreMaintenanceWindowStartTime *time.Time `json:"preMaintenanceWindowStartTime,omitempty"` 4073} 4074 4075// MarshalJSON implements the json.Marshaller interface for type MaintenanceRedeployStatus. 4076func (m MaintenanceRedeployStatus) MarshalJSON() ([]byte, error) { 4077 objectMap := make(map[string]interface{}) 4078 populate(objectMap, "isCustomerInitiatedMaintenanceAllowed", m.IsCustomerInitiatedMaintenanceAllowed) 4079 populate(objectMap, "lastOperationMessage", m.LastOperationMessage) 4080 populate(objectMap, "lastOperationResultCode", m.LastOperationResultCode) 4081 populate(objectMap, "maintenanceWindowEndTime", (*timeRFC3339)(m.MaintenanceWindowEndTime)) 4082 populate(objectMap, "maintenanceWindowStartTime", (*timeRFC3339)(m.MaintenanceWindowStartTime)) 4083 populate(objectMap, "preMaintenanceWindowEndTime", (*timeRFC3339)(m.PreMaintenanceWindowEndTime)) 4084 populate(objectMap, "preMaintenanceWindowStartTime", (*timeRFC3339)(m.PreMaintenanceWindowStartTime)) 4085 return json.Marshal(objectMap) 4086} 4087 4088// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceRedeployStatus. 4089func (m *MaintenanceRedeployStatus) UnmarshalJSON(data []byte) error { 4090 var rawMsg map[string]json.RawMessage 4091 if err := json.Unmarshal(data, &rawMsg); err != nil { 4092 return err 4093 } 4094 for key, val := range rawMsg { 4095 var err error 4096 switch key { 4097 case "isCustomerInitiatedMaintenanceAllowed": 4098 err = unpopulate(val, &m.IsCustomerInitiatedMaintenanceAllowed) 4099 delete(rawMsg, key) 4100 case "lastOperationMessage": 4101 err = unpopulate(val, &m.LastOperationMessage) 4102 delete(rawMsg, key) 4103 case "lastOperationResultCode": 4104 err = unpopulate(val, &m.LastOperationResultCode) 4105 delete(rawMsg, key) 4106 case "maintenanceWindowEndTime": 4107 var aux timeRFC3339 4108 err = unpopulate(val, &aux) 4109 m.MaintenanceWindowEndTime = (*time.Time)(&aux) 4110 delete(rawMsg, key) 4111 case "maintenanceWindowStartTime": 4112 var aux timeRFC3339 4113 err = unpopulate(val, &aux) 4114 m.MaintenanceWindowStartTime = (*time.Time)(&aux) 4115 delete(rawMsg, key) 4116 case "preMaintenanceWindowEndTime": 4117 var aux timeRFC3339 4118 err = unpopulate(val, &aux) 4119 m.PreMaintenanceWindowEndTime = (*time.Time)(&aux) 4120 delete(rawMsg, key) 4121 case "preMaintenanceWindowStartTime": 4122 var aux timeRFC3339 4123 err = unpopulate(val, &aux) 4124 m.PreMaintenanceWindowStartTime = (*time.Time)(&aux) 4125 delete(rawMsg, key) 4126 } 4127 if err != nil { 4128 return err 4129 } 4130 } 4131 return nil 4132} 4133 4134// ManagedArtifact - The managed artifact. 4135type ManagedArtifact struct { 4136 // REQUIRED; The managed artifact id. 4137 ID *string `json:"id,omitempty"` 4138} 4139 4140// ManagedDiskParameters - The parameters of a managed disk. 4141type ManagedDiskParameters struct { 4142 SubResource 4143 // Specifies the customer managed disk encryption set resource id for the managed disk. 4144 DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` 4145 4146 // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. 4147 StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"` 4148} 4149 4150// MarshalJSON implements the json.Marshaller interface for type ManagedDiskParameters. 4151func (m ManagedDiskParameters) MarshalJSON() ([]byte, error) { 4152 objectMap := m.SubResource.marshalInternal() 4153 populate(objectMap, "diskEncryptionSet", m.DiskEncryptionSet) 4154 populate(objectMap, "storageAccountType", m.StorageAccountType) 4155 return json.Marshal(objectMap) 4156} 4157 4158// NetworkInterfaceReference - Describes a network interface reference. 4159type NetworkInterfaceReference struct { 4160 SubResource 4161 // Describes a network interface reference properties. 4162 Properties *NetworkInterfaceReferenceProperties `json:"properties,omitempty"` 4163} 4164 4165// MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceReference. 4166func (n NetworkInterfaceReference) MarshalJSON() ([]byte, error) { 4167 objectMap := n.SubResource.marshalInternal() 4168 populate(objectMap, "properties", n.Properties) 4169 return json.Marshal(objectMap) 4170} 4171 4172// NetworkInterfaceReferenceProperties - Describes a network interface reference properties. 4173type NetworkInterfaceReferenceProperties struct { 4174 // Specify what happens to the network interface when the VM is deleted 4175 DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` 4176 4177 // Specifies the primary network interface in case the virtual machine has more than 1 network interface. 4178 Primary *bool `json:"primary,omitempty"` 4179} 4180 4181// NetworkProfile - Specifies the network interfaces or the networking configuration of the virtual machine. 4182type NetworkProfile struct { 4183 // specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations 4184 NetworkAPIVersion *NetworkAPIVersion `json:"networkApiVersion,omitempty"` 4185 4186 // Specifies the networking configurations that will be used to create the virtual machine networking resources. 4187 NetworkInterfaceConfigurations []*VirtualMachineNetworkInterfaceConfiguration `json:"networkInterfaceConfigurations,omitempty"` 4188 4189 // Specifies the list of resource Ids for the network interfaces associated with the virtual machine. 4190 NetworkInterfaces []*NetworkInterfaceReference `json:"networkInterfaces,omitempty"` 4191} 4192 4193// MarshalJSON implements the json.Marshaller interface for type NetworkProfile. 4194func (n NetworkProfile) MarshalJSON() ([]byte, error) { 4195 objectMap := make(map[string]interface{}) 4196 populate(objectMap, "networkApiVersion", n.NetworkAPIVersion) 4197 populate(objectMap, "networkInterfaceConfigurations", n.NetworkInterfaceConfigurations) 4198 populate(objectMap, "networkInterfaces", n.NetworkInterfaces) 4199 return json.Marshal(objectMap) 4200} 4201 4202// OSDisk - Specifies information about the operating system disk used by the virtual machine. 4203// For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview]. 4204type OSDisk struct { 4205 // REQUIRED; Specifies how the virtual machine should be created. 4206 // Possible values are: 4207 // Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine. 4208 // FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference 4209 // element described above. If you are 4210 // using a marketplace image, you also use the plan element previously described. 4211 CreateOption *DiskCreateOptionTypes `json:"createOption,omitempty"` 4212 4213 // Specifies the caching requirements. 4214 // Possible values are: 4215 // None 4216 // ReadOnly 4217 // ReadWrite 4218 // Default: None for Standard storage. ReadOnly for Premium storage. 4219 Caching *CachingTypes `json:"caching,omitempty"` 4220 4221 // Specifies whether OS Disk should be deleted or detached upon VM deletion. 4222 // Possible values: 4223 // Delete If this value is used, the OS disk is deleted when VM is deleted. 4224 // Detach If this value is used, the os disk is retained after VM is deleted. 4225 // The default value is set to detach. For an ephemeral OS Disk, the default value is set to Delete. User cannot change the delete option for ephemeral 4226 // OS Disk. 4227 DeleteOption *DiskDeleteOptionTypes `json:"deleteOption,omitempty"` 4228 4229 // Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. 4230 DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` 4231 4232 // Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. 4233 // This value cannot be larger than 1023 GB 4234 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 4235 4236 // Specifies the encryption settings for the OS Disk. 4237 // Minimum api-version: 2015-06-15 4238 EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"` 4239 4240 // The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, 4241 // the destination virtual hard drive must not 4242 // exist. 4243 Image *VirtualHardDisk `json:"image,omitempty"` 4244 4245 // The managed disk parameters. 4246 ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` 4247 4248 // The disk name. 4249 Name *string `json:"name,omitempty"` 4250 4251 // This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. 4252 // Possible values are: 4253 // Windows 4254 // Linux 4255 OSType *OperatingSystemTypes `json:"osType,omitempty"` 4256 4257 // The virtual hard disk. 4258 Vhd *VirtualHardDisk `json:"vhd,omitempty"` 4259 4260 // Specifies whether writeAccelerator should be enabled or disabled on the disk. 4261 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 4262} 4263 4264// OSDiskImage - Contains the os disk image information. 4265type OSDiskImage struct { 4266 // REQUIRED; The operating system of the osDiskImage. 4267 OperatingSystem *OperatingSystemTypes `json:"operatingSystem,omitempty"` 4268} 4269 4270// OSDiskImageEncryption - Contains encryption settings for an OS disk image. 4271type OSDiskImageEncryption struct { 4272 DiskImageEncryption 4273} 4274 4275// OSFamily - Describes a cloud service OS family. 4276type OSFamily struct { 4277 // OS family properties. 4278 Properties *OSFamilyProperties `json:"properties,omitempty"` 4279 4280 // READ-ONLY; Resource Id. 4281 ID *string `json:"id,omitempty" azure:"ro"` 4282 4283 // READ-ONLY; Resource location. 4284 Location *string `json:"location,omitempty" azure:"ro"` 4285 4286 // READ-ONLY; Resource name. 4287 Name *string `json:"name,omitempty" azure:"ro"` 4288 4289 // READ-ONLY; Resource type. 4290 Type *string `json:"type,omitempty" azure:"ro"` 4291} 4292 4293type OSFamilyListResult struct { 4294 // REQUIRED 4295 Value []*OSFamily `json:"value,omitempty"` 4296 NextLink *string `json:"nextLink,omitempty"` 4297} 4298 4299// MarshalJSON implements the json.Marshaller interface for type OSFamilyListResult. 4300func (o OSFamilyListResult) MarshalJSON() ([]byte, error) { 4301 objectMap := make(map[string]interface{}) 4302 populate(objectMap, "nextLink", o.NextLink) 4303 populate(objectMap, "value", o.Value) 4304 return json.Marshal(objectMap) 4305} 4306 4307// OSFamilyProperties - OS family properties. 4308type OSFamilyProperties struct { 4309 // READ-ONLY; The OS family label. 4310 Label *string `json:"label,omitempty" azure:"ro"` 4311 4312 // READ-ONLY; The OS family name. 4313 Name *string `json:"name,omitempty" azure:"ro"` 4314 4315 // READ-ONLY; List of OS versions belonging to this family. 4316 Versions []*OSVersionPropertiesBase `json:"versions,omitempty" azure:"ro"` 4317} 4318 4319// MarshalJSON implements the json.Marshaller interface for type OSFamilyProperties. 4320func (o OSFamilyProperties) MarshalJSON() ([]byte, error) { 4321 objectMap := make(map[string]interface{}) 4322 populate(objectMap, "label", o.Label) 4323 populate(objectMap, "name", o.Name) 4324 populate(objectMap, "versions", o.Versions) 4325 return json.Marshal(objectMap) 4326} 4327 4328// OSProfile - Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned. 4329type OSProfile struct { 4330 // Specifies the password of the administrator account. 4331 // Minimum-length (Windows): 8 characters 4332 // Minimum-length (Linux): 6 characters 4333 // Max-length (Windows): 123 characters 4334 // Max-length (Linux): 72 characters 4335 // Complexity requirements: 3 out of 4 conditions below need to be fulfilled 4336 // Has lower characters 4337 // Has upper characters 4338 // Has a digit 4339 // Has a special character (Regex match [\W_]) 4340 // Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" 4341 // For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp] 4342 // For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension 4343 // [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection] 4344 AdminPassword *string `json:"adminPassword,omitempty"` 4345 4346 // Specifies the name of the administrator account. 4347 // This property cannot be updated after the VM is created. 4348 // Windows-only restriction: Cannot end in "." 4349 // Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", 4350 // "aspnet", "backup", "console", "david", "guest", 4351 // "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". 4352 // Minimum-length (Linux): 1 character 4353 // Max-length (Linux): 64 characters 4354 // Max-length (Windows): 20 characters. 4355 AdminUsername *string `json:"adminUsername,omitempty"` 4356 4357 // Specifies whether extension operations should be allowed on the virtual machine. 4358 // This may only be set to False when no extensions are present on the virtual machine. 4359 AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"` 4360 4361 // Specifies the host OS name of the virtual machine. 4362 // This name cannot be updated after the VM is created. 4363 // Max-length (Windows): 15 characters 4364 // Max-length (Linux): 64 characters. 4365 // For naming conventions and restrictions see Azure infrastructure services implementation guidelines [https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules]. 4366 ComputerName *string `json:"computerName,omitempty"` 4367 4368 // Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. 4369 // The maximum length of the binary array is 4370 // 65535 bytes. 4371 // Note: Do not pass any secrets or passwords in customData property 4372 // This property cannot be updated after the VM is created. 4373 // customData is passed to the VM to be saved as a file, for more information see Custom Data on Azure VMs [https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/] 4374 // For using cloud-init for your Linux VM, see Using cloud-init to customize a Linux VM during creation [https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init] 4375 CustomData *string `json:"customData,omitempty"` 4376 4377 // Specifies the Linux operating system settings on the virtual machine. 4378 // For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions [https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros]. 4379 LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` 4380 4381 // Specifies whether the guest provision signal is required to infer provision success of the virtual machine. Note: This property is for private testing 4382 // only, and all customers must not set the property 4383 // to false. 4384 RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"` 4385 4386 // Specifies set of certificates that should be installed onto the virtual machine. 4387 Secrets []*VaultSecretGroup `json:"secrets,omitempty"` 4388 4389 // Specifies Windows operating system settings on the virtual machine. 4390 WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` 4391} 4392 4393// MarshalJSON implements the json.Marshaller interface for type OSProfile. 4394func (o OSProfile) MarshalJSON() ([]byte, error) { 4395 objectMap := make(map[string]interface{}) 4396 populate(objectMap, "adminPassword", o.AdminPassword) 4397 populate(objectMap, "adminUsername", o.AdminUsername) 4398 populate(objectMap, "allowExtensionOperations", o.AllowExtensionOperations) 4399 populate(objectMap, "computerName", o.ComputerName) 4400 populate(objectMap, "customData", o.CustomData) 4401 populate(objectMap, "linuxConfiguration", o.LinuxConfiguration) 4402 populate(objectMap, "requireGuestProvisionSignal", o.RequireGuestProvisionSignal) 4403 populate(objectMap, "secrets", o.Secrets) 4404 populate(objectMap, "windowsConfiguration", o.WindowsConfiguration) 4405 return json.Marshal(objectMap) 4406} 4407 4408// OSVersion - Describes a cloud service OS version. 4409type OSVersion struct { 4410 // OS version properties. 4411 Properties *OSVersionProperties `json:"properties,omitempty"` 4412 4413 // READ-ONLY; Resource Id. 4414 ID *string `json:"id,omitempty" azure:"ro"` 4415 4416 // READ-ONLY; Resource location. 4417 Location *string `json:"location,omitempty" azure:"ro"` 4418 4419 // READ-ONLY; Resource name. 4420 Name *string `json:"name,omitempty" azure:"ro"` 4421 4422 // READ-ONLY; Resource type. 4423 Type *string `json:"type,omitempty" azure:"ro"` 4424} 4425 4426type OSVersionListResult struct { 4427 // REQUIRED 4428 Value []*OSVersion `json:"value,omitempty"` 4429 NextLink *string `json:"nextLink,omitempty"` 4430} 4431 4432// MarshalJSON implements the json.Marshaller interface for type OSVersionListResult. 4433func (o OSVersionListResult) MarshalJSON() ([]byte, error) { 4434 objectMap := make(map[string]interface{}) 4435 populate(objectMap, "nextLink", o.NextLink) 4436 populate(objectMap, "value", o.Value) 4437 return json.Marshal(objectMap) 4438} 4439 4440// OSVersionProperties - OS version properties. 4441type OSVersionProperties struct { 4442 // READ-ONLY; The family of this OS version. 4443 Family *string `json:"family,omitempty" azure:"ro"` 4444 4445 // READ-ONLY; The family label of this OS version. 4446 FamilyLabel *string `json:"familyLabel,omitempty" azure:"ro"` 4447 4448 // READ-ONLY; Specifies whether this OS version is active. 4449 IsActive *bool `json:"isActive,omitempty" azure:"ro"` 4450 4451 // READ-ONLY; Specifies whether this is the default OS version for its family. 4452 IsDefault *bool `json:"isDefault,omitempty" azure:"ro"` 4453 4454 // READ-ONLY; The OS version label. 4455 Label *string `json:"label,omitempty" azure:"ro"` 4456 4457 // READ-ONLY; The OS version. 4458 Version *string `json:"version,omitempty" azure:"ro"` 4459} 4460 4461// OSVersionPropertiesBase - Configuration view of an OS version. 4462type OSVersionPropertiesBase struct { 4463 // READ-ONLY; Specifies whether this OS version is active. 4464 IsActive *bool `json:"isActive,omitempty" azure:"ro"` 4465 4466 // READ-ONLY; Specifies whether this is the default OS version for its family. 4467 IsDefault *bool `json:"isDefault,omitempty" azure:"ro"` 4468 4469 // READ-ONLY; The OS version label. 4470 Label *string `json:"label,omitempty" azure:"ro"` 4471 4472 // READ-ONLY; The OS version. 4473 Version *string `json:"version,omitempty" azure:"ro"` 4474} 4475 4476// OperationsListOptions contains the optional parameters for the Operations.List method. 4477type OperationsListOptions struct { 4478 // placeholder for future optional parameters 4479} 4480 4481// OrchestrationServiceStateInput - The input for OrchestrationServiceState 4482type OrchestrationServiceStateInput struct { 4483 // REQUIRED; The action to be performed. 4484 Action *OrchestrationServiceStateAction `json:"action,omitempty"` 4485 4486 // REQUIRED; The name of the service. 4487 ServiceName *OrchestrationServiceNames `json:"serviceName,omitempty"` 4488} 4489 4490// OrchestrationServiceSummary - Summary for an orchestration service of a virtual machine scale set. 4491type OrchestrationServiceSummary struct { 4492 // READ-ONLY; The name of the service. 4493 ServiceName *OrchestrationServiceNames `json:"serviceName,omitempty" azure:"ro"` 4494 4495 // READ-ONLY; The current state of the service. 4496 ServiceState *OrchestrationServiceState `json:"serviceState,omitempty" azure:"ro"` 4497} 4498 4499// PatchInstallationDetail - Information about a specific patch that was encountered during an installation action. 4500type PatchInstallationDetail struct { 4501 // READ-ONLY; The classification(s) of the patch as provided by the patch publisher. 4502 Classifications []*string `json:"classifications,omitempty" azure:"ro"` 4503 4504 // READ-ONLY; The state of the patch after the installation operation completed. 4505 InstallationState *PatchInstallationState `json:"installationState,omitempty" azure:"ro"` 4506 4507 // READ-ONLY; The KBID of the patch. Only applies to Windows patches. 4508 KbID *string `json:"kbId,omitempty" azure:"ro"` 4509 4510 // READ-ONLY; The friendly name of the patch. 4511 Name *string `json:"name,omitempty" azure:"ro"` 4512 4513 // READ-ONLY; A unique identifier for the patch. 4514 PatchID *string `json:"patchId,omitempty" azure:"ro"` 4515 4516 // READ-ONLY; The version string of the package. It may conform to Semantic Versioning. Only applies to Linux. 4517 Version *string `json:"version,omitempty" azure:"ro"` 4518} 4519 4520// MarshalJSON implements the json.Marshaller interface for type PatchInstallationDetail. 4521func (p PatchInstallationDetail) MarshalJSON() ([]byte, error) { 4522 objectMap := make(map[string]interface{}) 4523 populate(objectMap, "classifications", p.Classifications) 4524 populate(objectMap, "installationState", p.InstallationState) 4525 populate(objectMap, "kbId", p.KbID) 4526 populate(objectMap, "name", p.Name) 4527 populate(objectMap, "patchId", p.PatchID) 4528 populate(objectMap, "version", p.Version) 4529 return json.Marshal(objectMap) 4530} 4531 4532// PatchSettings - Specifies settings related to VM Guest Patching on Windows. 4533type PatchSettings struct { 4534 // Specifies the mode of VM Guest patch assessment for the IaaS virtual machine. 4535 // Possible values are: 4536 // ImageDefault - You control the timing of patch assessments on a virtual machine. 4537 // AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. 4538 AssessmentMode *WindowsPatchAssessmentMode `json:"assessmentMode,omitempty"` 4539 4540 // Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' 4541 // must be set to 'AutomaticByPlatform'. 4542 EnableHotpatching *bool `json:"enableHotpatching,omitempty"` 4543 4544 // Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as 4545 // Flexible. 4546 // Possible values are: 4547 // Manual - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic 4548 // updates are disabled; the property 4549 // WindowsConfiguration.enableAutomaticUpdates must be false 4550 // AutomaticByOS - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. 4551 // AutomaticByPlatform - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates 4552 // must be true 4553 PatchMode *WindowsVMGuestPatchMode `json:"patchMode,omitempty"` 4554} 4555 4556// PirResource - The Resource model definition. 4557type PirResource struct { 4558 // READ-ONLY; Resource location 4559 Location *string `json:"location,omitempty" azure:"ro"` 4560 4561 // READ-ONLY; Resource name 4562 Name *string `json:"name,omitempty" azure:"ro"` 4563} 4564 4565// PirSharedGalleryResource - Base information about the shared gallery resource in pir. 4566type PirSharedGalleryResource struct { 4567 PirResource 4568 // The identifier information of shared gallery. 4569 Identifier *SharedGalleryIdentifier `json:"identifier,omitempty"` 4570} 4571 4572// Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before 4573// you can use a marketplace image from an API, you must 4574// enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, 4575// Get Started ->. Enter any required 4576// information and then click Save. 4577type Plan struct { 4578 // The plan ID. 4579 Name *string `json:"name,omitempty"` 4580 4581 // Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. 4582 Product *string `json:"product,omitempty"` 4583 4584 // The promotion code. 4585 PromotionCode *string `json:"promotionCode,omitempty"` 4586 4587 // The publisher ID. 4588 Publisher *string `json:"publisher,omitempty"` 4589} 4590 4591// PrivateEndpoint - The Private Endpoint resource. 4592type PrivateEndpoint struct { 4593 // READ-ONLY; The ARM identifier for Private Endpoint 4594 ID *string `json:"id,omitempty" azure:"ro"` 4595} 4596 4597// PrivateEndpointConnection - The Private Endpoint Connection resource. 4598type PrivateEndpointConnection struct { 4599 // Resource properties. 4600 Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` 4601 4602 // READ-ONLY; private endpoint connection Id 4603 ID *string `json:"id,omitempty" azure:"ro"` 4604 4605 // READ-ONLY; private endpoint connection name 4606 Name *string `json:"name,omitempty" azure:"ro"` 4607 4608 // READ-ONLY; private endpoint connection type 4609 Type *string `json:"type,omitempty" azure:"ro"` 4610} 4611 4612// PrivateEndpointConnectionListResult - A list of private link resources 4613type PrivateEndpointConnectionListResult struct { 4614 // The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots. 4615 NextLink *string `json:"nextLink,omitempty"` 4616 4617 // Array of private endpoint connections 4618 Value []*PrivateEndpointConnection `json:"value,omitempty"` 4619} 4620 4621// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. 4622func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { 4623 objectMap := make(map[string]interface{}) 4624 populate(objectMap, "nextLink", p.NextLink) 4625 populate(objectMap, "value", p.Value) 4626 return json.Marshal(objectMap) 4627} 4628 4629// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. 4630type PrivateEndpointConnectionProperties struct { 4631 // REQUIRED; A collection of information about the state of the connection between DiskAccess and Virtual Network. 4632 PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` 4633 4634 // READ-ONLY; The resource of private end point. 4635 PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty" azure:"ro"` 4636 4637 // READ-ONLY; The provisioning state of the private endpoint connection resource. 4638 ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` 4639} 4640 4641// PrivateLinkResource - A private link resource 4642type PrivateLinkResource struct { 4643 // Resource properties. 4644 Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` 4645 4646 // READ-ONLY; private link resource Id 4647 ID *string `json:"id,omitempty" azure:"ro"` 4648 4649 // READ-ONLY; private link resource name 4650 Name *string `json:"name,omitempty" azure:"ro"` 4651 4652 // READ-ONLY; private link resource type 4653 Type *string `json:"type,omitempty" azure:"ro"` 4654} 4655 4656// PrivateLinkResourceListResult - A list of private link resources 4657type PrivateLinkResourceListResult struct { 4658 // Array of private link resources 4659 Value []*PrivateLinkResource `json:"value,omitempty"` 4660} 4661 4662// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. 4663func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { 4664 objectMap := make(map[string]interface{}) 4665 populate(objectMap, "value", p.Value) 4666 return json.Marshal(objectMap) 4667} 4668 4669// PrivateLinkResourceProperties - Properties of a private link resource. 4670type PrivateLinkResourceProperties struct { 4671 // The private link resource DNS zone name. 4672 RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` 4673 4674 // READ-ONLY; The private link resource group id. 4675 GroupID *string `json:"groupId,omitempty" azure:"ro"` 4676 4677 // READ-ONLY; The private link resource required member names. 4678 RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` 4679} 4680 4681// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. 4682func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { 4683 objectMap := make(map[string]interface{}) 4684 populate(objectMap, "groupId", p.GroupID) 4685 populate(objectMap, "requiredMembers", p.RequiredMembers) 4686 populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) 4687 return json.Marshal(objectMap) 4688} 4689 4690// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. 4691type PrivateLinkServiceConnectionState struct { 4692 // A message indicating if changes on the service provider require any updates on the consumer. 4693 ActionsRequired *string `json:"actionsRequired,omitempty"` 4694 4695 // The reason for approval/rejection of the connection. 4696 Description *string `json:"description,omitempty"` 4697 4698 // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. 4699 Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` 4700} 4701 4702// PropertyUpdatesInProgress - Properties of the disk for which update is pending. 4703type PropertyUpdatesInProgress struct { 4704 // The target performance tier of the disk if a tier change operation is in progress. 4705 TargetTier *string `json:"targetTier,omitempty"` 4706} 4707 4708// ProximityPlacementGroup - Specifies information about the proximity placement group. 4709type ProximityPlacementGroup struct { 4710 Resource 4711 // Describes the properties of a Proximity Placement Group. 4712 Properties *ProximityPlacementGroupProperties `json:"properties,omitempty"` 4713} 4714 4715// MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroup. 4716func (p ProximityPlacementGroup) MarshalJSON() ([]byte, error) { 4717 objectMap := p.Resource.marshalInternal() 4718 populate(objectMap, "properties", p.Properties) 4719 return json.Marshal(objectMap) 4720} 4721 4722// ProximityPlacementGroupListResult - The List Proximity Placement Group operation response. 4723type ProximityPlacementGroupListResult struct { 4724 // REQUIRED; The list of proximity placement groups 4725 Value []*ProximityPlacementGroup `json:"value,omitempty"` 4726 4727 // The URI to fetch the next page of proximity placement groups. 4728 NextLink *string `json:"nextLink,omitempty"` 4729} 4730 4731// MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupListResult. 4732func (p ProximityPlacementGroupListResult) MarshalJSON() ([]byte, error) { 4733 objectMap := make(map[string]interface{}) 4734 populate(objectMap, "nextLink", p.NextLink) 4735 populate(objectMap, "value", p.Value) 4736 return json.Marshal(objectMap) 4737} 4738 4739// ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group. 4740type ProximityPlacementGroupProperties struct { 4741 // Describes colocation status of the Proximity Placement Group. 4742 ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"` 4743 4744 // Specifies the type of the proximity placement group. 4745 // Possible values are: 4746 // Standard : Co-locate resources within an Azure region or Availability Zone. 4747 // Ultra : For future use. 4748 ProximityPlacementGroupType *ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"` 4749 4750 // READ-ONLY; A list of references to all availability sets in the proximity placement group. 4751 AvailabilitySets []*SubResourceWithColocationStatus `json:"availabilitySets,omitempty" azure:"ro"` 4752 4753 // READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group. 4754 VirtualMachineScaleSets []*SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty" azure:"ro"` 4755 4756 // READ-ONLY; A list of references to all virtual machines in the proximity placement group. 4757 VirtualMachines []*SubResourceWithColocationStatus `json:"virtualMachines,omitempty" azure:"ro"` 4758} 4759 4760// MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupProperties. 4761func (p ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) { 4762 objectMap := make(map[string]interface{}) 4763 populate(objectMap, "availabilitySets", p.AvailabilitySets) 4764 populate(objectMap, "colocationStatus", p.ColocationStatus) 4765 populate(objectMap, "proximityPlacementGroupType", p.ProximityPlacementGroupType) 4766 populate(objectMap, "virtualMachineScaleSets", p.VirtualMachineScaleSets) 4767 populate(objectMap, "virtualMachines", p.VirtualMachines) 4768 return json.Marshal(objectMap) 4769} 4770 4771// ProximityPlacementGroupUpdate - Specifies information about the proximity placement group. 4772type ProximityPlacementGroupUpdate struct { 4773 UpdateResource 4774} 4775 4776// ProximityPlacementGroupsCreateOrUpdateOptions contains the optional parameters for the ProximityPlacementGroups.CreateOrUpdate method. 4777type ProximityPlacementGroupsCreateOrUpdateOptions struct { 4778 // placeholder for future optional parameters 4779} 4780 4781// ProximityPlacementGroupsDeleteOptions contains the optional parameters for the ProximityPlacementGroups.Delete method. 4782type ProximityPlacementGroupsDeleteOptions struct { 4783 // placeholder for future optional parameters 4784} 4785 4786// ProximityPlacementGroupsGetOptions contains the optional parameters for the ProximityPlacementGroups.Get method. 4787type ProximityPlacementGroupsGetOptions struct { 4788 // includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group. 4789 IncludeColocationStatus *string 4790} 4791 4792// ProximityPlacementGroupsListByResourceGroupOptions contains the optional parameters for the ProximityPlacementGroups.ListByResourceGroup method. 4793type ProximityPlacementGroupsListByResourceGroupOptions struct { 4794 // placeholder for future optional parameters 4795} 4796 4797// ProximityPlacementGroupsListBySubscriptionOptions contains the optional parameters for the ProximityPlacementGroups.ListBySubscription method. 4798type ProximityPlacementGroupsListBySubscriptionOptions struct { 4799 // placeholder for future optional parameters 4800} 4801 4802// ProximityPlacementGroupsUpdateOptions contains the optional parameters for the ProximityPlacementGroups.Update method. 4803type ProximityPlacementGroupsUpdateOptions struct { 4804 // placeholder for future optional parameters 4805} 4806 4807// ProxyOnlyResource - The ProxyOnly Resource model definition. 4808type ProxyOnlyResource struct { 4809 // READ-ONLY; Resource Id 4810 ID *string `json:"id,omitempty" azure:"ro"` 4811 4812 // READ-ONLY; Resource name 4813 Name *string `json:"name,omitempty" azure:"ro"` 4814 4815 // READ-ONLY; Resource type 4816 Type *string `json:"type,omitempty" azure:"ro"` 4817} 4818 4819// ProxyResource - The resource model definition for an Azure Resource Manager proxy resource. It will not have tags and a location 4820type ProxyResource struct { 4821 // READ-ONLY; Resource Id 4822 ID *string `json:"id,omitempty" azure:"ro"` 4823 4824 // READ-ONLY; Resource name 4825 Name *string `json:"name,omitempty" azure:"ro"` 4826 4827 // READ-ONLY; Resource type 4828 Type *string `json:"type,omitempty" azure:"ro"` 4829} 4830 4831// MarshalJSON implements the json.Marshaller interface for type ProxyResource. 4832func (p ProxyResource) MarshalJSON() ([]byte, error) { 4833 objectMap := p.marshalInternal() 4834 return json.Marshal(objectMap) 4835} 4836 4837func (p ProxyResource) marshalInternal() map[string]interface{} { 4838 objectMap := make(map[string]interface{}) 4839 populate(objectMap, "id", p.ID) 4840 populate(objectMap, "name", p.Name) 4841 populate(objectMap, "type", p.Type) 4842 return objectMap 4843} 4844 4845// PublicIPAddressSKU - Describes the public IP Sku 4846type PublicIPAddressSKU struct { 4847 // REQUIRED; Specify public IP sku name 4848 PublicIPAddressSKUName *PublicIPAddressSKUName `json:"publicIPAddressSkuName,omitempty"` 4849 4850 // Specify public IP sku tier 4851 PublicIPAddressSKUTier *PublicIPAddressSKUTier `json:"publicIPAddressSkuTier,omitempty"` 4852} 4853 4854// PurchasePlan - Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. 4855type PurchasePlan struct { 4856 // REQUIRED; The plan ID. 4857 Name *string `json:"name,omitempty"` 4858 4859 // REQUIRED; Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. 4860 Product *string `json:"product,omitempty"` 4861 4862 // REQUIRED; The publisher ID. 4863 Publisher *string `json:"publisher,omitempty"` 4864} 4865 4866// RecommendedMachineConfiguration - The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. 4867type RecommendedMachineConfiguration struct { 4868 // Describes the resource range. 4869 Memory *ResourceRange `json:"memory,omitempty"` 4870 4871 // Describes the resource range. 4872 VCPUs *ResourceRange `json:"vCPUs,omitempty"` 4873} 4874 4875// RecoveryWalkResponse - Response after calling a manual recovery walk 4876type RecoveryWalkResponse struct { 4877 // READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed 4878 NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty" azure:"ro"` 4879 4880 // READ-ONLY; Whether the recovery walk was performed 4881 WalkPerformed *bool `json:"walkPerformed,omitempty" azure:"ro"` 4882} 4883 4884// RegionalReplicationStatus - This is the regional replication status. 4885type RegionalReplicationStatus struct { 4886 // READ-ONLY; The details of the replication status. 4887 Details *string `json:"details,omitempty" azure:"ro"` 4888 4889 // READ-ONLY; It indicates progress of the replication job. 4890 Progress *int32 `json:"progress,omitempty" azure:"ro"` 4891 4892 // READ-ONLY; The region to which the gallery image version is being replicated to. 4893 Region *string `json:"region,omitempty" azure:"ro"` 4894 4895 // READ-ONLY; This is the regional replication state. 4896 State *ReplicationState `json:"state,omitempty" azure:"ro"` 4897} 4898 4899// ReplicationStatus - This is the replication status of the gallery image version. 4900type ReplicationStatus struct { 4901 // READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. 4902 AggregatedState *AggregatedReplicationState `json:"aggregatedState,omitempty" azure:"ro"` 4903 4904 // READ-ONLY; This is a summary of replication status for each region. 4905 Summary []*RegionalReplicationStatus `json:"summary,omitempty" azure:"ro"` 4906} 4907 4908// MarshalJSON implements the json.Marshaller interface for type ReplicationStatus. 4909func (r ReplicationStatus) MarshalJSON() ([]byte, error) { 4910 objectMap := make(map[string]interface{}) 4911 populate(objectMap, "aggregatedState", r.AggregatedState) 4912 populate(objectMap, "summary", r.Summary) 4913 return json.Marshal(objectMap) 4914} 4915 4916// RequestRateByIntervalInput - Api request input for LogAnalytics getRequestRateByInterval Api. 4917type RequestRateByIntervalInput struct { 4918 LogAnalyticsInputBase 4919 // REQUIRED; Interval value in minutes used to create LogAnalytics call rate logs. 4920 IntervalLength *IntervalInMins `json:"intervalLength,omitempty"` 4921} 4922 4923// MarshalJSON implements the json.Marshaller interface for type RequestRateByIntervalInput. 4924func (r RequestRateByIntervalInput) MarshalJSON() ([]byte, error) { 4925 objectMap := r.LogAnalyticsInputBase.marshalInternal() 4926 populate(objectMap, "intervalLength", r.IntervalLength) 4927 return json.Marshal(objectMap) 4928} 4929 4930// UnmarshalJSON implements the json.Unmarshaller interface for type RequestRateByIntervalInput. 4931func (r *RequestRateByIntervalInput) UnmarshalJSON(data []byte) error { 4932 var rawMsg map[string]json.RawMessage 4933 if err := json.Unmarshal(data, &rawMsg); err != nil { 4934 return err 4935 } 4936 for key, val := range rawMsg { 4937 var err error 4938 switch key { 4939 case "intervalLength": 4940 err = unpopulate(val, &r.IntervalLength) 4941 delete(rawMsg, key) 4942 } 4943 if err != nil { 4944 return err 4945 } 4946 } 4947 return r.LogAnalyticsInputBase.unmarshalInternal(rawMsg) 4948} 4949 4950// Resource - The Resource model definition. 4951type Resource struct { 4952 // REQUIRED; Resource location 4953 Location *string `json:"location,omitempty"` 4954 4955 // Resource tags 4956 Tags map[string]*string `json:"tags,omitempty"` 4957 4958 // READ-ONLY; Resource Id 4959 ID *string `json:"id,omitempty" azure:"ro"` 4960 4961 // READ-ONLY; Resource name 4962 Name *string `json:"name,omitempty" azure:"ro"` 4963 4964 // READ-ONLY; Resource type 4965 Type *string `json:"type,omitempty" azure:"ro"` 4966} 4967 4968// MarshalJSON implements the json.Marshaller interface for type Resource. 4969func (r Resource) MarshalJSON() ([]byte, error) { 4970 objectMap := r.marshalInternal() 4971 return json.Marshal(objectMap) 4972} 4973 4974func (r Resource) marshalInternal() map[string]interface{} { 4975 objectMap := make(map[string]interface{}) 4976 populate(objectMap, "id", r.ID) 4977 populate(objectMap, "location", r.Location) 4978 populate(objectMap, "name", r.Name) 4979 populate(objectMap, "tags", r.Tags) 4980 populate(objectMap, "type", r.Type) 4981 return objectMap 4982} 4983 4984// ResourceInstanceViewStatus - Instance view status. 4985type ResourceInstanceViewStatus struct { 4986 // The level code. 4987 Level *StatusLevelTypes `json:"level,omitempty"` 4988 4989 // READ-ONLY; The status code. 4990 Code *string `json:"code,omitempty" azure:"ro"` 4991 4992 // READ-ONLY; The short localizable label for the status. 4993 DisplayStatus *string `json:"displayStatus,omitempty" azure:"ro"` 4994 4995 // READ-ONLY; The detailed status message, including for alerts and error messages. 4996 Message *string `json:"message,omitempty" azure:"ro"` 4997 4998 // READ-ONLY; The time of the status. 4999 Time *time.Time `json:"time,omitempty" azure:"ro"` 5000} 5001 5002// MarshalJSON implements the json.Marshaller interface for type ResourceInstanceViewStatus. 5003func (r ResourceInstanceViewStatus) MarshalJSON() ([]byte, error) { 5004 objectMap := make(map[string]interface{}) 5005 populate(objectMap, "code", r.Code) 5006 populate(objectMap, "displayStatus", r.DisplayStatus) 5007 populate(objectMap, "level", r.Level) 5008 populate(objectMap, "message", r.Message) 5009 populate(objectMap, "time", (*timeRFC3339)(r.Time)) 5010 return json.Marshal(objectMap) 5011} 5012 5013// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceInstanceViewStatus. 5014func (r *ResourceInstanceViewStatus) UnmarshalJSON(data []byte) error { 5015 var rawMsg map[string]json.RawMessage 5016 if err := json.Unmarshal(data, &rawMsg); err != nil { 5017 return err 5018 } 5019 for key, val := range rawMsg { 5020 var err error 5021 switch key { 5022 case "code": 5023 err = unpopulate(val, &r.Code) 5024 delete(rawMsg, key) 5025 case "displayStatus": 5026 err = unpopulate(val, &r.DisplayStatus) 5027 delete(rawMsg, key) 5028 case "level": 5029 err = unpopulate(val, &r.Level) 5030 delete(rawMsg, key) 5031 case "message": 5032 err = unpopulate(val, &r.Message) 5033 delete(rawMsg, key) 5034 case "time": 5035 var aux timeRFC3339 5036 err = unpopulate(val, &aux) 5037 r.Time = (*time.Time)(&aux) 5038 delete(rawMsg, key) 5039 } 5040 if err != nil { 5041 return err 5042 } 5043 } 5044 return nil 5045} 5046 5047// ResourceRange - Describes the resource range. 5048type ResourceRange struct { 5049 // The maximum number of the resource. 5050 Max *int32 `json:"max,omitempty"` 5051 5052 // The minimum number of the resource. 5053 Min *int32 `json:"min,omitempty"` 5054} 5055 5056// ResourceSKU - Describes an available Compute SKU. 5057type ResourceSKU struct { 5058 // READ-ONLY; The api versions that support this SKU. 5059 APIVersions []*string `json:"apiVersions,omitempty" azure:"ro"` 5060 5061 // READ-ONLY; A name value pair to describe the capability. 5062 Capabilities []*ResourceSKUCapabilities `json:"capabilities,omitempty" azure:"ro"` 5063 5064 // READ-ONLY; Specifies the number of virtual machines in the scale set. 5065 Capacity *ResourceSKUCapacity `json:"capacity,omitempty" azure:"ro"` 5066 5067 // READ-ONLY; Metadata for retrieving price info. 5068 Costs []*ResourceSKUCosts `json:"costs,omitempty" azure:"ro"` 5069 5070 // READ-ONLY; The Family of this particular SKU. 5071 Family *string `json:"family,omitempty" azure:"ro"` 5072 5073 // READ-ONLY; The Kind of resources that are supported in this SKU. 5074 Kind *string `json:"kind,omitempty" azure:"ro"` 5075 5076 // READ-ONLY; A list of locations and availability zones in those locations where the SKU is available. 5077 LocationInfo []*ResourceSKULocationInfo `json:"locationInfo,omitempty" azure:"ro"` 5078 5079 // READ-ONLY; The set of locations that the SKU is available. 5080 Locations []*string `json:"locations,omitempty" azure:"ro"` 5081 5082 // READ-ONLY; The name of SKU. 5083 Name *string `json:"name,omitempty" azure:"ro"` 5084 5085 // READ-ONLY; The type of resource the SKU applies to. 5086 ResourceType *string `json:"resourceType,omitempty" azure:"ro"` 5087 5088 // READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. 5089 Restrictions []*ResourceSKURestrictions `json:"restrictions,omitempty" azure:"ro"` 5090 5091 // READ-ONLY; The Size of the SKU. 5092 Size *string `json:"size,omitempty" azure:"ro"` 5093 5094 // READ-ONLY; Specifies the tier of virtual machines in a scale set. 5095 // Possible Values: 5096 // Standard 5097 // Basic 5098 Tier *string `json:"tier,omitempty" azure:"ro"` 5099} 5100 5101// MarshalJSON implements the json.Marshaller interface for type ResourceSKU. 5102func (r ResourceSKU) MarshalJSON() ([]byte, error) { 5103 objectMap := make(map[string]interface{}) 5104 populate(objectMap, "apiVersions", r.APIVersions) 5105 populate(objectMap, "capabilities", r.Capabilities) 5106 populate(objectMap, "capacity", r.Capacity) 5107 populate(objectMap, "costs", r.Costs) 5108 populate(objectMap, "family", r.Family) 5109 populate(objectMap, "kind", r.Kind) 5110 populate(objectMap, "locationInfo", r.LocationInfo) 5111 populate(objectMap, "locations", r.Locations) 5112 populate(objectMap, "name", r.Name) 5113 populate(objectMap, "resourceType", r.ResourceType) 5114 populate(objectMap, "restrictions", r.Restrictions) 5115 populate(objectMap, "size", r.Size) 5116 populate(objectMap, "tier", r.Tier) 5117 return json.Marshal(objectMap) 5118} 5119 5120// ResourceSKUCapabilities - Describes The SKU capabilities object. 5121type ResourceSKUCapabilities struct { 5122 // READ-ONLY; An invariant to describe the feature. 5123 Name *string `json:"name,omitempty" azure:"ro"` 5124 5125 // READ-ONLY; An invariant if the feature is measured by quantity. 5126 Value *string `json:"value,omitempty" azure:"ro"` 5127} 5128 5129// ResourceSKUCapacity - Describes scaling information of a SKU. 5130type ResourceSKUCapacity struct { 5131 // READ-ONLY; The default capacity. 5132 Default *int64 `json:"default,omitempty" azure:"ro"` 5133 5134 // READ-ONLY; The maximum capacity that can be set. 5135 Maximum *int64 `json:"maximum,omitempty" azure:"ro"` 5136 5137 // READ-ONLY; The minimum capacity. 5138 Minimum *int64 `json:"minimum,omitempty" azure:"ro"` 5139 5140 // READ-ONLY; The scale type applicable to the sku. 5141 ScaleType *ResourceSKUCapacityScaleType `json:"scaleType,omitempty" azure:"ro"` 5142} 5143 5144// ResourceSKUCosts - Describes metadata for retrieving price info. 5145type ResourceSKUCosts struct { 5146 // READ-ONLY; An invariant to show the extended unit. 5147 ExtendedUnit *string `json:"extendedUnit,omitempty" azure:"ro"` 5148 5149 // READ-ONLY; Used for querying price from commerce. 5150 MeterID *string `json:"meterID,omitempty" azure:"ro"` 5151 5152 // READ-ONLY; The multiplier is needed to extend the base metered cost. 5153 Quantity *int64 `json:"quantity,omitempty" azure:"ro"` 5154} 5155 5156type ResourceSKULocationInfo struct { 5157 // READ-ONLY; Location of the SKU 5158 Location *string `json:"location,omitempty" azure:"ro"` 5159 5160 // READ-ONLY; Details of capabilities available to a SKU in specific zones. 5161 ZoneDetails []*ResourceSKUZoneDetails `json:"zoneDetails,omitempty" azure:"ro"` 5162 5163 // READ-ONLY; List of availability zones where the SKU is supported. 5164 Zones []*string `json:"zones,omitempty" azure:"ro"` 5165} 5166 5167// MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo. 5168func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error) { 5169 objectMap := make(map[string]interface{}) 5170 populate(objectMap, "location", r.Location) 5171 populate(objectMap, "zoneDetails", r.ZoneDetails) 5172 populate(objectMap, "zones", r.Zones) 5173 return json.Marshal(objectMap) 5174} 5175 5176type ResourceSKURestrictionInfo struct { 5177 // READ-ONLY; Locations where the SKU is restricted 5178 Locations []*string `json:"locations,omitempty" azure:"ro"` 5179 5180 // READ-ONLY; List of availability zones where the SKU is restricted. 5181 Zones []*string `json:"zones,omitempty" azure:"ro"` 5182} 5183 5184// MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictionInfo. 5185func (r ResourceSKURestrictionInfo) MarshalJSON() ([]byte, error) { 5186 objectMap := make(map[string]interface{}) 5187 populate(objectMap, "locations", r.Locations) 5188 populate(objectMap, "zones", r.Zones) 5189 return json.Marshal(objectMap) 5190} 5191 5192// ResourceSKURestrictions - Describes scaling information of a SKU. 5193type ResourceSKURestrictions struct { 5194 // READ-ONLY; The reason for restriction. 5195 ReasonCode *ResourceSKURestrictionsReasonCode `json:"reasonCode,omitempty" azure:"ro"` 5196 5197 // READ-ONLY; The information about the restriction where the SKU cannot be used. 5198 RestrictionInfo *ResourceSKURestrictionInfo `json:"restrictionInfo,omitempty" azure:"ro"` 5199 5200 // READ-ONLY; The type of restrictions. 5201 Type *ResourceSKURestrictionsType `json:"type,omitempty" azure:"ro"` 5202 5203 // READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. 5204 Values []*string `json:"values,omitempty" azure:"ro"` 5205} 5206 5207// MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictions. 5208func (r ResourceSKURestrictions) MarshalJSON() ([]byte, error) { 5209 objectMap := make(map[string]interface{}) 5210 populate(objectMap, "reasonCode", r.ReasonCode) 5211 populate(objectMap, "restrictionInfo", r.RestrictionInfo) 5212 populate(objectMap, "type", r.Type) 5213 populate(objectMap, "values", r.Values) 5214 return json.Marshal(objectMap) 5215} 5216 5217// ResourceSKUZoneDetails - Describes The zonal capabilities of a SKU. 5218type ResourceSKUZoneDetails struct { 5219 // READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones. 5220 Capabilities []*ResourceSKUCapabilities `json:"capabilities,omitempty" azure:"ro"` 5221 5222 // READ-ONLY; The set of zones that the SKU is available in with the specified capabilities. 5223 Name []*string `json:"name,omitempty" azure:"ro"` 5224} 5225 5226// MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails. 5227func (r ResourceSKUZoneDetails) MarshalJSON() ([]byte, error) { 5228 objectMap := make(map[string]interface{}) 5229 populate(objectMap, "capabilities", r.Capabilities) 5230 populate(objectMap, "name", r.Name) 5231 return json.Marshal(objectMap) 5232} 5233 5234// ResourceSKUsListOptions contains the optional parameters for the ResourceSKUs.List method. 5235type ResourceSKUsListOptions struct { 5236 // The filter to apply on the operation. Only **location** filter is supported currently. 5237 Filter *string 5238} 5239 5240// ResourceSKUsResult - The List Resource Skus operation response. 5241type ResourceSKUsResult struct { 5242 // REQUIRED; The list of skus available for the subscription. 5243 Value []*ResourceSKU `json:"value,omitempty"` 5244 5245 // The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus 5246 NextLink *string `json:"nextLink,omitempty"` 5247} 5248 5249// MarshalJSON implements the json.Marshaller interface for type ResourceSKUsResult. 5250func (r ResourceSKUsResult) MarshalJSON() ([]byte, error) { 5251 objectMap := make(map[string]interface{}) 5252 populate(objectMap, "nextLink", r.NextLink) 5253 populate(objectMap, "value", r.Value) 5254 return json.Marshal(objectMap) 5255} 5256 5257// ResourceURIList - The List resources which are encrypted with the disk encryption set. 5258type ResourceURIList struct { 5259 // REQUIRED; A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set. 5260 Value []*string `json:"value,omitempty"` 5261 5262 // The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources. 5263 NextLink *string `json:"nextLink,omitempty"` 5264} 5265 5266// MarshalJSON implements the json.Marshaller interface for type ResourceURIList. 5267func (r ResourceURIList) MarshalJSON() ([]byte, error) { 5268 objectMap := make(map[string]interface{}) 5269 populate(objectMap, "nextLink", r.NextLink) 5270 populate(objectMap, "value", r.Value) 5271 return json.Marshal(objectMap) 5272} 5273 5274// RestorePoint - Restore Point details. 5275type RestorePoint struct { 5276 ProxyResource 5277 // List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included. 5278 ExcludeDisks []*APIEntityReference `json:"excludeDisks,omitempty"` 5279 5280 // READ-ONLY; Gets the consistency mode for the restore point. Please refer to https://aka.ms/RestorePoints for more details. 5281 ConsistencyMode *ConsistencyModeTypes `json:"consistencyMode,omitempty" azure:"ro"` 5282 5283 // READ-ONLY; Gets the provisioning details set by the server during Create restore point operation. 5284 ProvisioningDetails *RestorePointProvisioningDetails `json:"provisioningDetails,omitempty" azure:"ro"` 5285 5286 // READ-ONLY; Gets the provisioning state of the restore point. 5287 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 5288 5289 // READ-ONLY; Gets the details of the VM captured at the time of the restore point creation. 5290 SourceMetadata *RestorePointSourceMetadata `json:"sourceMetadata,omitempty" azure:"ro"` 5291} 5292 5293// MarshalJSON implements the json.Marshaller interface for type RestorePoint. 5294func (r RestorePoint) MarshalJSON() ([]byte, error) { 5295 objectMap := r.ProxyResource.marshalInternal() 5296 populate(objectMap, "consistencyMode", r.ConsistencyMode) 5297 populate(objectMap, "excludeDisks", r.ExcludeDisks) 5298 populate(objectMap, "provisioningDetails", r.ProvisioningDetails) 5299 populate(objectMap, "provisioningState", r.ProvisioningState) 5300 populate(objectMap, "sourceMetadata", r.SourceMetadata) 5301 return json.Marshal(objectMap) 5302} 5303 5304// RestorePointCollection - Create or update Restore Point collection parameters. 5305type RestorePointCollection struct { 5306 Resource 5307 // The restore point collection properties. 5308 Properties *RestorePointCollectionProperties `json:"properties,omitempty"` 5309} 5310 5311// MarshalJSON implements the json.Marshaller interface for type RestorePointCollection. 5312func (r RestorePointCollection) MarshalJSON() ([]byte, error) { 5313 objectMap := r.Resource.marshalInternal() 5314 populate(objectMap, "properties", r.Properties) 5315 return json.Marshal(objectMap) 5316} 5317 5318// RestorePointCollectionListResult - The List restore point collection operation response. 5319type RestorePointCollectionListResult struct { 5320 // The uri to fetch the next page of RestorePointCollections. Call ListNext() with this to fetch the next page of RestorePointCollections 5321 NextLink *string `json:"nextLink,omitempty"` 5322 5323 // Gets the list of restore point collections. 5324 Value []*RestorePointCollection `json:"value,omitempty"` 5325} 5326 5327// MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionListResult. 5328func (r RestorePointCollectionListResult) MarshalJSON() ([]byte, error) { 5329 objectMap := make(map[string]interface{}) 5330 populate(objectMap, "nextLink", r.NextLink) 5331 populate(objectMap, "value", r.Value) 5332 return json.Marshal(objectMap) 5333} 5334 5335// RestorePointCollectionProperties - The restore point collection properties. 5336type RestorePointCollectionProperties struct { 5337 // The properties of the source resource that this restore point collection is created from. 5338 Source *RestorePointCollectionSourceProperties `json:"source,omitempty"` 5339 5340 // READ-ONLY; The provisioning state of the restore point collection. 5341 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 5342 5343 // READ-ONLY; The unique id of the restore point collection. 5344 RestorePointCollectionID *string `json:"restorePointCollectionId,omitempty" azure:"ro"` 5345 5346 // READ-ONLY; A list containing all restore points created under this restore point collection. 5347 RestorePoints []*RestorePoint `json:"restorePoints,omitempty" azure:"ro"` 5348} 5349 5350// MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionProperties. 5351func (r RestorePointCollectionProperties) MarshalJSON() ([]byte, error) { 5352 objectMap := make(map[string]interface{}) 5353 populate(objectMap, "provisioningState", r.ProvisioningState) 5354 populate(objectMap, "restorePointCollectionId", r.RestorePointCollectionID) 5355 populate(objectMap, "restorePoints", r.RestorePoints) 5356 populate(objectMap, "source", r.Source) 5357 return json.Marshal(objectMap) 5358} 5359 5360// RestorePointCollectionSourceProperties - The properties of the source resource that this restore point collection is created from. 5361type RestorePointCollectionSourceProperties struct { 5362 // Resource Id of the source resource used to create this restore point collection 5363 ID *string `json:"id,omitempty"` 5364 5365 // READ-ONLY; Location of the source resource used to create this restore point collection. 5366 Location *string `json:"location,omitempty" azure:"ro"` 5367} 5368 5369// RestorePointCollectionUpdate - Update Restore Point collection parameters. 5370type RestorePointCollectionUpdate struct { 5371 UpdateResource 5372 // The restore point collection properties. 5373 Properties *RestorePointCollectionProperties `json:"properties,omitempty"` 5374} 5375 5376// MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionUpdate. 5377func (r RestorePointCollectionUpdate) MarshalJSON() ([]byte, error) { 5378 objectMap := r.UpdateResource.marshalInternal() 5379 populate(objectMap, "properties", r.Properties) 5380 return json.Marshal(objectMap) 5381} 5382 5383// RestorePointCollectionsBeginDeleteOptions contains the optional parameters for the RestorePointCollections.BeginDelete method. 5384type RestorePointCollectionsBeginDeleteOptions struct { 5385 // placeholder for future optional parameters 5386} 5387 5388// RestorePointCollectionsCreateOrUpdateOptions contains the optional parameters for the RestorePointCollections.CreateOrUpdate method. 5389type RestorePointCollectionsCreateOrUpdateOptions struct { 5390 // placeholder for future optional parameters 5391} 5392 5393// RestorePointCollectionsGetOptions contains the optional parameters for the RestorePointCollections.Get method. 5394type RestorePointCollectionsGetOptions struct { 5395 // The expand expression to apply on the operation. If expand=restorePoints, server will return all contained restore points in the restorePointCollection. 5396 Expand *RestorePointCollectionExpandOptions 5397} 5398 5399// RestorePointCollectionsListAllOptions contains the optional parameters for the RestorePointCollections.ListAll method. 5400type RestorePointCollectionsListAllOptions struct { 5401 // placeholder for future optional parameters 5402} 5403 5404// RestorePointCollectionsListOptions contains the optional parameters for the RestorePointCollections.List method. 5405type RestorePointCollectionsListOptions struct { 5406 // placeholder for future optional parameters 5407} 5408 5409// RestorePointCollectionsUpdateOptions contains the optional parameters for the RestorePointCollections.Update method. 5410type RestorePointCollectionsUpdateOptions struct { 5411 // placeholder for future optional parameters 5412} 5413 5414// RestorePointProvisioningDetails - Restore Point Provisioning details. 5415type RestorePointProvisioningDetails struct { 5416 // Gets the creation time of the restore point. 5417 CreationTime *time.Time `json:"creationTime,omitempty"` 5418 5419 // Gets the status of the Create restore point operation. 5420 StatusCode *int32 `json:"statusCode,omitempty"` 5421 5422 // Gets the status message of the Create restore point operation. 5423 StatusMessage *string `json:"statusMessage,omitempty"` 5424 5425 // Gets the total size of the data in all the disks which are part of the restore point. 5426 TotalUsedSizeInBytes *int64 `json:"totalUsedSizeInBytes,omitempty"` 5427} 5428 5429// MarshalJSON implements the json.Marshaller interface for type RestorePointProvisioningDetails. 5430func (r RestorePointProvisioningDetails) MarshalJSON() ([]byte, error) { 5431 objectMap := make(map[string]interface{}) 5432 populate(objectMap, "creationTime", (*timeRFC3339)(r.CreationTime)) 5433 populate(objectMap, "statusCode", r.StatusCode) 5434 populate(objectMap, "statusMessage", r.StatusMessage) 5435 populate(objectMap, "totalUsedSizeInBytes", r.TotalUsedSizeInBytes) 5436 return json.Marshal(objectMap) 5437} 5438 5439// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointProvisioningDetails. 5440func (r *RestorePointProvisioningDetails) UnmarshalJSON(data []byte) error { 5441 var rawMsg map[string]json.RawMessage 5442 if err := json.Unmarshal(data, &rawMsg); err != nil { 5443 return err 5444 } 5445 for key, val := range rawMsg { 5446 var err error 5447 switch key { 5448 case "creationTime": 5449 var aux timeRFC3339 5450 err = unpopulate(val, &aux) 5451 r.CreationTime = (*time.Time)(&aux) 5452 delete(rawMsg, key) 5453 case "statusCode": 5454 err = unpopulate(val, &r.StatusCode) 5455 delete(rawMsg, key) 5456 case "statusMessage": 5457 err = unpopulate(val, &r.StatusMessage) 5458 delete(rawMsg, key) 5459 case "totalUsedSizeInBytes": 5460 err = unpopulate(val, &r.TotalUsedSizeInBytes) 5461 delete(rawMsg, key) 5462 } 5463 if err != nil { 5464 return err 5465 } 5466 } 5467 return nil 5468} 5469 5470// RestorePointSourceMetadata - Describes the properties of the Virtual Machine for which the restore point was created. The properties provided are a subset 5471// and the snapshot of the overall Virtual Machine properties captured at the 5472// time of the restore point creation. 5473type RestorePointSourceMetadata struct { 5474 // Gets the diagnostics profile. 5475 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 5476 5477 // Gets the hardware profile. 5478 HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` 5479 5480 // Gets the license type, which is for bring your own license scenario. 5481 LicenseType *string `json:"licenseType,omitempty"` 5482 5483 // Gets the OS profile. 5484 OSProfile *OSProfile `json:"osProfile,omitempty"` 5485 5486 // Gets the security profile. 5487 SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` 5488 5489 // Gets the storage profile. 5490 StorageProfile *RestorePointSourceVMStorageProfile `json:"storageProfile,omitempty"` 5491 5492 // Gets the virtual machine unique id. 5493 VMID *string `json:"vmId,omitempty"` 5494} 5495 5496// RestorePointSourceVMDataDisk - Describes a data disk. 5497type RestorePointSourceVMDataDisk struct { 5498 // Gets the caching type. 5499 Caching *CachingTypes `json:"caching,omitempty"` 5500 5501 // Gets the disk restore point Id. 5502 DiskRestorePoint *APIEntityReference `json:"diskRestorePoint,omitempty"` 5503 5504 // Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks. 5505 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 5506 5507 // Gets the logical unit number. 5508 Lun *int32 `json:"lun,omitempty"` 5509 5510 // Gets the managed disk details 5511 ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` 5512 5513 // Gets the disk name. 5514 Name *string `json:"name,omitempty"` 5515} 5516 5517// RestorePointSourceVMOSDisk - Describes an Operating System disk. 5518type RestorePointSourceVMOSDisk struct { 5519 // Gets the caching type. 5520 Caching *CachingTypes `json:"caching,omitempty"` 5521 5522 // Gets the disk restore point Id. 5523 DiskRestorePoint *APIEntityReference `json:"diskRestorePoint,omitempty"` 5524 5525 // Gets the disk size in GB. 5526 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 5527 5528 // Gets the disk encryption settings. 5529 EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"` 5530 5531 // Gets the managed disk details 5532 ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` 5533 5534 // Gets the disk name. 5535 Name *string `json:"name,omitempty"` 5536 5537 // Gets the Operating System type. 5538 OSType *OperatingSystemType `json:"osType,omitempty"` 5539} 5540 5541// RestorePointSourceVMStorageProfile - Describes the storage profile. 5542type RestorePointSourceVMStorageProfile struct { 5543 // Gets the data disks of the VM captured at the time of the restore point creation. 5544 DataDisks []*RestorePointSourceVMDataDisk `json:"dataDisks,omitempty"` 5545 5546 // Gets the OS disk of the VM captured at the time of the restore point creation. 5547 OSDisk *RestorePointSourceVMOSDisk `json:"osDisk,omitempty"` 5548} 5549 5550// MarshalJSON implements the json.Marshaller interface for type RestorePointSourceVMStorageProfile. 5551func (r RestorePointSourceVMStorageProfile) MarshalJSON() ([]byte, error) { 5552 objectMap := make(map[string]interface{}) 5553 populate(objectMap, "dataDisks", r.DataDisks) 5554 populate(objectMap, "osDisk", r.OSDisk) 5555 return json.Marshal(objectMap) 5556} 5557 5558// RestorePointsBeginCreateOptions contains the optional parameters for the RestorePoints.BeginCreate method. 5559type RestorePointsBeginCreateOptions struct { 5560 // placeholder for future optional parameters 5561} 5562 5563// RestorePointsBeginDeleteOptions contains the optional parameters for the RestorePoints.BeginDelete method. 5564type RestorePointsBeginDeleteOptions struct { 5565 // placeholder for future optional parameters 5566} 5567 5568// RestorePointsGetOptions contains the optional parameters for the RestorePoints.Get method. 5569type RestorePointsGetOptions struct { 5570 // placeholder for future optional parameters 5571} 5572 5573// RetrieveBootDiagnosticsDataResult - The SAS URIs of the console screenshot and serial log blobs. 5574type RetrieveBootDiagnosticsDataResult struct { 5575 // READ-ONLY; The console screenshot blob URI 5576 ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty" azure:"ro"` 5577 5578 // READ-ONLY; The serial console log blob URI. 5579 SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty" azure:"ro"` 5580} 5581 5582type RoleInstance struct { 5583 Properties *RoleInstanceProperties `json:"properties,omitempty"` 5584 SKU *InstanceSKU `json:"sku,omitempty"` 5585 5586 // READ-ONLY; Resource Id 5587 ID *string `json:"id,omitempty" azure:"ro"` 5588 5589 // READ-ONLY; Resource Location. 5590 Location *string `json:"location,omitempty" azure:"ro"` 5591 5592 // READ-ONLY; Resource Name. 5593 Name *string `json:"name,omitempty" azure:"ro"` 5594 5595 // READ-ONLY; Resource tags. 5596 Tags map[string]*string `json:"tags,omitempty" azure:"ro"` 5597 5598 // READ-ONLY; Resource Type. 5599 Type *string `json:"type,omitempty" azure:"ro"` 5600} 5601 5602// MarshalJSON implements the json.Marshaller interface for type RoleInstance. 5603func (r RoleInstance) MarshalJSON() ([]byte, error) { 5604 objectMap := make(map[string]interface{}) 5605 populate(objectMap, "id", r.ID) 5606 populate(objectMap, "location", r.Location) 5607 populate(objectMap, "name", r.Name) 5608 populate(objectMap, "properties", r.Properties) 5609 populate(objectMap, "sku", r.SKU) 5610 populate(objectMap, "tags", r.Tags) 5611 populate(objectMap, "type", r.Type) 5612 return json.Marshal(objectMap) 5613} 5614 5615type RoleInstanceListResult struct { 5616 // REQUIRED 5617 Value []*RoleInstance `json:"value,omitempty"` 5618 NextLink *string `json:"nextLink,omitempty"` 5619} 5620 5621// MarshalJSON implements the json.Marshaller interface for type RoleInstanceListResult. 5622func (r RoleInstanceListResult) MarshalJSON() ([]byte, error) { 5623 objectMap := make(map[string]interface{}) 5624 populate(objectMap, "nextLink", r.NextLink) 5625 populate(objectMap, "value", r.Value) 5626 return json.Marshal(objectMap) 5627} 5628 5629// RoleInstanceNetworkProfile - Describes the network profile for the role instance. 5630type RoleInstanceNetworkProfile struct { 5631 // READ-ONLY; Specifies the list of resource Ids for the network interfaces associated with the role instance. 5632 NetworkInterfaces []*SubResource `json:"networkInterfaces,omitempty" azure:"ro"` 5633} 5634 5635// MarshalJSON implements the json.Marshaller interface for type RoleInstanceNetworkProfile. 5636func (r RoleInstanceNetworkProfile) MarshalJSON() ([]byte, error) { 5637 objectMap := make(map[string]interface{}) 5638 populate(objectMap, "networkInterfaces", r.NetworkInterfaces) 5639 return json.Marshal(objectMap) 5640} 5641 5642type RoleInstanceProperties struct { 5643 // The instance view of the role instance. 5644 InstanceView *RoleInstanceView `json:"instanceView,omitempty"` 5645 5646 // Describes the network profile for the role instance. 5647 NetworkProfile *RoleInstanceNetworkProfile `json:"networkProfile,omitempty"` 5648} 5649 5650// RoleInstanceView - The instance view of the role instance. 5651type RoleInstanceView struct { 5652 // READ-ONLY; The Fault Domain. 5653 PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty" azure:"ro"` 5654 5655 // READ-ONLY; The Update Domain. 5656 PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty" azure:"ro"` 5657 5658 // READ-ONLY; Specifies a unique identifier generated internally for the cloud service associated with this role instance. 5659 // NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. 5660 PrivateID *string `json:"privateId,omitempty" azure:"ro"` 5661 5662 // READ-ONLY 5663 Statuses []*ResourceInstanceViewStatus `json:"statuses,omitempty" azure:"ro"` 5664} 5665 5666// MarshalJSON implements the json.Marshaller interface for type RoleInstanceView. 5667func (r RoleInstanceView) MarshalJSON() ([]byte, error) { 5668 objectMap := make(map[string]interface{}) 5669 populate(objectMap, "platformFaultDomain", r.PlatformFaultDomain) 5670 populate(objectMap, "platformUpdateDomain", r.PlatformUpdateDomain) 5671 populate(objectMap, "privateId", r.PrivateID) 5672 populate(objectMap, "statuses", r.Statuses) 5673 return json.Marshal(objectMap) 5674} 5675 5676// RoleInstances - Specifies a list of role instances from the cloud service. 5677type RoleInstances struct { 5678 // REQUIRED; List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service. 5679 RoleInstances []*string `json:"roleInstances,omitempty"` 5680} 5681 5682// MarshalJSON implements the json.Marshaller interface for type RoleInstances. 5683func (r RoleInstances) MarshalJSON() ([]byte, error) { 5684 objectMap := make(map[string]interface{}) 5685 populate(objectMap, "roleInstances", r.RoleInstances) 5686 return json.Marshal(objectMap) 5687} 5688 5689// RollbackStatusInfo - Information about rollback on failed VM instances after a OS Upgrade operation. 5690type RollbackStatusInfo struct { 5691 // READ-ONLY; The number of instances which failed to rollback. 5692 FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty" azure:"ro"` 5693 5694 // READ-ONLY; Error details if OS rollback failed. 5695 RollbackError *APIError `json:"rollbackError,omitempty" azure:"ro"` 5696 5697 // READ-ONLY; The number of instances which have been successfully rolled back. 5698 SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty" azure:"ro"` 5699} 5700 5701// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade. 5702type RollingUpgradePolicy struct { 5703 // Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine 5704 // the batch size. 5705 EnableCrossZoneUpgrade *bool `json:"enableCrossZoneUpgrade,omitempty"` 5706 5707 // The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, 5708 // unhealthy instances in previous or future batches 5709 // can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. 5710 MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"` 5711 5712 // The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, 5713 // or by being found in an unhealthy state by 5714 // the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for 5715 // this parameter is 20%. 5716 MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"` 5717 5718 // The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is 5719 // upgraded. If this percentage is ever exceeded, 5720 // the rolling update aborts. The default value for this parameter is 20%. 5721 MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"` 5722 5723 // The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified 5724 // in ISO 8601 format. The default value is 0 seconds 5725 // (PT0S). 5726 PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"` 5727 5728 // Upgrade all unhealthy instances in a scale set before any healthy instances. 5729 PrioritizeUnhealthyInstances *bool `json:"prioritizeUnhealthyInstances,omitempty"` 5730} 5731 5732// RollingUpgradeProgressInfo - Information about the number of virtual machine instances in each upgrade state. 5733type RollingUpgradeProgressInfo struct { 5734 // READ-ONLY; The number of instances that have failed to be upgraded successfully. 5735 FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty" azure:"ro"` 5736 5737 // READ-ONLY; The number of instances that are currently being upgraded. 5738 InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty" azure:"ro"` 5739 5740 // READ-ONLY; The number of instances that have not yet begun to be upgraded. 5741 PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty" azure:"ro"` 5742 5743 // READ-ONLY; The number of instances that have been successfully upgraded. 5744 SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty" azure:"ro"` 5745} 5746 5747// RollingUpgradeRunningStatus - Information about the current running state of the overall upgrade. 5748type RollingUpgradeRunningStatus struct { 5749 // READ-ONLY; Code indicating the current status of the upgrade. 5750 Code *RollingUpgradeStatusCode `json:"code,omitempty" azure:"ro"` 5751 5752 // READ-ONLY; The last action performed on the rolling upgrade. 5753 LastAction *RollingUpgradeActionType `json:"lastAction,omitempty" azure:"ro"` 5754 5755 // READ-ONLY; Last action time of the upgrade. 5756 LastActionTime *time.Time `json:"lastActionTime,omitempty" azure:"ro"` 5757 5758 // READ-ONLY; Start time of the upgrade. 5759 StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` 5760} 5761 5762// MarshalJSON implements the json.Marshaller interface for type RollingUpgradeRunningStatus. 5763func (r RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) { 5764 objectMap := make(map[string]interface{}) 5765 populate(objectMap, "code", r.Code) 5766 populate(objectMap, "lastAction", r.LastAction) 5767 populate(objectMap, "lastActionTime", (*timeRFC3339)(r.LastActionTime)) 5768 populate(objectMap, "startTime", (*timeRFC3339)(r.StartTime)) 5769 return json.Marshal(objectMap) 5770} 5771 5772// UnmarshalJSON implements the json.Unmarshaller interface for type RollingUpgradeRunningStatus. 5773func (r *RollingUpgradeRunningStatus) UnmarshalJSON(data []byte) error { 5774 var rawMsg map[string]json.RawMessage 5775 if err := json.Unmarshal(data, &rawMsg); err != nil { 5776 return err 5777 } 5778 for key, val := range rawMsg { 5779 var err error 5780 switch key { 5781 case "code": 5782 err = unpopulate(val, &r.Code) 5783 delete(rawMsg, key) 5784 case "lastAction": 5785 err = unpopulate(val, &r.LastAction) 5786 delete(rawMsg, key) 5787 case "lastActionTime": 5788 var aux timeRFC3339 5789 err = unpopulate(val, &aux) 5790 r.LastActionTime = (*time.Time)(&aux) 5791 delete(rawMsg, key) 5792 case "startTime": 5793 var aux timeRFC3339 5794 err = unpopulate(val, &aux) 5795 r.StartTime = (*time.Time)(&aux) 5796 delete(rawMsg, key) 5797 } 5798 if err != nil { 5799 return err 5800 } 5801 } 5802 return nil 5803} 5804 5805// RollingUpgradeStatusInfo - The status of the latest virtual machine scale set rolling upgrade. 5806type RollingUpgradeStatusInfo struct { 5807 Resource 5808 // The status of the latest virtual machine scale set rolling upgrade. 5809 Properties *RollingUpgradeStatusInfoProperties `json:"properties,omitempty"` 5810} 5811 5812// MarshalJSON implements the json.Marshaller interface for type RollingUpgradeStatusInfo. 5813func (r RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) { 5814 objectMap := r.Resource.marshalInternal() 5815 populate(objectMap, "properties", r.Properties) 5816 return json.Marshal(objectMap) 5817} 5818 5819// RollingUpgradeStatusInfoProperties - The status of the latest virtual machine scale set rolling upgrade. 5820type RollingUpgradeStatusInfoProperties struct { 5821 // READ-ONLY; Error details for this upgrade, if there are any. 5822 Error *APIError `json:"error,omitempty" azure:"ro"` 5823 5824 // READ-ONLY; The rolling upgrade policies applied for this upgrade. 5825 Policy *RollingUpgradePolicy `json:"policy,omitempty" azure:"ro"` 5826 5827 // READ-ONLY; Information about the number of virtual machine instances in each upgrade state. 5828 Progress *RollingUpgradeProgressInfo `json:"progress,omitempty" azure:"ro"` 5829 5830 // READ-ONLY; Information about the current running state of the overall upgrade. 5831 RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty" azure:"ro"` 5832} 5833 5834// RunCommandDocument - Describes the properties of a Run Command. 5835type RunCommandDocument struct { 5836 RunCommandDocumentBase 5837 // REQUIRED; The script to be executed. 5838 Script []*string `json:"script,omitempty"` 5839 5840 // The parameters used by the script. 5841 Parameters []*RunCommandParameterDefinition `json:"parameters,omitempty"` 5842} 5843 5844// MarshalJSON implements the json.Marshaller interface for type RunCommandDocument. 5845func (r RunCommandDocument) MarshalJSON() ([]byte, error) { 5846 objectMap := r.RunCommandDocumentBase.marshalInternal() 5847 populate(objectMap, "parameters", r.Parameters) 5848 populate(objectMap, "script", r.Script) 5849 return json.Marshal(objectMap) 5850} 5851 5852// RunCommandDocumentBase - Describes the properties of a Run Command metadata. 5853type RunCommandDocumentBase struct { 5854 // REQUIRED; The VM run command description. 5855 Description *string `json:"description,omitempty"` 5856 5857 // REQUIRED; The VM run command id. 5858 ID *string `json:"id,omitempty"` 5859 5860 // REQUIRED; The VM run command label. 5861 Label *string `json:"label,omitempty"` 5862 5863 // REQUIRED; The Operating System type. 5864 OSType *OperatingSystemTypes `json:"osType,omitempty"` 5865 5866 // REQUIRED; The VM run command schema. 5867 Schema *string `json:"$schema,omitempty"` 5868} 5869 5870// MarshalJSON implements the json.Marshaller interface for type RunCommandDocumentBase. 5871func (r RunCommandDocumentBase) MarshalJSON() ([]byte, error) { 5872 objectMap := r.marshalInternal() 5873 return json.Marshal(objectMap) 5874} 5875 5876func (r RunCommandDocumentBase) marshalInternal() map[string]interface{} { 5877 objectMap := make(map[string]interface{}) 5878 populate(objectMap, "description", r.Description) 5879 populate(objectMap, "id", r.ID) 5880 populate(objectMap, "label", r.Label) 5881 populate(objectMap, "osType", r.OSType) 5882 populate(objectMap, "$schema", r.Schema) 5883 return objectMap 5884} 5885 5886// RunCommandInput - Capture Virtual Machine parameters. 5887type RunCommandInput struct { 5888 // REQUIRED; The run command id. 5889 CommandID *string `json:"commandId,omitempty"` 5890 5891 // The run command parameters. 5892 Parameters []*RunCommandInputParameter `json:"parameters,omitempty"` 5893 5894 // Optional. The script to be executed. When this value is given, the given script will override the default script of the command. 5895 Script []*string `json:"script,omitempty"` 5896} 5897 5898// MarshalJSON implements the json.Marshaller interface for type RunCommandInput. 5899func (r RunCommandInput) MarshalJSON() ([]byte, error) { 5900 objectMap := make(map[string]interface{}) 5901 populate(objectMap, "commandId", r.CommandID) 5902 populate(objectMap, "parameters", r.Parameters) 5903 populate(objectMap, "script", r.Script) 5904 return json.Marshal(objectMap) 5905} 5906 5907// RunCommandInputParameter - Describes the properties of a run command parameter. 5908type RunCommandInputParameter struct { 5909 // REQUIRED; The run command parameter name. 5910 Name *string `json:"name,omitempty"` 5911 5912 // REQUIRED; The run command parameter value. 5913 Value *string `json:"value,omitempty"` 5914} 5915 5916// RunCommandListResult - The List Virtual Machine operation response. 5917type RunCommandListResult struct { 5918 // REQUIRED; The list of virtual machine run commands. 5919 Value []*RunCommandDocumentBase `json:"value,omitempty"` 5920 5921 // The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. 5922 NextLink *string `json:"nextLink,omitempty"` 5923} 5924 5925// MarshalJSON implements the json.Marshaller interface for type RunCommandListResult. 5926func (r RunCommandListResult) MarshalJSON() ([]byte, error) { 5927 objectMap := make(map[string]interface{}) 5928 populate(objectMap, "nextLink", r.NextLink) 5929 populate(objectMap, "value", r.Value) 5930 return json.Marshal(objectMap) 5931} 5932 5933// RunCommandParameterDefinition - Describes the properties of a run command parameter. 5934type RunCommandParameterDefinition struct { 5935 // REQUIRED; The run command parameter name. 5936 Name *string `json:"name,omitempty"` 5937 5938 // REQUIRED; The run command parameter type. 5939 Type *string `json:"type,omitempty"` 5940 5941 // The run command parameter default value. 5942 DefaultValue *string `json:"defaultValue,omitempty"` 5943 5944 // The run command parameter required. 5945 Required *bool `json:"required,omitempty"` 5946} 5947 5948type RunCommandResult struct { 5949 // Run command operation response. 5950 Value []*InstanceViewStatus `json:"value,omitempty"` 5951} 5952 5953// MarshalJSON implements the json.Marshaller interface for type RunCommandResult. 5954func (r RunCommandResult) MarshalJSON() ([]byte, error) { 5955 objectMap := make(map[string]interface{}) 5956 populate(objectMap, "value", r.Value) 5957 return json.Marshal(objectMap) 5958} 5959 5960// SKU - Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to 5961// deallocate the VMs in the scale set before you modify the 5962// SKU name. 5963type SKU struct { 5964 // Specifies the number of virtual machines in the scale set. 5965 Capacity *int64 `json:"capacity,omitempty"` 5966 5967 // The sku name. 5968 Name *string `json:"name,omitempty"` 5969 5970 // Specifies the tier of virtual machines in a scale set. 5971 // Possible Values: 5972 // Standard 5973 // Basic 5974 Tier *string `json:"tier,omitempty"` 5975} 5976 5977// SSHConfiguration - SSH configuration for Linux based VMs running on Azure 5978type SSHConfiguration struct { 5979 // The list of SSH public keys used to authenticate with linux based VMs. 5980 PublicKeys []*SSHPublicKey `json:"publicKeys,omitempty"` 5981} 5982 5983// MarshalJSON implements the json.Marshaller interface for type SSHConfiguration. 5984func (s SSHConfiguration) MarshalJSON() ([]byte, error) { 5985 objectMap := make(map[string]interface{}) 5986 populate(objectMap, "publicKeys", s.PublicKeys) 5987 return json.Marshal(objectMap) 5988} 5989 5990// SSHPublicKey - Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. 5991type SSHPublicKey struct { 5992 // SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. 5993 // For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). 5994 KeyData *string `json:"keyData,omitempty"` 5995 5996 // Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: 5997 // /home/user/.ssh/authorized_keys 5998 Path *string `json:"path,omitempty"` 5999} 6000 6001// SSHPublicKeyGenerateKeyPairResult - Response from generation of an SSH key pair. 6002type SSHPublicKeyGenerateKeyPairResult struct { 6003 // REQUIRED; The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} 6004 ID *string `json:"id,omitempty"` 6005 6006 // REQUIRED; Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and 6007 // should be treated as a secret. 6008 PrivateKey *string `json:"privateKey,omitempty"` 6009 6010 // REQUIRED; Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format. 6011 PublicKey *string `json:"publicKey,omitempty"` 6012} 6013 6014// SSHPublicKeyResource - Specifies information about the SSH public key. 6015type SSHPublicKeyResource struct { 6016 Resource 6017 // Properties of the SSH public key. 6018 Properties *SSHPublicKeyResourceProperties `json:"properties,omitempty"` 6019} 6020 6021// MarshalJSON implements the json.Marshaller interface for type SSHPublicKeyResource. 6022func (s SSHPublicKeyResource) MarshalJSON() ([]byte, error) { 6023 objectMap := s.Resource.marshalInternal() 6024 populate(objectMap, "properties", s.Properties) 6025 return json.Marshal(objectMap) 6026} 6027 6028// SSHPublicKeyResourceProperties - Properties of the SSH public key. 6029type SSHPublicKeyResourceProperties struct { 6030 // SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey 6031 // property will be populated when 6032 // generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa 6033 // format. 6034 PublicKey *string `json:"publicKey,omitempty"` 6035} 6036 6037// SSHPublicKeyUpdateResource - Specifies information about the SSH public key. 6038type SSHPublicKeyUpdateResource struct { 6039 UpdateResource 6040 // Properties of the SSH public key. 6041 Properties *SSHPublicKeyResourceProperties `json:"properties,omitempty"` 6042} 6043 6044// MarshalJSON implements the json.Marshaller interface for type SSHPublicKeyUpdateResource. 6045func (s SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) { 6046 objectMap := s.UpdateResource.marshalInternal() 6047 populate(objectMap, "properties", s.Properties) 6048 return json.Marshal(objectMap) 6049} 6050 6051// SSHPublicKeysCreateOptions contains the optional parameters for the SSHPublicKeys.Create method. 6052type SSHPublicKeysCreateOptions struct { 6053 // placeholder for future optional parameters 6054} 6055 6056// SSHPublicKeysDeleteOptions contains the optional parameters for the SSHPublicKeys.Delete method. 6057type SSHPublicKeysDeleteOptions struct { 6058 // placeholder for future optional parameters 6059} 6060 6061// SSHPublicKeysGenerateKeyPairOptions contains the optional parameters for the SSHPublicKeys.GenerateKeyPair method. 6062type SSHPublicKeysGenerateKeyPairOptions struct { 6063 // placeholder for future optional parameters 6064} 6065 6066// SSHPublicKeysGetOptions contains the optional parameters for the SSHPublicKeys.Get method. 6067type SSHPublicKeysGetOptions struct { 6068 // placeholder for future optional parameters 6069} 6070 6071// SSHPublicKeysGroupListResult - The list SSH public keys operation response. 6072type SSHPublicKeysGroupListResult struct { 6073 // REQUIRED; The list of SSH public keys 6074 Value []*SSHPublicKeyResource `json:"value,omitempty"` 6075 6076 // The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys. 6077 NextLink *string `json:"nextLink,omitempty"` 6078} 6079 6080// MarshalJSON implements the json.Marshaller interface for type SSHPublicKeysGroupListResult. 6081func (s SSHPublicKeysGroupListResult) MarshalJSON() ([]byte, error) { 6082 objectMap := make(map[string]interface{}) 6083 populate(objectMap, "nextLink", s.NextLink) 6084 populate(objectMap, "value", s.Value) 6085 return json.Marshal(objectMap) 6086} 6087 6088// SSHPublicKeysListByResourceGroupOptions contains the optional parameters for the SSHPublicKeys.ListByResourceGroup method. 6089type SSHPublicKeysListByResourceGroupOptions struct { 6090 // placeholder for future optional parameters 6091} 6092 6093// SSHPublicKeysListBySubscriptionOptions contains the optional parameters for the SSHPublicKeys.ListBySubscription method. 6094type SSHPublicKeysListBySubscriptionOptions struct { 6095 // placeholder for future optional parameters 6096} 6097 6098// SSHPublicKeysUpdateOptions contains the optional parameters for the SSHPublicKeys.Update method. 6099type SSHPublicKeysUpdateOptions struct { 6100 // placeholder for future optional parameters 6101} 6102 6103// ScaleInPolicy - Describes a scale-in policy for a virtual machine scale set. 6104type ScaleInPolicy struct { 6105 // The rules to be followed when scaling-in a virtual machine scale set. 6106 // Possible values are: 6107 // Default When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be 6108 // balanced across Fault Domains as far as possible. 6109 // Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in. 6110 // OldestVM When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. 6111 // For zonal virtual machine scale sets, the 6112 // scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal. 6113 // NewestVM When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. 6114 // For zonal virtual machine scale sets, the 6115 // scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal. 6116 Rules []*VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"` 6117} 6118 6119// MarshalJSON implements the json.Marshaller interface for type ScaleInPolicy. 6120func (s ScaleInPolicy) MarshalJSON() ([]byte, error) { 6121 objectMap := make(map[string]interface{}) 6122 populate(objectMap, "rules", s.Rules) 6123 return json.Marshal(objectMap) 6124} 6125 6126type ScheduledEventsProfile struct { 6127 // Specifies Terminate Scheduled Event related configurations. 6128 TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"` 6129} 6130 6131// SecurityProfile - Specifies the Security profile settings for the virtual machine or virtual machine scale set. 6132type SecurityProfile struct { 6133 // This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This 6134 // will enable the encryption for all the disks 6135 // including Resource/Temp disk at host itself. 6136 // Default: The Encryption at host will be disabled unless this property is set to true for the resource. 6137 EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"` 6138 6139 // Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. 6140 // Default: UefiSettings will not be enabled unless this property is set as TrustedLaunch. 6141 SecurityType *string `json:"securityType,omitempty"` 6142 6143 // Specifies the security settings like secure boot and vTPM used while creating the virtual machine. 6144 // Minimum api-version: 2020-12-01 6145 UefiSettings *UefiSettings `json:"uefiSettings,omitempty"` 6146} 6147 6148type ShareInfoElement struct { 6149 // READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. 6150 VMURI *string `json:"vmUri,omitempty" azure:"ro"` 6151} 6152 6153// SharedGalleriesGetOptions contains the optional parameters for the SharedGalleries.Get method. 6154type SharedGalleriesGetOptions struct { 6155 // placeholder for future optional parameters 6156} 6157 6158// SharedGalleriesListOptions contains the optional parameters for the SharedGalleries.List method. 6159type SharedGalleriesListOptions struct { 6160 // The query parameter to decide what shared galleries to fetch when doing listing operations. 6161 SharedTo *SharedToValues 6162} 6163 6164// SharedGallery - Specifies information about the Shared Gallery that you want to create or update. 6165type SharedGallery struct { 6166 PirSharedGalleryResource 6167} 6168 6169// SharedGalleryIdentifier - The identifier information of shared gallery. 6170type SharedGalleryIdentifier struct { 6171 // The unique id of this shared gallery. 6172 UniqueID *string `json:"uniqueId,omitempty"` 6173} 6174 6175// SharedGalleryImage - Specifies information about the gallery image definition that you want to create or update. 6176type SharedGalleryImage struct { 6177 PirSharedGalleryResource 6178 // Describes the properties of a gallery image definition. 6179 Properties *SharedGalleryImageProperties `json:"properties,omitempty"` 6180} 6181 6182// SharedGalleryImageList - The List Shared Gallery Images operation response. 6183type SharedGalleryImageList struct { 6184 // REQUIRED; A list of shared gallery images. 6185 Value []*SharedGalleryImage `json:"value,omitempty"` 6186 6187 // The uri to fetch the next page of shared gallery images. Call ListNext() with this to fetch the next page of shared gallery images. 6188 NextLink *string `json:"nextLink,omitempty"` 6189} 6190 6191// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageList. 6192func (s SharedGalleryImageList) MarshalJSON() ([]byte, error) { 6193 objectMap := make(map[string]interface{}) 6194 populate(objectMap, "nextLink", s.NextLink) 6195 populate(objectMap, "value", s.Value) 6196 return json.Marshal(objectMap) 6197} 6198 6199// SharedGalleryImageProperties - Describes the properties of a gallery image definition. 6200type SharedGalleryImageProperties struct { 6201 // REQUIRED; This is the gallery image definition identifier. 6202 Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` 6203 6204 // REQUIRED; This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. 6205 OSState *OperatingSystemStateTypes `json:"osState,omitempty"` 6206 6207 // REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. 6208 // Possible values are: 6209 // Windows 6210 // Linux 6211 OSType *OperatingSystemTypes `json:"osType,omitempty"` 6212 6213 // Describes the disallowed disk types. 6214 Disallowed *Disallowed `json:"disallowed,omitempty"` 6215 6216 // The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. 6217 EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"` 6218 6219 // A list of gallery image features. 6220 Features []*GalleryImageFeature `json:"features,omitempty"` 6221 6222 // The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 6223 HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"` 6224 6225 // Describes the gallery image definition purchase plan. This is used by marketplace images. 6226 PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"` 6227 6228 // The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. 6229 Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"` 6230} 6231 6232// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageProperties. 6233func (s SharedGalleryImageProperties) MarshalJSON() ([]byte, error) { 6234 objectMap := make(map[string]interface{}) 6235 populate(objectMap, "disallowed", s.Disallowed) 6236 populate(objectMap, "endOfLifeDate", (*timeRFC3339)(s.EndOfLifeDate)) 6237 populate(objectMap, "features", s.Features) 6238 populate(objectMap, "hyperVGeneration", s.HyperVGeneration) 6239 populate(objectMap, "identifier", s.Identifier) 6240 populate(objectMap, "osState", s.OSState) 6241 populate(objectMap, "osType", s.OSType) 6242 populate(objectMap, "purchasePlan", s.PurchasePlan) 6243 populate(objectMap, "recommended", s.Recommended) 6244 return json.Marshal(objectMap) 6245} 6246 6247// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageProperties. 6248func (s *SharedGalleryImageProperties) UnmarshalJSON(data []byte) error { 6249 var rawMsg map[string]json.RawMessage 6250 if err := json.Unmarshal(data, &rawMsg); err != nil { 6251 return err 6252 } 6253 for key, val := range rawMsg { 6254 var err error 6255 switch key { 6256 case "disallowed": 6257 err = unpopulate(val, &s.Disallowed) 6258 delete(rawMsg, key) 6259 case "endOfLifeDate": 6260 var aux timeRFC3339 6261 err = unpopulate(val, &aux) 6262 s.EndOfLifeDate = (*time.Time)(&aux) 6263 delete(rawMsg, key) 6264 case "features": 6265 err = unpopulate(val, &s.Features) 6266 delete(rawMsg, key) 6267 case "hyperVGeneration": 6268 err = unpopulate(val, &s.HyperVGeneration) 6269 delete(rawMsg, key) 6270 case "identifier": 6271 err = unpopulate(val, &s.Identifier) 6272 delete(rawMsg, key) 6273 case "osState": 6274 err = unpopulate(val, &s.OSState) 6275 delete(rawMsg, key) 6276 case "osType": 6277 err = unpopulate(val, &s.OSType) 6278 delete(rawMsg, key) 6279 case "purchasePlan": 6280 err = unpopulate(val, &s.PurchasePlan) 6281 delete(rawMsg, key) 6282 case "recommended": 6283 err = unpopulate(val, &s.Recommended) 6284 delete(rawMsg, key) 6285 } 6286 if err != nil { 6287 return err 6288 } 6289 } 6290 return nil 6291} 6292 6293// SharedGalleryImageVersion - Specifies information about the gallery image version that you want to create or update. 6294type SharedGalleryImageVersion struct { 6295 PirSharedGalleryResource 6296 // Describes the properties of a gallery image version. 6297 Properties *SharedGalleryImageVersionProperties `json:"properties,omitempty"` 6298} 6299 6300// SharedGalleryImageVersionList - The List Shared Gallery Image versions operation response. 6301type SharedGalleryImageVersionList struct { 6302 // REQUIRED; A list of shared gallery images versions. 6303 Value []*SharedGalleryImageVersion `json:"value,omitempty"` 6304 6305 // The uri to fetch the next page of shared gallery image versions. Call ListNext() with this to fetch the next page of shared gallery image versions. 6306 NextLink *string `json:"nextLink,omitempty"` 6307} 6308 6309// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageVersionList. 6310func (s SharedGalleryImageVersionList) MarshalJSON() ([]byte, error) { 6311 objectMap := make(map[string]interface{}) 6312 populate(objectMap, "nextLink", s.NextLink) 6313 populate(objectMap, "value", s.Value) 6314 return json.Marshal(objectMap) 6315} 6316 6317// SharedGalleryImageVersionProperties - Describes the properties of a gallery image version. 6318type SharedGalleryImageVersionProperties struct { 6319 // The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. 6320 EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty"` 6321 6322 // The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. 6323 PublishedDate *time.Time `json:"publishedDate,omitempty"` 6324} 6325 6326// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageVersionProperties. 6327func (s SharedGalleryImageVersionProperties) MarshalJSON() ([]byte, error) { 6328 objectMap := make(map[string]interface{}) 6329 populate(objectMap, "endOfLifeDate", (*timeRFC3339)(s.EndOfLifeDate)) 6330 populate(objectMap, "publishedDate", (*timeRFC3339)(s.PublishedDate)) 6331 return json.Marshal(objectMap) 6332} 6333 6334// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageVersionProperties. 6335func (s *SharedGalleryImageVersionProperties) UnmarshalJSON(data []byte) error { 6336 var rawMsg map[string]json.RawMessage 6337 if err := json.Unmarshal(data, &rawMsg); err != nil { 6338 return err 6339 } 6340 for key, val := range rawMsg { 6341 var err error 6342 switch key { 6343 case "endOfLifeDate": 6344 var aux timeRFC3339 6345 err = unpopulate(val, &aux) 6346 s.EndOfLifeDate = (*time.Time)(&aux) 6347 delete(rawMsg, key) 6348 case "publishedDate": 6349 var aux timeRFC3339 6350 err = unpopulate(val, &aux) 6351 s.PublishedDate = (*time.Time)(&aux) 6352 delete(rawMsg, key) 6353 } 6354 if err != nil { 6355 return err 6356 } 6357 } 6358 return nil 6359} 6360 6361// SharedGalleryImageVersionsGetOptions contains the optional parameters for the SharedGalleryImageVersions.Get method. 6362type SharedGalleryImageVersionsGetOptions struct { 6363 // placeholder for future optional parameters 6364} 6365 6366// SharedGalleryImageVersionsListOptions contains the optional parameters for the SharedGalleryImageVersions.List method. 6367type SharedGalleryImageVersionsListOptions struct { 6368 // The query parameter to decide what shared galleries to fetch when doing listing operations. 6369 SharedTo *SharedToValues 6370} 6371 6372// SharedGalleryImagesGetOptions contains the optional parameters for the SharedGalleryImages.Get method. 6373type SharedGalleryImagesGetOptions struct { 6374 // placeholder for future optional parameters 6375} 6376 6377// SharedGalleryImagesListOptions contains the optional parameters for the SharedGalleryImages.List method. 6378type SharedGalleryImagesListOptions struct { 6379 // The query parameter to decide what shared galleries to fetch when doing listing operations. 6380 SharedTo *SharedToValues 6381} 6382 6383// SharedGalleryList - The List Shared Galleries operation response. 6384type SharedGalleryList struct { 6385 // REQUIRED; A list of shared galleries. 6386 Value []*SharedGallery `json:"value,omitempty"` 6387 6388 // The uri to fetch the next page of shared galleries. Call ListNext() with this to fetch the next page of shared galleries. 6389 NextLink *string `json:"nextLink,omitempty"` 6390} 6391 6392// MarshalJSON implements the json.Marshaller interface for type SharedGalleryList. 6393func (s SharedGalleryList) MarshalJSON() ([]byte, error) { 6394 objectMap := make(map[string]interface{}) 6395 populate(objectMap, "nextLink", s.NextLink) 6396 populate(objectMap, "value", s.Value) 6397 return json.Marshal(objectMap) 6398} 6399 6400// SharingProfile - Profile for gallery sharing to subscription or tenant 6401type SharingProfile struct { 6402 // This property allows you to specify the permission of sharing gallery. 6403 // Possible values are: 6404 // Private 6405 // Groups 6406 Permissions *GallerySharingPermissionTypes `json:"permissions,omitempty"` 6407 6408 // READ-ONLY; A list of sharing profile groups. 6409 Groups []*SharingProfileGroup `json:"groups,omitempty" azure:"ro"` 6410} 6411 6412// MarshalJSON implements the json.Marshaller interface for type SharingProfile. 6413func (s SharingProfile) MarshalJSON() ([]byte, error) { 6414 objectMap := make(map[string]interface{}) 6415 populate(objectMap, "groups", s.Groups) 6416 populate(objectMap, "permissions", s.Permissions) 6417 return json.Marshal(objectMap) 6418} 6419 6420// SharingProfileGroup - Group of the gallery sharing profile 6421type SharingProfileGroup struct { 6422 // A list of subscription/tenant ids the gallery is aimed to be shared to. 6423 IDs []*string `json:"ids,omitempty"` 6424 6425 // This property allows you to specify the type of sharing group. 6426 // Possible values are: 6427 // Subscriptions 6428 // AADTenants 6429 Type *SharingProfileGroupTypes `json:"type,omitempty"` 6430} 6431 6432// MarshalJSON implements the json.Marshaller interface for type SharingProfileGroup. 6433func (s SharingProfileGroup) MarshalJSON() ([]byte, error) { 6434 objectMap := make(map[string]interface{}) 6435 populate(objectMap, "ids", s.IDs) 6436 populate(objectMap, "type", s.Type) 6437 return json.Marshal(objectMap) 6438} 6439 6440// SharingUpdate - Specifies information about the gallery sharing profile update. 6441type SharingUpdate struct { 6442 // REQUIRED; This property allows you to specify the operation type of gallery sharing update. 6443 // Possible values are: 6444 // Add 6445 // Remove 6446 // Reset 6447 OperationType *SharingUpdateOperationTypes `json:"operationType,omitempty"` 6448 6449 // A list of sharing profile groups. 6450 Groups []*SharingProfileGroup `json:"groups,omitempty"` 6451} 6452 6453// MarshalJSON implements the json.Marshaller interface for type SharingUpdate. 6454func (s SharingUpdate) MarshalJSON() ([]byte, error) { 6455 objectMap := make(map[string]interface{}) 6456 populate(objectMap, "groups", s.Groups) 6457 populate(objectMap, "operationType", s.OperationType) 6458 return json.Marshal(objectMap) 6459} 6460 6461// Snapshot resource. 6462type Snapshot struct { 6463 Resource 6464 // The extended location where the snapshot will be created. Extended location cannot be changed. 6465 ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` 6466 6467 // Snapshot resource properties. 6468 Properties *SnapshotProperties `json:"properties,omitempty"` 6469 6470 // The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior 6471 // is the SKU will be set to the same sku as the 6472 // previous snapshot 6473 SKU *SnapshotSKU `json:"sku,omitempty"` 6474 6475 // READ-ONLY; Unused. Always Null. 6476 ManagedBy *string `json:"managedBy,omitempty" azure:"ro"` 6477} 6478 6479// MarshalJSON implements the json.Marshaller interface for type Snapshot. 6480func (s Snapshot) MarshalJSON() ([]byte, error) { 6481 objectMap := s.Resource.marshalInternal() 6482 populate(objectMap, "extendedLocation", s.ExtendedLocation) 6483 populate(objectMap, "managedBy", s.ManagedBy) 6484 populate(objectMap, "properties", s.Properties) 6485 populate(objectMap, "sku", s.SKU) 6486 return json.Marshal(objectMap) 6487} 6488 6489// SnapshotList - The List Snapshots operation response. 6490type SnapshotList struct { 6491 // REQUIRED; A list of snapshots. 6492 Value []*Snapshot `json:"value,omitempty"` 6493 6494 // The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots. 6495 NextLink *string `json:"nextLink,omitempty"` 6496} 6497 6498// MarshalJSON implements the json.Marshaller interface for type SnapshotList. 6499func (s SnapshotList) MarshalJSON() ([]byte, error) { 6500 objectMap := make(map[string]interface{}) 6501 populate(objectMap, "nextLink", s.NextLink) 6502 populate(objectMap, "value", s.Value) 6503 return json.Marshal(objectMap) 6504} 6505 6506// SnapshotProperties - Snapshot resource properties. 6507type SnapshotProperties struct { 6508 // REQUIRED; Disk source information. CreationData information cannot be changed after the disk has been created. 6509 CreationData *CreationData `json:"creationData,omitempty"` 6510 6511 // ARM id of the DiskAccess resource for using private endpoints on disks. 6512 DiskAccessID *string `json:"diskAccessId,omitempty"` 6513 6514 // If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates 6515 // or creation with other options, it indicates a 6516 // resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. 6517 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 6518 6519 // Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. 6520 Encryption *Encryption `json:"encryption,omitempty"` 6521 6522 // Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. 6523 EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` 6524 6525 // The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 6526 HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"` 6527 6528 // Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed. 6529 Incremental *bool `json:"incremental,omitempty"` 6530 6531 // Policy for accessing the disk via network. 6532 NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` 6533 6534 // The Operating System type. 6535 OSType *OperatingSystemTypes `json:"osType,omitempty"` 6536 6537 // Purchase plan information for the image from which the source disk for the snapshot was originally created. 6538 PurchasePlan *DiskPurchasePlan `json:"purchasePlan,omitempty"` 6539 6540 // Indicates the OS on a snapshot supports hibernation. 6541 SupportsHibernation *bool `json:"supportsHibernation,omitempty"` 6542 6543 // READ-ONLY; The size of the disk in bytes. This field is read only. 6544 DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty" azure:"ro"` 6545 6546 // READ-ONLY; The state of the snapshot. 6547 DiskState *DiskState `json:"diskState,omitempty" azure:"ro"` 6548 6549 // READ-ONLY; The disk provisioning state. 6550 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 6551 6552 // READ-ONLY; The time when the snapshot was created. 6553 TimeCreated *time.Time `json:"timeCreated,omitempty" azure:"ro"` 6554 6555 // READ-ONLY; Unique Guid identifying the resource. 6556 UniqueID *string `json:"uniqueId,omitempty" azure:"ro"` 6557} 6558 6559// MarshalJSON implements the json.Marshaller interface for type SnapshotProperties. 6560func (s SnapshotProperties) MarshalJSON() ([]byte, error) { 6561 objectMap := make(map[string]interface{}) 6562 populate(objectMap, "creationData", s.CreationData) 6563 populate(objectMap, "diskAccessId", s.DiskAccessID) 6564 populate(objectMap, "diskSizeBytes", s.DiskSizeBytes) 6565 populate(objectMap, "diskSizeGB", s.DiskSizeGB) 6566 populate(objectMap, "diskState", s.DiskState) 6567 populate(objectMap, "encryption", s.Encryption) 6568 populate(objectMap, "encryptionSettingsCollection", s.EncryptionSettingsCollection) 6569 populate(objectMap, "hyperVGeneration", s.HyperVGeneration) 6570 populate(objectMap, "incremental", s.Incremental) 6571 populate(objectMap, "networkAccessPolicy", s.NetworkAccessPolicy) 6572 populate(objectMap, "osType", s.OSType) 6573 populate(objectMap, "provisioningState", s.ProvisioningState) 6574 populate(objectMap, "purchasePlan", s.PurchasePlan) 6575 populate(objectMap, "supportsHibernation", s.SupportsHibernation) 6576 populate(objectMap, "timeCreated", (*timeRFC3339)(s.TimeCreated)) 6577 populate(objectMap, "uniqueId", s.UniqueID) 6578 return json.Marshal(objectMap) 6579} 6580 6581// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties. 6582func (s *SnapshotProperties) UnmarshalJSON(data []byte) error { 6583 var rawMsg map[string]json.RawMessage 6584 if err := json.Unmarshal(data, &rawMsg); err != nil { 6585 return err 6586 } 6587 for key, val := range rawMsg { 6588 var err error 6589 switch key { 6590 case "creationData": 6591 err = unpopulate(val, &s.CreationData) 6592 delete(rawMsg, key) 6593 case "diskAccessId": 6594 err = unpopulate(val, &s.DiskAccessID) 6595 delete(rawMsg, key) 6596 case "diskSizeBytes": 6597 err = unpopulate(val, &s.DiskSizeBytes) 6598 delete(rawMsg, key) 6599 case "diskSizeGB": 6600 err = unpopulate(val, &s.DiskSizeGB) 6601 delete(rawMsg, key) 6602 case "diskState": 6603 err = unpopulate(val, &s.DiskState) 6604 delete(rawMsg, key) 6605 case "encryption": 6606 err = unpopulate(val, &s.Encryption) 6607 delete(rawMsg, key) 6608 case "encryptionSettingsCollection": 6609 err = unpopulate(val, &s.EncryptionSettingsCollection) 6610 delete(rawMsg, key) 6611 case "hyperVGeneration": 6612 err = unpopulate(val, &s.HyperVGeneration) 6613 delete(rawMsg, key) 6614 case "incremental": 6615 err = unpopulate(val, &s.Incremental) 6616 delete(rawMsg, key) 6617 case "networkAccessPolicy": 6618 err = unpopulate(val, &s.NetworkAccessPolicy) 6619 delete(rawMsg, key) 6620 case "osType": 6621 err = unpopulate(val, &s.OSType) 6622 delete(rawMsg, key) 6623 case "provisioningState": 6624 err = unpopulate(val, &s.ProvisioningState) 6625 delete(rawMsg, key) 6626 case "purchasePlan": 6627 err = unpopulate(val, &s.PurchasePlan) 6628 delete(rawMsg, key) 6629 case "supportsHibernation": 6630 err = unpopulate(val, &s.SupportsHibernation) 6631 delete(rawMsg, key) 6632 case "timeCreated": 6633 var aux timeRFC3339 6634 err = unpopulate(val, &aux) 6635 s.TimeCreated = (*time.Time)(&aux) 6636 delete(rawMsg, key) 6637 case "uniqueId": 6638 err = unpopulate(val, &s.UniqueID) 6639 delete(rawMsg, key) 6640 } 6641 if err != nil { 6642 return err 6643 } 6644 } 6645 return nil 6646} 6647 6648// SnapshotSKU - The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the 6649// default behavior is the SKU will be set to the same sku as the 6650// previous snapshot 6651type SnapshotSKU struct { 6652 // The sku name. 6653 Name *SnapshotStorageAccountTypes `json:"name,omitempty"` 6654 6655 // READ-ONLY; The sku tier. 6656 Tier *string `json:"tier,omitempty" azure:"ro"` 6657} 6658 6659// SnapshotUpdate - Snapshot update resource. 6660type SnapshotUpdate struct { 6661 // Snapshot resource update properties. 6662 Properties *SnapshotUpdateProperties `json:"properties,omitempty"` 6663 6664 // The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior 6665 // is the SKU will be set to the same sku as the 6666 // previous snapshot 6667 SKU *SnapshotSKU `json:"sku,omitempty"` 6668 6669 // Resource tags 6670 Tags map[string]*string `json:"tags,omitempty"` 6671} 6672 6673// MarshalJSON implements the json.Marshaller interface for type SnapshotUpdate. 6674func (s SnapshotUpdate) MarshalJSON() ([]byte, error) { 6675 objectMap := make(map[string]interface{}) 6676 populate(objectMap, "properties", s.Properties) 6677 populate(objectMap, "sku", s.SKU) 6678 populate(objectMap, "tags", s.Tags) 6679 return json.Marshal(objectMap) 6680} 6681 6682// SnapshotUpdateProperties - Snapshot resource update properties. 6683type SnapshotUpdateProperties struct { 6684 // ARM id of the DiskAccess resource for using private endpoints on disks. 6685 DiskAccessID *string `json:"diskAccessId,omitempty"` 6686 6687 // If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates 6688 // or creation with other options, it indicates a 6689 // resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. 6690 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 6691 6692 // Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. 6693 Encryption *Encryption `json:"encryption,omitempty"` 6694 6695 // Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. 6696 EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` 6697 6698 // Policy for accessing the disk via network. 6699 NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` 6700 6701 // the Operating System type. 6702 OSType *OperatingSystemTypes `json:"osType,omitempty"` 6703 6704 // Indicates the OS on a snapshot supports hibernation. 6705 SupportsHibernation *bool `json:"supportsHibernation,omitempty"` 6706} 6707 6708// SnapshotsBeginCreateOrUpdateOptions contains the optional parameters for the Snapshots.BeginCreateOrUpdate method. 6709type SnapshotsBeginCreateOrUpdateOptions struct { 6710 // placeholder for future optional parameters 6711} 6712 6713// SnapshotsBeginDeleteOptions contains the optional parameters for the Snapshots.BeginDelete method. 6714type SnapshotsBeginDeleteOptions struct { 6715 // placeholder for future optional parameters 6716} 6717 6718// SnapshotsBeginGrantAccessOptions contains the optional parameters for the Snapshots.BeginGrantAccess method. 6719type SnapshotsBeginGrantAccessOptions struct { 6720 // placeholder for future optional parameters 6721} 6722 6723// SnapshotsBeginRevokeAccessOptions contains the optional parameters for the Snapshots.BeginRevokeAccess method. 6724type SnapshotsBeginRevokeAccessOptions struct { 6725 // placeholder for future optional parameters 6726} 6727 6728// SnapshotsBeginUpdateOptions contains the optional parameters for the Snapshots.BeginUpdate method. 6729type SnapshotsBeginUpdateOptions struct { 6730 // placeholder for future optional parameters 6731} 6732 6733// SnapshotsGetOptions contains the optional parameters for the Snapshots.Get method. 6734type SnapshotsGetOptions struct { 6735 // placeholder for future optional parameters 6736} 6737 6738// SnapshotsListByResourceGroupOptions contains the optional parameters for the Snapshots.ListByResourceGroup method. 6739type SnapshotsListByResourceGroupOptions struct { 6740 // placeholder for future optional parameters 6741} 6742 6743// SnapshotsListOptions contains the optional parameters for the Snapshots.List method. 6744type SnapshotsListOptions struct { 6745 // placeholder for future optional parameters 6746} 6747 6748// SourceVault - The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} 6749type SourceVault struct { 6750 // Resource Id 6751 ID *string `json:"id,omitempty"` 6752} 6753 6754type StatusCodeCount struct { 6755 // READ-ONLY; The instance view status code 6756 Code *string `json:"code,omitempty" azure:"ro"` 6757 6758 // READ-ONLY; Number of instances having this status code 6759 Count *int32 `json:"count,omitempty" azure:"ro"` 6760} 6761 6762// StorageProfile - Specifies the storage settings for the virtual machine disks. 6763type StorageProfile struct { 6764 // Specifies the parameters that are used to add a data disk to a virtual machine. 6765 // For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview]. 6766 DataDisks []*DataDisk `json:"dataDisks,omitempty"` 6767 6768 // Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This 6769 // element is required when you want to use a platform 6770 // image, marketplace image, or virtual machine image, but is not used in other creation operations. 6771 ImageReference *ImageReference `json:"imageReference,omitempty"` 6772 6773 // Specifies information about the operating system disk used by the virtual machine. 6774 // For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview]. 6775 OSDisk *OSDisk `json:"osDisk,omitempty"` 6776} 6777 6778// MarshalJSON implements the json.Marshaller interface for type StorageProfile. 6779func (s StorageProfile) MarshalJSON() ([]byte, error) { 6780 objectMap := make(map[string]interface{}) 6781 populate(objectMap, "dataDisks", s.DataDisks) 6782 populate(objectMap, "imageReference", s.ImageReference) 6783 populate(objectMap, "osDisk", s.OSDisk) 6784 return json.Marshal(objectMap) 6785} 6786 6787type SubResource struct { 6788 // Resource Id 6789 ID *string `json:"id,omitempty"` 6790} 6791 6792// MarshalJSON implements the json.Marshaller interface for type SubResource. 6793func (s SubResource) MarshalJSON() ([]byte, error) { 6794 objectMap := s.marshalInternal() 6795 return json.Marshal(objectMap) 6796} 6797 6798func (s SubResource) marshalInternal() map[string]interface{} { 6799 objectMap := make(map[string]interface{}) 6800 populate(objectMap, "id", s.ID) 6801 return objectMap 6802} 6803 6804type SubResourceReadOnly struct { 6805 // READ-ONLY; Resource Id 6806 ID *string `json:"id,omitempty" azure:"ro"` 6807} 6808 6809// MarshalJSON implements the json.Marshaller interface for type SubResourceReadOnly. 6810func (s SubResourceReadOnly) MarshalJSON() ([]byte, error) { 6811 objectMap := s.marshalInternal() 6812 return json.Marshal(objectMap) 6813} 6814 6815func (s SubResourceReadOnly) marshalInternal() map[string]interface{} { 6816 objectMap := make(map[string]interface{}) 6817 populate(objectMap, "id", s.ID) 6818 return objectMap 6819} 6820 6821type SubResourceWithColocationStatus struct { 6822 SubResource 6823 // Describes colocation status of a resource in the Proximity Placement Group. 6824 ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"` 6825} 6826 6827// MarshalJSON implements the json.Marshaller interface for type SubResourceWithColocationStatus. 6828func (s SubResourceWithColocationStatus) MarshalJSON() ([]byte, error) { 6829 objectMap := s.SubResource.marshalInternal() 6830 populate(objectMap, "colocationStatus", s.ColocationStatus) 6831 return json.Marshal(objectMap) 6832} 6833 6834// TargetRegion - Describes the target region information. 6835type TargetRegion struct { 6836 // REQUIRED; The name of the region. 6837 Name *string `json:"name,omitempty"` 6838 6839 // Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. 6840 Encryption *EncryptionImages `json:"encryption,omitempty"` 6841 6842 // The number of replicas of the Image Version to be created per region. This property is updatable. 6843 RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"` 6844 6845 // Specifies the storage account type to be used to store the image. This property is not updatable. 6846 StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"` 6847} 6848 6849type TerminateNotificationProfile struct { 6850 // Specifies whether the Terminate Scheduled event is enabled or disabled. 6851 Enable *bool `json:"enable,omitempty"` 6852 6853 // Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved 6854 // (timed out). The configuration must be 6855 // specified in ISO 8601 format, the default value is 5 minutes (PT5M) 6856 NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"` 6857} 6858 6859// ThrottledRequestsInput - Api request input for LogAnalytics getThrottledRequests Api. 6860type ThrottledRequestsInput struct { 6861 LogAnalyticsInputBase 6862} 6863 6864// UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine. 6865// Minimum api-version: 2020-12-01 6866type UefiSettings struct { 6867 // Specifies whether secure boot should be enabled on the virtual machine. 6868 // Minimum api-version: 2020-12-01 6869 SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"` 6870 6871 // Specifies whether vTPM should be enabled on the virtual machine. 6872 // Minimum api-version: 2020-12-01 6873 VTpmEnabled *bool `json:"vTpmEnabled,omitempty"` 6874} 6875 6876// UpdateDomain - Defines an update domain for the cloud service. 6877type UpdateDomain struct { 6878 // READ-ONLY; Resource Id 6879 ID *string `json:"id,omitempty" azure:"ro"` 6880 6881 // READ-ONLY; Resource Name 6882 Name *string `json:"name,omitempty" azure:"ro"` 6883} 6884 6885type UpdateDomainListResult struct { 6886 // REQUIRED 6887 Value []*UpdateDomain `json:"value,omitempty"` 6888 NextLink *string `json:"nextLink,omitempty"` 6889} 6890 6891// MarshalJSON implements the json.Marshaller interface for type UpdateDomainListResult. 6892func (u UpdateDomainListResult) MarshalJSON() ([]byte, error) { 6893 objectMap := make(map[string]interface{}) 6894 populate(objectMap, "nextLink", u.NextLink) 6895 populate(objectMap, "value", u.Value) 6896 return json.Marshal(objectMap) 6897} 6898 6899// UpdateResource - The Update Resource model definition. 6900type UpdateResource struct { 6901 // Resource tags 6902 Tags map[string]*string `json:"tags,omitempty"` 6903} 6904 6905// MarshalJSON implements the json.Marshaller interface for type UpdateResource. 6906func (u UpdateResource) MarshalJSON() ([]byte, error) { 6907 objectMap := u.marshalInternal() 6908 return json.Marshal(objectMap) 6909} 6910 6911func (u UpdateResource) marshalInternal() map[string]interface{} { 6912 objectMap := make(map[string]interface{}) 6913 populate(objectMap, "tags", u.Tags) 6914 return objectMap 6915} 6916 6917// UpdateResourceDefinition - The Update Resource model definition. 6918type UpdateResourceDefinition struct { 6919 // Resource tags 6920 Tags map[string]*string `json:"tags,omitempty"` 6921 6922 // READ-ONLY; Resource Id 6923 ID *string `json:"id,omitempty" azure:"ro"` 6924 6925 // READ-ONLY; Resource name 6926 Name *string `json:"name,omitempty" azure:"ro"` 6927 6928 // READ-ONLY; Resource type 6929 Type *string `json:"type,omitempty" azure:"ro"` 6930} 6931 6932// MarshalJSON implements the json.Marshaller interface for type UpdateResourceDefinition. 6933func (u UpdateResourceDefinition) MarshalJSON() ([]byte, error) { 6934 objectMap := u.marshalInternal() 6935 return json.Marshal(objectMap) 6936} 6937 6938func (u UpdateResourceDefinition) marshalInternal() map[string]interface{} { 6939 objectMap := make(map[string]interface{}) 6940 populate(objectMap, "id", u.ID) 6941 populate(objectMap, "name", u.Name) 6942 populate(objectMap, "tags", u.Tags) 6943 populate(objectMap, "type", u.Type) 6944 return objectMap 6945} 6946 6947// UpgradeOperationHistoricalStatusInfo - Virtual Machine Scale Set OS Upgrade History operation response. 6948type UpgradeOperationHistoricalStatusInfo struct { 6949 // READ-ONLY; Resource location 6950 Location *string `json:"location,omitempty" azure:"ro"` 6951 6952 // READ-ONLY; Information about the properties of the upgrade operation. 6953 Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty" azure:"ro"` 6954 6955 // READ-ONLY; Resource type 6956 Type *string `json:"type,omitempty" azure:"ro"` 6957} 6958 6959// UpgradeOperationHistoricalStatusInfoProperties - Describes each OS upgrade on the Virtual Machine Scale Set. 6960type UpgradeOperationHistoricalStatusInfoProperties struct { 6961 // READ-ONLY; Error Details for this upgrade if there are any. 6962 Error *APIError `json:"error,omitempty" azure:"ro"` 6963 6964 // READ-ONLY; Counts of the VMs in each state. 6965 Progress *RollingUpgradeProgressInfo `json:"progress,omitempty" azure:"ro"` 6966 6967 // READ-ONLY; Information about OS rollback if performed 6968 RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty" azure:"ro"` 6969 6970 // READ-ONLY; Information about the overall status of the upgrade operation. 6971 RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty" azure:"ro"` 6972 6973 // READ-ONLY; Invoker of the Upgrade Operation 6974 StartedBy *UpgradeOperationInvoker `json:"startedBy,omitempty" azure:"ro"` 6975 6976 // READ-ONLY; Image Reference details 6977 TargetImageReference *ImageReference `json:"targetImageReference,omitempty" azure:"ro"` 6978} 6979 6980// UpgradeOperationHistoryStatus - Information about the current running state of the overall upgrade. 6981type UpgradeOperationHistoryStatus struct { 6982 // READ-ONLY; Code indicating the current status of the upgrade. 6983 Code *UpgradeState `json:"code,omitempty" azure:"ro"` 6984 6985 // READ-ONLY; End time of the upgrade. 6986 EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` 6987 6988 // READ-ONLY; Start time of the upgrade. 6989 StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` 6990} 6991 6992// MarshalJSON implements the json.Marshaller interface for type UpgradeOperationHistoryStatus. 6993func (u UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) { 6994 objectMap := make(map[string]interface{}) 6995 populate(objectMap, "code", u.Code) 6996 populate(objectMap, "endTime", (*timeRFC3339)(u.EndTime)) 6997 populate(objectMap, "startTime", (*timeRFC3339)(u.StartTime)) 6998 return json.Marshal(objectMap) 6999} 7000 7001// UnmarshalJSON implements the json.Unmarshaller interface for type UpgradeOperationHistoryStatus. 7002func (u *UpgradeOperationHistoryStatus) UnmarshalJSON(data []byte) error { 7003 var rawMsg map[string]json.RawMessage 7004 if err := json.Unmarshal(data, &rawMsg); err != nil { 7005 return err 7006 } 7007 for key, val := range rawMsg { 7008 var err error 7009 switch key { 7010 case "code": 7011 err = unpopulate(val, &u.Code) 7012 delete(rawMsg, key) 7013 case "endTime": 7014 var aux timeRFC3339 7015 err = unpopulate(val, &aux) 7016 u.EndTime = (*time.Time)(&aux) 7017 delete(rawMsg, key) 7018 case "startTime": 7019 var aux timeRFC3339 7020 err = unpopulate(val, &aux) 7021 u.StartTime = (*time.Time)(&aux) 7022 delete(rawMsg, key) 7023 } 7024 if err != nil { 7025 return err 7026 } 7027 } 7028 return nil 7029} 7030 7031// UpgradePolicy - Describes an upgrade policy - automatic, manual, or rolling. 7032type UpgradePolicy struct { 7033 // Configuration parameters used for performing automatic OS Upgrade. 7034 AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"` 7035 7036 // Specifies the mode of an upgrade to virtual machines in the scale set. 7037 // Possible values are: 7038 // Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. 7039 // Automatic - All virtual machines in the scale set are automatically updated at the same time. 7040 Mode *UpgradeMode `json:"mode,omitempty"` 7041 7042 // The configuration parameters used while performing a rolling upgrade. 7043 RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"` 7044} 7045 7046// Usage - Describes Compute Resource Usage. 7047type Usage struct { 7048 // REQUIRED; The current usage of the resource. 7049 CurrentValue *int32 `json:"currentValue,omitempty"` 7050 7051 // REQUIRED; The maximum permitted usage of the resource. 7052 Limit *int64 `json:"limit,omitempty"` 7053 7054 // REQUIRED; The name of the type of usage. 7055 Name *UsageName `json:"name,omitempty"` 7056 7057 // REQUIRED; An enum describing the unit of usage measurement. 7058 Unit *string `json:"unit,omitempty"` 7059} 7060 7061// UsageListOptions contains the optional parameters for the Usage.List method. 7062type UsageListOptions struct { 7063 // placeholder for future optional parameters 7064} 7065 7066// UsageName - The Usage Names. 7067type UsageName struct { 7068 // The localized name of the resource. 7069 LocalizedValue *string `json:"localizedValue,omitempty"` 7070 7071 // The name of the resource. 7072 Value *string `json:"value,omitempty"` 7073} 7074 7075type UserArtifactManage struct { 7076 // REQUIRED; Required. The path and arguments to install the gallery application. This is limited to 4096 characters. 7077 Install *string `json:"install,omitempty"` 7078 7079 // REQUIRED; Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. 7080 Remove *string `json:"remove,omitempty"` 7081 7082 // Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous 7083 // version and install command on the current version 7084 // of the gallery application. This is limited to 4096 characters. 7085 Update *string `json:"update,omitempty"` 7086} 7087 7088// UserArtifactSource - The source image from which the Image Version is going to be created. 7089type UserArtifactSource struct { 7090 // REQUIRED; Required. The mediaLink of the artifact, must be a readable storage page blob. 7091 MediaLink *string `json:"mediaLink,omitempty"` 7092 7093 // Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. 7094 DefaultConfigurationLink *string `json:"defaultConfigurationLink,omitempty"` 7095} 7096 7097type UserAssignedIdentitiesValue struct { 7098 // READ-ONLY; The client id of user assigned identity. 7099 ClientID *string `json:"clientId,omitempty" azure:"ro"` 7100 7101 // READ-ONLY; The principal id of user assigned identity. 7102 PrincipalID *string `json:"principalId,omitempty" azure:"ro"` 7103} 7104 7105type VMScaleSetConvertToSinglePlacementGroupInput struct { 7106 // Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale 7107 // Set VMs - Get API. If not provided, the 7108 // platform will choose one with maximum number of virtual machine instances. 7109 ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"` 7110} 7111 7112// VaultCertificate - Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. 7113type VaultCertificate struct { 7114 // For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is 7115 // implicitly in the LocalMachine account. 7116 // For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate 7117 // file and <UppercaseThumbprint>.prv for private 7118 // key. Both of these files are .pem formatted. 7119 CertificateStore *string `json:"certificateStore,omitempty"` 7120 7121 // This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see Add a key or secret to the 7122 // key vault 7123 // [https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add]. In this case, your certificate needs to be It is the Base64 encoding of the 7124 // following JSON Object which is encoded in UTF-8: 7125 // { 7126 // "data":"", 7127 // "dataType":"pfx", 7128 // "password":"" 7129 // } 7130 CertificateURL *string `json:"certificateUrl,omitempty"` 7131} 7132 7133// VaultSecretGroup - Describes a set of certificates which are all in the same Key Vault. 7134type VaultSecretGroup struct { 7135 // The relative URL of the Key Vault containing all of the certificates in VaultCertificates. 7136 SourceVault *SubResource `json:"sourceVault,omitempty"` 7137 7138 // The list of key vault references in SourceVault which contain certificates. 7139 VaultCertificates []*VaultCertificate `json:"vaultCertificates,omitempty"` 7140} 7141 7142// MarshalJSON implements the json.Marshaller interface for type VaultSecretGroup. 7143func (v VaultSecretGroup) MarshalJSON() ([]byte, error) { 7144 objectMap := make(map[string]interface{}) 7145 populate(objectMap, "sourceVault", v.SourceVault) 7146 populate(objectMap, "vaultCertificates", v.VaultCertificates) 7147 return json.Marshal(objectMap) 7148} 7149 7150// VirtualHardDisk - Describes the uri of a disk. 7151type VirtualHardDisk struct { 7152 // Specifies the virtual hard disk's uri. 7153 URI *string `json:"uri,omitempty"` 7154} 7155 7156// VirtualMachine - Describes a Virtual Machine. 7157type VirtualMachine struct { 7158 Resource 7159 // The extended location of the Virtual Machine. 7160 ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` 7161 7162 // The identity of the virtual machine, if configured. 7163 Identity *VirtualMachineIdentity `json:"identity,omitempty"` 7164 7165 // Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can 7166 // use a marketplace image from an API, you must 7167 // enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, 7168 // Get Started ->. Enter any required 7169 // information and then click Save. 7170 Plan *Plan `json:"plan,omitempty"` 7171 7172 // Describes the properties of a Virtual Machine. 7173 Properties *VirtualMachineProperties `json:"properties,omitempty"` 7174 7175 // The virtual machine zones. 7176 Zones []*string `json:"zones,omitempty"` 7177 7178 // READ-ONLY; The virtual machine child extension resources. 7179 Resources []*VirtualMachineExtension `json:"resources,omitempty" azure:"ro"` 7180} 7181 7182// MarshalJSON implements the json.Marshaller interface for type VirtualMachine. 7183func (v VirtualMachine) MarshalJSON() ([]byte, error) { 7184 objectMap := v.Resource.marshalInternal() 7185 populate(objectMap, "extendedLocation", v.ExtendedLocation) 7186 populate(objectMap, "identity", v.Identity) 7187 populate(objectMap, "plan", v.Plan) 7188 populate(objectMap, "properties", v.Properties) 7189 populate(objectMap, "resources", v.Resources) 7190 populate(objectMap, "zones", v.Zones) 7191 return json.Marshal(objectMap) 7192} 7193 7194// VirtualMachineAgentInstanceView - The instance view of the VM Agent running on the virtual machine. 7195type VirtualMachineAgentInstanceView struct { 7196 // The virtual machine extension handler instance view. 7197 ExtensionHandlers []*VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"` 7198 7199 // The resource status information. 7200 Statuses []*InstanceViewStatus `json:"statuses,omitempty"` 7201 7202 // The VM Agent full version. 7203 VMAgentVersion *string `json:"vmAgentVersion,omitempty"` 7204} 7205 7206// MarshalJSON implements the json.Marshaller interface for type VirtualMachineAgentInstanceView. 7207func (v VirtualMachineAgentInstanceView) MarshalJSON() ([]byte, error) { 7208 objectMap := make(map[string]interface{}) 7209 populate(objectMap, "extensionHandlers", v.ExtensionHandlers) 7210 populate(objectMap, "statuses", v.Statuses) 7211 populate(objectMap, "vmAgentVersion", v.VMAgentVersion) 7212 return json.Marshal(objectMap) 7213} 7214 7215// VirtualMachineAssessPatchesResult - Describes the properties of an AssessPatches result. 7216type VirtualMachineAssessPatchesResult struct { 7217 // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. 7218 AssessmentActivityID *string `json:"assessmentActivityId,omitempty" azure:"ro"` 7219 7220 // READ-ONLY; The list of patches that have been detected as available for installation. 7221 AvailablePatches []*VirtualMachineSoftwarePatchProperties `json:"availablePatches,omitempty" azure:"ro"` 7222 7223 // READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed. 7224 CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty" azure:"ro"` 7225 7226 // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. 7227 Error *APIError `json:"error,omitempty" azure:"ro"` 7228 7229 // READ-ONLY; The number of all available patches excluding critical and security. 7230 OtherPatchCount *int32 `json:"otherPatchCount,omitempty" azure:"ro"` 7231 7232 // READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot 7233 // has not yet occurred. 7234 RebootPending *bool `json:"rebootPending,omitempty" azure:"ro"` 7235 7236 // READ-ONLY; The UTC timestamp when the operation began. 7237 StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"` 7238 7239 // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become 7240 // "Unknown", "Failed", "Succeeded", or 7241 // "CompletedWithWarnings." 7242 Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"` 7243} 7244 7245// MarshalJSON implements the json.Marshaller interface for type VirtualMachineAssessPatchesResult. 7246func (v VirtualMachineAssessPatchesResult) MarshalJSON() ([]byte, error) { 7247 objectMap := make(map[string]interface{}) 7248 populate(objectMap, "assessmentActivityId", v.AssessmentActivityID) 7249 populate(objectMap, "availablePatches", v.AvailablePatches) 7250 populate(objectMap, "criticalAndSecurityPatchCount", v.CriticalAndSecurityPatchCount) 7251 populate(objectMap, "error", v.Error) 7252 populate(objectMap, "otherPatchCount", v.OtherPatchCount) 7253 populate(objectMap, "rebootPending", v.RebootPending) 7254 populate(objectMap, "startDateTime", (*timeRFC3339)(v.StartDateTime)) 7255 populate(objectMap, "status", v.Status) 7256 return json.Marshal(objectMap) 7257} 7258 7259// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineAssessPatchesResult. 7260func (v *VirtualMachineAssessPatchesResult) UnmarshalJSON(data []byte) error { 7261 var rawMsg map[string]json.RawMessage 7262 if err := json.Unmarshal(data, &rawMsg); err != nil { 7263 return err 7264 } 7265 for key, val := range rawMsg { 7266 var err error 7267 switch key { 7268 case "assessmentActivityId": 7269 err = unpopulate(val, &v.AssessmentActivityID) 7270 delete(rawMsg, key) 7271 case "availablePatches": 7272 err = unpopulate(val, &v.AvailablePatches) 7273 delete(rawMsg, key) 7274 case "criticalAndSecurityPatchCount": 7275 err = unpopulate(val, &v.CriticalAndSecurityPatchCount) 7276 delete(rawMsg, key) 7277 case "error": 7278 err = unpopulate(val, &v.Error) 7279 delete(rawMsg, key) 7280 case "otherPatchCount": 7281 err = unpopulate(val, &v.OtherPatchCount) 7282 delete(rawMsg, key) 7283 case "rebootPending": 7284 err = unpopulate(val, &v.RebootPending) 7285 delete(rawMsg, key) 7286 case "startDateTime": 7287 var aux timeRFC3339 7288 err = unpopulate(val, &aux) 7289 v.StartDateTime = (*time.Time)(&aux) 7290 delete(rawMsg, key) 7291 case "status": 7292 err = unpopulate(val, &v.Status) 7293 delete(rawMsg, key) 7294 } 7295 if err != nil { 7296 return err 7297 } 7298 } 7299 return nil 7300} 7301 7302// VirtualMachineCaptureParameters - Capture Virtual Machine parameters. 7303type VirtualMachineCaptureParameters struct { 7304 // REQUIRED; The destination container name. 7305 DestinationContainerName *string `json:"destinationContainerName,omitempty"` 7306 7307 // REQUIRED; Specifies whether to overwrite the destination virtual hard disk, in case of conflict. 7308 OverwriteVhds *bool `json:"overwriteVhds,omitempty"` 7309 7310 // REQUIRED; The captured virtual hard disk's name prefix. 7311 VhdPrefix *string `json:"vhdPrefix,omitempty"` 7312} 7313 7314// VirtualMachineCaptureResult - Output of virtual machine capture operation. 7315type VirtualMachineCaptureResult struct { 7316 SubResource 7317 // READ-ONLY; the version of the content 7318 ContentVersion *string `json:"contentVersion,omitempty" azure:"ro"` 7319 7320 // READ-ONLY; parameters of the captured virtual machine 7321 Parameters map[string]interface{} `json:"parameters,omitempty" azure:"ro"` 7322 7323 // READ-ONLY; a list of resource items of the captured virtual machine 7324 Resources []map[string]interface{} `json:"resources,omitempty" azure:"ro"` 7325 7326 // READ-ONLY; the schema of the captured virtual machine 7327 Schema *string `json:"$schema,omitempty" azure:"ro"` 7328} 7329 7330// MarshalJSON implements the json.Marshaller interface for type VirtualMachineCaptureResult. 7331func (v VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) { 7332 objectMap := v.SubResource.marshalInternal() 7333 populate(objectMap, "contentVersion", v.ContentVersion) 7334 populate(objectMap, "parameters", v.Parameters) 7335 populate(objectMap, "resources", v.Resources) 7336 populate(objectMap, "$schema", v.Schema) 7337 return json.Marshal(objectMap) 7338} 7339 7340// VirtualMachineExtension - Describes a Virtual Machine Extension. 7341type VirtualMachineExtension struct { 7342 Resource 7343 // Describes the properties of a Virtual Machine Extension. 7344 Properties *VirtualMachineExtensionProperties `json:"properties,omitempty"` 7345} 7346 7347// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtension. 7348func (v VirtualMachineExtension) MarshalJSON() ([]byte, error) { 7349 objectMap := v.Resource.marshalInternal() 7350 populate(objectMap, "properties", v.Properties) 7351 return json.Marshal(objectMap) 7352} 7353 7354// VirtualMachineExtensionHandlerInstanceView - The instance view of a virtual machine extension handler. 7355type VirtualMachineExtensionHandlerInstanceView struct { 7356 // The extension handler status. 7357 Status *InstanceViewStatus `json:"status,omitempty"` 7358 7359 // Specifies the type of the extension; an example is "CustomScriptExtension". 7360 Type *string `json:"type,omitempty"` 7361 7362 // Specifies the version of the script handler. 7363 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 7364} 7365 7366// VirtualMachineExtensionImage - Describes a Virtual Machine Extension Image. 7367type VirtualMachineExtensionImage struct { 7368 Resource 7369 // Describes the properties of a Virtual Machine Extension Image. 7370 Properties *VirtualMachineExtensionImageProperties `json:"properties,omitempty"` 7371} 7372 7373// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionImage. 7374func (v VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) { 7375 objectMap := v.Resource.marshalInternal() 7376 populate(objectMap, "properties", v.Properties) 7377 return json.Marshal(objectMap) 7378} 7379 7380// VirtualMachineExtensionImageProperties - Describes the properties of a Virtual Machine Extension Image. 7381type VirtualMachineExtensionImageProperties struct { 7382 // REQUIRED; The type of role (IaaS or PaaS) this extension supports. 7383 ComputeRole *string `json:"computeRole,omitempty"` 7384 7385 // REQUIRED; The schema defined by publisher, where extension consumers should provide settings in a matching schema. 7386 HandlerSchema *string `json:"handlerSchema,omitempty"` 7387 7388 // REQUIRED; The operating system this extension supports. 7389 OperatingSystem *string `json:"operatingSystem,omitempty"` 7390 7391 // Whether the handler can support multiple extensions. 7392 SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"` 7393 7394 // Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher 7395 // wants to explicitly indicate the extension is 7396 // only enabled for CRP VMs but not VMSS. 7397 VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"` 7398} 7399 7400// VirtualMachineExtensionImagesGetOptions contains the optional parameters for the VirtualMachineExtensionImages.Get method. 7401type VirtualMachineExtensionImagesGetOptions struct { 7402 // placeholder for future optional parameters 7403} 7404 7405// VirtualMachineExtensionImagesListTypesOptions contains the optional parameters for the VirtualMachineExtensionImages.ListTypes method. 7406type VirtualMachineExtensionImagesListTypesOptions struct { 7407 // placeholder for future optional parameters 7408} 7409 7410// VirtualMachineExtensionImagesListVersionsOptions contains the optional parameters for the VirtualMachineExtensionImages.ListVersions method. 7411type VirtualMachineExtensionImagesListVersionsOptions struct { 7412 // The filter to apply on the operation. 7413 Filter *string 7414 Orderby *string 7415 Top *int32 7416} 7417 7418// VirtualMachineExtensionInstanceView - The instance view of a virtual machine extension. 7419type VirtualMachineExtensionInstanceView struct { 7420 // The virtual machine extension name. 7421 Name *string `json:"name,omitempty"` 7422 7423 // The resource status information. 7424 Statuses []*InstanceViewStatus `json:"statuses,omitempty"` 7425 7426 // The resource status information. 7427 Substatuses []*InstanceViewStatus `json:"substatuses,omitempty"` 7428 7429 // Specifies the type of the extension; an example is "CustomScriptExtension". 7430 Type *string `json:"type,omitempty"` 7431 7432 // Specifies the version of the script handler. 7433 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 7434} 7435 7436// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionInstanceView. 7437func (v VirtualMachineExtensionInstanceView) MarshalJSON() ([]byte, error) { 7438 objectMap := make(map[string]interface{}) 7439 populate(objectMap, "name", v.Name) 7440 populate(objectMap, "statuses", v.Statuses) 7441 populate(objectMap, "substatuses", v.Substatuses) 7442 populate(objectMap, "type", v.Type) 7443 populate(objectMap, "typeHandlerVersion", v.TypeHandlerVersion) 7444 return json.Marshal(objectMap) 7445} 7446 7447// VirtualMachineExtensionProperties - Describes the properties of a Virtual Machine Extension. 7448type VirtualMachineExtensionProperties struct { 7449 // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not 7450 // upgrade minor versions unless redeployed, even 7451 // with this property set to true. 7452 AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` 7453 7454 // Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. 7455 EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` 7456 7457 // How the extension handler should be forced to update even if the extension configuration has not changed. 7458 ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` 7459 7460 // The virtual machine extension instance view. 7461 InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"` 7462 7463 // The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. 7464 ProtectedSettings map[string]interface{} `json:"protectedSettings,omitempty"` 7465 7466 // The name of the extension handler publisher. 7467 Publisher *string `json:"publisher,omitempty"` 7468 7469 // Json formatted public settings for the extension. 7470 Settings map[string]interface{} `json:"settings,omitempty"` 7471 7472 // Specifies the type of the extension; an example is "CustomScriptExtension". 7473 Type *string `json:"type,omitempty"` 7474 7475 // Specifies the version of the script handler. 7476 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 7477 7478 // READ-ONLY; The provisioning state, which only appears in the response. 7479 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 7480} 7481 7482// VirtualMachineExtensionUpdate - Describes a Virtual Machine Extension. 7483type VirtualMachineExtensionUpdate struct { 7484 UpdateResource 7485 // Describes the properties of a Virtual Machine Extension. 7486 Properties *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` 7487} 7488 7489// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionUpdate. 7490func (v VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) { 7491 objectMap := v.UpdateResource.marshalInternal() 7492 populate(objectMap, "properties", v.Properties) 7493 return json.Marshal(objectMap) 7494} 7495 7496// VirtualMachineExtensionUpdateProperties - Describes the properties of a Virtual Machine Extension. 7497type VirtualMachineExtensionUpdateProperties struct { 7498 // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not 7499 // upgrade minor versions unless redeployed, even 7500 // with this property set to true. 7501 AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` 7502 7503 // Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. 7504 EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` 7505 7506 // How the extension handler should be forced to update even if the extension configuration has not changed. 7507 ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` 7508 7509 // The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. 7510 ProtectedSettings map[string]interface{} `json:"protectedSettings,omitempty"` 7511 7512 // The name of the extension handler publisher. 7513 Publisher *string `json:"publisher,omitempty"` 7514 7515 // Json formatted public settings for the extension. 7516 Settings map[string]interface{} `json:"settings,omitempty"` 7517 7518 // Specifies the type of the extension; an example is "CustomScriptExtension". 7519 Type *string `json:"type,omitempty"` 7520 7521 // Specifies the version of the script handler. 7522 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 7523} 7524 7525// VirtualMachineExtensionsBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineExtensions.BeginCreateOrUpdate method. 7526type VirtualMachineExtensionsBeginCreateOrUpdateOptions struct { 7527 // placeholder for future optional parameters 7528} 7529 7530// VirtualMachineExtensionsBeginDeleteOptions contains the optional parameters for the VirtualMachineExtensions.BeginDelete method. 7531type VirtualMachineExtensionsBeginDeleteOptions struct { 7532 // placeholder for future optional parameters 7533} 7534 7535// VirtualMachineExtensionsBeginUpdateOptions contains the optional parameters for the VirtualMachineExtensions.BeginUpdate method. 7536type VirtualMachineExtensionsBeginUpdateOptions struct { 7537 // placeholder for future optional parameters 7538} 7539 7540// VirtualMachineExtensionsGetOptions contains the optional parameters for the VirtualMachineExtensions.Get method. 7541type VirtualMachineExtensionsGetOptions struct { 7542 // The expand expression to apply on the operation. 7543 Expand *string 7544} 7545 7546// VirtualMachineExtensionsListOptions contains the optional parameters for the VirtualMachineExtensions.List method. 7547type VirtualMachineExtensionsListOptions struct { 7548 // The expand expression to apply on the operation. 7549 Expand *string 7550} 7551 7552// VirtualMachineExtensionsListResult - The List Extension operation response 7553type VirtualMachineExtensionsListResult struct { 7554 // The list of extensions 7555 Value []*VirtualMachineExtension `json:"value,omitempty"` 7556} 7557 7558// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionsListResult. 7559func (v VirtualMachineExtensionsListResult) MarshalJSON() ([]byte, error) { 7560 objectMap := make(map[string]interface{}) 7561 populate(objectMap, "value", v.Value) 7562 return json.Marshal(objectMap) 7563} 7564 7565// VirtualMachineHealthStatus - The health status of the VM. 7566type VirtualMachineHealthStatus struct { 7567 // READ-ONLY; The health status information for the VM. 7568 Status *InstanceViewStatus `json:"status,omitempty" azure:"ro"` 7569} 7570 7571// VirtualMachineIPTag - Contains the IP tag associated with the public IP address. 7572type VirtualMachineIPTag struct { 7573 // IP tag type. Example: FirstPartyUsage. 7574 IPTagType *string `json:"ipTagType,omitempty"` 7575 7576 // IP tag associated with the public IP. Example: SQL, Storage etc. 7577 Tag *string `json:"tag,omitempty"` 7578} 7579 7580// VirtualMachineIdentity - Identity for the virtual machine. 7581type VirtualMachineIdentity struct { 7582 // The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of 7583 // user assigned identities. The type 'None' will 7584 // remove any identities from the virtual machine. 7585 Type *ResourceIdentityType `json:"type,omitempty"` 7586 7587 // The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: 7588 // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. 7589 UserAssignedIdentities map[string]*UserAssignedIdentitiesValue `json:"userAssignedIdentities,omitempty"` 7590 7591 // READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity. 7592 PrincipalID *string `json:"principalId,omitempty" azure:"ro"` 7593 7594 // READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. 7595 TenantID *string `json:"tenantId,omitempty" azure:"ro"` 7596} 7597 7598// MarshalJSON implements the json.Marshaller interface for type VirtualMachineIdentity. 7599func (v VirtualMachineIdentity) MarshalJSON() ([]byte, error) { 7600 objectMap := make(map[string]interface{}) 7601 populate(objectMap, "principalId", v.PrincipalID) 7602 populate(objectMap, "tenantId", v.TenantID) 7603 populate(objectMap, "type", v.Type) 7604 populate(objectMap, "userAssignedIdentities", v.UserAssignedIdentities) 7605 return json.Marshal(objectMap) 7606} 7607 7608// VirtualMachineImage - Describes a Virtual Machine Image. 7609type VirtualMachineImage struct { 7610 VirtualMachineImageResource 7611 // Describes the properties of a Virtual Machine Image. 7612 Properties *VirtualMachineImageProperties `json:"properties,omitempty"` 7613} 7614 7615// MarshalJSON implements the json.Marshaller interface for type VirtualMachineImage. 7616func (v VirtualMachineImage) MarshalJSON() ([]byte, error) { 7617 objectMap := v.VirtualMachineImageResource.marshalInternal() 7618 populate(objectMap, "properties", v.Properties) 7619 return json.Marshal(objectMap) 7620} 7621 7622// VirtualMachineImageFeature - Specifies additional capabilities supported by the image 7623type VirtualMachineImageFeature struct { 7624 // The name of the feature. 7625 Name *string `json:"name,omitempty"` 7626 7627 // The corresponding value for the feature. 7628 Value *string `json:"value,omitempty"` 7629} 7630 7631// VirtualMachineImageProperties - Describes the properties of a Virtual Machine Image. 7632type VirtualMachineImageProperties struct { 7633 // Describes automatic OS upgrade properties on the image. 7634 AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"` 7635 DataDiskImages []*DataDiskImage `json:"dataDiskImages,omitempty"` 7636 7637 // Specifies disallowed configuration for the VirtualMachine created from the image 7638 Disallowed *DisallowedConfiguration `json:"disallowed,omitempty"` 7639 Features []*VirtualMachineImageFeature `json:"features,omitempty"` 7640 7641 // Specifies the HyperVGeneration Type 7642 HyperVGeneration *HyperVGenerationTypes `json:"hyperVGeneration,omitempty"` 7643 7644 // Contains the os disk image information. 7645 OSDiskImage *OSDiskImage `json:"osDiskImage,omitempty"` 7646 7647 // Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. 7648 Plan *PurchasePlan `json:"plan,omitempty"` 7649} 7650 7651// MarshalJSON implements the json.Marshaller interface for type VirtualMachineImageProperties. 7652func (v VirtualMachineImageProperties) MarshalJSON() ([]byte, error) { 7653 objectMap := make(map[string]interface{}) 7654 populate(objectMap, "automaticOSUpgradeProperties", v.AutomaticOSUpgradeProperties) 7655 populate(objectMap, "dataDiskImages", v.DataDiskImages) 7656 populate(objectMap, "disallowed", v.Disallowed) 7657 populate(objectMap, "features", v.Features) 7658 populate(objectMap, "hyperVGeneration", v.HyperVGeneration) 7659 populate(objectMap, "osDiskImage", v.OSDiskImage) 7660 populate(objectMap, "plan", v.Plan) 7661 return json.Marshal(objectMap) 7662} 7663 7664// VirtualMachineImageResource - Virtual machine image resource information. 7665type VirtualMachineImageResource struct { 7666 SubResource 7667 // REQUIRED; The supported Azure location of the resource. 7668 Location *string `json:"location,omitempty"` 7669 7670 // REQUIRED; The name of the resource. 7671 Name *string `json:"name,omitempty"` 7672 7673 // The extended location of the Virtual Machine. 7674 ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` 7675 7676 // Specifies the tags that are assigned to the virtual machine. For more information about using tags, see Using tags to organize your Azure resources 7677 // [https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md]. 7678 Tags map[string]*string `json:"tags,omitempty"` 7679} 7680 7681// MarshalJSON implements the json.Marshaller interface for type VirtualMachineImageResource. 7682func (v VirtualMachineImageResource) MarshalJSON() ([]byte, error) { 7683 objectMap := v.marshalInternal() 7684 return json.Marshal(objectMap) 7685} 7686 7687func (v VirtualMachineImageResource) marshalInternal() map[string]interface{} { 7688 objectMap := v.SubResource.marshalInternal() 7689 populate(objectMap, "extendedLocation", v.ExtendedLocation) 7690 populate(objectMap, "location", v.Location) 7691 populate(objectMap, "name", v.Name) 7692 populate(objectMap, "tags", v.Tags) 7693 return objectMap 7694} 7695 7696// VirtualMachineImagesEdgeZoneGetOptions contains the optional parameters for the VirtualMachineImagesEdgeZone.Get method. 7697type VirtualMachineImagesEdgeZoneGetOptions struct { 7698 // placeholder for future optional parameters 7699} 7700 7701// VirtualMachineImagesEdgeZoneListOffersOptions contains the optional parameters for the VirtualMachineImagesEdgeZone.ListOffers method. 7702type VirtualMachineImagesEdgeZoneListOffersOptions struct { 7703 // placeholder for future optional parameters 7704} 7705 7706// VirtualMachineImagesEdgeZoneListOptions contains the optional parameters for the VirtualMachineImagesEdgeZone.List method. 7707type VirtualMachineImagesEdgeZoneListOptions struct { 7708 // The expand expression to apply on the operation. 7709 Expand *string 7710 // Specifies the order of the results returned. Formatted as an OData query. 7711 Orderby *string 7712 // An integer value specifying the number of images to return that matches supplied values. 7713 Top *int32 7714} 7715 7716// VirtualMachineImagesEdgeZoneListPublishersOptions contains the optional parameters for the VirtualMachineImagesEdgeZone.ListPublishers method. 7717type VirtualMachineImagesEdgeZoneListPublishersOptions struct { 7718 // placeholder for future optional parameters 7719} 7720 7721// VirtualMachineImagesEdgeZoneListSKUsOptions contains the optional parameters for the VirtualMachineImagesEdgeZone.ListSKUs method. 7722type VirtualMachineImagesEdgeZoneListSKUsOptions struct { 7723 // placeholder for future optional parameters 7724} 7725 7726// VirtualMachineImagesGetOptions contains the optional parameters for the VirtualMachineImages.Get method. 7727type VirtualMachineImagesGetOptions struct { 7728 // placeholder for future optional parameters 7729} 7730 7731// VirtualMachineImagesListOffersOptions contains the optional parameters for the VirtualMachineImages.ListOffers method. 7732type VirtualMachineImagesListOffersOptions struct { 7733 // placeholder for future optional parameters 7734} 7735 7736// VirtualMachineImagesListOptions contains the optional parameters for the VirtualMachineImages.List method. 7737type VirtualMachineImagesListOptions struct { 7738 // The expand expression to apply on the operation. 7739 Expand *string 7740 Orderby *string 7741 Top *int32 7742} 7743 7744// VirtualMachineImagesListPublishersOptions contains the optional parameters for the VirtualMachineImages.ListPublishers method. 7745type VirtualMachineImagesListPublishersOptions struct { 7746 // placeholder for future optional parameters 7747} 7748 7749// VirtualMachineImagesListSKUsOptions contains the optional parameters for the VirtualMachineImages.ListSKUs method. 7750type VirtualMachineImagesListSKUsOptions struct { 7751 // placeholder for future optional parameters 7752} 7753 7754// VirtualMachineInstallPatchesParameters - Input for InstallPatches as directly received by the API 7755type VirtualMachineInstallPatchesParameters struct { 7756 // REQUIRED; Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours) 7757 MaximumDuration *string `json:"maximumDuration,omitempty"` 7758 7759 // REQUIRED; Defines when it is acceptable to reboot a VM during a software update operation. 7760 RebootSetting *VMGuestPatchRebootSetting `json:"rebootSetting,omitempty"` 7761 7762 // Input for InstallPatches on a Linux VM, as directly received by the API 7763 LinuxParameters *LinuxParameters `json:"linuxParameters,omitempty"` 7764 7765 // Input for InstallPatches on a Windows VM, as directly received by the API 7766 WindowsParameters *WindowsParameters `json:"windowsParameters,omitempty"` 7767} 7768 7769// VirtualMachineInstallPatchesResult - The result summary of an installation operation. 7770type VirtualMachineInstallPatchesResult struct { 7771 // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. 7772 Error *APIError `json:"error,omitempty" azure:"ro"` 7773 7774 // READ-ONLY; The number of patches that were not installed due to the user blocking their installation. 7775 ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty" azure:"ro"` 7776 7777 // READ-ONLY; The number of patches that could not be installed due to some issue. See errors for details. 7778 FailedPatchCount *int32 `json:"failedPatchCount,omitempty" azure:"ro"` 7779 7780 // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. 7781 InstallationActivityID *string `json:"installationActivityId,omitempty" azure:"ro"` 7782 7783 // READ-ONLY; The number of patches successfully installed. 7784 InstalledPatchCount *int32 `json:"installedPatchCount,omitempty" azure:"ro"` 7785 7786 // READ-ONLY; Whether the operation ran out of time before it completed all its intended actions. 7787 MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty" azure:"ro"` 7788 7789 // READ-ONLY; The number of patches that were detected as available for install, but did not meet the operation's criteria. 7790 NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty" azure:"ro"` 7791 7792 // READ-ONLY; The patches that were installed during the operation. 7793 Patches []*PatchInstallationDetail `json:"patches,omitempty" azure:"ro"` 7794 7795 // READ-ONLY; The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens 7796 // when maintenanceWindowExceeded == true. 7797 PendingPatchCount *int32 `json:"pendingPatchCount,omitempty" azure:"ro"` 7798 7799 // READ-ONLY; The reboot state of the VM following completion of the operation. 7800 RebootStatus *VMGuestPatchRebootStatus `json:"rebootStatus,omitempty" azure:"ro"` 7801 7802 // READ-ONLY; The UTC timestamp when the operation began. 7803 StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"` 7804 7805 // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become 7806 // "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." 7807 Status *PatchOperationStatus `json:"status,omitempty" azure:"ro"` 7808} 7809 7810// MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstallPatchesResult. 7811func (v VirtualMachineInstallPatchesResult) MarshalJSON() ([]byte, error) { 7812 objectMap := make(map[string]interface{}) 7813 populate(objectMap, "error", v.Error) 7814 populate(objectMap, "excludedPatchCount", v.ExcludedPatchCount) 7815 populate(objectMap, "failedPatchCount", v.FailedPatchCount) 7816 populate(objectMap, "installationActivityId", v.InstallationActivityID) 7817 populate(objectMap, "installedPatchCount", v.InstalledPatchCount) 7818 populate(objectMap, "maintenanceWindowExceeded", v.MaintenanceWindowExceeded) 7819 populate(objectMap, "notSelectedPatchCount", v.NotSelectedPatchCount) 7820 populate(objectMap, "patches", v.Patches) 7821 populate(objectMap, "pendingPatchCount", v.PendingPatchCount) 7822 populate(objectMap, "rebootStatus", v.RebootStatus) 7823 populate(objectMap, "startDateTime", (*timeRFC3339)(v.StartDateTime)) 7824 populate(objectMap, "status", v.Status) 7825 return json.Marshal(objectMap) 7826} 7827 7828// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstallPatchesResult. 7829func (v *VirtualMachineInstallPatchesResult) UnmarshalJSON(data []byte) error { 7830 var rawMsg map[string]json.RawMessage 7831 if err := json.Unmarshal(data, &rawMsg); err != nil { 7832 return err 7833 } 7834 for key, val := range rawMsg { 7835 var err error 7836 switch key { 7837 case "error": 7838 err = unpopulate(val, &v.Error) 7839 delete(rawMsg, key) 7840 case "excludedPatchCount": 7841 err = unpopulate(val, &v.ExcludedPatchCount) 7842 delete(rawMsg, key) 7843 case "failedPatchCount": 7844 err = unpopulate(val, &v.FailedPatchCount) 7845 delete(rawMsg, key) 7846 case "installationActivityId": 7847 err = unpopulate(val, &v.InstallationActivityID) 7848 delete(rawMsg, key) 7849 case "installedPatchCount": 7850 err = unpopulate(val, &v.InstalledPatchCount) 7851 delete(rawMsg, key) 7852 case "maintenanceWindowExceeded": 7853 err = unpopulate(val, &v.MaintenanceWindowExceeded) 7854 delete(rawMsg, key) 7855 case "notSelectedPatchCount": 7856 err = unpopulate(val, &v.NotSelectedPatchCount) 7857 delete(rawMsg, key) 7858 case "patches": 7859 err = unpopulate(val, &v.Patches) 7860 delete(rawMsg, key) 7861 case "pendingPatchCount": 7862 err = unpopulate(val, &v.PendingPatchCount) 7863 delete(rawMsg, key) 7864 case "rebootStatus": 7865 err = unpopulate(val, &v.RebootStatus) 7866 delete(rawMsg, key) 7867 case "startDateTime": 7868 var aux timeRFC3339 7869 err = unpopulate(val, &aux) 7870 v.StartDateTime = (*time.Time)(&aux) 7871 delete(rawMsg, key) 7872 case "status": 7873 err = unpopulate(val, &v.Status) 7874 delete(rawMsg, key) 7875 } 7876 if err != nil { 7877 return err 7878 } 7879 } 7880 return nil 7881} 7882 7883// VirtualMachineInstanceView - The instance view of a virtual machine. 7884type VirtualMachineInstanceView struct { 7885 // Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. 7886 // You can easily view the output of your console log. 7887 // Azure also enables you to see a screenshot of the VM from the hypervisor. 7888 BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` 7889 7890 // The computer name assigned to the virtual machine. 7891 ComputerName *string `json:"computerName,omitempty"` 7892 7893 // The virtual machine disk information. 7894 Disks []*DiskInstanceView `json:"disks,omitempty"` 7895 7896 // The extensions information. 7897 Extensions []*VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` 7898 7899 // Specifies the HyperVGeneration Type associated with a resource 7900 HyperVGeneration *HyperVGenerationType `json:"hyperVGeneration,omitempty"` 7901 7902 // The Maintenance Operation status on the virtual machine. 7903 MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` 7904 7905 // The Operating System running on the virtual machine. 7906 OSName *string `json:"osName,omitempty"` 7907 7908 // The version of Operating System running on the virtual machine. 7909 OSVersion *string `json:"osVersion,omitempty"` 7910 7911 // [Preview Feature] The status of virtual machine patch operations. 7912 PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"` 7913 7914 // Specifies the fault domain of the virtual machine. 7915 PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` 7916 7917 // Specifies the update domain of the virtual machine. 7918 PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` 7919 7920 // The Remote desktop certificate thumbprint. 7921 RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` 7922 7923 // The resource status information. 7924 Statuses []*InstanceViewStatus `json:"statuses,omitempty"` 7925 7926 // The VM Agent running on the virtual machine. 7927 VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` 7928 7929 // READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated 7930 // with a dedicated host group that has automatic 7931 // placement enabled. 7932 // Minimum api-version: 2020-06-01. 7933 AssignedHost *string `json:"assignedHost,omitempty" azure:"ro"` 7934 7935 // READ-ONLY; The health status for the VM. 7936 VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty" azure:"ro"` 7937} 7938 7939// MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceView. 7940func (v VirtualMachineInstanceView) MarshalJSON() ([]byte, error) { 7941 objectMap := make(map[string]interface{}) 7942 populate(objectMap, "assignedHost", v.AssignedHost) 7943 populate(objectMap, "bootDiagnostics", v.BootDiagnostics) 7944 populate(objectMap, "computerName", v.ComputerName) 7945 populate(objectMap, "disks", v.Disks) 7946 populate(objectMap, "extensions", v.Extensions) 7947 populate(objectMap, "hyperVGeneration", v.HyperVGeneration) 7948 populate(objectMap, "maintenanceRedeployStatus", v.MaintenanceRedeployStatus) 7949 populate(objectMap, "osName", v.OSName) 7950 populate(objectMap, "osVersion", v.OSVersion) 7951 populate(objectMap, "patchStatus", v.PatchStatus) 7952 populate(objectMap, "platformFaultDomain", v.PlatformFaultDomain) 7953 populate(objectMap, "platformUpdateDomain", v.PlatformUpdateDomain) 7954 populate(objectMap, "rdpThumbPrint", v.RdpThumbPrint) 7955 populate(objectMap, "statuses", v.Statuses) 7956 populate(objectMap, "vmAgent", v.VMAgent) 7957 populate(objectMap, "vmHealth", v.VMHealth) 7958 return json.Marshal(objectMap) 7959} 7960 7961// VirtualMachineListResult - The List Virtual Machine operation response. 7962type VirtualMachineListResult struct { 7963 // REQUIRED; The list of virtual machines. 7964 Value []*VirtualMachine `json:"value,omitempty"` 7965 7966 // The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines. 7967 NextLink *string `json:"nextLink,omitempty"` 7968} 7969 7970// MarshalJSON implements the json.Marshaller interface for type VirtualMachineListResult. 7971func (v VirtualMachineListResult) MarshalJSON() ([]byte, error) { 7972 objectMap := make(map[string]interface{}) 7973 populate(objectMap, "nextLink", v.NextLink) 7974 populate(objectMap, "value", v.Value) 7975 return json.Marshal(objectMap) 7976} 7977 7978// VirtualMachineNetworkInterfaceConfiguration - Describes a virtual machine network interface configurations. 7979type VirtualMachineNetworkInterfaceConfiguration struct { 7980 // REQUIRED; The network interface configuration name. 7981 Name *string `json:"name,omitempty"` 7982 7983 // Describes a virtual machine network profile's IP configuration. 7984 Properties *VirtualMachineNetworkInterfaceConfigurationProperties `json:"properties,omitempty"` 7985} 7986 7987// VirtualMachineNetworkInterfaceConfigurationProperties - Describes a virtual machine network profile's IP configuration. 7988type VirtualMachineNetworkInterfaceConfigurationProperties struct { 7989 // REQUIRED; Specifies the IP configurations of the network interface. 7990 IPConfigurations []*VirtualMachineNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` 7991 7992 // The dns settings to be applied on the network interfaces. 7993 DNSSettings *VirtualMachineNetworkInterfaceDNSSettingsConfiguration `json:"dnsSettings,omitempty"` 7994 7995 // Specify what happens to the network interface when the VM is deleted 7996 DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` 7997 DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` 7998 7999 // Specifies whether the network interface is accelerated networking-enabled. 8000 EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` 8001 8002 // Specifies whether the network interface is FPGA networking-enabled. 8003 EnableFpga *bool `json:"enableFpga,omitempty"` 8004 8005 // Whether IP forwarding enabled on this NIC. 8006 EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` 8007 8008 // The network security group. 8009 NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` 8010 8011 // Specifies the primary network interface in case the virtual machine has more than 1 network interface. 8012 Primary *bool `json:"primary,omitempty"` 8013} 8014 8015// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceConfigurationProperties. 8016func (v VirtualMachineNetworkInterfaceConfigurationProperties) MarshalJSON() ([]byte, error) { 8017 objectMap := make(map[string]interface{}) 8018 populate(objectMap, "dnsSettings", v.DNSSettings) 8019 populate(objectMap, "deleteOption", v.DeleteOption) 8020 populate(objectMap, "dscpConfiguration", v.DscpConfiguration) 8021 populate(objectMap, "enableAcceleratedNetworking", v.EnableAcceleratedNetworking) 8022 populate(objectMap, "enableFpga", v.EnableFpga) 8023 populate(objectMap, "enableIPForwarding", v.EnableIPForwarding) 8024 populate(objectMap, "ipConfigurations", v.IPConfigurations) 8025 populate(objectMap, "networkSecurityGroup", v.NetworkSecurityGroup) 8026 populate(objectMap, "primary", v.Primary) 8027 return json.Marshal(objectMap) 8028} 8029 8030// VirtualMachineNetworkInterfaceDNSSettingsConfiguration - Describes a virtual machines network configuration's DNS settings. 8031type VirtualMachineNetworkInterfaceDNSSettingsConfiguration struct { 8032 // List of DNS servers IP addresses 8033 DNSServers []*string `json:"dnsServers,omitempty"` 8034} 8035 8036// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceDNSSettingsConfiguration. 8037func (v VirtualMachineNetworkInterfaceDNSSettingsConfiguration) MarshalJSON() ([]byte, error) { 8038 objectMap := make(map[string]interface{}) 8039 populate(objectMap, "dnsServers", v.DNSServers) 8040 return json.Marshal(objectMap) 8041} 8042 8043// VirtualMachineNetworkInterfaceIPConfiguration - Describes a virtual machine network profile's IP configuration. 8044type VirtualMachineNetworkInterfaceIPConfiguration struct { 8045 // REQUIRED; The IP configuration name. 8046 Name *string `json:"name,omitempty"` 8047 8048 // Describes a virtual machine network interface IP configuration properties. 8049 Properties *VirtualMachineNetworkInterfaceIPConfigurationProperties `json:"properties,omitempty"` 8050} 8051 8052// VirtualMachineNetworkInterfaceIPConfigurationProperties - Describes a virtual machine network interface IP configuration properties. 8053type VirtualMachineNetworkInterfaceIPConfigurationProperties struct { 8054 // Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple 8055 // application gateways. Multiple virtual machines 8056 // cannot use the same application gateway. 8057 ApplicationGatewayBackendAddressPools []*SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` 8058 8059 // Specifies an array of references to application security group. 8060 ApplicationSecurityGroups []*SubResource `json:"applicationSecurityGroups,omitempty"` 8061 8062 // Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and 8063 // one internal load balancer. [Multiple virtual 8064 // machines cannot use the same basic sku load balancer]. 8065 LoadBalancerBackendAddressPools []*SubResource `json:"loadBalancerBackendAddressPools,omitempty"` 8066 8067 // Specifies the primary network interface in case the virtual machine has more than 1 network interface. 8068 Primary *bool `json:"primary,omitempty"` 8069 8070 // Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible 8071 // values are: 'IPv4' and 'IPv6'. 8072 PrivateIPAddressVersion *IPVersions `json:"privateIPAddressVersion,omitempty"` 8073 8074 // The publicIPAddressConfiguration. 8075 PublicIPAddressConfiguration *VirtualMachinePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` 8076 8077 // Specifies the identifier of the subnet. 8078 Subnet *SubResource `json:"subnet,omitempty"` 8079} 8080 8081// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceIPConfigurationProperties. 8082func (v VirtualMachineNetworkInterfaceIPConfigurationProperties) MarshalJSON() ([]byte, error) { 8083 objectMap := make(map[string]interface{}) 8084 populate(objectMap, "applicationGatewayBackendAddressPools", v.ApplicationGatewayBackendAddressPools) 8085 populate(objectMap, "applicationSecurityGroups", v.ApplicationSecurityGroups) 8086 populate(objectMap, "loadBalancerBackendAddressPools", v.LoadBalancerBackendAddressPools) 8087 populate(objectMap, "primary", v.Primary) 8088 populate(objectMap, "privateIPAddressVersion", v.PrivateIPAddressVersion) 8089 populate(objectMap, "publicIPAddressConfiguration", v.PublicIPAddressConfiguration) 8090 populate(objectMap, "subnet", v.Subnet) 8091 return json.Marshal(objectMap) 8092} 8093 8094// VirtualMachinePatchStatus - The status of virtual machine patch operations. 8095type VirtualMachinePatchStatus struct { 8096 // The available patch summary of the latest assessment operation for the virtual machine. 8097 AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"` 8098 8099 // The installation summary of the latest installation operation for the virtual machine. 8100 LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"` 8101 8102 // READ-ONLY; The enablement status of the specified patchMode 8103 ConfigurationStatuses []*InstanceViewStatus `json:"configurationStatuses,omitempty" azure:"ro"` 8104} 8105 8106// MarshalJSON implements the json.Marshaller interface for type VirtualMachinePatchStatus. 8107func (v VirtualMachinePatchStatus) MarshalJSON() ([]byte, error) { 8108 objectMap := make(map[string]interface{}) 8109 populate(objectMap, "availablePatchSummary", v.AvailablePatchSummary) 8110 populate(objectMap, "configurationStatuses", v.ConfigurationStatuses) 8111 populate(objectMap, "lastPatchInstallationSummary", v.LastPatchInstallationSummary) 8112 return json.Marshal(objectMap) 8113} 8114 8115// VirtualMachineProperties - Describes the properties of a Virtual Machine. 8116type VirtualMachineProperties struct { 8117 // Specifies additional capabilities enabled or disabled on the virtual machine. 8118 AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` 8119 8120 // Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability 8121 // set are allocated to different nodes to maximize 8122 // availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview]. 8123 // For more information on Azure planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates] 8124 // Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same 8125 // resource group as the availability set resource. An 8126 // existing VM cannot be added to an availability set. 8127 // This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. 8128 AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` 8129 8130 // Specifies the billing related details of a Azure Spot virtual machine. 8131 // Minimum api-version: 2019-03-01. 8132 BillingProfile *BillingProfile `json:"billingProfile,omitempty"` 8133 8134 // Specifies the boot diagnostic settings state. 8135 // Minimum api-version: 2015-06-15. 8136 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 8137 8138 // Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. 8139 // For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. 8140 // For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. 8141 EvictionPolicy *VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` 8142 8143 // Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified 8144 // in ISO 8601 format. The default value is 90 8145 // minutes (PT1H30M). 8146 // Minimum api-version: 2020-06-01 8147 ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"` 8148 8149 // Specifies the hardware settings for the virtual machine. 8150 HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` 8151 8152 // Specifies information about the dedicated host that the virtual machine resides in. 8153 // Minimum api-version: 2018-10-01. 8154 Host *SubResource `json:"host,omitempty"` 8155 8156 // Specifies information about the dedicated host group that the virtual machine resides in. 8157 // Minimum api-version: 2020-06-01. 8158 // NOTE: User cannot specify both host and hostGroup properties. 8159 HostGroup *SubResource `json:"hostGroup,omitempty"` 8160 8161 // Specifies that the image or disk that is being used was licensed on-premises. 8162 // Possible values for Windows Server operating system are: 8163 // WindowsClient 8164 // WindowsServer 8165 // Possible values for Linux Server operating system are: 8166 // RHELBYOS (for RHEL) 8167 // SLESBYOS (for SUSE) 8168 // For more information, see Azure Hybrid Use Benefit for Windows Server [https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing] 8169 // Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux] 8170 // Minimum api-version: 2015-06-15 8171 LicenseType *string `json:"licenseType,omitempty"` 8172 8173 // Specifies the network interfaces of the virtual machine. 8174 NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` 8175 8176 // Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. 8177 OSProfile *OSProfile `json:"osProfile,omitempty"` 8178 8179 // Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned 8180 // to a fault domain that best maintains 8181 // balance across available fault domains. 8182 // This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.The Virtual Machine Scale Set that is referenced, must 8183 // have 'platformFaultDomainCount' > 1.This property 8184 // cannot be updated once the Virtual Machine is created.Fault domain assignment can be viewed in the Virtual Machine Instance View. 8185 // Minimum api‐version: 2020‐12‐01 8186 PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` 8187 8188 // Specifies the priority for the virtual machine. 8189 // Minimum api-version: 2019-03-01 8190 Priority *VirtualMachinePriorityTypes `json:"priority,omitempty"` 8191 8192 // Specifies information about the proximity placement group that the virtual machine should be assigned to. 8193 // Minimum api-version: 2018-04-01. 8194 ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` 8195 8196 // Specifies Scheduled Event related configurations. 8197 ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` 8198 8199 // Specifies the Security related profile settings for the virtual machine. 8200 SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` 8201 8202 // Specifies the storage settings for the virtual machine disks. 8203 StorageProfile *StorageProfile `json:"storageProfile,omitempty"` 8204 8205 // UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. 8206 // Minimum api-version: 2021-03-01 8207 UserData *string `json:"userData,omitempty"` 8208 8209 // Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual 8210 // machine scale set are allocated to different 8211 // nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a 8212 // virtual machine scale set. 8213 // This property cannot exist along with a non-null properties.availabilitySet reference. 8214 // Minimum api‐version: 2019‐03‐01 8215 VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"` 8216 8217 // READ-ONLY; The virtual machine instance view. 8218 InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty" azure:"ro"` 8219 8220 // READ-ONLY; The provisioning state, which only appears in the response. 8221 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 8222 8223 // READ-ONLY; Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform 8224 // BIOS commands. 8225 VMID *string `json:"vmId,omitempty" azure:"ro"` 8226} 8227 8228// VirtualMachinePublicIPAddressConfiguration - Describes a virtual machines IP Configuration's PublicIPAddress configuration 8229type VirtualMachinePublicIPAddressConfiguration struct { 8230 // REQUIRED; The publicIP address configuration name. 8231 Name *string `json:"name,omitempty"` 8232 8233 // Describes a virtual machines IP Configuration's PublicIPAddress configuration 8234 Properties *VirtualMachinePublicIPAddressConfigurationProperties `json:"properties,omitempty"` 8235 8236 // Describes the public IP Sku 8237 SKU *PublicIPAddressSKU `json:"sku,omitempty"` 8238} 8239 8240// VirtualMachinePublicIPAddressConfigurationProperties - Describes a virtual machines IP Configuration's PublicIPAddress configuration 8241type VirtualMachinePublicIPAddressConfigurationProperties struct { 8242 // The dns settings to be applied on the publicIP addresses . 8243 DNSSettings *VirtualMachinePublicIPAddressDNSSettingsConfiguration `json:"dnsSettings,omitempty"` 8244 8245 // Specify what happens to the public IP address when the VM is deleted 8246 DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` 8247 8248 // The list of IP tags associated with the public IP address. 8249 IPTags []*VirtualMachineIPTag `json:"ipTags,omitempty"` 8250 8251 // The idle timeout of the public IP address. 8252 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 8253 8254 // Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible 8255 // values are: 'IPv4' and 'IPv6'. 8256 PublicIPAddressVersion *IPVersions `json:"publicIPAddressVersion,omitempty"` 8257 8258 // Specify the public IP allocation type 8259 PublicIPAllocationMethod *PublicIPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` 8260 8261 // The PublicIPPrefix from which to allocate publicIP addresses. 8262 PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` 8263} 8264 8265// MarshalJSON implements the json.Marshaller interface for type VirtualMachinePublicIPAddressConfigurationProperties. 8266func (v VirtualMachinePublicIPAddressConfigurationProperties) MarshalJSON() ([]byte, error) { 8267 objectMap := make(map[string]interface{}) 8268 populate(objectMap, "dnsSettings", v.DNSSettings) 8269 populate(objectMap, "deleteOption", v.DeleteOption) 8270 populate(objectMap, "ipTags", v.IPTags) 8271 populate(objectMap, "idleTimeoutInMinutes", v.IdleTimeoutInMinutes) 8272 populate(objectMap, "publicIPAddressVersion", v.PublicIPAddressVersion) 8273 populate(objectMap, "publicIPAllocationMethod", v.PublicIPAllocationMethod) 8274 populate(objectMap, "publicIPPrefix", v.PublicIPPrefix) 8275 return json.Marshal(objectMap) 8276} 8277 8278// VirtualMachinePublicIPAddressDNSSettingsConfiguration - Describes a virtual machines network configuration's DNS settings. 8279type VirtualMachinePublicIPAddressDNSSettingsConfiguration struct { 8280 // REQUIRED; The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain 8281 // name label and vm network profile unique ID. 8282 DomainNameLabel *string `json:"domainNameLabel,omitempty"` 8283} 8284 8285// VirtualMachineReimageParameters - Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be reimaged 8286type VirtualMachineReimageParameters struct { 8287 // Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS 8288 // disk. 8289 TempDisk *bool `json:"tempDisk,omitempty"` 8290} 8291 8292// MarshalJSON implements the json.Marshaller interface for type VirtualMachineReimageParameters. 8293func (v VirtualMachineReimageParameters) MarshalJSON() ([]byte, error) { 8294 objectMap := v.marshalInternal() 8295 return json.Marshal(objectMap) 8296} 8297 8298func (v VirtualMachineReimageParameters) marshalInternal() map[string]interface{} { 8299 objectMap := make(map[string]interface{}) 8300 populate(objectMap, "tempDisk", v.TempDisk) 8301 return objectMap 8302} 8303 8304// VirtualMachineRunCommand - Describes a Virtual Machine run command. 8305type VirtualMachineRunCommand struct { 8306 Resource 8307 // Describes the properties of a Virtual Machine run command. 8308 Properties *VirtualMachineRunCommandProperties `json:"properties,omitempty"` 8309} 8310 8311// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommand. 8312func (v VirtualMachineRunCommand) MarshalJSON() ([]byte, error) { 8313 objectMap := v.Resource.marshalInternal() 8314 populate(objectMap, "properties", v.Properties) 8315 return json.Marshal(objectMap) 8316} 8317 8318// VirtualMachineRunCommandInstanceView - The instance view of a virtual machine run command. 8319type VirtualMachineRunCommandInstanceView struct { 8320 // Script end time. 8321 EndTime *time.Time `json:"endTime,omitempty"` 8322 8323 // Script error stream. 8324 Error *string `json:"error,omitempty"` 8325 8326 // Communicate script configuration errors or execution messages. 8327 ExecutionMessage *string `json:"executionMessage,omitempty"` 8328 8329 // Script execution status. 8330 ExecutionState *ExecutionState `json:"executionState,omitempty"` 8331 8332 // Exit code returned from script execution. 8333 ExitCode *int32 `json:"exitCode,omitempty"` 8334 8335 // Script output stream. 8336 Output *string `json:"output,omitempty"` 8337 8338 // Script start time. 8339 StartTime *time.Time `json:"startTime,omitempty"` 8340 8341 // The resource status information. 8342 Statuses []*InstanceViewStatus `json:"statuses,omitempty"` 8343} 8344 8345// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandInstanceView. 8346func (v VirtualMachineRunCommandInstanceView) MarshalJSON() ([]byte, error) { 8347 objectMap := make(map[string]interface{}) 8348 populate(objectMap, "endTime", (*timeRFC3339)(v.EndTime)) 8349 populate(objectMap, "error", v.Error) 8350 populate(objectMap, "executionMessage", v.ExecutionMessage) 8351 populate(objectMap, "executionState", v.ExecutionState) 8352 populate(objectMap, "exitCode", v.ExitCode) 8353 populate(objectMap, "output", v.Output) 8354 populate(objectMap, "startTime", (*timeRFC3339)(v.StartTime)) 8355 populate(objectMap, "statuses", v.Statuses) 8356 return json.Marshal(objectMap) 8357} 8358 8359// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRunCommandInstanceView. 8360func (v *VirtualMachineRunCommandInstanceView) UnmarshalJSON(data []byte) error { 8361 var rawMsg map[string]json.RawMessage 8362 if err := json.Unmarshal(data, &rawMsg); err != nil { 8363 return err 8364 } 8365 for key, val := range rawMsg { 8366 var err error 8367 switch key { 8368 case "endTime": 8369 var aux timeRFC3339 8370 err = unpopulate(val, &aux) 8371 v.EndTime = (*time.Time)(&aux) 8372 delete(rawMsg, key) 8373 case "error": 8374 err = unpopulate(val, &v.Error) 8375 delete(rawMsg, key) 8376 case "executionMessage": 8377 err = unpopulate(val, &v.ExecutionMessage) 8378 delete(rawMsg, key) 8379 case "executionState": 8380 err = unpopulate(val, &v.ExecutionState) 8381 delete(rawMsg, key) 8382 case "exitCode": 8383 err = unpopulate(val, &v.ExitCode) 8384 delete(rawMsg, key) 8385 case "output": 8386 err = unpopulate(val, &v.Output) 8387 delete(rawMsg, key) 8388 case "startTime": 8389 var aux timeRFC3339 8390 err = unpopulate(val, &aux) 8391 v.StartTime = (*time.Time)(&aux) 8392 delete(rawMsg, key) 8393 case "statuses": 8394 err = unpopulate(val, &v.Statuses) 8395 delete(rawMsg, key) 8396 } 8397 if err != nil { 8398 return err 8399 } 8400 } 8401 return nil 8402} 8403 8404// VirtualMachineRunCommandProperties - Describes the properties of a Virtual Machine run command. 8405type VirtualMachineRunCommandProperties struct { 8406 // Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. 8407 AsyncExecution *bool `json:"asyncExecution,omitempty"` 8408 8409 // Specifies the Azure storage blob where script error stream will be uploaded. 8410 ErrorBlobURI *string `json:"errorBlobUri,omitempty"` 8411 8412 // Specifies the Azure storage blob where script output stream will be uploaded. 8413 OutputBlobURI *string `json:"outputBlobUri,omitempty"` 8414 8415 // The parameters used by the script. 8416 Parameters []*RunCommandInputParameter `json:"parameters,omitempty"` 8417 8418 // The parameters used by the script. 8419 ProtectedParameters []*RunCommandInputParameter `json:"protectedParameters,omitempty"` 8420 8421 // Specifies the user account password on the VM when executing the run command. 8422 RunAsPassword *string `json:"runAsPassword,omitempty"` 8423 8424 // Specifies the user account on the VM when executing the run command. 8425 RunAsUser *string `json:"runAsUser,omitempty"` 8426 8427 // The source of the run command script. 8428 Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"` 8429 8430 // The timeout in seconds to execute the run command. 8431 TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"` 8432 8433 // READ-ONLY; The virtual machine run command instance view. 8434 InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty" azure:"ro"` 8435 8436 // READ-ONLY; The provisioning state, which only appears in the response. 8437 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 8438} 8439 8440// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandProperties. 8441func (v VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) { 8442 objectMap := make(map[string]interface{}) 8443 populate(objectMap, "asyncExecution", v.AsyncExecution) 8444 populate(objectMap, "errorBlobUri", v.ErrorBlobURI) 8445 populate(objectMap, "instanceView", v.InstanceView) 8446 populate(objectMap, "outputBlobUri", v.OutputBlobURI) 8447 populate(objectMap, "parameters", v.Parameters) 8448 populate(objectMap, "protectedParameters", v.ProtectedParameters) 8449 populate(objectMap, "provisioningState", v.ProvisioningState) 8450 populate(objectMap, "runAsPassword", v.RunAsPassword) 8451 populate(objectMap, "runAsUser", v.RunAsUser) 8452 populate(objectMap, "source", v.Source) 8453 populate(objectMap, "timeoutInSeconds", v.TimeoutInSeconds) 8454 return json.Marshal(objectMap) 8455} 8456 8457// VirtualMachineRunCommandScriptSource - Describes the script sources for run command. 8458type VirtualMachineRunCommandScriptSource struct { 8459 // Specifies a commandId of predefined built-in script. 8460 CommandID *string `json:"commandId,omitempty"` 8461 8462 // Specifies the script content to be executed on the VM. 8463 Script *string `json:"script,omitempty"` 8464 8465 // Specifies the script download location. 8466 ScriptURI *string `json:"scriptUri,omitempty"` 8467} 8468 8469// VirtualMachineRunCommandUpdate - Describes a Virtual Machine run command. 8470type VirtualMachineRunCommandUpdate struct { 8471 UpdateResource 8472 // Describes the properties of a Virtual Machine run command. 8473 Properties *VirtualMachineRunCommandProperties `json:"properties,omitempty"` 8474} 8475 8476// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandUpdate. 8477func (v VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) { 8478 objectMap := v.UpdateResource.marshalInternal() 8479 populate(objectMap, "properties", v.Properties) 8480 return json.Marshal(objectMap) 8481} 8482 8483// VirtualMachineRunCommandsBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineRunCommands.BeginCreateOrUpdate method. 8484type VirtualMachineRunCommandsBeginCreateOrUpdateOptions struct { 8485 // placeholder for future optional parameters 8486} 8487 8488// VirtualMachineRunCommandsBeginDeleteOptions contains the optional parameters for the VirtualMachineRunCommands.BeginDelete method. 8489type VirtualMachineRunCommandsBeginDeleteOptions struct { 8490 // placeholder for future optional parameters 8491} 8492 8493// VirtualMachineRunCommandsBeginUpdateOptions contains the optional parameters for the VirtualMachineRunCommands.BeginUpdate method. 8494type VirtualMachineRunCommandsBeginUpdateOptions struct { 8495 // placeholder for future optional parameters 8496} 8497 8498// VirtualMachineRunCommandsGetByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommands.GetByVirtualMachine method. 8499type VirtualMachineRunCommandsGetByVirtualMachineOptions struct { 8500 // The expand expression to apply on the operation. 8501 Expand *string 8502} 8503 8504// VirtualMachineRunCommandsGetOptions contains the optional parameters for the VirtualMachineRunCommands.Get method. 8505type VirtualMachineRunCommandsGetOptions struct { 8506 // placeholder for future optional parameters 8507} 8508 8509// VirtualMachineRunCommandsListByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommands.ListByVirtualMachine method. 8510type VirtualMachineRunCommandsListByVirtualMachineOptions struct { 8511 // The expand expression to apply on the operation. 8512 Expand *string 8513} 8514 8515// VirtualMachineRunCommandsListOptions contains the optional parameters for the VirtualMachineRunCommands.List method. 8516type VirtualMachineRunCommandsListOptions struct { 8517 // placeholder for future optional parameters 8518} 8519 8520// VirtualMachineRunCommandsListResult - The List run command operation response 8521type VirtualMachineRunCommandsListResult struct { 8522 // REQUIRED; The list of run commands 8523 Value []*VirtualMachineRunCommand `json:"value,omitempty"` 8524 8525 // The uri to fetch the next page of run commands. 8526 NextLink *string `json:"nextLink,omitempty"` 8527} 8528 8529// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandsListResult. 8530func (v VirtualMachineRunCommandsListResult) MarshalJSON() ([]byte, error) { 8531 objectMap := make(map[string]interface{}) 8532 populate(objectMap, "nextLink", v.NextLink) 8533 populate(objectMap, "value", v.Value) 8534 return json.Marshal(objectMap) 8535} 8536 8537// VirtualMachineScaleSet - Describes a Virtual Machine Scale Set. 8538type VirtualMachineScaleSet struct { 8539 Resource 8540 // The extended location of the Virtual Machine Scale Set. 8541 ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` 8542 8543 // The identity of the virtual machine scale set, if configured. 8544 Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` 8545 8546 // Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can 8547 // use a marketplace image from an API, you must 8548 // enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, 8549 // Get Started ->. Enter any required 8550 // information and then click Save. 8551 Plan *Plan `json:"plan,omitempty"` 8552 8553 // Describes the properties of a Virtual Machine Scale Set. 8554 Properties *VirtualMachineScaleSetProperties `json:"properties,omitempty"` 8555 8556 // The virtual machine scale set sku. 8557 SKU *SKU `json:"sku,omitempty"` 8558 8559 // The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set 8560 Zones []*string `json:"zones,omitempty"` 8561} 8562 8563// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSet. 8564func (v VirtualMachineScaleSet) MarshalJSON() ([]byte, error) { 8565 objectMap := v.Resource.marshalInternal() 8566 populate(objectMap, "extendedLocation", v.ExtendedLocation) 8567 populate(objectMap, "identity", v.Identity) 8568 populate(objectMap, "plan", v.Plan) 8569 populate(objectMap, "properties", v.Properties) 8570 populate(objectMap, "sku", v.SKU) 8571 populate(objectMap, "zones", v.Zones) 8572 return json.Marshal(objectMap) 8573} 8574 8575// VirtualMachineScaleSetDataDisk - Describes a virtual machine scale set data disk. 8576type VirtualMachineScaleSetDataDisk struct { 8577 // REQUIRED; The create option. 8578 CreateOption *DiskCreateOptionTypes `json:"createOption,omitempty"` 8579 8580 // REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for 8581 // each data disk attached to a VM. 8582 Lun *int32 `json:"lun,omitempty"` 8583 8584 // Specifies the caching requirements. 8585 // Possible values are: 8586 // None 8587 // ReadOnly 8588 // ReadWrite 8589 // Default: None for Standard storage. ReadOnly for Premium storage 8590 Caching *CachingTypes `json:"caching,omitempty"` 8591 8592 // Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would 8593 // be assigned based on diskSizeGB. 8594 DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` 8595 8596 // Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default 8597 // value would be assigned based on diskSizeGB. 8598 DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` 8599 8600 // Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. 8601 // This value cannot be larger than 1023 GB 8602 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 8603 8604 // The managed disk parameters. 8605 ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` 8606 8607 // The disk name. 8608 Name *string `json:"name,omitempty"` 8609 8610 // Specifies whether writeAccelerator should be enabled or disabled on the disk. 8611 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 8612} 8613 8614// VirtualMachineScaleSetExtension - Describes a Virtual Machine Scale Set Extension. 8615type VirtualMachineScaleSetExtension struct { 8616 SubResourceReadOnly 8617 // The name of the extension. 8618 Name *string `json:"name,omitempty"` 8619 8620 // Describes the properties of a Virtual Machine Scale Set Extension. 8621 Properties *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` 8622 8623 // READ-ONLY; Resource type 8624 Type *string `json:"type,omitempty" azure:"ro"` 8625} 8626 8627// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtension. 8628func (v VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) { 8629 objectMap := v.SubResourceReadOnly.marshalInternal() 8630 populate(objectMap, "name", v.Name) 8631 populate(objectMap, "properties", v.Properties) 8632 populate(objectMap, "type", v.Type) 8633 return json.Marshal(objectMap) 8634} 8635 8636// VirtualMachineScaleSetExtensionListResult - The List VM scale set extension operation response. 8637type VirtualMachineScaleSetExtensionListResult struct { 8638 // REQUIRED; The list of VM scale set extensions. 8639 Value []*VirtualMachineScaleSetExtension `json:"value,omitempty"` 8640 8641 // The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale set extensions. 8642 NextLink *string `json:"nextLink,omitempty"` 8643} 8644 8645// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionListResult. 8646func (v VirtualMachineScaleSetExtensionListResult) MarshalJSON() ([]byte, error) { 8647 objectMap := make(map[string]interface{}) 8648 populate(objectMap, "nextLink", v.NextLink) 8649 populate(objectMap, "value", v.Value) 8650 return json.Marshal(objectMap) 8651} 8652 8653// VirtualMachineScaleSetExtensionProfile - Describes a virtual machine scale set extension profile. 8654type VirtualMachineScaleSetExtensionProfile struct { 8655 // The virtual machine scale set child extension resources. 8656 Extensions []*VirtualMachineScaleSetExtension `json:"extensions,omitempty"` 8657 8658 // Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified 8659 // in ISO 8601 format. The default value is 90 8660 // minutes (PT1H30M). 8661 // Minimum api-version: 2020-06-01 8662 ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"` 8663} 8664 8665// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionProfile. 8666func (v VirtualMachineScaleSetExtensionProfile) MarshalJSON() ([]byte, error) { 8667 objectMap := make(map[string]interface{}) 8668 populate(objectMap, "extensions", v.Extensions) 8669 populate(objectMap, "extensionsTimeBudget", v.ExtensionsTimeBudget) 8670 return json.Marshal(objectMap) 8671} 8672 8673// VirtualMachineScaleSetExtensionProperties - Describes the properties of a Virtual Machine Scale Set Extension. 8674type VirtualMachineScaleSetExtensionProperties struct { 8675 // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not 8676 // upgrade minor versions unless redeployed, even 8677 // with this property set to true. 8678 AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` 8679 8680 // Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. 8681 EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"` 8682 8683 // If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has 8684 // not changed. 8685 ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` 8686 8687 // The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. 8688 ProtectedSettings map[string]interface{} `json:"protectedSettings,omitempty"` 8689 8690 // Collection of extension names after which this extension needs to be provisioned. 8691 ProvisionAfterExtensions []*string `json:"provisionAfterExtensions,omitempty"` 8692 8693 // The name of the extension handler publisher. 8694 Publisher *string `json:"publisher,omitempty"` 8695 8696 // Json formatted public settings for the extension. 8697 Settings map[string]interface{} `json:"settings,omitempty"` 8698 8699 // Specifies the type of the extension; an example is "CustomScriptExtension". 8700 Type *string `json:"type,omitempty"` 8701 8702 // Specifies the version of the script handler. 8703 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 8704 8705 // READ-ONLY; The provisioning state, which only appears in the response. 8706 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 8707} 8708 8709// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionProperties. 8710func (v VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) { 8711 objectMap := make(map[string]interface{}) 8712 populate(objectMap, "autoUpgradeMinorVersion", v.AutoUpgradeMinorVersion) 8713 populate(objectMap, "enableAutomaticUpgrade", v.EnableAutomaticUpgrade) 8714 populate(objectMap, "forceUpdateTag", v.ForceUpdateTag) 8715 populate(objectMap, "protectedSettings", v.ProtectedSettings) 8716 populate(objectMap, "provisionAfterExtensions", v.ProvisionAfterExtensions) 8717 populate(objectMap, "provisioningState", v.ProvisioningState) 8718 populate(objectMap, "publisher", v.Publisher) 8719 populate(objectMap, "settings", v.Settings) 8720 populate(objectMap, "type", v.Type) 8721 populate(objectMap, "typeHandlerVersion", v.TypeHandlerVersion) 8722 return json.Marshal(objectMap) 8723} 8724 8725// VirtualMachineScaleSetExtensionUpdate - Describes a Virtual Machine Scale Set Extension. 8726type VirtualMachineScaleSetExtensionUpdate struct { 8727 SubResourceReadOnly 8728 // Describes the properties of a Virtual Machine Scale Set Extension. 8729 Properties *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` 8730 8731 // READ-ONLY; The name of the extension. 8732 Name *string `json:"name,omitempty" azure:"ro"` 8733 8734 // READ-ONLY; Resource type 8735 Type *string `json:"type,omitempty" azure:"ro"` 8736} 8737 8738// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionUpdate. 8739func (v VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) { 8740 objectMap := v.SubResourceReadOnly.marshalInternal() 8741 populate(objectMap, "name", v.Name) 8742 populate(objectMap, "properties", v.Properties) 8743 populate(objectMap, "type", v.Type) 8744 return json.Marshal(objectMap) 8745} 8746 8747// VirtualMachineScaleSetExtensionsBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensions.BeginCreateOrUpdate 8748// method. 8749type VirtualMachineScaleSetExtensionsBeginCreateOrUpdateOptions struct { 8750 // placeholder for future optional parameters 8751} 8752 8753// VirtualMachineScaleSetExtensionsBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetExtensions.BeginDelete method. 8754type VirtualMachineScaleSetExtensionsBeginDeleteOptions struct { 8755 // placeholder for future optional parameters 8756} 8757 8758// VirtualMachineScaleSetExtensionsBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensions.BeginUpdate method. 8759type VirtualMachineScaleSetExtensionsBeginUpdateOptions struct { 8760 // placeholder for future optional parameters 8761} 8762 8763// VirtualMachineScaleSetExtensionsGetOptions contains the optional parameters for the VirtualMachineScaleSetExtensions.Get method. 8764type VirtualMachineScaleSetExtensionsGetOptions struct { 8765 // The expand expression to apply on the operation. 8766 Expand *string 8767} 8768 8769// VirtualMachineScaleSetExtensionsListOptions contains the optional parameters for the VirtualMachineScaleSetExtensions.List method. 8770type VirtualMachineScaleSetExtensionsListOptions struct { 8771 // placeholder for future optional parameters 8772} 8773 8774// VirtualMachineScaleSetIPConfiguration - Describes a virtual machine scale set network profile's IP configuration. 8775type VirtualMachineScaleSetIPConfiguration struct { 8776 SubResource 8777 // REQUIRED; The IP configuration name. 8778 Name *string `json:"name,omitempty"` 8779 8780 // Describes a virtual machine scale set network profile's IP configuration properties. 8781 Properties *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"` 8782} 8783 8784// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIPConfiguration. 8785func (v VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) { 8786 objectMap := v.SubResource.marshalInternal() 8787 populate(objectMap, "name", v.Name) 8788 populate(objectMap, "properties", v.Properties) 8789 return json.Marshal(objectMap) 8790} 8791 8792// VirtualMachineScaleSetIPConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration properties. 8793type VirtualMachineScaleSetIPConfigurationProperties struct { 8794 // Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application 8795 // gateways. Multiple scale sets cannot use the 8796 // same application gateway. 8797 ApplicationGatewayBackendAddressPools []*SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` 8798 8799 // Specifies an array of references to application security group. 8800 ApplicationSecurityGroups []*SubResource `json:"applicationSecurityGroups,omitempty"` 8801 8802 // Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal 8803 // load balancer. Multiple scale sets cannot 8804 // use the same basic sku load balancer. 8805 LoadBalancerBackendAddressPools []*SubResource `json:"loadBalancerBackendAddressPools,omitempty"` 8806 8807 // Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal 8808 // load balancer. Multiple scale sets cannot use 8809 // the same basic sku load balancer. 8810 LoadBalancerInboundNatPools []*SubResource `json:"loadBalancerInboundNatPools,omitempty"` 8811 8812 // Specifies the primary network interface in case the virtual machine has more than 1 network interface. 8813 Primary *bool `json:"primary,omitempty"` 8814 8815 // Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible 8816 // values are: 'IPv4' and 'IPv6'. 8817 PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` 8818 8819 // The publicIPAddressConfiguration. 8820 PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` 8821 8822 // Specifies the identifier of the subnet. 8823 Subnet *APIEntityReference `json:"subnet,omitempty"` 8824} 8825 8826// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIPConfigurationProperties. 8827func (v VirtualMachineScaleSetIPConfigurationProperties) MarshalJSON() ([]byte, error) { 8828 objectMap := make(map[string]interface{}) 8829 populate(objectMap, "applicationGatewayBackendAddressPools", v.ApplicationGatewayBackendAddressPools) 8830 populate(objectMap, "applicationSecurityGroups", v.ApplicationSecurityGroups) 8831 populate(objectMap, "loadBalancerBackendAddressPools", v.LoadBalancerBackendAddressPools) 8832 populate(objectMap, "loadBalancerInboundNatPools", v.LoadBalancerInboundNatPools) 8833 populate(objectMap, "primary", v.Primary) 8834 populate(objectMap, "privateIPAddressVersion", v.PrivateIPAddressVersion) 8835 populate(objectMap, "publicIPAddressConfiguration", v.PublicIPAddressConfiguration) 8836 populate(objectMap, "subnet", v.Subnet) 8837 return json.Marshal(objectMap) 8838} 8839 8840// VirtualMachineScaleSetIPTag - Contains the IP tag associated with the public IP address. 8841type VirtualMachineScaleSetIPTag struct { 8842 // IP tag type. Example: FirstPartyUsage. 8843 IPTagType *string `json:"ipTagType,omitempty"` 8844 8845 // IP tag associated with the public IP. Example: SQL, Storage etc. 8846 Tag *string `json:"tag,omitempty"` 8847} 8848 8849// VirtualMachineScaleSetIdentity - Identity for the virtual machine scale set. 8850type VirtualMachineScaleSetIdentity struct { 8851 // The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and 8852 // a set of user assigned identities. The type 'None' 8853 // will remove any identities from the virtual machine scale set. 8854 Type *ResourceIdentityType `json:"type,omitempty"` 8855 8856 // The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the 8857 // form: 8858 // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. 8859 UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities,omitempty"` 8860 8861 // READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity. 8862 PrincipalID *string `json:"principalId,omitempty" azure:"ro"` 8863 8864 // READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity. 8865 TenantID *string `json:"tenantId,omitempty" azure:"ro"` 8866} 8867 8868// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIdentity. 8869func (v VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) { 8870 objectMap := make(map[string]interface{}) 8871 populate(objectMap, "principalId", v.PrincipalID) 8872 populate(objectMap, "tenantId", v.TenantID) 8873 populate(objectMap, "type", v.Type) 8874 populate(objectMap, "userAssignedIdentities", v.UserAssignedIdentities) 8875 return json.Marshal(objectMap) 8876} 8877 8878type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct { 8879 // READ-ONLY; The client id of user assigned identity. 8880 ClientID *string `json:"clientId,omitempty" azure:"ro"` 8881 8882 // READ-ONLY; The principal id of user assigned identity. 8883 PrincipalID *string `json:"principalId,omitempty" azure:"ro"` 8884} 8885 8886// VirtualMachineScaleSetInstanceView - The instance view of a virtual machine scale set. 8887type VirtualMachineScaleSetInstanceView struct { 8888 // The resource status information. 8889 Statuses []*InstanceViewStatus `json:"statuses,omitempty"` 8890 8891 // READ-ONLY; The extensions information. 8892 Extensions []*VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty" azure:"ro"` 8893 8894 // READ-ONLY; The orchestration services information. 8895 OrchestrationServices []*OrchestrationServiceSummary `json:"orchestrationServices,omitempty" azure:"ro"` 8896 8897 // READ-ONLY; The instance view status summary for the virtual machine scale set. 8898 VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty" azure:"ro"` 8899} 8900 8901// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetInstanceView. 8902func (v VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) { 8903 objectMap := make(map[string]interface{}) 8904 populate(objectMap, "extensions", v.Extensions) 8905 populate(objectMap, "orchestrationServices", v.OrchestrationServices) 8906 populate(objectMap, "statuses", v.Statuses) 8907 populate(objectMap, "virtualMachine", v.VirtualMachine) 8908 return json.Marshal(objectMap) 8909} 8910 8911// VirtualMachineScaleSetInstanceViewStatusesSummary - Instance view statuses summary for virtual machines of a virtual machine scale set. 8912type VirtualMachineScaleSetInstanceViewStatusesSummary struct { 8913 // READ-ONLY; The extensions information. 8914 StatusesSummary []*VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty" azure:"ro"` 8915} 8916 8917// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetInstanceViewStatusesSummary. 8918func (v VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) { 8919 objectMap := make(map[string]interface{}) 8920 populate(objectMap, "statusesSummary", v.StatusesSummary) 8921 return json.Marshal(objectMap) 8922} 8923 8924// VirtualMachineScaleSetListOSUpgradeHistory - List of Virtual Machine Scale Set OS Upgrade History operation response. 8925type VirtualMachineScaleSetListOSUpgradeHistory struct { 8926 // REQUIRED; The list of OS upgrades performed on the virtual machine scale set. 8927 Value []*UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"` 8928 8929 // The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades. 8930 NextLink *string `json:"nextLink,omitempty"` 8931} 8932 8933// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetListOSUpgradeHistory. 8934func (v VirtualMachineScaleSetListOSUpgradeHistory) MarshalJSON() ([]byte, error) { 8935 objectMap := make(map[string]interface{}) 8936 populate(objectMap, "nextLink", v.NextLink) 8937 populate(objectMap, "value", v.Value) 8938 return json.Marshal(objectMap) 8939} 8940 8941// VirtualMachineScaleSetListResult - The List Virtual Machine operation response. 8942type VirtualMachineScaleSetListResult struct { 8943 // REQUIRED; The list of virtual machine scale sets. 8944 Value []*VirtualMachineScaleSet `json:"value,omitempty"` 8945 8946 // The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS. 8947 NextLink *string `json:"nextLink,omitempty"` 8948} 8949 8950// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetListResult. 8951func (v VirtualMachineScaleSetListResult) MarshalJSON() ([]byte, error) { 8952 objectMap := make(map[string]interface{}) 8953 populate(objectMap, "nextLink", v.NextLink) 8954 populate(objectMap, "value", v.Value) 8955 return json.Marshal(objectMap) 8956} 8957 8958// VirtualMachineScaleSetListSKUsResult - The Virtual Machine Scale Set List Skus operation response. 8959type VirtualMachineScaleSetListSKUsResult struct { 8960 // REQUIRED; The list of skus available for the virtual machine scale set. 8961 Value []*VirtualMachineScaleSetSKU `json:"value,omitempty"` 8962 8963 // The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to fetch the next page of VMSS Skus. 8964 NextLink *string `json:"nextLink,omitempty"` 8965} 8966 8967// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetListSKUsResult. 8968func (v VirtualMachineScaleSetListSKUsResult) MarshalJSON() ([]byte, error) { 8969 objectMap := make(map[string]interface{}) 8970 populate(objectMap, "nextLink", v.NextLink) 8971 populate(objectMap, "value", v.Value) 8972 return json.Marshal(objectMap) 8973} 8974 8975// VirtualMachineScaleSetListWithLinkResult - The List Virtual Machine operation response. 8976type VirtualMachineScaleSetListWithLinkResult struct { 8977 // REQUIRED; The list of virtual machine scale sets. 8978 Value []*VirtualMachineScaleSet `json:"value,omitempty"` 8979 8980 // The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of Virtual Machine Scale Sets. 8981 NextLink *string `json:"nextLink,omitempty"` 8982} 8983 8984// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetListWithLinkResult. 8985func (v VirtualMachineScaleSetListWithLinkResult) MarshalJSON() ([]byte, error) { 8986 objectMap := make(map[string]interface{}) 8987 populate(objectMap, "nextLink", v.NextLink) 8988 populate(objectMap, "value", v.Value) 8989 return json.Marshal(objectMap) 8990} 8991 8992// VirtualMachineScaleSetManagedDiskParameters - Describes the parameters of a ScaleSet managed disk. 8993type VirtualMachineScaleSetManagedDiskParameters struct { 8994 // Specifies the customer managed disk encryption set resource id for the managed disk. 8995 DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` 8996 8997 // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. 8998 StorageAccountType *StorageAccountTypes `json:"storageAccountType,omitempty"` 8999} 9000 9001// VirtualMachineScaleSetNetworkConfiguration - Describes a virtual machine scale set network profile's network configurations. 9002type VirtualMachineScaleSetNetworkConfiguration struct { 9003 SubResource 9004 // REQUIRED; The network configuration name. 9005 Name *string `json:"name,omitempty"` 9006 9007 // Describes a virtual machine scale set network profile's IP configuration. 9008 Properties *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"` 9009} 9010 9011// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkConfiguration. 9012func (v VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) { 9013 objectMap := v.SubResource.marshalInternal() 9014 populate(objectMap, "name", v.Name) 9015 populate(objectMap, "properties", v.Properties) 9016 return json.Marshal(objectMap) 9017} 9018 9019// VirtualMachineScaleSetNetworkConfigurationDNSSettings - Describes a virtual machines scale sets network configuration's DNS settings. 9020type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct { 9021 // List of DNS servers IP addresses 9022 DNSServers []*string `json:"dnsServers,omitempty"` 9023} 9024 9025// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkConfigurationDNSSettings. 9026func (v VirtualMachineScaleSetNetworkConfigurationDNSSettings) MarshalJSON() ([]byte, error) { 9027 objectMap := make(map[string]interface{}) 9028 populate(objectMap, "dnsServers", v.DNSServers) 9029 return json.Marshal(objectMap) 9030} 9031 9032// VirtualMachineScaleSetNetworkConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration. 9033type VirtualMachineScaleSetNetworkConfigurationProperties struct { 9034 // REQUIRED; Specifies the IP configurations of the network interface. 9035 IPConfigurations []*VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"` 9036 9037 // The dns settings to be applied on the network interfaces. 9038 DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` 9039 9040 // Specify what happens to the network interface when the VM is deleted 9041 DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` 9042 9043 // Specifies whether the network interface is accelerated networking-enabled. 9044 EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` 9045 9046 // Specifies whether the network interface is FPGA networking-enabled. 9047 EnableFpga *bool `json:"enableFpga,omitempty"` 9048 9049 // Whether IP forwarding enabled on this NIC. 9050 EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` 9051 9052 // The network security group. 9053 NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` 9054 9055 // Specifies the primary network interface in case the virtual machine has more than 1 network interface. 9056 Primary *bool `json:"primary,omitempty"` 9057} 9058 9059// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkConfigurationProperties. 9060func (v VirtualMachineScaleSetNetworkConfigurationProperties) MarshalJSON() ([]byte, error) { 9061 objectMap := make(map[string]interface{}) 9062 populate(objectMap, "dnsSettings", v.DNSSettings) 9063 populate(objectMap, "deleteOption", v.DeleteOption) 9064 populate(objectMap, "enableAcceleratedNetworking", v.EnableAcceleratedNetworking) 9065 populate(objectMap, "enableFpga", v.EnableFpga) 9066 populate(objectMap, "enableIPForwarding", v.EnableIPForwarding) 9067 populate(objectMap, "ipConfigurations", v.IPConfigurations) 9068 populate(objectMap, "networkSecurityGroup", v.NetworkSecurityGroup) 9069 populate(objectMap, "primary", v.Primary) 9070 return json.Marshal(objectMap) 9071} 9072 9073// VirtualMachineScaleSetNetworkProfile - Describes a virtual machine scale set network profile. 9074type VirtualMachineScaleSetNetworkProfile struct { 9075 // A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: 9076 // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. 9077 HealthProbe *APIEntityReference `json:"healthProbe,omitempty"` 9078 9079 // specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale 9080 // Set with orchestration mode 'Flexible' 9081 NetworkAPIVersion *NetworkAPIVersion `json:"networkApiVersion,omitempty"` 9082 9083 // The list of network configurations. 9084 NetworkInterfaceConfigurations []*VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` 9085} 9086 9087// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkProfile. 9088func (v VirtualMachineScaleSetNetworkProfile) MarshalJSON() ([]byte, error) { 9089 objectMap := make(map[string]interface{}) 9090 populate(objectMap, "healthProbe", v.HealthProbe) 9091 populate(objectMap, "networkApiVersion", v.NetworkAPIVersion) 9092 populate(objectMap, "networkInterfaceConfigurations", v.NetworkInterfaceConfigurations) 9093 return json.Marshal(objectMap) 9094} 9095 9096// VirtualMachineScaleSetOSDisk - Describes a virtual machine scale set operating system disk. 9097type VirtualMachineScaleSetOSDisk struct { 9098 // REQUIRED; Specifies how the virtual machines in the scale set should be created. 9099 // The only allowed value is: FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform 9100 // image, you also use the imageReference element 9101 // described above. If you are using a marketplace image, you also use the plan element previously described. 9102 CreateOption *DiskCreateOptionTypes `json:"createOption,omitempty"` 9103 9104 // Specifies the caching requirements. 9105 // Possible values are: 9106 // None 9107 // ReadOnly 9108 // ReadWrite 9109 // Default: None for Standard storage. ReadOnly for Premium storage 9110 Caching *CachingTypes `json:"caching,omitempty"` 9111 9112 // Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. 9113 DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` 9114 9115 // Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. 9116 // This value cannot be larger than 1023 GB 9117 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 9118 9119 // Specifies information about the unmanaged user image to base the scale set on. 9120 Image *VirtualHardDisk `json:"image,omitempty"` 9121 9122 // The managed disk parameters. 9123 ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` 9124 9125 // The disk name. 9126 Name *string `json:"name,omitempty"` 9127 9128 // This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. 9129 // Possible values are: 9130 // Windows 9131 // Linux 9132 OSType *OperatingSystemTypes `json:"osType,omitempty"` 9133 9134 // Specifies the container urls that are used to store operating system disks for the scale set. 9135 VhdContainers []*string `json:"vhdContainers,omitempty"` 9136 9137 // Specifies whether writeAccelerator should be enabled or disabled on the disk. 9138 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 9139} 9140 9141// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetOSDisk. 9142func (v VirtualMachineScaleSetOSDisk) MarshalJSON() ([]byte, error) { 9143 objectMap := make(map[string]interface{}) 9144 populate(objectMap, "caching", v.Caching) 9145 populate(objectMap, "createOption", v.CreateOption) 9146 populate(objectMap, "diffDiskSettings", v.DiffDiskSettings) 9147 populate(objectMap, "diskSizeGB", v.DiskSizeGB) 9148 populate(objectMap, "image", v.Image) 9149 populate(objectMap, "managedDisk", v.ManagedDisk) 9150 populate(objectMap, "name", v.Name) 9151 populate(objectMap, "osType", v.OSType) 9152 populate(objectMap, "vhdContainers", v.VhdContainers) 9153 populate(objectMap, "writeAcceleratorEnabled", v.WriteAcceleratorEnabled) 9154 return json.Marshal(objectMap) 9155} 9156 9157// VirtualMachineScaleSetOSProfile - Describes a virtual machine scale set OS profile. 9158type VirtualMachineScaleSetOSProfile struct { 9159 // Specifies the password of the administrator account. 9160 // Minimum-length (Windows): 8 characters 9161 // Minimum-length (Linux): 6 characters 9162 // Max-length (Windows): 123 characters 9163 // Max-length (Linux): 72 characters 9164 // Complexity requirements: 3 out of 4 conditions below need to be fulfilled 9165 // Has lower characters 9166 // Has upper characters 9167 // Has a digit 9168 // Has a special character (Regex match [\W_]) 9169 // Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" 9170 // For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp] 9171 // For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension 9172 // [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection] 9173 AdminPassword *string `json:"adminPassword,omitempty"` 9174 9175 // Specifies the name of the administrator account. 9176 // Windows-only restriction: Cannot end in "." 9177 // Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", 9178 // "aspnet", "backup", "console", "david", "guest", 9179 // "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". 9180 // Minimum-length (Linux): 1 character 9181 // Max-length (Linux): 64 characters 9182 // Max-length (Windows): 20 characters 9183 AdminUsername *string `json:"adminUsername,omitempty"` 9184 9185 // Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. 9186 ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"` 9187 9188 // Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. 9189 // The maximum length of the binary array is 9190 // 65535 bytes. 9191 // For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation [https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init] 9192 CustomData *string `json:"customData,omitempty"` 9193 9194 // Specifies the Linux operating system settings on the virtual machine. 9195 // For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions [https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros]. 9196 LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` 9197 9198 // Specifies set of certificates that should be installed onto the virtual machines in the scale set. 9199 Secrets []*VaultSecretGroup `json:"secrets,omitempty"` 9200 9201 // Specifies Windows operating system settings on the virtual machine. 9202 WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` 9203} 9204 9205// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetOSProfile. 9206func (v VirtualMachineScaleSetOSProfile) MarshalJSON() ([]byte, error) { 9207 objectMap := make(map[string]interface{}) 9208 populate(objectMap, "adminPassword", v.AdminPassword) 9209 populate(objectMap, "adminUsername", v.AdminUsername) 9210 populate(objectMap, "computerNamePrefix", v.ComputerNamePrefix) 9211 populate(objectMap, "customData", v.CustomData) 9212 populate(objectMap, "linuxConfiguration", v.LinuxConfiguration) 9213 populate(objectMap, "secrets", v.Secrets) 9214 populate(objectMap, "windowsConfiguration", v.WindowsConfiguration) 9215 return json.Marshal(objectMap) 9216} 9217 9218// VirtualMachineScaleSetProperties - Describes the properties of a Virtual Machine Scale Set. 9219type VirtualMachineScaleSetProperties struct { 9220 // Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines 9221 // have the capability to support attaching 9222 // managed data disks with UltraSSD_LRS storage account type. 9223 AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` 9224 9225 // Policy for automatic repairs. 9226 AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"` 9227 9228 // When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that 9229 // the extensions do not run on the extra 9230 // overprovisioned VMs. 9231 DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` 9232 9233 // Specifies information about the dedicated host group that the virtual machine scale set resides in. 9234 // Minimum api-version: 2020-06-01. 9235 HostGroup *SubResource `json:"hostGroup,omitempty"` 9236 9237 // Specifies the orchestration mode for the virtual machine scale set. 9238 OrchestrationMode *OrchestrationMode `json:"orchestrationMode,omitempty"` 9239 9240 // Specifies whether the Virtual Machine Scale Set should be overprovisioned. 9241 Overprovision *bool `json:"overprovision,omitempty"` 9242 9243 // Fault Domain count for each placement group. 9244 PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` 9245 9246 // Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. 9247 // Minimum api-version: 2018-04-01. 9248 ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` 9249 9250 // Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. 9251 ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` 9252 9253 // When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified 9254 // to false. However, if singlePlacementGroup 9255 // is false, it may not be modified to true. 9256 SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` 9257 9258 // The upgrade policy. 9259 UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` 9260 9261 // The virtual machine profile. 9262 VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"` 9263 9264 // Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. 9265 ZoneBalance *bool `json:"zoneBalance,omitempty"` 9266 9267 // READ-ONLY; The provisioning state, which only appears in the response. 9268 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 9269 9270 // READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set. 9271 UniqueID *string `json:"uniqueId,omitempty" azure:"ro"` 9272} 9273 9274// VirtualMachineScaleSetPublicIPAddressConfiguration - Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration 9275type VirtualMachineScaleSetPublicIPAddressConfiguration struct { 9276 // REQUIRED; The publicIP address configuration name. 9277 Name *string `json:"name,omitempty"` 9278 9279 // Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration 9280 Properties *VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"` 9281 9282 // Describes the public IP Sku 9283 SKU *PublicIPAddressSKU `json:"sku,omitempty"` 9284} 9285 9286// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings - Describes a virtual machines scale sets network configuration's DNS settings. 9287type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct { 9288 // REQUIRED; The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources 9289 // that will be created 9290 DomainNameLabel *string `json:"domainNameLabel,omitempty"` 9291} 9292 9293// VirtualMachineScaleSetPublicIPAddressConfigurationProperties - Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration 9294type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct { 9295 // The dns settings to be applied on the publicIP addresses . 9296 DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` 9297 9298 // Specify what happens to the public IP when the VM is deleted 9299 DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` 9300 9301 // The list of IP tags associated with the public IP address. 9302 IPTags []*VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"` 9303 9304 // The idle timeout of the public IP address. 9305 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 9306 9307 // Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible 9308 // values are: 'IPv4' and 'IPv6'. 9309 PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` 9310 9311 // The PublicIPPrefix from which to allocate publicIP addresses. 9312 PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` 9313} 9314 9315// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetPublicIPAddressConfigurationProperties. 9316func (v VirtualMachineScaleSetPublicIPAddressConfigurationProperties) MarshalJSON() ([]byte, error) { 9317 objectMap := make(map[string]interface{}) 9318 populate(objectMap, "dnsSettings", v.DNSSettings) 9319 populate(objectMap, "deleteOption", v.DeleteOption) 9320 populate(objectMap, "ipTags", v.IPTags) 9321 populate(objectMap, "idleTimeoutInMinutes", v.IdleTimeoutInMinutes) 9322 populate(objectMap, "publicIPAddressVersion", v.PublicIPAddressVersion) 9323 populate(objectMap, "publicIPPrefix", v.PublicIPPrefix) 9324 return json.Marshal(objectMap) 9325} 9326 9327// VirtualMachineScaleSetReimageParameters - Describes a Virtual Machine Scale Set VM Reimage Parameters. 9328type VirtualMachineScaleSetReimageParameters struct { 9329 VirtualMachineScaleSetVMReimageParameters 9330 // The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual 9331 // machines in the virtual machine scale set. 9332 InstanceIDs []*string `json:"instanceIds,omitempty"` 9333} 9334 9335// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetReimageParameters. 9336func (v VirtualMachineScaleSetReimageParameters) MarshalJSON() ([]byte, error) { 9337 objectMap := v.VirtualMachineScaleSetVMReimageParameters.marshalInternal() 9338 populate(objectMap, "instanceIds", v.InstanceIDs) 9339 return json.Marshal(objectMap) 9340} 9341 9342// VirtualMachineScaleSetRollingUpgradesBeginCancelOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgrades.BeginCancel method. 9343type VirtualMachineScaleSetRollingUpgradesBeginCancelOptions struct { 9344 // placeholder for future optional parameters 9345} 9346 9347// VirtualMachineScaleSetRollingUpgradesBeginStartExtensionUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgrades.BeginStartExtensionUpgrade 9348// method. 9349type VirtualMachineScaleSetRollingUpgradesBeginStartExtensionUpgradeOptions struct { 9350 // placeholder for future optional parameters 9351} 9352 9353// VirtualMachineScaleSetRollingUpgradesBeginStartOSUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgrades.BeginStartOSUpgrade 9354// method. 9355type VirtualMachineScaleSetRollingUpgradesBeginStartOSUpgradeOptions struct { 9356 // placeholder for future optional parameters 9357} 9358 9359// VirtualMachineScaleSetRollingUpgradesGetLatestOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgrades.GetLatest method. 9360type VirtualMachineScaleSetRollingUpgradesGetLatestOptions struct { 9361 // placeholder for future optional parameters 9362} 9363 9364// VirtualMachineScaleSetSKU - Describes an available virtual machine scale set sku. 9365type VirtualMachineScaleSetSKU struct { 9366 // READ-ONLY; Specifies the number of virtual machines in the scale set. 9367 Capacity *VirtualMachineScaleSetSKUCapacity `json:"capacity,omitempty" azure:"ro"` 9368 9369 // READ-ONLY; The type of resource the sku applies to. 9370 ResourceType *string `json:"resourceType,omitempty" azure:"ro"` 9371 9372 // READ-ONLY; The Sku. 9373 SKU *SKU `json:"sku,omitempty" azure:"ro"` 9374} 9375 9376// VirtualMachineScaleSetSKUCapacity - Describes scaling information of a sku. 9377type VirtualMachineScaleSetSKUCapacity struct { 9378 // READ-ONLY; The default capacity. 9379 DefaultCapacity *int64 `json:"defaultCapacity,omitempty" azure:"ro"` 9380 9381 // READ-ONLY; The maximum capacity that can be set. 9382 Maximum *int64 `json:"maximum,omitempty" azure:"ro"` 9383 9384 // READ-ONLY; The minimum capacity. 9385 Minimum *int64 `json:"minimum,omitempty" azure:"ro"` 9386 9387 // READ-ONLY; The scale type applicable to the sku. 9388 ScaleType *VirtualMachineScaleSetSKUScaleType `json:"scaleType,omitempty" azure:"ro"` 9389} 9390 9391// VirtualMachineScaleSetStorageProfile - Describes a virtual machine scale set storage profile. 9392type VirtualMachineScaleSetStorageProfile struct { 9393 // Specifies the parameters that are used to add data disks to the virtual machines in the scale set. 9394 // For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview]. 9395 DataDisks []*VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` 9396 9397 // Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This 9398 // element is required when you want to use a platform 9399 // image, marketplace image, or virtual machine image, but is not used in other creation operations. 9400 ImageReference *ImageReference `json:"imageReference,omitempty"` 9401 9402 // Specifies information about the operating system disk used by the virtual machines in the scale set. 9403 // For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview]. 9404 OSDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"` 9405} 9406 9407// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetStorageProfile. 9408func (v VirtualMachineScaleSetStorageProfile) MarshalJSON() ([]byte, error) { 9409 objectMap := make(map[string]interface{}) 9410 populate(objectMap, "dataDisks", v.DataDisks) 9411 populate(objectMap, "imageReference", v.ImageReference) 9412 populate(objectMap, "osDisk", v.OSDisk) 9413 return json.Marshal(objectMap) 9414} 9415 9416// VirtualMachineScaleSetUpdate - Describes a Virtual Machine Scale Set. 9417type VirtualMachineScaleSetUpdate struct { 9418 UpdateResource 9419 // The identity of the virtual machine scale set, if configured. 9420 Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` 9421 9422 // The purchase plan when deploying a virtual machine scale set from VM Marketplace images. 9423 Plan *Plan `json:"plan,omitempty"` 9424 9425 // Describes the properties of a Virtual Machine Scale Set. 9426 Properties *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"` 9427 9428 // The virtual machine scale set sku. 9429 SKU *SKU `json:"sku,omitempty"` 9430} 9431 9432// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdate. 9433func (v VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) { 9434 objectMap := v.UpdateResource.marshalInternal() 9435 populate(objectMap, "identity", v.Identity) 9436 populate(objectMap, "plan", v.Plan) 9437 populate(objectMap, "properties", v.Properties) 9438 populate(objectMap, "sku", v.SKU) 9439 return json.Marshal(objectMap) 9440} 9441 9442// VirtualMachineScaleSetUpdateIPConfiguration - Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a scale set 9443// may be modified as long as the original subnet and the new subnet are in the same virtual 9444// network 9445type VirtualMachineScaleSetUpdateIPConfiguration struct { 9446 SubResource 9447 // The IP configuration name. 9448 Name *string `json:"name,omitempty"` 9449 9450 // Describes a virtual machine scale set network profile's IP configuration properties. 9451 Properties *VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"` 9452} 9453 9454// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateIPConfiguration. 9455func (v VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) { 9456 objectMap := v.SubResource.marshalInternal() 9457 populate(objectMap, "name", v.Name) 9458 populate(objectMap, "properties", v.Properties) 9459 return json.Marshal(objectMap) 9460} 9461 9462// VirtualMachineScaleSetUpdateIPConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration properties. 9463type VirtualMachineScaleSetUpdateIPConfigurationProperties struct { 9464 // The application gateway backend address pools. 9465 ApplicationGatewayBackendAddressPools []*SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` 9466 9467 // Specifies an array of references to application security group. 9468 ApplicationSecurityGroups []*SubResource `json:"applicationSecurityGroups,omitempty"` 9469 9470 // The load balancer backend address pools. 9471 LoadBalancerBackendAddressPools []*SubResource `json:"loadBalancerBackendAddressPools,omitempty"` 9472 9473 // The load balancer inbound nat pools. 9474 LoadBalancerInboundNatPools []*SubResource `json:"loadBalancerInboundNatPools,omitempty"` 9475 9476 // Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. 9477 Primary *bool `json:"primary,omitempty"` 9478 9479 // Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible 9480 // values are: 'IPv4' and 'IPv6'. 9481 PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` 9482 9483 // The publicIPAddressConfiguration. 9484 PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` 9485 9486 // The subnet. 9487 Subnet *APIEntityReference `json:"subnet,omitempty"` 9488} 9489 9490// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateIPConfigurationProperties. 9491func (v VirtualMachineScaleSetUpdateIPConfigurationProperties) MarshalJSON() ([]byte, error) { 9492 objectMap := make(map[string]interface{}) 9493 populate(objectMap, "applicationGatewayBackendAddressPools", v.ApplicationGatewayBackendAddressPools) 9494 populate(objectMap, "applicationSecurityGroups", v.ApplicationSecurityGroups) 9495 populate(objectMap, "loadBalancerBackendAddressPools", v.LoadBalancerBackendAddressPools) 9496 populate(objectMap, "loadBalancerInboundNatPools", v.LoadBalancerInboundNatPools) 9497 populate(objectMap, "primary", v.Primary) 9498 populate(objectMap, "privateIPAddressVersion", v.PrivateIPAddressVersion) 9499 populate(objectMap, "publicIPAddressConfiguration", v.PublicIPAddressConfiguration) 9500 populate(objectMap, "subnet", v.Subnet) 9501 return json.Marshal(objectMap) 9502} 9503 9504// VirtualMachineScaleSetUpdateNetworkConfiguration - Describes a virtual machine scale set network profile's network configurations. 9505type VirtualMachineScaleSetUpdateNetworkConfiguration struct { 9506 SubResource 9507 // The network configuration name. 9508 Name *string `json:"name,omitempty"` 9509 9510 // Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration. 9511 Properties *VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"` 9512} 9513 9514// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateNetworkConfiguration. 9515func (v VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) { 9516 objectMap := v.SubResource.marshalInternal() 9517 populate(objectMap, "name", v.Name) 9518 populate(objectMap, "properties", v.Properties) 9519 return json.Marshal(objectMap) 9520} 9521 9522// VirtualMachineScaleSetUpdateNetworkConfigurationProperties - Describes a virtual machine scale set updatable network profile's IP configuration.Use this 9523// object for updating network profile's IP Configuration. 9524type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct { 9525 // The dns settings to be applied on the network interfaces. 9526 DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` 9527 9528 // Specify what happens to the network interface when the VM is deleted 9529 DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` 9530 9531 // Specifies whether the network interface is accelerated networking-enabled. 9532 EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` 9533 9534 // Specifies whether the network interface is FPGA networking-enabled. 9535 EnableFpga *bool `json:"enableFpga,omitempty"` 9536 9537 // Whether IP forwarding enabled on this NIC. 9538 EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` 9539 9540 // The virtual machine scale set IP Configuration. 9541 IPConfigurations []*VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"` 9542 9543 // The network security group. 9544 NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` 9545 9546 // Whether this is a primary NIC on a virtual machine. 9547 Primary *bool `json:"primary,omitempty"` 9548} 9549 9550// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateNetworkConfigurationProperties. 9551func (v VirtualMachineScaleSetUpdateNetworkConfigurationProperties) MarshalJSON() ([]byte, error) { 9552 objectMap := make(map[string]interface{}) 9553 populate(objectMap, "dnsSettings", v.DNSSettings) 9554 populate(objectMap, "deleteOption", v.DeleteOption) 9555 populate(objectMap, "enableAcceleratedNetworking", v.EnableAcceleratedNetworking) 9556 populate(objectMap, "enableFpga", v.EnableFpga) 9557 populate(objectMap, "enableIPForwarding", v.EnableIPForwarding) 9558 populate(objectMap, "ipConfigurations", v.IPConfigurations) 9559 populate(objectMap, "networkSecurityGroup", v.NetworkSecurityGroup) 9560 populate(objectMap, "primary", v.Primary) 9561 return json.Marshal(objectMap) 9562} 9563 9564// VirtualMachineScaleSetUpdateNetworkProfile - Describes a virtual machine scale set network profile. 9565type VirtualMachineScaleSetUpdateNetworkProfile struct { 9566 // A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: 9567 // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. 9568 HealthProbe *APIEntityReference `json:"healthProbe,omitempty"` 9569 9570 // specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale 9571 // Set with orchestration mode 'Flexible' 9572 NetworkAPIVersion *NetworkAPIVersion `json:"networkApiVersion,omitempty"` 9573 9574 // The list of network configurations. 9575 NetworkInterfaceConfigurations []*VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` 9576} 9577 9578// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateNetworkProfile. 9579func (v VirtualMachineScaleSetUpdateNetworkProfile) MarshalJSON() ([]byte, error) { 9580 objectMap := make(map[string]interface{}) 9581 populate(objectMap, "healthProbe", v.HealthProbe) 9582 populate(objectMap, "networkApiVersion", v.NetworkAPIVersion) 9583 populate(objectMap, "networkInterfaceConfigurations", v.NetworkInterfaceConfigurations) 9584 return json.Marshal(objectMap) 9585} 9586 9587// VirtualMachineScaleSetUpdateOSDisk - Describes virtual machine scale set operating system disk Update Object. This should be used for Updating VMSS OS 9588// Disk. 9589type VirtualMachineScaleSetUpdateOSDisk struct { 9590 // The caching type. 9591 Caching *CachingTypes `json:"caching,omitempty"` 9592 9593 // Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. 9594 // This value cannot be larger than 1023 GB 9595 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 9596 9597 // The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, 9598 // the destination VirtualHardDisk should not 9599 // exist. 9600 Image *VirtualHardDisk `json:"image,omitempty"` 9601 9602 // The managed disk parameters. 9603 ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` 9604 9605 // The list of virtual hard disk container uris. 9606 VhdContainers []*string `json:"vhdContainers,omitempty"` 9607 9608 // Specifies whether writeAccelerator should be enabled or disabled on the disk. 9609 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 9610} 9611 9612// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateOSDisk. 9613func (v VirtualMachineScaleSetUpdateOSDisk) MarshalJSON() ([]byte, error) { 9614 objectMap := make(map[string]interface{}) 9615 populate(objectMap, "caching", v.Caching) 9616 populate(objectMap, "diskSizeGB", v.DiskSizeGB) 9617 populate(objectMap, "image", v.Image) 9618 populate(objectMap, "managedDisk", v.ManagedDisk) 9619 populate(objectMap, "vhdContainers", v.VhdContainers) 9620 populate(objectMap, "writeAcceleratorEnabled", v.WriteAcceleratorEnabled) 9621 return json.Marshal(objectMap) 9622} 9623 9624// VirtualMachineScaleSetUpdateOSProfile - Describes a virtual machine scale set OS profile. 9625type VirtualMachineScaleSetUpdateOSProfile struct { 9626 // A base-64 encoded string of custom data. 9627 CustomData *string `json:"customData,omitempty"` 9628 9629 // The Linux Configuration of the OS profile. 9630 LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` 9631 9632 // The List of certificates for addition to the VM. 9633 Secrets []*VaultSecretGroup `json:"secrets,omitempty"` 9634 9635 // The Windows Configuration of the OS profile. 9636 WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` 9637} 9638 9639// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateOSProfile. 9640func (v VirtualMachineScaleSetUpdateOSProfile) MarshalJSON() ([]byte, error) { 9641 objectMap := make(map[string]interface{}) 9642 populate(objectMap, "customData", v.CustomData) 9643 populate(objectMap, "linuxConfiguration", v.LinuxConfiguration) 9644 populate(objectMap, "secrets", v.Secrets) 9645 populate(objectMap, "windowsConfiguration", v.WindowsConfiguration) 9646 return json.Marshal(objectMap) 9647} 9648 9649// VirtualMachineScaleSetUpdateProperties - Describes the properties of a Virtual Machine Scale Set. 9650type VirtualMachineScaleSetUpdateProperties struct { 9651 // Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines 9652 // have the capability to support attaching 9653 // managed data disks with UltraSSD_LRS storage account type. 9654 AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` 9655 9656 // Policy for automatic repairs. 9657 AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"` 9658 9659 // When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that 9660 // the extensions do not run on the extra 9661 // overprovisioned VMs. 9662 DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` 9663 9664 // Specifies whether the Virtual Machine Scale Set should be overprovisioned. 9665 Overprovision *bool `json:"overprovision,omitempty"` 9666 9667 // Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. 9668 // Minimum api-version: 2018-04-01. 9669 ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` 9670 9671 // Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. 9672 ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` 9673 9674 // When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified 9675 // to false. However, if singlePlacementGroup 9676 // is false, it may not be modified to true. 9677 SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` 9678 9679 // The upgrade policy. 9680 UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` 9681 9682 // The virtual machine profile. 9683 VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"` 9684} 9685 9686// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration 9687type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct { 9688 // The publicIP address configuration name. 9689 Name *string `json:"name,omitempty"` 9690 9691 // Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration 9692 Properties *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"` 9693} 9694 9695// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties - Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration 9696type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct { 9697 // The dns settings to be applied on the publicIP addresses . 9698 DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` 9699 9700 // Specify what happens to the public IP when the VM is deleted 9701 DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` 9702 9703 // The idle timeout of the public IP address. 9704 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 9705} 9706 9707// VirtualMachineScaleSetUpdateStorageProfile - Describes a virtual machine scale set storage profile. 9708type VirtualMachineScaleSetUpdateStorageProfile struct { 9709 // The data disks. 9710 DataDisks []*VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` 9711 9712 // The image reference. 9713 ImageReference *ImageReference `json:"imageReference,omitempty"` 9714 9715 // The OS disk. 9716 OSDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"` 9717} 9718 9719// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateStorageProfile. 9720func (v VirtualMachineScaleSetUpdateStorageProfile) MarshalJSON() ([]byte, error) { 9721 objectMap := make(map[string]interface{}) 9722 populate(objectMap, "dataDisks", v.DataDisks) 9723 populate(objectMap, "imageReference", v.ImageReference) 9724 populate(objectMap, "osDisk", v.OSDisk) 9725 return json.Marshal(objectMap) 9726} 9727 9728// VirtualMachineScaleSetUpdateVMProfile - Describes a virtual machine scale set virtual machine profile. 9729type VirtualMachineScaleSetUpdateVMProfile struct { 9730 // Specifies the billing related details of a Azure Spot VMSS. 9731 // Minimum api-version: 2019-03-01. 9732 BillingProfile *BillingProfile `json:"billingProfile,omitempty"` 9733 9734 // The virtual machine scale set diagnostics profile. 9735 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 9736 9737 // The virtual machine scale set extension profile. 9738 ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` 9739 9740 // The license type, which is for bring your own license scenario. 9741 LicenseType *string `json:"licenseType,omitempty"` 9742 9743 // The virtual machine scale set network profile. 9744 NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"` 9745 9746 // The virtual machine scale set OS profile. 9747 OSProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"` 9748 9749 // Specifies Scheduled Event related configurations. 9750 ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` 9751 9752 // The virtual machine scale set Security profile 9753 SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` 9754 9755 // The virtual machine scale set storage profile. 9756 StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"` 9757 9758 // UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. 9759 // Minimum api-version: 2021-03-01 9760 UserData *string `json:"userData,omitempty"` 9761} 9762 9763// VirtualMachineScaleSetVM - Describes a virtual machine scale set virtual machine. 9764type VirtualMachineScaleSetVM struct { 9765 Resource 9766 // Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can 9767 // use a marketplace image from an API, you must 9768 // enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, 9769 // Get Started ->. Enter any required 9770 // information and then click Save. 9771 Plan *Plan `json:"plan,omitempty"` 9772 9773 // Describes the properties of a virtual machine scale set virtual machine. 9774 Properties *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"` 9775 9776 // READ-ONLY; The virtual machine instance ID. 9777 InstanceID *string `json:"instanceId,omitempty" azure:"ro"` 9778 9779 // READ-ONLY; The virtual machine child extension resources. 9780 Resources []*VirtualMachineExtension `json:"resources,omitempty" azure:"ro"` 9781 9782 // READ-ONLY; The virtual machine SKU. 9783 SKU *SKU `json:"sku,omitempty" azure:"ro"` 9784 9785 // READ-ONLY; The virtual machine zones. 9786 Zones []*string `json:"zones,omitempty" azure:"ro"` 9787} 9788 9789// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVM. 9790func (v VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) { 9791 objectMap := v.Resource.marshalInternal() 9792 populate(objectMap, "instanceId", v.InstanceID) 9793 populate(objectMap, "plan", v.Plan) 9794 populate(objectMap, "properties", v.Properties) 9795 populate(objectMap, "resources", v.Resources) 9796 populate(objectMap, "sku", v.SKU) 9797 populate(objectMap, "zones", v.Zones) 9798 return json.Marshal(objectMap) 9799} 9800 9801// VirtualMachineScaleSetVMExtension - Describes a VMSS VM Extension. 9802type VirtualMachineScaleSetVMExtension struct { 9803 SubResourceReadOnly 9804 // Describes the properties of a Virtual Machine Extension. 9805 Properties *VirtualMachineExtensionProperties `json:"properties,omitempty"` 9806 9807 // READ-ONLY; The name of the extension. 9808 Name *string `json:"name,omitempty" azure:"ro"` 9809 9810 // READ-ONLY; Resource type 9811 Type *string `json:"type,omitempty" azure:"ro"` 9812} 9813 9814// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtension. 9815func (v VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) { 9816 objectMap := v.SubResourceReadOnly.marshalInternal() 9817 populate(objectMap, "name", v.Name) 9818 populate(objectMap, "properties", v.Properties) 9819 populate(objectMap, "type", v.Type) 9820 return json.Marshal(objectMap) 9821} 9822 9823// VirtualMachineScaleSetVMExtensionUpdate - Describes a VMSS VM Extension. 9824type VirtualMachineScaleSetVMExtensionUpdate struct { 9825 SubResourceReadOnly 9826 // Describes the properties of a Virtual Machine Extension. 9827 Properties *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` 9828 9829 // READ-ONLY; The name of the extension. 9830 Name *string `json:"name,omitempty" azure:"ro"` 9831 9832 // READ-ONLY; Resource type 9833 Type *string `json:"type,omitempty" azure:"ro"` 9834} 9835 9836// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtensionUpdate. 9837func (v VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) { 9838 objectMap := v.SubResourceReadOnly.marshalInternal() 9839 populate(objectMap, "name", v.Name) 9840 populate(objectMap, "properties", v.Properties) 9841 populate(objectMap, "type", v.Type) 9842 return json.Marshal(objectMap) 9843} 9844 9845// VirtualMachineScaleSetVMExtensionsBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensions.BeginCreateOrUpdate 9846// method. 9847type VirtualMachineScaleSetVMExtensionsBeginCreateOrUpdateOptions struct { 9848 // placeholder for future optional parameters 9849} 9850 9851// VirtualMachineScaleSetVMExtensionsBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensions.BeginDelete method. 9852type VirtualMachineScaleSetVMExtensionsBeginDeleteOptions struct { 9853 // placeholder for future optional parameters 9854} 9855 9856// VirtualMachineScaleSetVMExtensionsBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensions.BeginUpdate method. 9857type VirtualMachineScaleSetVMExtensionsBeginUpdateOptions struct { 9858 // placeholder for future optional parameters 9859} 9860 9861// VirtualMachineScaleSetVMExtensionsGetOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensions.Get method. 9862type VirtualMachineScaleSetVMExtensionsGetOptions struct { 9863 // The expand expression to apply on the operation. 9864 Expand *string 9865} 9866 9867// VirtualMachineScaleSetVMExtensionsListOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensions.List method. 9868type VirtualMachineScaleSetVMExtensionsListOptions struct { 9869 // The expand expression to apply on the operation. 9870 Expand *string 9871} 9872 9873// VirtualMachineScaleSetVMExtensionsListResult - The List VMSS VM Extension operation response 9874type VirtualMachineScaleSetVMExtensionsListResult struct { 9875 // The list of VMSS VM extensions 9876 Value []*VirtualMachineScaleSetVMExtension `json:"value,omitempty"` 9877} 9878 9879// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtensionsListResult. 9880func (v VirtualMachineScaleSetVMExtensionsListResult) MarshalJSON() ([]byte, error) { 9881 objectMap := make(map[string]interface{}) 9882 populate(objectMap, "value", v.Value) 9883 return json.Marshal(objectMap) 9884} 9885 9886// VirtualMachineScaleSetVMExtensionsSummary - Extensions summary for virtual machines of a virtual machine scale set. 9887type VirtualMachineScaleSetVMExtensionsSummary struct { 9888 // READ-ONLY; The extension name. 9889 Name *string `json:"name,omitempty" azure:"ro"` 9890 9891 // READ-ONLY; The extensions information. 9892 StatusesSummary []*VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty" azure:"ro"` 9893} 9894 9895// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtensionsSummary. 9896func (v VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) { 9897 objectMap := make(map[string]interface{}) 9898 populate(objectMap, "name", v.Name) 9899 populate(objectMap, "statusesSummary", v.StatusesSummary) 9900 return json.Marshal(objectMap) 9901} 9902 9903// VirtualMachineScaleSetVMInstanceIDs - Specifies a list of virtual machine instance IDs from the VM scale set. 9904type VirtualMachineScaleSetVMInstanceIDs struct { 9905 // The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual 9906 // machines in the virtual machine scale set. 9907 InstanceIDs []*string `json:"instanceIds,omitempty"` 9908} 9909 9910// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceIDs. 9911func (v VirtualMachineScaleSetVMInstanceIDs) MarshalJSON() ([]byte, error) { 9912 objectMap := make(map[string]interface{}) 9913 populate(objectMap, "instanceIds", v.InstanceIDs) 9914 return json.Marshal(objectMap) 9915} 9916 9917// VirtualMachineScaleSetVMInstanceRequiredIDs - Specifies a list of virtual machine instance IDs from the VM scale set. 9918type VirtualMachineScaleSetVMInstanceRequiredIDs struct { 9919 // REQUIRED; The virtual machine scale set instance ids. 9920 InstanceIDs []*string `json:"instanceIds,omitempty"` 9921} 9922 9923// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceRequiredIDs. 9924func (v VirtualMachineScaleSetVMInstanceRequiredIDs) MarshalJSON() ([]byte, error) { 9925 objectMap := make(map[string]interface{}) 9926 populate(objectMap, "instanceIds", v.InstanceIDs) 9927 return json.Marshal(objectMap) 9928} 9929 9930// VirtualMachineScaleSetVMInstanceView - The instance view of a virtual machine scale set VM. 9931type VirtualMachineScaleSetVMInstanceView struct { 9932 // Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. 9933 // You can easily view the output of your console log. 9934 // Azure also enables you to see a screenshot of the VM from the hypervisor. 9935 BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` 9936 9937 // The disks information. 9938 Disks []*DiskInstanceView `json:"disks,omitempty"` 9939 9940 // The extensions information. 9941 Extensions []*VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` 9942 9943 // The Maintenance Operation status on the virtual machine. 9944 MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` 9945 9946 // The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. 9947 PlacementGroupID *string `json:"placementGroupId,omitempty"` 9948 9949 // The Fault Domain count. 9950 PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` 9951 9952 // The Update Domain count. 9953 PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` 9954 9955 // The Remote desktop certificate thumbprint. 9956 RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` 9957 9958 // The resource status information. 9959 Statuses []*InstanceViewStatus `json:"statuses,omitempty"` 9960 9961 // The VM Agent running on the virtual machine. 9962 VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` 9963 9964 // READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated 9965 // with a dedicated host group that has automatic 9966 // placement enabled. 9967 // Minimum api-version: 2020-06-01. 9968 AssignedHost *string `json:"assignedHost,omitempty" azure:"ro"` 9969 9970 // READ-ONLY; The health status for the VM. 9971 VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty" azure:"ro"` 9972} 9973 9974// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceView. 9975func (v VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) { 9976 objectMap := make(map[string]interface{}) 9977 populate(objectMap, "assignedHost", v.AssignedHost) 9978 populate(objectMap, "bootDiagnostics", v.BootDiagnostics) 9979 populate(objectMap, "disks", v.Disks) 9980 populate(objectMap, "extensions", v.Extensions) 9981 populate(objectMap, "maintenanceRedeployStatus", v.MaintenanceRedeployStatus) 9982 populate(objectMap, "placementGroupId", v.PlacementGroupID) 9983 populate(objectMap, "platformFaultDomain", v.PlatformFaultDomain) 9984 populate(objectMap, "platformUpdateDomain", v.PlatformUpdateDomain) 9985 populate(objectMap, "rdpThumbPrint", v.RdpThumbPrint) 9986 populate(objectMap, "statuses", v.Statuses) 9987 populate(objectMap, "vmAgent", v.VMAgent) 9988 populate(objectMap, "vmHealth", v.VMHealth) 9989 return json.Marshal(objectMap) 9990} 9991 9992// VirtualMachineScaleSetVMListResult - The List Virtual Machine Scale Set VMs operation response. 9993type VirtualMachineScaleSetVMListResult struct { 9994 // REQUIRED; The list of virtual machine scale sets VMs. 9995 Value []*VirtualMachineScaleSetVM `json:"value,omitempty"` 9996 9997 // The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to fetch the next page of VMSS VMs 9998 NextLink *string `json:"nextLink,omitempty"` 9999} 10000 10001// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMListResult. 10002func (v VirtualMachineScaleSetVMListResult) MarshalJSON() ([]byte, error) { 10003 objectMap := make(map[string]interface{}) 10004 populate(objectMap, "nextLink", v.NextLink) 10005 populate(objectMap, "value", v.Value) 10006 return json.Marshal(objectMap) 10007} 10008 10009// VirtualMachineScaleSetVMNetworkProfileConfiguration - Describes a virtual machine scale set VM network profile. 10010type VirtualMachineScaleSetVMNetworkProfileConfiguration struct { 10011 // The list of network configurations. 10012 NetworkInterfaceConfigurations []*VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` 10013} 10014 10015// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMNetworkProfileConfiguration. 10016func (v VirtualMachineScaleSetVMNetworkProfileConfiguration) MarshalJSON() ([]byte, error) { 10017 objectMap := make(map[string]interface{}) 10018 populate(objectMap, "networkInterfaceConfigurations", v.NetworkInterfaceConfigurations) 10019 return json.Marshal(objectMap) 10020} 10021 10022// VirtualMachineScaleSetVMProfile - Describes a virtual machine scale set virtual machine profile. 10023type VirtualMachineScaleSetVMProfile struct { 10024 // Specifies the billing related details of a Azure Spot VMSS. 10025 // Minimum api-version: 2019-03-01. 10026 BillingProfile *BillingProfile `json:"billingProfile,omitempty"` 10027 10028 // Specifies the boot diagnostic settings state. 10029 // Minimum api-version: 2015-06-15. 10030 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 10031 10032 // Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. 10033 // For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. 10034 // For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. 10035 EvictionPolicy *VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` 10036 10037 // Specifies a collection of settings for extensions installed on virtual machines in the scale set. 10038 ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` 10039 10040 // Specifies that the image or disk that is being used was licensed on-premises. 10041 // Possible values for Windows Server operating system are: 10042 // WindowsClient 10043 // WindowsServer 10044 // Possible values for Linux Server operating system are: 10045 // RHELBYOS (for RHEL) 10046 // SLESBYOS (for SUSE) 10047 // For more information, see Azure Hybrid Use Benefit for Windows Server [https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing] 10048 // Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux] 10049 // Minimum api-version: 2015-06-15 10050 LicenseType *string `json:"licenseType,omitempty"` 10051 10052 // Specifies properties of the network interfaces of the virtual machines in the scale set. 10053 NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"` 10054 10055 // Specifies the operating system settings for the virtual machines in the scale set. 10056 OSProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"` 10057 10058 // Specifies the priority for the virtual machines in the scale set. 10059 // Minimum api-version: 2017-10-30-preview 10060 Priority *VirtualMachinePriorityTypes `json:"priority,omitempty"` 10061 10062 // Specifies Scheduled Event related configurations. 10063 ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` 10064 10065 // Specifies the Security related profile settings for the virtual machines in the scale set. 10066 SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` 10067 10068 // Specifies the storage settings for the virtual machine disks. 10069 StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"` 10070 10071 // UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. 10072 // Minimum api-version: 2021-03-01 10073 UserData *string `json:"userData,omitempty"` 10074} 10075 10076// VirtualMachineScaleSetVMProperties - Describes the properties of a virtual machine scale set virtual machine. 10077type VirtualMachineScaleSetVMProperties struct { 10078 // Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability 10079 // to support attaching managed data disks with 10080 // UltraSSD_LRS storage account type. 10081 AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` 10082 10083 // Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability 10084 // set are allocated to different nodes to maximize 10085 // availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview]. 10086 // For more information on Azure planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates] 10087 // Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. 10088 AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` 10089 10090 // Specifies the boot diagnostic settings state. 10091 // Minimum api-version: 2015-06-15. 10092 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 10093 10094 // Specifies the hardware settings for the virtual machine. 10095 HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` 10096 10097 // Specifies that the image or disk that is being used was licensed on-premises. 10098 // Possible values for Windows Server operating system are: 10099 // WindowsClient 10100 // WindowsServer 10101 // Possible values for Linux Server operating system are: 10102 // RHELBYOS (for RHEL) 10103 // SLESBYOS (for SUSE) 10104 // For more information, see Azure Hybrid Use Benefit for Windows Server [https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing] 10105 // Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux] 10106 // Minimum api-version: 2015-06-15 10107 LicenseType *string `json:"licenseType,omitempty"` 10108 10109 // Specifies the network interfaces of the virtual machine. 10110 NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` 10111 10112 // Specifies the network profile configuration of the virtual machine. 10113 NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"` 10114 10115 // Specifies the operating system settings for the virtual machine. 10116 OSProfile *OSProfile `json:"osProfile,omitempty"` 10117 10118 // Specifies the protection policy of the virtual machine. 10119 ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"` 10120 10121 // Specifies the Security related profile settings for the virtual machine. 10122 SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` 10123 10124 // Specifies the storage settings for the virtual machine disks. 10125 StorageProfile *StorageProfile `json:"storageProfile,omitempty"` 10126 10127 // UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. 10128 // Minimum api-version: 2021-03-01 10129 UserData *string `json:"userData,omitempty"` 10130 10131 // READ-ONLY; The virtual machine instance view. 10132 InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty" azure:"ro"` 10133 10134 // READ-ONLY; Specifies whether the latest model has been applied to the virtual machine. 10135 LatestModelApplied *bool `json:"latestModelApplied,omitempty" azure:"ro"` 10136 10137 // READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual 10138 // machine. 10139 ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty" azure:"ro"` 10140 10141 // READ-ONLY; The provisioning state, which only appears in the response. 10142 ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` 10143 10144 // READ-ONLY; Azure VM unique ID. 10145 VMID *string `json:"vmId,omitempty" azure:"ro"` 10146} 10147 10148// VirtualMachineScaleSetVMProtectionPolicy - The protection policy of a virtual machine scale set VM. 10149type VirtualMachineScaleSetVMProtectionPolicy struct { 10150 // Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation. 10151 ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"` 10152 10153 // Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine 10154 // scale set VM. 10155 ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"` 10156} 10157 10158// VirtualMachineScaleSetVMReimageParameters - Describes a Virtual Machine Scale Set VM Reimage Parameters. 10159type VirtualMachineScaleSetVMReimageParameters struct { 10160 VirtualMachineReimageParameters 10161} 10162 10163func (v VirtualMachineScaleSetVMReimageParameters) marshalInternal() map[string]interface{} { 10164 objectMap := v.VirtualMachineReimageParameters.marshalInternal() 10165 return objectMap 10166} 10167 10168// VirtualMachineScaleSetVMRunCommandsBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommands.BeginCreateOrUpdate 10169// method. 10170type VirtualMachineScaleSetVMRunCommandsBeginCreateOrUpdateOptions struct { 10171 // placeholder for future optional parameters 10172} 10173 10174// VirtualMachineScaleSetVMRunCommandsBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommands.BeginDelete method. 10175type VirtualMachineScaleSetVMRunCommandsBeginDeleteOptions struct { 10176 // placeholder for future optional parameters 10177} 10178 10179// VirtualMachineScaleSetVMRunCommandsBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommands.BeginUpdate method. 10180type VirtualMachineScaleSetVMRunCommandsBeginUpdateOptions struct { 10181 // placeholder for future optional parameters 10182} 10183 10184// VirtualMachineScaleSetVMRunCommandsGetOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommands.Get method. 10185type VirtualMachineScaleSetVMRunCommandsGetOptions struct { 10186 // The expand expression to apply on the operation. 10187 Expand *string 10188} 10189 10190// VirtualMachineScaleSetVMRunCommandsListOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommands.List method. 10191type VirtualMachineScaleSetVMRunCommandsListOptions struct { 10192 // The expand expression to apply on the operation. 10193 Expand *string 10194} 10195 10196// VirtualMachineScaleSetVMsBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginDeallocate method. 10197type VirtualMachineScaleSetVMsBeginDeallocateOptions struct { 10198 // placeholder for future optional parameters 10199} 10200 10201// VirtualMachineScaleSetVMsBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginDelete method. 10202type VirtualMachineScaleSetVMsBeginDeleteOptions struct { 10203 // Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview) 10204 ForceDeletion *bool 10205} 10206 10207// VirtualMachineScaleSetVMsBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginPerformMaintenance method. 10208type VirtualMachineScaleSetVMsBeginPerformMaintenanceOptions struct { 10209 // placeholder for future optional parameters 10210} 10211 10212// VirtualMachineScaleSetVMsBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginPowerOff method. 10213type VirtualMachineScaleSetVMsBeginPowerOffOptions struct { 10214 // The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default 10215 // value for this flag is false if not specified 10216 SkipShutdown *bool 10217} 10218 10219// VirtualMachineScaleSetVMsBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginRedeploy method. 10220type VirtualMachineScaleSetVMsBeginRedeployOptions struct { 10221 // placeholder for future optional parameters 10222} 10223 10224// VirtualMachineScaleSetVMsBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginReimageAll method. 10225type VirtualMachineScaleSetVMsBeginReimageAllOptions struct { 10226 // placeholder for future optional parameters 10227} 10228 10229// VirtualMachineScaleSetVMsBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginReimage method. 10230type VirtualMachineScaleSetVMsBeginReimageOptions struct { 10231 // Parameters for the Reimaging Virtual machine in ScaleSet. 10232 VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters 10233} 10234 10235// VirtualMachineScaleSetVMsBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginRestart method. 10236type VirtualMachineScaleSetVMsBeginRestartOptions struct { 10237 // placeholder for future optional parameters 10238} 10239 10240// VirtualMachineScaleSetVMsBeginRunCommandOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginRunCommand method. 10241type VirtualMachineScaleSetVMsBeginRunCommandOptions struct { 10242 // placeholder for future optional parameters 10243} 10244 10245// VirtualMachineScaleSetVMsBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginStart method. 10246type VirtualMachineScaleSetVMsBeginStartOptions struct { 10247 // placeholder for future optional parameters 10248} 10249 10250// VirtualMachineScaleSetVMsBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMs.BeginUpdate method. 10251type VirtualMachineScaleSetVMsBeginUpdateOptions struct { 10252 // placeholder for future optional parameters 10253} 10254 10255// VirtualMachineScaleSetVMsGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetVMs.GetInstanceView method. 10256type VirtualMachineScaleSetVMsGetInstanceViewOptions struct { 10257 // placeholder for future optional parameters 10258} 10259 10260// VirtualMachineScaleSetVMsGetOptions contains the optional parameters for the VirtualMachineScaleSetVMs.Get method. 10261type VirtualMachineScaleSetVMsGetOptions struct { 10262 // The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine. 'UserData' will retrieve the 10263 // UserData of the virtual machine. 10264 Expand *InstanceViewTypes 10265} 10266 10267// VirtualMachineScaleSetVMsListOptions contains the optional parameters for the VirtualMachineScaleSetVMs.List method. 10268type VirtualMachineScaleSetVMsListOptions struct { 10269 // The expand expression to apply to the operation. Allowed values are 'instanceView'. 10270 Expand *string 10271 // The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied 10272 // eq true', 'properties/latestModelApplied eq false'. 10273 Filter *string 10274 // The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. 10275 Select *string 10276} 10277 10278// VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachineScaleSetVMs.RetrieveBootDiagnosticsData 10279// method. 10280type VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptions struct { 10281 // Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with 10282 // a default expiration duration of 120 minutes. 10283 SasURIExpirationTimeInMinutes *int32 10284} 10285 10286// VirtualMachineScaleSetVMsSimulateEvictionOptions contains the optional parameters for the VirtualMachineScaleSetVMs.SimulateEviction method. 10287type VirtualMachineScaleSetVMsSimulateEvictionOptions struct { 10288 // placeholder for future optional parameters 10289} 10290 10291// VirtualMachineScaleSetsBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSets.BeginCreateOrUpdate method. 10292type VirtualMachineScaleSetsBeginCreateOrUpdateOptions struct { 10293 // placeholder for future optional parameters 10294} 10295 10296// VirtualMachineScaleSetsBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSets.BeginDeallocate method. 10297type VirtualMachineScaleSetsBeginDeallocateOptions struct { 10298 // A list of virtual machine instance IDs from the VM scale set. 10299 VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs 10300} 10301 10302// VirtualMachineScaleSetsBeginDeleteInstancesOptions contains the optional parameters for the VirtualMachineScaleSets.BeginDeleteInstances method. 10303type VirtualMachineScaleSetsBeginDeleteInstancesOptions struct { 10304 // Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) 10305 ForceDeletion *bool 10306} 10307 10308// VirtualMachineScaleSetsBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSets.BeginDelete method. 10309type VirtualMachineScaleSetsBeginDeleteOptions struct { 10310 // Optional parameter to force delete a VM scale set. (Feature in Preview) 10311 ForceDeletion *bool 10312} 10313 10314// VirtualMachineScaleSetsBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSets.BeginPerformMaintenance method. 10315type VirtualMachineScaleSetsBeginPerformMaintenanceOptions struct { 10316 // A list of virtual machine instance IDs from the VM scale set. 10317 VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs 10318} 10319 10320// VirtualMachineScaleSetsBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSets.BeginPowerOff method. 10321type VirtualMachineScaleSetsBeginPowerOffOptions struct { 10322 // The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default 10323 // value for this flag is false if not specified 10324 SkipShutdown *bool 10325 // A list of virtual machine instance IDs from the VM scale set. 10326 VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs 10327} 10328 10329// VirtualMachineScaleSetsBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSets.BeginRedeploy method. 10330type VirtualMachineScaleSetsBeginRedeployOptions struct { 10331 // A list of virtual machine instance IDs from the VM scale set. 10332 VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs 10333} 10334 10335// VirtualMachineScaleSetsBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSets.BeginReimageAll method. 10336type VirtualMachineScaleSetsBeginReimageAllOptions struct { 10337 // A list of virtual machine instance IDs from the VM scale set. 10338 VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs 10339} 10340 10341// VirtualMachineScaleSetsBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSets.BeginReimage method. 10342type VirtualMachineScaleSetsBeginReimageOptions struct { 10343 // Parameters for Reimaging VM ScaleSet. 10344 VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters 10345} 10346 10347// VirtualMachineScaleSetsBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSets.BeginRestart method. 10348type VirtualMachineScaleSetsBeginRestartOptions struct { 10349 // A list of virtual machine instance IDs from the VM scale set. 10350 VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs 10351} 10352 10353// VirtualMachineScaleSetsBeginSetOrchestrationServiceStateOptions contains the optional parameters for the VirtualMachineScaleSets.BeginSetOrchestrationServiceState 10354// method. 10355type VirtualMachineScaleSetsBeginSetOrchestrationServiceStateOptions struct { 10356 // placeholder for future optional parameters 10357} 10358 10359// VirtualMachineScaleSetsBeginStartOptions contains the optional parameters for the VirtualMachineScaleSets.BeginStart method. 10360type VirtualMachineScaleSetsBeginStartOptions struct { 10361 // A list of virtual machine instance IDs from the VM scale set. 10362 VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs 10363} 10364 10365// VirtualMachineScaleSetsBeginUpdateInstancesOptions contains the optional parameters for the VirtualMachineScaleSets.BeginUpdateInstances method. 10366type VirtualMachineScaleSetsBeginUpdateInstancesOptions struct { 10367 // placeholder for future optional parameters 10368} 10369 10370// VirtualMachineScaleSetsBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSets.BeginUpdate method. 10371type VirtualMachineScaleSetsBeginUpdateOptions struct { 10372 // placeholder for future optional parameters 10373} 10374 10375// VirtualMachineScaleSetsConvertToSinglePlacementGroupOptions contains the optional parameters for the VirtualMachineScaleSets.ConvertToSinglePlacementGroup 10376// method. 10377type VirtualMachineScaleSetsConvertToSinglePlacementGroupOptions struct { 10378 // placeholder for future optional parameters 10379} 10380 10381// VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions contains the optional parameters for the VirtualMachineScaleSets.ForceRecoveryServiceFabricPlatformUpdateDomainWalk 10382// method. 10383type VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions struct { 10384 // placeholder for future optional parameters 10385} 10386 10387// VirtualMachineScaleSetsGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSets.GetInstanceView method. 10388type VirtualMachineScaleSetsGetInstanceViewOptions struct { 10389 // placeholder for future optional parameters 10390} 10391 10392// VirtualMachineScaleSetsGetOSUpgradeHistoryOptions contains the optional parameters for the VirtualMachineScaleSets.GetOSUpgradeHistory method. 10393type VirtualMachineScaleSetsGetOSUpgradeHistoryOptions struct { 10394 // placeholder for future optional parameters 10395} 10396 10397// VirtualMachineScaleSetsGetOptions contains the optional parameters for the VirtualMachineScaleSets.Get method. 10398type VirtualMachineScaleSetsGetOptions struct { 10399 // The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was provided by the user during 10400 // the VM scale set Create/Update operation 10401 Expand *ExpandTypesForGetVMScaleSets 10402} 10403 10404// VirtualMachineScaleSetsListAllOptions contains the optional parameters for the VirtualMachineScaleSets.ListAll method. 10405type VirtualMachineScaleSetsListAllOptions struct { 10406 // placeholder for future optional parameters 10407} 10408 10409// VirtualMachineScaleSetsListByLocationOptions contains the optional parameters for the VirtualMachineScaleSets.ListByLocation method. 10410type VirtualMachineScaleSetsListByLocationOptions struct { 10411 // placeholder for future optional parameters 10412} 10413 10414// VirtualMachineScaleSetsListOptions contains the optional parameters for the VirtualMachineScaleSets.List method. 10415type VirtualMachineScaleSetsListOptions struct { 10416 // placeholder for future optional parameters 10417} 10418 10419// VirtualMachineScaleSetsListSKUsOptions contains the optional parameters for the VirtualMachineScaleSets.ListSKUs method. 10420type VirtualMachineScaleSetsListSKUsOptions struct { 10421 // placeholder for future optional parameters 10422} 10423 10424// VirtualMachineSize - Describes the properties of a VM size. 10425type VirtualMachineSize struct { 10426 // The maximum number of data disks that can be attached to the virtual machine size. 10427 MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"` 10428 10429 // The amount of memory, in MB, supported by the virtual machine size. 10430 MemoryInMB *int32 `json:"memoryInMB,omitempty"` 10431 10432 // The name of the virtual machine size. 10433 Name *string `json:"name,omitempty"` 10434 10435 // The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that 10436 // the VM uses. For accurate vCPU count, please 10437 // refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list 10438 NumberOfCores *int32 `json:"numberOfCores,omitempty"` 10439 10440 // The OS disk size, in MB, allowed by the virtual machine size. 10441 OSDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"` 10442 10443 // The resource disk size, in MB, allowed by the virtual machine size. 10444 ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"` 10445} 10446 10447// VirtualMachineSizeListResult - The List Virtual Machine operation response. 10448type VirtualMachineSizeListResult struct { 10449 // The list of virtual machine sizes. 10450 Value []*VirtualMachineSize `json:"value,omitempty"` 10451} 10452 10453// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSizeListResult. 10454func (v VirtualMachineSizeListResult) MarshalJSON() ([]byte, error) { 10455 objectMap := make(map[string]interface{}) 10456 populate(objectMap, "value", v.Value) 10457 return json.Marshal(objectMap) 10458} 10459 10460// VirtualMachineSizesListOptions contains the optional parameters for the VirtualMachineSizes.List method. 10461type VirtualMachineSizesListOptions struct { 10462 // placeholder for future optional parameters 10463} 10464 10465// VirtualMachineSoftwarePatchProperties - Describes the properties of a Virtual Machine software patch. 10466type VirtualMachineSoftwarePatchProperties struct { 10467 // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. 10468 ActivityID *string `json:"activityId,omitempty" azure:"ro"` 10469 10470 // READ-ONLY; Describes the availability of a given patch. 10471 AssessmentState *PatchAssessmentState `json:"assessmentState,omitempty" azure:"ro"` 10472 10473 // READ-ONLY; The classification(s) of the patch as provided by the patch publisher. 10474 Classifications []*string `json:"classifications,omitempty" azure:"ro"` 10475 10476 // READ-ONLY; The KBID of the patch. Only applies to Windows patches. 10477 KbID *string `json:"kbId,omitempty" azure:"ro"` 10478 10479 // READ-ONLY; The UTC timestamp of the last update to this patch record. 10480 LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" azure:"ro"` 10481 10482 // READ-ONLY; The friendly name of the patch. 10483 Name *string `json:"name,omitempty" azure:"ro"` 10484 10485 // READ-ONLY; A unique identifier for the patch. 10486 PatchID *string `json:"patchId,omitempty" azure:"ro"` 10487 10488 // READ-ONLY; The UTC timestamp when the repository published this patch. 10489 PublishedDate *time.Time `json:"publishedDate,omitempty" azure:"ro"` 10490 10491 // READ-ONLY; Describes the reboot requirements of the patch. 10492 RebootBehavior *VMGuestPatchRebootBehavior `json:"rebootBehavior,omitempty" azure:"ro"` 10493 10494 // READ-ONLY; The version number of the patch. This property applies only to Linux patches. 10495 Version *string `json:"version,omitempty" azure:"ro"` 10496} 10497 10498// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSoftwarePatchProperties. 10499func (v VirtualMachineSoftwarePatchProperties) MarshalJSON() ([]byte, error) { 10500 objectMap := make(map[string]interface{}) 10501 populate(objectMap, "activityId", v.ActivityID) 10502 populate(objectMap, "assessmentState", v.AssessmentState) 10503 populate(objectMap, "classifications", v.Classifications) 10504 populate(objectMap, "kbId", v.KbID) 10505 populate(objectMap, "lastModifiedDateTime", (*timeRFC3339)(v.LastModifiedDateTime)) 10506 populate(objectMap, "name", v.Name) 10507 populate(objectMap, "patchId", v.PatchID) 10508 populate(objectMap, "publishedDate", (*timeRFC3339)(v.PublishedDate)) 10509 populate(objectMap, "rebootBehavior", v.RebootBehavior) 10510 populate(objectMap, "version", v.Version) 10511 return json.Marshal(objectMap) 10512} 10513 10514// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSoftwarePatchProperties. 10515func (v *VirtualMachineSoftwarePatchProperties) UnmarshalJSON(data []byte) error { 10516 var rawMsg map[string]json.RawMessage 10517 if err := json.Unmarshal(data, &rawMsg); err != nil { 10518 return err 10519 } 10520 for key, val := range rawMsg { 10521 var err error 10522 switch key { 10523 case "activityId": 10524 err = unpopulate(val, &v.ActivityID) 10525 delete(rawMsg, key) 10526 case "assessmentState": 10527 err = unpopulate(val, &v.AssessmentState) 10528 delete(rawMsg, key) 10529 case "classifications": 10530 err = unpopulate(val, &v.Classifications) 10531 delete(rawMsg, key) 10532 case "kbId": 10533 err = unpopulate(val, &v.KbID) 10534 delete(rawMsg, key) 10535 case "lastModifiedDateTime": 10536 var aux timeRFC3339 10537 err = unpopulate(val, &aux) 10538 v.LastModifiedDateTime = (*time.Time)(&aux) 10539 delete(rawMsg, key) 10540 case "name": 10541 err = unpopulate(val, &v.Name) 10542 delete(rawMsg, key) 10543 case "patchId": 10544 err = unpopulate(val, &v.PatchID) 10545 delete(rawMsg, key) 10546 case "publishedDate": 10547 var aux timeRFC3339 10548 err = unpopulate(val, &aux) 10549 v.PublishedDate = (*time.Time)(&aux) 10550 delete(rawMsg, key) 10551 case "rebootBehavior": 10552 err = unpopulate(val, &v.RebootBehavior) 10553 delete(rawMsg, key) 10554 case "version": 10555 err = unpopulate(val, &v.Version) 10556 delete(rawMsg, key) 10557 } 10558 if err != nil { 10559 return err 10560 } 10561 } 10562 return nil 10563} 10564 10565// VirtualMachineStatusCodeCount - The status code and count of the virtual machine scale set instance view status summary. 10566type VirtualMachineStatusCodeCount struct { 10567 // READ-ONLY; The instance view status code. 10568 Code *string `json:"code,omitempty" azure:"ro"` 10569 10570 // READ-ONLY; The number of instances having a particular status code. 10571 Count *int32 `json:"count,omitempty" azure:"ro"` 10572} 10573 10574// VirtualMachineUpdate - Describes a Virtual Machine Update. 10575type VirtualMachineUpdate struct { 10576 UpdateResource 10577 // The identity of the virtual machine, if configured. 10578 Identity *VirtualMachineIdentity `json:"identity,omitempty"` 10579 10580 // Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can 10581 // use a marketplace image from an API, you must 10582 // enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, 10583 // Get Started ->. Enter any required 10584 // information and then click Save. 10585 Plan *Plan `json:"plan,omitempty"` 10586 10587 // Describes the properties of a Virtual Machine. 10588 Properties *VirtualMachineProperties `json:"properties,omitempty"` 10589 10590 // The virtual machine zones. 10591 Zones []*string `json:"zones,omitempty"` 10592} 10593 10594// MarshalJSON implements the json.Marshaller interface for type VirtualMachineUpdate. 10595func (v VirtualMachineUpdate) MarshalJSON() ([]byte, error) { 10596 objectMap := v.UpdateResource.marshalInternal() 10597 populate(objectMap, "identity", v.Identity) 10598 populate(objectMap, "plan", v.Plan) 10599 populate(objectMap, "properties", v.Properties) 10600 populate(objectMap, "zones", v.Zones) 10601 return json.Marshal(objectMap) 10602} 10603 10604// VirtualMachinesBeginAssessPatchesOptions contains the optional parameters for the VirtualMachines.BeginAssessPatches method. 10605type VirtualMachinesBeginAssessPatchesOptions struct { 10606 // placeholder for future optional parameters 10607} 10608 10609// VirtualMachinesBeginCaptureOptions contains the optional parameters for the VirtualMachines.BeginCapture method. 10610type VirtualMachinesBeginCaptureOptions struct { 10611 // placeholder for future optional parameters 10612} 10613 10614// VirtualMachinesBeginConvertToManagedDisksOptions contains the optional parameters for the VirtualMachines.BeginConvertToManagedDisks method. 10615type VirtualMachinesBeginConvertToManagedDisksOptions struct { 10616 // placeholder for future optional parameters 10617} 10618 10619// VirtualMachinesBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachines.BeginCreateOrUpdate method. 10620type VirtualMachinesBeginCreateOrUpdateOptions struct { 10621 // placeholder for future optional parameters 10622} 10623 10624// VirtualMachinesBeginDeallocateOptions contains the optional parameters for the VirtualMachines.BeginDeallocate method. 10625type VirtualMachinesBeginDeallocateOptions struct { 10626 // placeholder for future optional parameters 10627} 10628 10629// VirtualMachinesBeginDeleteOptions contains the optional parameters for the VirtualMachines.BeginDelete method. 10630type VirtualMachinesBeginDeleteOptions struct { 10631 // Optional parameter to force delete virtual machines.(Feature in Preview) 10632 ForceDeletion *bool 10633} 10634 10635// VirtualMachinesBeginInstallPatchesOptions contains the optional parameters for the VirtualMachines.BeginInstallPatches method. 10636type VirtualMachinesBeginInstallPatchesOptions struct { 10637 // placeholder for future optional parameters 10638} 10639 10640// VirtualMachinesBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachines.BeginPerformMaintenance method. 10641type VirtualMachinesBeginPerformMaintenanceOptions struct { 10642 // placeholder for future optional parameters 10643} 10644 10645// VirtualMachinesBeginPowerOffOptions contains the optional parameters for the VirtualMachines.BeginPowerOff method. 10646type VirtualMachinesBeginPowerOffOptions struct { 10647 // The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default 10648 // value for this flag is false if not specified 10649 SkipShutdown *bool 10650} 10651 10652// VirtualMachinesBeginReapplyOptions contains the optional parameters for the VirtualMachines.BeginReapply method. 10653type VirtualMachinesBeginReapplyOptions struct { 10654 // placeholder for future optional parameters 10655} 10656 10657// VirtualMachinesBeginRedeployOptions contains the optional parameters for the VirtualMachines.BeginRedeploy method. 10658type VirtualMachinesBeginRedeployOptions struct { 10659 // placeholder for future optional parameters 10660} 10661 10662// VirtualMachinesBeginReimageOptions contains the optional parameters for the VirtualMachines.BeginReimage method. 10663type VirtualMachinesBeginReimageOptions struct { 10664 // Parameters supplied to the Reimage Virtual Machine operation. 10665 Parameters *VirtualMachineReimageParameters 10666} 10667 10668// VirtualMachinesBeginRestartOptions contains the optional parameters for the VirtualMachines.BeginRestart method. 10669type VirtualMachinesBeginRestartOptions struct { 10670 // placeholder for future optional parameters 10671} 10672 10673// VirtualMachinesBeginRunCommandOptions contains the optional parameters for the VirtualMachines.BeginRunCommand method. 10674type VirtualMachinesBeginRunCommandOptions struct { 10675 // placeholder for future optional parameters 10676} 10677 10678// VirtualMachinesBeginStartOptions contains the optional parameters for the VirtualMachines.BeginStart method. 10679type VirtualMachinesBeginStartOptions struct { 10680 // placeholder for future optional parameters 10681} 10682 10683// VirtualMachinesBeginUpdateOptions contains the optional parameters for the VirtualMachines.BeginUpdate method. 10684type VirtualMachinesBeginUpdateOptions struct { 10685 // placeholder for future optional parameters 10686} 10687 10688// VirtualMachinesGeneralizeOptions contains the optional parameters for the VirtualMachines.Generalize method. 10689type VirtualMachinesGeneralizeOptions struct { 10690 // placeholder for future optional parameters 10691} 10692 10693// VirtualMachinesGetOptions contains the optional parameters for the VirtualMachines.Get method. 10694type VirtualMachinesGetOptions struct { 10695 // The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the virtual machine that is managed 10696 // by the platform and can change outside of control plane operations. 'UserData' retrieves the UserData property as part of the VM model view that was 10697 // provided by the user during the VM Create/Update operation. 10698 Expand *InstanceViewTypes 10699} 10700 10701// VirtualMachinesInstanceViewOptions contains the optional parameters for the VirtualMachines.InstanceView method. 10702type VirtualMachinesInstanceViewOptions struct { 10703 // placeholder for future optional parameters 10704} 10705 10706// VirtualMachinesListAllOptions contains the optional parameters for the VirtualMachines.ListAll method. 10707type VirtualMachinesListAllOptions struct { 10708 // statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. 10709 StatusOnly *string 10710} 10711 10712// VirtualMachinesListAvailableSizesOptions contains the optional parameters for the VirtualMachines.ListAvailableSizes method. 10713type VirtualMachinesListAvailableSizesOptions struct { 10714 // placeholder for future optional parameters 10715} 10716 10717// VirtualMachinesListByLocationOptions contains the optional parameters for the VirtualMachines.ListByLocation method. 10718type VirtualMachinesListByLocationOptions struct { 10719 // placeholder for future optional parameters 10720} 10721 10722// VirtualMachinesListOptions contains the optional parameters for the VirtualMachines.List method. 10723type VirtualMachinesListOptions struct { 10724 // placeholder for future optional parameters 10725} 10726 10727// VirtualMachinesRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachines.RetrieveBootDiagnosticsData method. 10728type VirtualMachinesRetrieveBootDiagnosticsDataOptions struct { 10729 // Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with 10730 // a default expiration duration of 120 minutes. 10731 SasURIExpirationTimeInMinutes *int32 10732} 10733 10734// VirtualMachinesSimulateEvictionOptions contains the optional parameters for the VirtualMachines.SimulateEviction method. 10735type VirtualMachinesSimulateEvictionOptions struct { 10736 // placeholder for future optional parameters 10737} 10738 10739// WinRMConfiguration - Describes Windows Remote Management configuration of the VM 10740type WinRMConfiguration struct { 10741 // The list of Windows Remote Management listeners 10742 Listeners []*WinRMListener `json:"listeners,omitempty"` 10743} 10744 10745// MarshalJSON implements the json.Marshaller interface for type WinRMConfiguration. 10746func (w WinRMConfiguration) MarshalJSON() ([]byte, error) { 10747 objectMap := make(map[string]interface{}) 10748 populate(objectMap, "listeners", w.Listeners) 10749 return json.Marshal(objectMap) 10750} 10751 10752// WinRMListener - Describes Protocol and thumbprint of Windows Remote Management listener 10753type WinRMListener struct { 10754 // This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see Add a key or secret to the 10755 // key vault 10756 // [https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add]. In this case, your certificate needs to be It is the Base64 encoding of the 10757 // following JSON Object which is encoded in UTF-8: 10758 // { 10759 // "data":"", 10760 // "dataType":"pfx", 10761 // "password":"" 10762 // } 10763 CertificateURL *string `json:"certificateUrl,omitempty"` 10764 10765 // Specifies the protocol of WinRM listener. 10766 // Possible values are: 10767 // http 10768 // https 10769 Protocol *ProtocolTypes `json:"protocol,omitempty"` 10770} 10771 10772// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. 10773type WindowsConfiguration struct { 10774 // Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. 10775 AdditionalUnattendContent []*AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"` 10776 10777 // Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. 10778 // For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. 10779 EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` 10780 10781 // [Preview Feature] Specifies settings related to VM Guest Patching on Windows. 10782 PatchSettings *PatchSettings `json:"patchSettings,omitempty"` 10783 10784 // Indicates whether virtual machine agent should be provisioned on the virtual machine. 10785 // When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM 10786 // so that extensions can be added to the VM later. 10787 ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` 10788 10789 // Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". 10790 // Possible values can be TimeZoneInfo.Id [https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id] value from time zones returned 10791 // by TimeZoneInfo.GetSystemTimeZones 10792 // [https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones]. 10793 TimeZone *string `json:"timeZone,omitempty"` 10794 10795 // Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. 10796 WinRM *WinRMConfiguration `json:"winRM,omitempty"` 10797} 10798 10799// MarshalJSON implements the json.Marshaller interface for type WindowsConfiguration. 10800func (w WindowsConfiguration) MarshalJSON() ([]byte, error) { 10801 objectMap := make(map[string]interface{}) 10802 populate(objectMap, "additionalUnattendContent", w.AdditionalUnattendContent) 10803 populate(objectMap, "enableAutomaticUpdates", w.EnableAutomaticUpdates) 10804 populate(objectMap, "patchSettings", w.PatchSettings) 10805 populate(objectMap, "provisionVMAgent", w.ProvisionVMAgent) 10806 populate(objectMap, "timeZone", w.TimeZone) 10807 populate(objectMap, "winRM", w.WinRM) 10808 return json.Marshal(objectMap) 10809} 10810 10811// WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API 10812type WindowsParameters struct { 10813 // The update classifications to select when installing patches for Windows. 10814 ClassificationsToInclude []*VMGuestPatchClassificationWindows `json:"classificationsToInclude,omitempty"` 10815 10816 // Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. 10817 ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"` 10818 10819 // Kbs to exclude in the patch operation 10820 KbNumbersToExclude []*string `json:"kbNumbersToExclude,omitempty"` 10821 10822 // Kbs to include in the patch operation 10823 KbNumbersToInclude []*string `json:"kbNumbersToInclude,omitempty"` 10824 10825 // This is used to install patches that were published on or before this given max published date. 10826 MaxPatchPublishDate *time.Time `json:"maxPatchPublishDate,omitempty"` 10827} 10828 10829// MarshalJSON implements the json.Marshaller interface for type WindowsParameters. 10830func (w WindowsParameters) MarshalJSON() ([]byte, error) { 10831 objectMap := make(map[string]interface{}) 10832 populate(objectMap, "classificationsToInclude", w.ClassificationsToInclude) 10833 populate(objectMap, "excludeKbsRequiringReboot", w.ExcludeKbsRequiringReboot) 10834 populate(objectMap, "kbNumbersToExclude", w.KbNumbersToExclude) 10835 populate(objectMap, "kbNumbersToInclude", w.KbNumbersToInclude) 10836 populate(objectMap, "maxPatchPublishDate", (*timeRFC3339)(w.MaxPatchPublishDate)) 10837 return json.Marshal(objectMap) 10838} 10839 10840// UnmarshalJSON implements the json.Unmarshaller interface for type WindowsParameters. 10841func (w *WindowsParameters) UnmarshalJSON(data []byte) error { 10842 var rawMsg map[string]json.RawMessage 10843 if err := json.Unmarshal(data, &rawMsg); err != nil { 10844 return err 10845 } 10846 for key, val := range rawMsg { 10847 var err error 10848 switch key { 10849 case "classificationsToInclude": 10850 err = unpopulate(val, &w.ClassificationsToInclude) 10851 delete(rawMsg, key) 10852 case "excludeKbsRequiringReboot": 10853 err = unpopulate(val, &w.ExcludeKbsRequiringReboot) 10854 delete(rawMsg, key) 10855 case "kbNumbersToExclude": 10856 err = unpopulate(val, &w.KbNumbersToExclude) 10857 delete(rawMsg, key) 10858 case "kbNumbersToInclude": 10859 err = unpopulate(val, &w.KbNumbersToInclude) 10860 delete(rawMsg, key) 10861 case "maxPatchPublishDate": 10862 var aux timeRFC3339 10863 err = unpopulate(val, &aux) 10864 w.MaxPatchPublishDate = (*time.Time)(&aux) 10865 delete(rawMsg, key) 10866 } 10867 if err != nil { 10868 return err 10869 } 10870 } 10871 return nil 10872} 10873 10874func populate(m map[string]interface{}, k string, v interface{}) { 10875 if v == nil { 10876 return 10877 } else if azcore.IsNullValue(v) { 10878 m[k] = nil 10879 } else if !reflect.ValueOf(v).IsNil() { 10880 m[k] = v 10881 } 10882} 10883 10884func unpopulate(data json.RawMessage, v interface{}) error { 10885 if data == nil { 10886 return nil 10887 } 10888 return json.Unmarshal(data, v) 10889} 10890