1package compute 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "context" 22 "encoding/json" 23 "github.com/Azure/go-autorest/autorest" 24 "github.com/Azure/go-autorest/autorest/azure" 25 "github.com/Azure/go-autorest/autorest/date" 26 "github.com/Azure/go-autorest/autorest/to" 27 "github.com/Azure/go-autorest/tracing" 28 "net/http" 29) 30 31// The package's fully qualified name. 32const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" 33 34// AccessLevel enumerates the values for access level. 35type AccessLevel string 36 37const ( 38 // None ... 39 None AccessLevel = "None" 40 // Read ... 41 Read AccessLevel = "Read" 42) 43 44// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type. 45func PossibleAccessLevelValues() []AccessLevel { 46 return []AccessLevel{None, Read} 47} 48 49// AggregatedReplicationState enumerates the values for aggregated replication state. 50type AggregatedReplicationState string 51 52const ( 53 // Completed ... 54 Completed AggregatedReplicationState = "Completed" 55 // Failed ... 56 Failed AggregatedReplicationState = "Failed" 57 // InProgress ... 58 InProgress AggregatedReplicationState = "InProgress" 59 // Unknown ... 60 Unknown AggregatedReplicationState = "Unknown" 61) 62 63// PossibleAggregatedReplicationStateValues returns an array of possible values for the AggregatedReplicationState const type. 64func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState { 65 return []AggregatedReplicationState{Completed, Failed, InProgress, Unknown} 66} 67 68// AvailabilitySetSkuTypes enumerates the values for availability set sku types. 69type AvailabilitySetSkuTypes string 70 71const ( 72 // Aligned ... 73 Aligned AvailabilitySetSkuTypes = "Aligned" 74 // Classic ... 75 Classic AvailabilitySetSkuTypes = "Classic" 76) 77 78// PossibleAvailabilitySetSkuTypesValues returns an array of possible values for the AvailabilitySetSkuTypes const type. 79func PossibleAvailabilitySetSkuTypesValues() []AvailabilitySetSkuTypes { 80 return []AvailabilitySetSkuTypes{Aligned, Classic} 81} 82 83// CachingTypes enumerates the values for caching types. 84type CachingTypes string 85 86const ( 87 // CachingTypesNone ... 88 CachingTypesNone CachingTypes = "None" 89 // CachingTypesReadOnly ... 90 CachingTypesReadOnly CachingTypes = "ReadOnly" 91 // CachingTypesReadWrite ... 92 CachingTypesReadWrite CachingTypes = "ReadWrite" 93) 94 95// PossibleCachingTypesValues returns an array of possible values for the CachingTypes const type. 96func PossibleCachingTypesValues() []CachingTypes { 97 return []CachingTypes{CachingTypesNone, CachingTypesReadOnly, CachingTypesReadWrite} 98} 99 100// ComponentNames enumerates the values for component names. 101type ComponentNames string 102 103const ( 104 // MicrosoftWindowsShellSetup ... 105 MicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup" 106) 107 108// PossibleComponentNamesValues returns an array of possible values for the ComponentNames const type. 109func PossibleComponentNamesValues() []ComponentNames { 110 return []ComponentNames{MicrosoftWindowsShellSetup} 111} 112 113// ContainerServiceOrchestratorTypes enumerates the values for container service orchestrator types. 114type ContainerServiceOrchestratorTypes string 115 116const ( 117 // Custom ... 118 Custom ContainerServiceOrchestratorTypes = "Custom" 119 // DCOS ... 120 DCOS ContainerServiceOrchestratorTypes = "DCOS" 121 // Kubernetes ... 122 Kubernetes ContainerServiceOrchestratorTypes = "Kubernetes" 123 // Swarm ... 124 Swarm ContainerServiceOrchestratorTypes = "Swarm" 125) 126 127// PossibleContainerServiceOrchestratorTypesValues returns an array of possible values for the ContainerServiceOrchestratorTypes const type. 128func PossibleContainerServiceOrchestratorTypesValues() []ContainerServiceOrchestratorTypes { 129 return []ContainerServiceOrchestratorTypes{Custom, DCOS, Kubernetes, Swarm} 130} 131 132// ContainerServiceVMSizeTypes enumerates the values for container service vm size types. 133type ContainerServiceVMSizeTypes string 134 135const ( 136 // StandardA0 ... 137 StandardA0 ContainerServiceVMSizeTypes = "Standard_A0" 138 // StandardA1 ... 139 StandardA1 ContainerServiceVMSizeTypes = "Standard_A1" 140 // StandardA10 ... 141 StandardA10 ContainerServiceVMSizeTypes = "Standard_A10" 142 // StandardA11 ... 143 StandardA11 ContainerServiceVMSizeTypes = "Standard_A11" 144 // StandardA2 ... 145 StandardA2 ContainerServiceVMSizeTypes = "Standard_A2" 146 // StandardA3 ... 147 StandardA3 ContainerServiceVMSizeTypes = "Standard_A3" 148 // StandardA4 ... 149 StandardA4 ContainerServiceVMSizeTypes = "Standard_A4" 150 // StandardA5 ... 151 StandardA5 ContainerServiceVMSizeTypes = "Standard_A5" 152 // StandardA6 ... 153 StandardA6 ContainerServiceVMSizeTypes = "Standard_A6" 154 // StandardA7 ... 155 StandardA7 ContainerServiceVMSizeTypes = "Standard_A7" 156 // StandardA8 ... 157 StandardA8 ContainerServiceVMSizeTypes = "Standard_A8" 158 // StandardA9 ... 159 StandardA9 ContainerServiceVMSizeTypes = "Standard_A9" 160 // StandardD1 ... 161 StandardD1 ContainerServiceVMSizeTypes = "Standard_D1" 162 // StandardD11 ... 163 StandardD11 ContainerServiceVMSizeTypes = "Standard_D11" 164 // StandardD11V2 ... 165 StandardD11V2 ContainerServiceVMSizeTypes = "Standard_D11_v2" 166 // StandardD12 ... 167 StandardD12 ContainerServiceVMSizeTypes = "Standard_D12" 168 // StandardD12V2 ... 169 StandardD12V2 ContainerServiceVMSizeTypes = "Standard_D12_v2" 170 // StandardD13 ... 171 StandardD13 ContainerServiceVMSizeTypes = "Standard_D13" 172 // StandardD13V2 ... 173 StandardD13V2 ContainerServiceVMSizeTypes = "Standard_D13_v2" 174 // StandardD14 ... 175 StandardD14 ContainerServiceVMSizeTypes = "Standard_D14" 176 // StandardD14V2 ... 177 StandardD14V2 ContainerServiceVMSizeTypes = "Standard_D14_v2" 178 // StandardD1V2 ... 179 StandardD1V2 ContainerServiceVMSizeTypes = "Standard_D1_v2" 180 // StandardD2 ... 181 StandardD2 ContainerServiceVMSizeTypes = "Standard_D2" 182 // StandardD2V2 ... 183 StandardD2V2 ContainerServiceVMSizeTypes = "Standard_D2_v2" 184 // StandardD3 ... 185 StandardD3 ContainerServiceVMSizeTypes = "Standard_D3" 186 // StandardD3V2 ... 187 StandardD3V2 ContainerServiceVMSizeTypes = "Standard_D3_v2" 188 // StandardD4 ... 189 StandardD4 ContainerServiceVMSizeTypes = "Standard_D4" 190 // StandardD4V2 ... 191 StandardD4V2 ContainerServiceVMSizeTypes = "Standard_D4_v2" 192 // StandardD5V2 ... 193 StandardD5V2 ContainerServiceVMSizeTypes = "Standard_D5_v2" 194 // StandardDS1 ... 195 StandardDS1 ContainerServiceVMSizeTypes = "Standard_DS1" 196 // StandardDS11 ... 197 StandardDS11 ContainerServiceVMSizeTypes = "Standard_DS11" 198 // StandardDS12 ... 199 StandardDS12 ContainerServiceVMSizeTypes = "Standard_DS12" 200 // StandardDS13 ... 201 StandardDS13 ContainerServiceVMSizeTypes = "Standard_DS13" 202 // StandardDS14 ... 203 StandardDS14 ContainerServiceVMSizeTypes = "Standard_DS14" 204 // StandardDS2 ... 205 StandardDS2 ContainerServiceVMSizeTypes = "Standard_DS2" 206 // StandardDS3 ... 207 StandardDS3 ContainerServiceVMSizeTypes = "Standard_DS3" 208 // StandardDS4 ... 209 StandardDS4 ContainerServiceVMSizeTypes = "Standard_DS4" 210 // StandardG1 ... 211 StandardG1 ContainerServiceVMSizeTypes = "Standard_G1" 212 // StandardG2 ... 213 StandardG2 ContainerServiceVMSizeTypes = "Standard_G2" 214 // StandardG3 ... 215 StandardG3 ContainerServiceVMSizeTypes = "Standard_G3" 216 // StandardG4 ... 217 StandardG4 ContainerServiceVMSizeTypes = "Standard_G4" 218 // StandardG5 ... 219 StandardG5 ContainerServiceVMSizeTypes = "Standard_G5" 220 // StandardGS1 ... 221 StandardGS1 ContainerServiceVMSizeTypes = "Standard_GS1" 222 // StandardGS2 ... 223 StandardGS2 ContainerServiceVMSizeTypes = "Standard_GS2" 224 // StandardGS3 ... 225 StandardGS3 ContainerServiceVMSizeTypes = "Standard_GS3" 226 // StandardGS4 ... 227 StandardGS4 ContainerServiceVMSizeTypes = "Standard_GS4" 228 // StandardGS5 ... 229 StandardGS5 ContainerServiceVMSizeTypes = "Standard_GS5" 230) 231 232// PossibleContainerServiceVMSizeTypesValues returns an array of possible values for the ContainerServiceVMSizeTypes const type. 233func PossibleContainerServiceVMSizeTypesValues() []ContainerServiceVMSizeTypes { 234 return []ContainerServiceVMSizeTypes{StandardA0, StandardA1, StandardA10, StandardA11, StandardA2, StandardA3, StandardA4, StandardA5, StandardA6, StandardA7, StandardA8, StandardA9, StandardD1, StandardD11, StandardD11V2, StandardD12, StandardD12V2, StandardD13, StandardD13V2, StandardD14, StandardD14V2, StandardD1V2, StandardD2, StandardD2V2, StandardD3, StandardD3V2, StandardD4, StandardD4V2, StandardD5V2, StandardDS1, StandardDS11, StandardDS12, StandardDS13, StandardDS14, StandardDS2, StandardDS3, StandardDS4, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS5} 235} 236 237// DiffDiskOptions enumerates the values for diff disk options. 238type DiffDiskOptions string 239 240const ( 241 // Local ... 242 Local DiffDiskOptions = "Local" 243) 244 245// PossibleDiffDiskOptionsValues returns an array of possible values for the DiffDiskOptions const type. 246func PossibleDiffDiskOptionsValues() []DiffDiskOptions { 247 return []DiffDiskOptions{Local} 248} 249 250// DiskCreateOption enumerates the values for disk create option. 251type DiskCreateOption string 252 253const ( 254 // Attach ... 255 Attach DiskCreateOption = "Attach" 256 // Copy ... 257 Copy DiskCreateOption = "Copy" 258 // Empty ... 259 Empty DiskCreateOption = "Empty" 260 // FromImage ... 261 FromImage DiskCreateOption = "FromImage" 262 // Import ... 263 Import DiskCreateOption = "Import" 264 // Restore ... 265 Restore DiskCreateOption = "Restore" 266) 267 268// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type. 269func PossibleDiskCreateOptionValues() []DiskCreateOption { 270 return []DiskCreateOption{Attach, Copy, Empty, FromImage, Import, Restore} 271} 272 273// DiskCreateOptionTypes enumerates the values for disk create option types. 274type DiskCreateOptionTypes string 275 276const ( 277 // DiskCreateOptionTypesAttach ... 278 DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach" 279 // DiskCreateOptionTypesEmpty ... 280 DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty" 281 // DiskCreateOptionTypesFromImage ... 282 DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage" 283) 284 285// PossibleDiskCreateOptionTypesValues returns an array of possible values for the DiskCreateOptionTypes const type. 286func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes { 287 return []DiskCreateOptionTypes{DiskCreateOptionTypesAttach, DiskCreateOptionTypesEmpty, DiskCreateOptionTypesFromImage} 288} 289 290// DiskStorageAccountTypes enumerates the values for disk storage account types. 291type DiskStorageAccountTypes string 292 293const ( 294 // PremiumLRS ... 295 PremiumLRS DiskStorageAccountTypes = "Premium_LRS" 296 // StandardLRS ... 297 StandardLRS DiskStorageAccountTypes = "Standard_LRS" 298 // StandardSSDLRS ... 299 StandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS" 300 // UltraSSDLRS ... 301 UltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS" 302) 303 304// PossibleDiskStorageAccountTypesValues returns an array of possible values for the DiskStorageAccountTypes const type. 305func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes { 306 return []DiskStorageAccountTypes{PremiumLRS, StandardLRS, StandardSSDLRS, UltraSSDLRS} 307} 308 309// HostCaching enumerates the values for host caching. 310type HostCaching string 311 312const ( 313 // HostCachingNone ... 314 HostCachingNone HostCaching = "None" 315 // HostCachingReadOnly ... 316 HostCachingReadOnly HostCaching = "ReadOnly" 317 // HostCachingReadWrite ... 318 HostCachingReadWrite HostCaching = "ReadWrite" 319) 320 321// PossibleHostCachingValues returns an array of possible values for the HostCaching const type. 322func PossibleHostCachingValues() []HostCaching { 323 return []HostCaching{HostCachingNone, HostCachingReadOnly, HostCachingReadWrite} 324} 325 326// InstanceViewTypes enumerates the values for instance view types. 327type InstanceViewTypes string 328 329const ( 330 // InstanceView ... 331 InstanceView InstanceViewTypes = "instanceView" 332) 333 334// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type. 335func PossibleInstanceViewTypesValues() []InstanceViewTypes { 336 return []InstanceViewTypes{InstanceView} 337} 338 339// IntervalInMins enumerates the values for interval in mins. 340type IntervalInMins string 341 342const ( 343 // FiveMins ... 344 FiveMins IntervalInMins = "FiveMins" 345 // SixtyMins ... 346 SixtyMins IntervalInMins = "SixtyMins" 347 // ThirtyMins ... 348 ThirtyMins IntervalInMins = "ThirtyMins" 349 // ThreeMins ... 350 ThreeMins IntervalInMins = "ThreeMins" 351) 352 353// PossibleIntervalInMinsValues returns an array of possible values for the IntervalInMins const type. 354func PossibleIntervalInMinsValues() []IntervalInMins { 355 return []IntervalInMins{FiveMins, SixtyMins, ThirtyMins, ThreeMins} 356} 357 358// IPVersion enumerates the values for ip version. 359type IPVersion string 360 361const ( 362 // IPv4 ... 363 IPv4 IPVersion = "IPv4" 364 // IPv6 ... 365 IPv6 IPVersion = "IPv6" 366) 367 368// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. 369func PossibleIPVersionValues() []IPVersion { 370 return []IPVersion{IPv4, IPv6} 371} 372 373// MaintenanceOperationResultCodeTypes enumerates the values for maintenance operation result code types. 374type MaintenanceOperationResultCodeTypes string 375 376const ( 377 // MaintenanceOperationResultCodeTypesMaintenanceAborted ... 378 MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = "MaintenanceAborted" 379 // MaintenanceOperationResultCodeTypesMaintenanceCompleted ... 380 MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted" 381 // MaintenanceOperationResultCodeTypesNone ... 382 MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = "None" 383 // MaintenanceOperationResultCodeTypesRetryLater ... 384 MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = "RetryLater" 385) 386 387// PossibleMaintenanceOperationResultCodeTypesValues returns an array of possible values for the MaintenanceOperationResultCodeTypes const type. 388func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes { 389 return []MaintenanceOperationResultCodeTypes{MaintenanceOperationResultCodeTypesMaintenanceAborted, MaintenanceOperationResultCodeTypesMaintenanceCompleted, MaintenanceOperationResultCodeTypesNone, MaintenanceOperationResultCodeTypesRetryLater} 390} 391 392// OperatingSystemStateTypes enumerates the values for operating system state types. 393type OperatingSystemStateTypes string 394 395const ( 396 // Generalized ... 397 Generalized OperatingSystemStateTypes = "Generalized" 398 // Specialized ... 399 Specialized OperatingSystemStateTypes = "Specialized" 400) 401 402// PossibleOperatingSystemStateTypesValues returns an array of possible values for the OperatingSystemStateTypes const type. 403func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes { 404 return []OperatingSystemStateTypes{Generalized, Specialized} 405} 406 407// OperatingSystemTypes enumerates the values for operating system types. 408type OperatingSystemTypes string 409 410const ( 411 // Linux ... 412 Linux OperatingSystemTypes = "Linux" 413 // Windows ... 414 Windows OperatingSystemTypes = "Windows" 415) 416 417// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type. 418func PossibleOperatingSystemTypesValues() []OperatingSystemTypes { 419 return []OperatingSystemTypes{Linux, Windows} 420} 421 422// PassNames enumerates the values for pass names. 423type PassNames string 424 425const ( 426 // OobeSystem ... 427 OobeSystem PassNames = "OobeSystem" 428) 429 430// PossiblePassNamesValues returns an array of possible values for the PassNames const type. 431func PossiblePassNamesValues() []PassNames { 432 return []PassNames{OobeSystem} 433} 434 435// ProtocolTypes enumerates the values for protocol types. 436type ProtocolTypes string 437 438const ( 439 // HTTP ... 440 HTTP ProtocolTypes = "Http" 441 // HTTPS ... 442 HTTPS ProtocolTypes = "Https" 443) 444 445// PossibleProtocolTypesValues returns an array of possible values for the ProtocolTypes const type. 446func PossibleProtocolTypesValues() []ProtocolTypes { 447 return []ProtocolTypes{HTTP, HTTPS} 448} 449 450// ProvisioningState enumerates the values for provisioning state. 451type ProvisioningState string 452 453const ( 454 // ProvisioningStateCreating ... 455 ProvisioningStateCreating ProvisioningState = "Creating" 456 // ProvisioningStateDeleting ... 457 ProvisioningStateDeleting ProvisioningState = "Deleting" 458 // ProvisioningStateFailed ... 459 ProvisioningStateFailed ProvisioningState = "Failed" 460 // ProvisioningStateMigrating ... 461 ProvisioningStateMigrating ProvisioningState = "Migrating" 462 // ProvisioningStateSucceeded ... 463 ProvisioningStateSucceeded ProvisioningState = "Succeeded" 464 // ProvisioningStateUpdating ... 465 ProvisioningStateUpdating ProvisioningState = "Updating" 466) 467 468// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. 469func PossibleProvisioningStateValues() []ProvisioningState { 470 return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateMigrating, ProvisioningStateSucceeded, ProvisioningStateUpdating} 471} 472 473// ProvisioningState1 enumerates the values for provisioning state 1. 474type ProvisioningState1 string 475 476const ( 477 // ProvisioningState1Creating ... 478 ProvisioningState1Creating ProvisioningState1 = "Creating" 479 // ProvisioningState1Deleting ... 480 ProvisioningState1Deleting ProvisioningState1 = "Deleting" 481 // ProvisioningState1Failed ... 482 ProvisioningState1Failed ProvisioningState1 = "Failed" 483 // ProvisioningState1Migrating ... 484 ProvisioningState1Migrating ProvisioningState1 = "Migrating" 485 // ProvisioningState1Succeeded ... 486 ProvisioningState1Succeeded ProvisioningState1 = "Succeeded" 487 // ProvisioningState1Updating ... 488 ProvisioningState1Updating ProvisioningState1 = "Updating" 489) 490 491// PossibleProvisioningState1Values returns an array of possible values for the ProvisioningState1 const type. 492func PossibleProvisioningState1Values() []ProvisioningState1 { 493 return []ProvisioningState1{ProvisioningState1Creating, ProvisioningState1Deleting, ProvisioningState1Failed, ProvisioningState1Migrating, ProvisioningState1Succeeded, ProvisioningState1Updating} 494} 495 496// ProvisioningState2 enumerates the values for provisioning state 2. 497type ProvisioningState2 string 498 499const ( 500 // ProvisioningState2Creating ... 501 ProvisioningState2Creating ProvisioningState2 = "Creating" 502 // ProvisioningState2Deleting ... 503 ProvisioningState2Deleting ProvisioningState2 = "Deleting" 504 // ProvisioningState2Failed ... 505 ProvisioningState2Failed ProvisioningState2 = "Failed" 506 // ProvisioningState2Migrating ... 507 ProvisioningState2Migrating ProvisioningState2 = "Migrating" 508 // ProvisioningState2Succeeded ... 509 ProvisioningState2Succeeded ProvisioningState2 = "Succeeded" 510 // ProvisioningState2Updating ... 511 ProvisioningState2Updating ProvisioningState2 = "Updating" 512) 513 514// PossibleProvisioningState2Values returns an array of possible values for the ProvisioningState2 const type. 515func PossibleProvisioningState2Values() []ProvisioningState2 { 516 return []ProvisioningState2{ProvisioningState2Creating, ProvisioningState2Deleting, ProvisioningState2Failed, ProvisioningState2Migrating, ProvisioningState2Succeeded, ProvisioningState2Updating} 517} 518 519// ReplicationState enumerates the values for replication state. 520type ReplicationState string 521 522const ( 523 // ReplicationStateCompleted ... 524 ReplicationStateCompleted ReplicationState = "Completed" 525 // ReplicationStateFailed ... 526 ReplicationStateFailed ReplicationState = "Failed" 527 // ReplicationStateReplicating ... 528 ReplicationStateReplicating ReplicationState = "Replicating" 529 // ReplicationStateUnknown ... 530 ReplicationStateUnknown ReplicationState = "Unknown" 531) 532 533// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type. 534func PossibleReplicationStateValues() []ReplicationState { 535 return []ReplicationState{ReplicationStateCompleted, ReplicationStateFailed, ReplicationStateReplicating, ReplicationStateUnknown} 536} 537 538// ReplicationStatusTypes enumerates the values for replication status types. 539type ReplicationStatusTypes string 540 541const ( 542 // ReplicationStatusTypesReplicationStatus ... 543 ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus" 544) 545 546// PossibleReplicationStatusTypesValues returns an array of possible values for the ReplicationStatusTypes const type. 547func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes { 548 return []ReplicationStatusTypes{ReplicationStatusTypesReplicationStatus} 549} 550 551// ResourceIdentityType enumerates the values for resource identity type. 552type ResourceIdentityType string 553 554const ( 555 // ResourceIdentityTypeNone ... 556 ResourceIdentityTypeNone ResourceIdentityType = "None" 557 // ResourceIdentityTypeSystemAssigned ... 558 ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" 559 // ResourceIdentityTypeSystemAssignedUserAssigned ... 560 ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" 561 // ResourceIdentityTypeUserAssigned ... 562 ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" 563) 564 565// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. 566func PossibleResourceIdentityTypeValues() []ResourceIdentityType { 567 return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} 568} 569 570// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type. 571type ResourceSkuCapacityScaleType string 572 573const ( 574 // ResourceSkuCapacityScaleTypeAutomatic ... 575 ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "Automatic" 576 // ResourceSkuCapacityScaleTypeManual ... 577 ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "Manual" 578 // ResourceSkuCapacityScaleTypeNone ... 579 ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "None" 580) 581 582// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type. 583func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { 584 return []ResourceSkuCapacityScaleType{ResourceSkuCapacityScaleTypeAutomatic, ResourceSkuCapacityScaleTypeManual, ResourceSkuCapacityScaleTypeNone} 585} 586 587// ResourceSkuRestrictionsReasonCode enumerates the values for resource sku restrictions reason code. 588type ResourceSkuRestrictionsReasonCode string 589 590const ( 591 // NotAvailableForSubscription ... 592 NotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription" 593 // QuotaID ... 594 QuotaID ResourceSkuRestrictionsReasonCode = "QuotaId" 595) 596 597// PossibleResourceSkuRestrictionsReasonCodeValues returns an array of possible values for the ResourceSkuRestrictionsReasonCode const type. 598func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictionsReasonCode { 599 return []ResourceSkuRestrictionsReasonCode{NotAvailableForSubscription, QuotaID} 600} 601 602// ResourceSkuRestrictionsType enumerates the values for resource sku restrictions type. 603type ResourceSkuRestrictionsType string 604 605const ( 606 // Location ... 607 Location ResourceSkuRestrictionsType = "Location" 608 // Zone ... 609 Zone ResourceSkuRestrictionsType = "Zone" 610) 611 612// PossibleResourceSkuRestrictionsTypeValues returns an array of possible values for the ResourceSkuRestrictionsType const type. 613func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType { 614 return []ResourceSkuRestrictionsType{Location, Zone} 615} 616 617// RollingUpgradeActionType enumerates the values for rolling upgrade action type. 618type RollingUpgradeActionType string 619 620const ( 621 // Cancel ... 622 Cancel RollingUpgradeActionType = "Cancel" 623 // Start ... 624 Start RollingUpgradeActionType = "Start" 625) 626 627// PossibleRollingUpgradeActionTypeValues returns an array of possible values for the RollingUpgradeActionType const type. 628func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType { 629 return []RollingUpgradeActionType{Cancel, Start} 630} 631 632// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code. 633type RollingUpgradeStatusCode string 634 635const ( 636 // RollingUpgradeStatusCodeCancelled ... 637 RollingUpgradeStatusCodeCancelled RollingUpgradeStatusCode = "Cancelled" 638 // RollingUpgradeStatusCodeCompleted ... 639 RollingUpgradeStatusCodeCompleted RollingUpgradeStatusCode = "Completed" 640 // RollingUpgradeStatusCodeFaulted ... 641 RollingUpgradeStatusCodeFaulted RollingUpgradeStatusCode = "Faulted" 642 // RollingUpgradeStatusCodeRollingForward ... 643 RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward" 644) 645 646// PossibleRollingUpgradeStatusCodeValues returns an array of possible values for the RollingUpgradeStatusCode const type. 647func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode { 648 return []RollingUpgradeStatusCode{RollingUpgradeStatusCodeCancelled, RollingUpgradeStatusCodeCompleted, RollingUpgradeStatusCodeFaulted, RollingUpgradeStatusCodeRollingForward} 649} 650 651// SettingNames enumerates the values for setting names. 652type SettingNames string 653 654const ( 655 // AutoLogon ... 656 AutoLogon SettingNames = "AutoLogon" 657 // FirstLogonCommands ... 658 FirstLogonCommands SettingNames = "FirstLogonCommands" 659) 660 661// PossibleSettingNamesValues returns an array of possible values for the SettingNames const type. 662func PossibleSettingNamesValues() []SettingNames { 663 return []SettingNames{AutoLogon, FirstLogonCommands} 664} 665 666// SnapshotStorageAccountTypes enumerates the values for snapshot storage account types. 667type SnapshotStorageAccountTypes string 668 669const ( 670 // SnapshotStorageAccountTypesPremiumLRS ... 671 SnapshotStorageAccountTypesPremiumLRS SnapshotStorageAccountTypes = "Premium_LRS" 672 // SnapshotStorageAccountTypesStandardLRS ... 673 SnapshotStorageAccountTypesStandardLRS SnapshotStorageAccountTypes = "Standard_LRS" 674 // SnapshotStorageAccountTypesStandardZRS ... 675 SnapshotStorageAccountTypesStandardZRS SnapshotStorageAccountTypes = "Standard_ZRS" 676) 677 678// PossibleSnapshotStorageAccountTypesValues returns an array of possible values for the SnapshotStorageAccountTypes const type. 679func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes { 680 return []SnapshotStorageAccountTypes{SnapshotStorageAccountTypesPremiumLRS, SnapshotStorageAccountTypesStandardLRS, SnapshotStorageAccountTypesStandardZRS} 681} 682 683// StatusLevelTypes enumerates the values for status level types. 684type StatusLevelTypes string 685 686const ( 687 // Error ... 688 Error StatusLevelTypes = "Error" 689 // Info ... 690 Info StatusLevelTypes = "Info" 691 // Warning ... 692 Warning StatusLevelTypes = "Warning" 693) 694 695// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type. 696func PossibleStatusLevelTypesValues() []StatusLevelTypes { 697 return []StatusLevelTypes{Error, Info, Warning} 698} 699 700// StorageAccountTypes enumerates the values for storage account types. 701type StorageAccountTypes string 702 703const ( 704 // StorageAccountTypesPremiumLRS ... 705 StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS" 706 // StorageAccountTypesStandardLRS ... 707 StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS" 708 // StorageAccountTypesStandardSSDLRS ... 709 StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS" 710 // StorageAccountTypesUltraSSDLRS ... 711 StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS" 712) 713 714// PossibleStorageAccountTypesValues returns an array of possible values for the StorageAccountTypes const type. 715func PossibleStorageAccountTypesValues() []StorageAccountTypes { 716 return []StorageAccountTypes{StorageAccountTypesPremiumLRS, StorageAccountTypesStandardLRS, StorageAccountTypesStandardSSDLRS, StorageAccountTypesUltraSSDLRS} 717} 718 719// UpgradeMode enumerates the values for upgrade mode. 720type UpgradeMode string 721 722const ( 723 // Automatic ... 724 Automatic UpgradeMode = "Automatic" 725 // Manual ... 726 Manual UpgradeMode = "Manual" 727 // Rolling ... 728 Rolling UpgradeMode = "Rolling" 729) 730 731// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type. 732func PossibleUpgradeModeValues() []UpgradeMode { 733 return []UpgradeMode{Automatic, Manual, Rolling} 734} 735 736// UpgradeOperationInvoker enumerates the values for upgrade operation invoker. 737type UpgradeOperationInvoker string 738 739const ( 740 // UpgradeOperationInvokerPlatform ... 741 UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform" 742 // UpgradeOperationInvokerUnknown ... 743 UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown" 744 // UpgradeOperationInvokerUser ... 745 UpgradeOperationInvokerUser UpgradeOperationInvoker = "User" 746) 747 748// PossibleUpgradeOperationInvokerValues returns an array of possible values for the UpgradeOperationInvoker const type. 749func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker { 750 return []UpgradeOperationInvoker{UpgradeOperationInvokerPlatform, UpgradeOperationInvokerUnknown, UpgradeOperationInvokerUser} 751} 752 753// UpgradeState enumerates the values for upgrade state. 754type UpgradeState string 755 756const ( 757 // UpgradeStateCancelled ... 758 UpgradeStateCancelled UpgradeState = "Cancelled" 759 // UpgradeStateCompleted ... 760 UpgradeStateCompleted UpgradeState = "Completed" 761 // UpgradeStateFaulted ... 762 UpgradeStateFaulted UpgradeState = "Faulted" 763 // UpgradeStateRollingForward ... 764 UpgradeStateRollingForward UpgradeState = "RollingForward" 765) 766 767// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type. 768func PossibleUpgradeStateValues() []UpgradeState { 769 return []UpgradeState{UpgradeStateCancelled, UpgradeStateCompleted, UpgradeStateFaulted, UpgradeStateRollingForward} 770} 771 772// VirtualMachineEvictionPolicyTypes enumerates the values for virtual machine eviction policy types. 773type VirtualMachineEvictionPolicyTypes string 774 775const ( 776 // Deallocate ... 777 Deallocate VirtualMachineEvictionPolicyTypes = "Deallocate" 778 // Delete ... 779 Delete VirtualMachineEvictionPolicyTypes = "Delete" 780) 781 782// PossibleVirtualMachineEvictionPolicyTypesValues returns an array of possible values for the VirtualMachineEvictionPolicyTypes const type. 783func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes { 784 return []VirtualMachineEvictionPolicyTypes{Deallocate, Delete} 785} 786 787// VirtualMachinePriorityTypes enumerates the values for virtual machine priority types. 788type VirtualMachinePriorityTypes string 789 790const ( 791 // Low ... 792 Low VirtualMachinePriorityTypes = "Low" 793 // Regular ... 794 Regular VirtualMachinePriorityTypes = "Regular" 795) 796 797// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type. 798func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes { 799 return []VirtualMachinePriorityTypes{Low, Regular} 800} 801 802// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type. 803type VirtualMachineScaleSetSkuScaleType string 804 805const ( 806 // VirtualMachineScaleSetSkuScaleTypeAutomatic ... 807 VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic" 808 // VirtualMachineScaleSetSkuScaleTypeNone ... 809 VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None" 810) 811 812// PossibleVirtualMachineScaleSetSkuScaleTypeValues returns an array of possible values for the VirtualMachineScaleSetSkuScaleType const type. 813func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSetSkuScaleType { 814 return []VirtualMachineScaleSetSkuScaleType{VirtualMachineScaleSetSkuScaleTypeAutomatic, VirtualMachineScaleSetSkuScaleTypeNone} 815} 816 817// VirtualMachineSizeTypes enumerates the values for virtual machine size types. 818type VirtualMachineSizeTypes string 819 820const ( 821 // VirtualMachineSizeTypesBasicA0 ... 822 VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0" 823 // VirtualMachineSizeTypesBasicA1 ... 824 VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1" 825 // VirtualMachineSizeTypesBasicA2 ... 826 VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2" 827 // VirtualMachineSizeTypesBasicA3 ... 828 VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3" 829 // VirtualMachineSizeTypesBasicA4 ... 830 VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4" 831 // VirtualMachineSizeTypesStandardA0 ... 832 VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0" 833 // VirtualMachineSizeTypesStandardA1 ... 834 VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1" 835 // VirtualMachineSizeTypesStandardA10 ... 836 VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10" 837 // VirtualMachineSizeTypesStandardA11 ... 838 VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11" 839 // VirtualMachineSizeTypesStandardA1V2 ... 840 VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2" 841 // VirtualMachineSizeTypesStandardA2 ... 842 VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2" 843 // VirtualMachineSizeTypesStandardA2mV2 ... 844 VirtualMachineSizeTypesStandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2" 845 // VirtualMachineSizeTypesStandardA2V2 ... 846 VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2" 847 // VirtualMachineSizeTypesStandardA3 ... 848 VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3" 849 // VirtualMachineSizeTypesStandardA4 ... 850 VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4" 851 // VirtualMachineSizeTypesStandardA4mV2 ... 852 VirtualMachineSizeTypesStandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2" 853 // VirtualMachineSizeTypesStandardA4V2 ... 854 VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2" 855 // VirtualMachineSizeTypesStandardA5 ... 856 VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5" 857 // VirtualMachineSizeTypesStandardA6 ... 858 VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6" 859 // VirtualMachineSizeTypesStandardA7 ... 860 VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7" 861 // VirtualMachineSizeTypesStandardA8 ... 862 VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8" 863 // VirtualMachineSizeTypesStandardA8mV2 ... 864 VirtualMachineSizeTypesStandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2" 865 // VirtualMachineSizeTypesStandardA8V2 ... 866 VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2" 867 // VirtualMachineSizeTypesStandardA9 ... 868 VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9" 869 // VirtualMachineSizeTypesStandardB1ms ... 870 VirtualMachineSizeTypesStandardB1ms VirtualMachineSizeTypes = "Standard_B1ms" 871 // VirtualMachineSizeTypesStandardB1s ... 872 VirtualMachineSizeTypesStandardB1s VirtualMachineSizeTypes = "Standard_B1s" 873 // VirtualMachineSizeTypesStandardB2ms ... 874 VirtualMachineSizeTypesStandardB2ms VirtualMachineSizeTypes = "Standard_B2ms" 875 // VirtualMachineSizeTypesStandardB2s ... 876 VirtualMachineSizeTypesStandardB2s VirtualMachineSizeTypes = "Standard_B2s" 877 // VirtualMachineSizeTypesStandardB4ms ... 878 VirtualMachineSizeTypesStandardB4ms VirtualMachineSizeTypes = "Standard_B4ms" 879 // VirtualMachineSizeTypesStandardB8ms ... 880 VirtualMachineSizeTypesStandardB8ms VirtualMachineSizeTypes = "Standard_B8ms" 881 // VirtualMachineSizeTypesStandardD1 ... 882 VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1" 883 // VirtualMachineSizeTypesStandardD11 ... 884 VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11" 885 // VirtualMachineSizeTypesStandardD11V2 ... 886 VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2" 887 // VirtualMachineSizeTypesStandardD12 ... 888 VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12" 889 // VirtualMachineSizeTypesStandardD12V2 ... 890 VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2" 891 // VirtualMachineSizeTypesStandardD13 ... 892 VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13" 893 // VirtualMachineSizeTypesStandardD13V2 ... 894 VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2" 895 // VirtualMachineSizeTypesStandardD14 ... 896 VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14" 897 // VirtualMachineSizeTypesStandardD14V2 ... 898 VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2" 899 // VirtualMachineSizeTypesStandardD15V2 ... 900 VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2" 901 // VirtualMachineSizeTypesStandardD16sV3 ... 902 VirtualMachineSizeTypesStandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3" 903 // VirtualMachineSizeTypesStandardD16V3 ... 904 VirtualMachineSizeTypesStandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3" 905 // VirtualMachineSizeTypesStandardD1V2 ... 906 VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2" 907 // VirtualMachineSizeTypesStandardD2 ... 908 VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2" 909 // VirtualMachineSizeTypesStandardD2sV3 ... 910 VirtualMachineSizeTypesStandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3" 911 // VirtualMachineSizeTypesStandardD2V2 ... 912 VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2" 913 // VirtualMachineSizeTypesStandardD2V3 ... 914 VirtualMachineSizeTypesStandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3" 915 // VirtualMachineSizeTypesStandardD3 ... 916 VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3" 917 // VirtualMachineSizeTypesStandardD32sV3 ... 918 VirtualMachineSizeTypesStandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3" 919 // VirtualMachineSizeTypesStandardD32V3 ... 920 VirtualMachineSizeTypesStandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3" 921 // VirtualMachineSizeTypesStandardD3V2 ... 922 VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2" 923 // VirtualMachineSizeTypesStandardD4 ... 924 VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4" 925 // VirtualMachineSizeTypesStandardD4sV3 ... 926 VirtualMachineSizeTypesStandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3" 927 // VirtualMachineSizeTypesStandardD4V2 ... 928 VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2" 929 // VirtualMachineSizeTypesStandardD4V3 ... 930 VirtualMachineSizeTypesStandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3" 931 // VirtualMachineSizeTypesStandardD5V2 ... 932 VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2" 933 // VirtualMachineSizeTypesStandardD64sV3 ... 934 VirtualMachineSizeTypesStandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3" 935 // VirtualMachineSizeTypesStandardD64V3 ... 936 VirtualMachineSizeTypesStandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3" 937 // VirtualMachineSizeTypesStandardD8sV3 ... 938 VirtualMachineSizeTypesStandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3" 939 // VirtualMachineSizeTypesStandardD8V3 ... 940 VirtualMachineSizeTypesStandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3" 941 // VirtualMachineSizeTypesStandardDS1 ... 942 VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1" 943 // VirtualMachineSizeTypesStandardDS11 ... 944 VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11" 945 // VirtualMachineSizeTypesStandardDS11V2 ... 946 VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2" 947 // VirtualMachineSizeTypesStandardDS12 ... 948 VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12" 949 // VirtualMachineSizeTypesStandardDS12V2 ... 950 VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2" 951 // VirtualMachineSizeTypesStandardDS13 ... 952 VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13" 953 // VirtualMachineSizeTypesStandardDS132V2 ... 954 VirtualMachineSizeTypesStandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2" 955 // VirtualMachineSizeTypesStandardDS134V2 ... 956 VirtualMachineSizeTypesStandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2" 957 // VirtualMachineSizeTypesStandardDS13V2 ... 958 VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2" 959 // VirtualMachineSizeTypesStandardDS14 ... 960 VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14" 961 // VirtualMachineSizeTypesStandardDS144V2 ... 962 VirtualMachineSizeTypesStandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2" 963 // VirtualMachineSizeTypesStandardDS148V2 ... 964 VirtualMachineSizeTypesStandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2" 965 // VirtualMachineSizeTypesStandardDS14V2 ... 966 VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2" 967 // VirtualMachineSizeTypesStandardDS15V2 ... 968 VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2" 969 // VirtualMachineSizeTypesStandardDS1V2 ... 970 VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2" 971 // VirtualMachineSizeTypesStandardDS2 ... 972 VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2" 973 // VirtualMachineSizeTypesStandardDS2V2 ... 974 VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2" 975 // VirtualMachineSizeTypesStandardDS3 ... 976 VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3" 977 // VirtualMachineSizeTypesStandardDS3V2 ... 978 VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2" 979 // VirtualMachineSizeTypesStandardDS4 ... 980 VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4" 981 // VirtualMachineSizeTypesStandardDS4V2 ... 982 VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2" 983 // VirtualMachineSizeTypesStandardDS5V2 ... 984 VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2" 985 // VirtualMachineSizeTypesStandardE16sV3 ... 986 VirtualMachineSizeTypesStandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3" 987 // VirtualMachineSizeTypesStandardE16V3 ... 988 VirtualMachineSizeTypesStandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3" 989 // VirtualMachineSizeTypesStandardE2sV3 ... 990 VirtualMachineSizeTypesStandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3" 991 // VirtualMachineSizeTypesStandardE2V3 ... 992 VirtualMachineSizeTypesStandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3" 993 // VirtualMachineSizeTypesStandardE3216V3 ... 994 VirtualMachineSizeTypesStandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3" 995 // VirtualMachineSizeTypesStandardE328sV3 ... 996 VirtualMachineSizeTypesStandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3" 997 // VirtualMachineSizeTypesStandardE32sV3 ... 998 VirtualMachineSizeTypesStandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3" 999 // VirtualMachineSizeTypesStandardE32V3 ... 1000 VirtualMachineSizeTypesStandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3" 1001 // VirtualMachineSizeTypesStandardE4sV3 ... 1002 VirtualMachineSizeTypesStandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3" 1003 // VirtualMachineSizeTypesStandardE4V3 ... 1004 VirtualMachineSizeTypesStandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3" 1005 // VirtualMachineSizeTypesStandardE6416sV3 ... 1006 VirtualMachineSizeTypesStandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3" 1007 // VirtualMachineSizeTypesStandardE6432sV3 ... 1008 VirtualMachineSizeTypesStandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3" 1009 // VirtualMachineSizeTypesStandardE64sV3 ... 1010 VirtualMachineSizeTypesStandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3" 1011 // VirtualMachineSizeTypesStandardE64V3 ... 1012 VirtualMachineSizeTypesStandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3" 1013 // VirtualMachineSizeTypesStandardE8sV3 ... 1014 VirtualMachineSizeTypesStandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3" 1015 // VirtualMachineSizeTypesStandardE8V3 ... 1016 VirtualMachineSizeTypesStandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3" 1017 // VirtualMachineSizeTypesStandardF1 ... 1018 VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1" 1019 // VirtualMachineSizeTypesStandardF16 ... 1020 VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16" 1021 // VirtualMachineSizeTypesStandardF16s ... 1022 VirtualMachineSizeTypesStandardF16s VirtualMachineSizeTypes = "Standard_F16s" 1023 // VirtualMachineSizeTypesStandardF16sV2 ... 1024 VirtualMachineSizeTypesStandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2" 1025 // VirtualMachineSizeTypesStandardF1s ... 1026 VirtualMachineSizeTypesStandardF1s VirtualMachineSizeTypes = "Standard_F1s" 1027 // VirtualMachineSizeTypesStandardF2 ... 1028 VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2" 1029 // VirtualMachineSizeTypesStandardF2s ... 1030 VirtualMachineSizeTypesStandardF2s VirtualMachineSizeTypes = "Standard_F2s" 1031 // VirtualMachineSizeTypesStandardF2sV2 ... 1032 VirtualMachineSizeTypesStandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2" 1033 // VirtualMachineSizeTypesStandardF32sV2 ... 1034 VirtualMachineSizeTypesStandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2" 1035 // VirtualMachineSizeTypesStandardF4 ... 1036 VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4" 1037 // VirtualMachineSizeTypesStandardF4s ... 1038 VirtualMachineSizeTypesStandardF4s VirtualMachineSizeTypes = "Standard_F4s" 1039 // VirtualMachineSizeTypesStandardF4sV2 ... 1040 VirtualMachineSizeTypesStandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2" 1041 // VirtualMachineSizeTypesStandardF64sV2 ... 1042 VirtualMachineSizeTypesStandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2" 1043 // VirtualMachineSizeTypesStandardF72sV2 ... 1044 VirtualMachineSizeTypesStandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2" 1045 // VirtualMachineSizeTypesStandardF8 ... 1046 VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8" 1047 // VirtualMachineSizeTypesStandardF8s ... 1048 VirtualMachineSizeTypesStandardF8s VirtualMachineSizeTypes = "Standard_F8s" 1049 // VirtualMachineSizeTypesStandardF8sV2 ... 1050 VirtualMachineSizeTypesStandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2" 1051 // VirtualMachineSizeTypesStandardG1 ... 1052 VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1" 1053 // VirtualMachineSizeTypesStandardG2 ... 1054 VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2" 1055 // VirtualMachineSizeTypesStandardG3 ... 1056 VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3" 1057 // VirtualMachineSizeTypesStandardG4 ... 1058 VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4" 1059 // VirtualMachineSizeTypesStandardG5 ... 1060 VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5" 1061 // VirtualMachineSizeTypesStandardGS1 ... 1062 VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1" 1063 // VirtualMachineSizeTypesStandardGS2 ... 1064 VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2" 1065 // VirtualMachineSizeTypesStandardGS3 ... 1066 VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3" 1067 // VirtualMachineSizeTypesStandardGS4 ... 1068 VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4" 1069 // VirtualMachineSizeTypesStandardGS44 ... 1070 VirtualMachineSizeTypesStandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4" 1071 // VirtualMachineSizeTypesStandardGS48 ... 1072 VirtualMachineSizeTypesStandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8" 1073 // VirtualMachineSizeTypesStandardGS5 ... 1074 VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5" 1075 // VirtualMachineSizeTypesStandardGS516 ... 1076 VirtualMachineSizeTypesStandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16" 1077 // VirtualMachineSizeTypesStandardGS58 ... 1078 VirtualMachineSizeTypesStandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8" 1079 // VirtualMachineSizeTypesStandardH16 ... 1080 VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16" 1081 // VirtualMachineSizeTypesStandardH16m ... 1082 VirtualMachineSizeTypesStandardH16m VirtualMachineSizeTypes = "Standard_H16m" 1083 // VirtualMachineSizeTypesStandardH16mr ... 1084 VirtualMachineSizeTypesStandardH16mr VirtualMachineSizeTypes = "Standard_H16mr" 1085 // VirtualMachineSizeTypesStandardH16r ... 1086 VirtualMachineSizeTypesStandardH16r VirtualMachineSizeTypes = "Standard_H16r" 1087 // VirtualMachineSizeTypesStandardH8 ... 1088 VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8" 1089 // VirtualMachineSizeTypesStandardH8m ... 1090 VirtualMachineSizeTypesStandardH8m VirtualMachineSizeTypes = "Standard_H8m" 1091 // VirtualMachineSizeTypesStandardL16s ... 1092 VirtualMachineSizeTypesStandardL16s VirtualMachineSizeTypes = "Standard_L16s" 1093 // VirtualMachineSizeTypesStandardL32s ... 1094 VirtualMachineSizeTypesStandardL32s VirtualMachineSizeTypes = "Standard_L32s" 1095 // VirtualMachineSizeTypesStandardL4s ... 1096 VirtualMachineSizeTypesStandardL4s VirtualMachineSizeTypes = "Standard_L4s" 1097 // VirtualMachineSizeTypesStandardL8s ... 1098 VirtualMachineSizeTypesStandardL8s VirtualMachineSizeTypes = "Standard_L8s" 1099 // VirtualMachineSizeTypesStandardM12832ms ... 1100 VirtualMachineSizeTypesStandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms" 1101 // VirtualMachineSizeTypesStandardM12864ms ... 1102 VirtualMachineSizeTypesStandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms" 1103 // VirtualMachineSizeTypesStandardM128ms ... 1104 VirtualMachineSizeTypesStandardM128ms VirtualMachineSizeTypes = "Standard_M128ms" 1105 // VirtualMachineSizeTypesStandardM128s ... 1106 VirtualMachineSizeTypesStandardM128s VirtualMachineSizeTypes = "Standard_M128s" 1107 // VirtualMachineSizeTypesStandardM6416ms ... 1108 VirtualMachineSizeTypesStandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms" 1109 // VirtualMachineSizeTypesStandardM6432ms ... 1110 VirtualMachineSizeTypesStandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms" 1111 // VirtualMachineSizeTypesStandardM64ms ... 1112 VirtualMachineSizeTypesStandardM64ms VirtualMachineSizeTypes = "Standard_M64ms" 1113 // VirtualMachineSizeTypesStandardM64s ... 1114 VirtualMachineSizeTypesStandardM64s VirtualMachineSizeTypes = "Standard_M64s" 1115 // VirtualMachineSizeTypesStandardNC12 ... 1116 VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12" 1117 // VirtualMachineSizeTypesStandardNC12sV2 ... 1118 VirtualMachineSizeTypesStandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2" 1119 // VirtualMachineSizeTypesStandardNC12sV3 ... 1120 VirtualMachineSizeTypesStandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3" 1121 // VirtualMachineSizeTypesStandardNC24 ... 1122 VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24" 1123 // VirtualMachineSizeTypesStandardNC24r ... 1124 VirtualMachineSizeTypesStandardNC24r VirtualMachineSizeTypes = "Standard_NC24r" 1125 // VirtualMachineSizeTypesStandardNC24rsV2 ... 1126 VirtualMachineSizeTypesStandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2" 1127 // VirtualMachineSizeTypesStandardNC24rsV3 ... 1128 VirtualMachineSizeTypesStandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3" 1129 // VirtualMachineSizeTypesStandardNC24sV2 ... 1130 VirtualMachineSizeTypesStandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2" 1131 // VirtualMachineSizeTypesStandardNC24sV3 ... 1132 VirtualMachineSizeTypesStandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3" 1133 // VirtualMachineSizeTypesStandardNC6 ... 1134 VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6" 1135 // VirtualMachineSizeTypesStandardNC6sV2 ... 1136 VirtualMachineSizeTypesStandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2" 1137 // VirtualMachineSizeTypesStandardNC6sV3 ... 1138 VirtualMachineSizeTypesStandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3" 1139 // VirtualMachineSizeTypesStandardND12s ... 1140 VirtualMachineSizeTypesStandardND12s VirtualMachineSizeTypes = "Standard_ND12s" 1141 // VirtualMachineSizeTypesStandardND24rs ... 1142 VirtualMachineSizeTypesStandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs" 1143 // VirtualMachineSizeTypesStandardND24s ... 1144 VirtualMachineSizeTypesStandardND24s VirtualMachineSizeTypes = "Standard_ND24s" 1145 // VirtualMachineSizeTypesStandardND6s ... 1146 VirtualMachineSizeTypesStandardND6s VirtualMachineSizeTypes = "Standard_ND6s" 1147 // VirtualMachineSizeTypesStandardNV12 ... 1148 VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12" 1149 // VirtualMachineSizeTypesStandardNV24 ... 1150 VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24" 1151 // VirtualMachineSizeTypesStandardNV6 ... 1152 VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6" 1153) 1154 1155// PossibleVirtualMachineSizeTypesValues returns an array of possible values for the VirtualMachineSizeTypes const type. 1156func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes { 1157 return []VirtualMachineSizeTypes{VirtualMachineSizeTypesBasicA0, VirtualMachineSizeTypesBasicA1, VirtualMachineSizeTypesBasicA2, VirtualMachineSizeTypesBasicA3, VirtualMachineSizeTypesBasicA4, VirtualMachineSizeTypesStandardA0, VirtualMachineSizeTypesStandardA1, VirtualMachineSizeTypesStandardA10, VirtualMachineSizeTypesStandardA11, VirtualMachineSizeTypesStandardA1V2, VirtualMachineSizeTypesStandardA2, VirtualMachineSizeTypesStandardA2mV2, VirtualMachineSizeTypesStandardA2V2, VirtualMachineSizeTypesStandardA3, VirtualMachineSizeTypesStandardA4, VirtualMachineSizeTypesStandardA4mV2, VirtualMachineSizeTypesStandardA4V2, VirtualMachineSizeTypesStandardA5, VirtualMachineSizeTypesStandardA6, VirtualMachineSizeTypesStandardA7, VirtualMachineSizeTypesStandardA8, VirtualMachineSizeTypesStandardA8mV2, VirtualMachineSizeTypesStandardA8V2, VirtualMachineSizeTypesStandardA9, VirtualMachineSizeTypesStandardB1ms, VirtualMachineSizeTypesStandardB1s, VirtualMachineSizeTypesStandardB2ms, VirtualMachineSizeTypesStandardB2s, VirtualMachineSizeTypesStandardB4ms, VirtualMachineSizeTypesStandardB8ms, VirtualMachineSizeTypesStandardD1, VirtualMachineSizeTypesStandardD11, VirtualMachineSizeTypesStandardD11V2, VirtualMachineSizeTypesStandardD12, VirtualMachineSizeTypesStandardD12V2, VirtualMachineSizeTypesStandardD13, VirtualMachineSizeTypesStandardD13V2, VirtualMachineSizeTypesStandardD14, VirtualMachineSizeTypesStandardD14V2, VirtualMachineSizeTypesStandardD15V2, VirtualMachineSizeTypesStandardD16sV3, VirtualMachineSizeTypesStandardD16V3, VirtualMachineSizeTypesStandardD1V2, VirtualMachineSizeTypesStandardD2, VirtualMachineSizeTypesStandardD2sV3, VirtualMachineSizeTypesStandardD2V2, VirtualMachineSizeTypesStandardD2V3, VirtualMachineSizeTypesStandardD3, VirtualMachineSizeTypesStandardD32sV3, VirtualMachineSizeTypesStandardD32V3, VirtualMachineSizeTypesStandardD3V2, VirtualMachineSizeTypesStandardD4, VirtualMachineSizeTypesStandardD4sV3, VirtualMachineSizeTypesStandardD4V2, VirtualMachineSizeTypesStandardD4V3, VirtualMachineSizeTypesStandardD5V2, VirtualMachineSizeTypesStandardD64sV3, VirtualMachineSizeTypesStandardD64V3, VirtualMachineSizeTypesStandardD8sV3, VirtualMachineSizeTypesStandardD8V3, VirtualMachineSizeTypesStandardDS1, VirtualMachineSizeTypesStandardDS11, VirtualMachineSizeTypesStandardDS11V2, VirtualMachineSizeTypesStandardDS12, VirtualMachineSizeTypesStandardDS12V2, VirtualMachineSizeTypesStandardDS13, VirtualMachineSizeTypesStandardDS132V2, VirtualMachineSizeTypesStandardDS134V2, VirtualMachineSizeTypesStandardDS13V2, VirtualMachineSizeTypesStandardDS14, VirtualMachineSizeTypesStandardDS144V2, VirtualMachineSizeTypesStandardDS148V2, VirtualMachineSizeTypesStandardDS14V2, VirtualMachineSizeTypesStandardDS15V2, VirtualMachineSizeTypesStandardDS1V2, VirtualMachineSizeTypesStandardDS2, VirtualMachineSizeTypesStandardDS2V2, VirtualMachineSizeTypesStandardDS3, VirtualMachineSizeTypesStandardDS3V2, VirtualMachineSizeTypesStandardDS4, VirtualMachineSizeTypesStandardDS4V2, VirtualMachineSizeTypesStandardDS5V2, VirtualMachineSizeTypesStandardE16sV3, VirtualMachineSizeTypesStandardE16V3, VirtualMachineSizeTypesStandardE2sV3, VirtualMachineSizeTypesStandardE2V3, VirtualMachineSizeTypesStandardE3216V3, VirtualMachineSizeTypesStandardE328sV3, VirtualMachineSizeTypesStandardE32sV3, VirtualMachineSizeTypesStandardE32V3, VirtualMachineSizeTypesStandardE4sV3, VirtualMachineSizeTypesStandardE4V3, VirtualMachineSizeTypesStandardE6416sV3, VirtualMachineSizeTypesStandardE6432sV3, VirtualMachineSizeTypesStandardE64sV3, VirtualMachineSizeTypesStandardE64V3, VirtualMachineSizeTypesStandardE8sV3, VirtualMachineSizeTypesStandardE8V3, VirtualMachineSizeTypesStandardF1, VirtualMachineSizeTypesStandardF16, VirtualMachineSizeTypesStandardF16s, VirtualMachineSizeTypesStandardF16sV2, VirtualMachineSizeTypesStandardF1s, VirtualMachineSizeTypesStandardF2, VirtualMachineSizeTypesStandardF2s, VirtualMachineSizeTypesStandardF2sV2, VirtualMachineSizeTypesStandardF32sV2, VirtualMachineSizeTypesStandardF4, VirtualMachineSizeTypesStandardF4s, VirtualMachineSizeTypesStandardF4sV2, VirtualMachineSizeTypesStandardF64sV2, VirtualMachineSizeTypesStandardF72sV2, VirtualMachineSizeTypesStandardF8, VirtualMachineSizeTypesStandardF8s, VirtualMachineSizeTypesStandardF8sV2, VirtualMachineSizeTypesStandardG1, VirtualMachineSizeTypesStandardG2, VirtualMachineSizeTypesStandardG3, VirtualMachineSizeTypesStandardG4, VirtualMachineSizeTypesStandardG5, VirtualMachineSizeTypesStandardGS1, VirtualMachineSizeTypesStandardGS2, VirtualMachineSizeTypesStandardGS3, VirtualMachineSizeTypesStandardGS4, VirtualMachineSizeTypesStandardGS44, VirtualMachineSizeTypesStandardGS48, VirtualMachineSizeTypesStandardGS5, VirtualMachineSizeTypesStandardGS516, VirtualMachineSizeTypesStandardGS58, VirtualMachineSizeTypesStandardH16, VirtualMachineSizeTypesStandardH16m, VirtualMachineSizeTypesStandardH16mr, VirtualMachineSizeTypesStandardH16r, VirtualMachineSizeTypesStandardH8, VirtualMachineSizeTypesStandardH8m, VirtualMachineSizeTypesStandardL16s, VirtualMachineSizeTypesStandardL32s, VirtualMachineSizeTypesStandardL4s, VirtualMachineSizeTypesStandardL8s, VirtualMachineSizeTypesStandardM12832ms, VirtualMachineSizeTypesStandardM12864ms, VirtualMachineSizeTypesStandardM128ms, VirtualMachineSizeTypesStandardM128s, VirtualMachineSizeTypesStandardM6416ms, VirtualMachineSizeTypesStandardM6432ms, VirtualMachineSizeTypesStandardM64ms, VirtualMachineSizeTypesStandardM64s, VirtualMachineSizeTypesStandardNC12, VirtualMachineSizeTypesStandardNC12sV2, VirtualMachineSizeTypesStandardNC12sV3, VirtualMachineSizeTypesStandardNC24, VirtualMachineSizeTypesStandardNC24r, VirtualMachineSizeTypesStandardNC24rsV2, VirtualMachineSizeTypesStandardNC24rsV3, VirtualMachineSizeTypesStandardNC24sV2, VirtualMachineSizeTypesStandardNC24sV3, VirtualMachineSizeTypesStandardNC6, VirtualMachineSizeTypesStandardNC6sV2, VirtualMachineSizeTypesStandardNC6sV3, VirtualMachineSizeTypesStandardND12s, VirtualMachineSizeTypesStandardND24rs, VirtualMachineSizeTypesStandardND24s, VirtualMachineSizeTypesStandardND6s, VirtualMachineSizeTypesStandardNV12, VirtualMachineSizeTypesStandardNV24, VirtualMachineSizeTypesStandardNV6} 1158} 1159 1160// AccessURI a disk access SAS uri. 1161type AccessURI struct { 1162 autorest.Response `json:"-"` 1163 // AccessSAS - A SAS uri for accessing a disk. 1164 AccessSAS *string `json:"accessSAS,omitempty"` 1165} 1166 1167// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale 1168// set. 1169type AdditionalCapabilities struct { 1170 // UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. 1171 UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"` 1172} 1173 1174// AdditionalUnattendContent specifies additional XML formatted information that can be included in the 1175// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, 1176// and the pass in which the content is applied. 1177type AdditionalUnattendContent struct { 1178 // PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem' 1179 PassName PassNames `json:"passName,omitempty"` 1180 // ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup' 1181 ComponentName ComponentNames `json:"componentName,omitempty"` 1182 // SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands' 1183 SettingName SettingNames `json:"settingName,omitempty"` 1184 // Content - 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 include the root element for the setting or feature that is being inserted. 1185 Content *string `json:"content,omitempty"` 1186} 1187 1188// APIEntityReference the API entity reference. 1189type APIEntityReference struct { 1190 // ID - The ARM resource id in the form of /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... 1191 ID *string `json:"id,omitempty"` 1192} 1193 1194// APIError api error. 1195type APIError struct { 1196 // Details - The Api error details 1197 Details *[]APIErrorBase `json:"details,omitempty"` 1198 // Innererror - The Api inner error 1199 Innererror *InnerError `json:"innererror,omitempty"` 1200 // Code - The error code. 1201 Code *string `json:"code,omitempty"` 1202 // Target - The target of the particular error. 1203 Target *string `json:"target,omitempty"` 1204 // Message - The error message. 1205 Message *string `json:"message,omitempty"` 1206} 1207 1208// APIErrorBase api error base. 1209type APIErrorBase struct { 1210 // Code - The error code. 1211 Code *string `json:"code,omitempty"` 1212 // Target - The target of the particular error. 1213 Target *string `json:"target,omitempty"` 1214 // Message - The error message. 1215 Message *string `json:"message,omitempty"` 1216} 1217 1218// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade. 1219type AutomaticOSUpgradePolicy struct { 1220 // EnableAutomaticOSUpgrade - Whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the image becomes available. Default value is false. 1221 EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"` 1222 // DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false. 1223 DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"` 1224} 1225 1226// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image. 1227type AutomaticOSUpgradeProperties struct { 1228 // AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image. 1229 AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"` 1230} 1231 1232// AvailabilitySet specifies information about the availability set that the virtual machine should be 1233// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to 1234// maximize availability. For more information about availability sets, see [Manage the availability of 1235// virtual 1236// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). 1237// <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual 1238// machines in 1239// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) 1240// <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot 1241// be added to an availability set. 1242type AvailabilitySet struct { 1243 autorest.Response `json:"-"` 1244 *AvailabilitySetProperties `json:"properties,omitempty"` 1245 // Sku - Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. 1246 Sku *Sku `json:"sku,omitempty"` 1247 // ID - Resource Id 1248 ID *string `json:"id,omitempty"` 1249 // Name - Resource name 1250 Name *string `json:"name,omitempty"` 1251 // Type - Resource type 1252 Type *string `json:"type,omitempty"` 1253 // Location - Resource location 1254 Location *string `json:"location,omitempty"` 1255 // Tags - Resource tags 1256 Tags map[string]*string `json:"tags"` 1257} 1258 1259// MarshalJSON is the custom marshaler for AvailabilitySet. 1260func (as AvailabilitySet) MarshalJSON() ([]byte, error) { 1261 objectMap := make(map[string]interface{}) 1262 if as.AvailabilitySetProperties != nil { 1263 objectMap["properties"] = as.AvailabilitySetProperties 1264 } 1265 if as.Sku != nil { 1266 objectMap["sku"] = as.Sku 1267 } 1268 if as.ID != nil { 1269 objectMap["id"] = as.ID 1270 } 1271 if as.Name != nil { 1272 objectMap["name"] = as.Name 1273 } 1274 if as.Type != nil { 1275 objectMap["type"] = as.Type 1276 } 1277 if as.Location != nil { 1278 objectMap["location"] = as.Location 1279 } 1280 if as.Tags != nil { 1281 objectMap["tags"] = as.Tags 1282 } 1283 return json.Marshal(objectMap) 1284} 1285 1286// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct. 1287func (as *AvailabilitySet) UnmarshalJSON(body []byte) error { 1288 var m map[string]*json.RawMessage 1289 err := json.Unmarshal(body, &m) 1290 if err != nil { 1291 return err 1292 } 1293 for k, v := range m { 1294 switch k { 1295 case "properties": 1296 if v != nil { 1297 var availabilitySetProperties AvailabilitySetProperties 1298 err = json.Unmarshal(*v, &availabilitySetProperties) 1299 if err != nil { 1300 return err 1301 } 1302 as.AvailabilitySetProperties = &availabilitySetProperties 1303 } 1304 case "sku": 1305 if v != nil { 1306 var sku Sku 1307 err = json.Unmarshal(*v, &sku) 1308 if err != nil { 1309 return err 1310 } 1311 as.Sku = &sku 1312 } 1313 case "id": 1314 if v != nil { 1315 var ID string 1316 err = json.Unmarshal(*v, &ID) 1317 if err != nil { 1318 return err 1319 } 1320 as.ID = &ID 1321 } 1322 case "name": 1323 if v != nil { 1324 var name string 1325 err = json.Unmarshal(*v, &name) 1326 if err != nil { 1327 return err 1328 } 1329 as.Name = &name 1330 } 1331 case "type": 1332 if v != nil { 1333 var typeVar string 1334 err = json.Unmarshal(*v, &typeVar) 1335 if err != nil { 1336 return err 1337 } 1338 as.Type = &typeVar 1339 } 1340 case "location": 1341 if v != nil { 1342 var location string 1343 err = json.Unmarshal(*v, &location) 1344 if err != nil { 1345 return err 1346 } 1347 as.Location = &location 1348 } 1349 case "tags": 1350 if v != nil { 1351 var tags map[string]*string 1352 err = json.Unmarshal(*v, &tags) 1353 if err != nil { 1354 return err 1355 } 1356 as.Tags = tags 1357 } 1358 } 1359 } 1360 1361 return nil 1362} 1363 1364// AvailabilitySetListResult the List Availability Set operation response. 1365type AvailabilitySetListResult struct { 1366 autorest.Response `json:"-"` 1367 // Value - The list of availability sets 1368 Value *[]AvailabilitySet `json:"value,omitempty"` 1369 // NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets. 1370 NextLink *string `json:"nextLink,omitempty"` 1371} 1372 1373// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values. 1374type AvailabilitySetListResultIterator struct { 1375 i int 1376 page AvailabilitySetListResultPage 1377} 1378 1379// NextWithContext advances to the next value. If there was an error making 1380// the request the iterator does not advance and the error is returned. 1381func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) { 1382 if tracing.IsEnabled() { 1383 ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext") 1384 defer func() { 1385 sc := -1 1386 if iter.Response().Response.Response != nil { 1387 sc = iter.Response().Response.Response.StatusCode 1388 } 1389 tracing.EndSpan(ctx, sc, err) 1390 }() 1391 } 1392 iter.i++ 1393 if iter.i < len(iter.page.Values()) { 1394 return nil 1395 } 1396 err = iter.page.NextWithContext(ctx) 1397 if err != nil { 1398 iter.i-- 1399 return err 1400 } 1401 iter.i = 0 1402 return nil 1403} 1404 1405// Next advances to the next value. If there was an error making 1406// the request the iterator does not advance and the error is returned. 1407// Deprecated: Use NextWithContext() instead. 1408func (iter *AvailabilitySetListResultIterator) Next() error { 1409 return iter.NextWithContext(context.Background()) 1410} 1411 1412// NotDone returns true if the enumeration should be started or is not yet complete. 1413func (iter AvailabilitySetListResultIterator) NotDone() bool { 1414 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1415} 1416 1417// Response returns the raw server response from the last page request. 1418func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult { 1419 return iter.page.Response() 1420} 1421 1422// Value returns the current value or a zero-initialized value if the 1423// iterator has advanced beyond the end of the collection. 1424func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet { 1425 if !iter.page.NotDone() { 1426 return AvailabilitySet{} 1427 } 1428 return iter.page.Values()[iter.i] 1429} 1430 1431// Creates a new instance of the AvailabilitySetListResultIterator type. 1432func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator { 1433 return AvailabilitySetListResultIterator{page: page} 1434} 1435 1436// IsEmpty returns true if the ListResult contains no values. 1437func (aslr AvailabilitySetListResult) IsEmpty() bool { 1438 return aslr.Value == nil || len(*aslr.Value) == 0 1439} 1440 1441// availabilitySetListResultPreparer prepares a request to retrieve the next set of results. 1442// It returns nil if no more results exist. 1443func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) { 1444 if aslr.NextLink == nil || len(to.String(aslr.NextLink)) < 1 { 1445 return nil, nil 1446 } 1447 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1448 autorest.AsJSON(), 1449 autorest.AsGet(), 1450 autorest.WithBaseURL(to.String(aslr.NextLink))) 1451} 1452 1453// AvailabilitySetListResultPage contains a page of AvailabilitySet values. 1454type AvailabilitySetListResultPage struct { 1455 fn func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error) 1456 aslr AvailabilitySetListResult 1457} 1458 1459// NextWithContext advances to the next page of values. If there was an error making 1460// the request the page does not advance and the error is returned. 1461func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) { 1462 if tracing.IsEnabled() { 1463 ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext") 1464 defer func() { 1465 sc := -1 1466 if page.Response().Response.Response != nil { 1467 sc = page.Response().Response.Response.StatusCode 1468 } 1469 tracing.EndSpan(ctx, sc, err) 1470 }() 1471 } 1472 next, err := page.fn(ctx, page.aslr) 1473 if err != nil { 1474 return err 1475 } 1476 page.aslr = next 1477 return nil 1478} 1479 1480// Next advances to the next page of values. If there was an error making 1481// the request the page does not advance and the error is returned. 1482// Deprecated: Use NextWithContext() instead. 1483func (page *AvailabilitySetListResultPage) Next() error { 1484 return page.NextWithContext(context.Background()) 1485} 1486 1487// NotDone returns true if the page enumeration should be started or is not yet complete. 1488func (page AvailabilitySetListResultPage) NotDone() bool { 1489 return !page.aslr.IsEmpty() 1490} 1491 1492// Response returns the raw server response from the last page request. 1493func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult { 1494 return page.aslr 1495} 1496 1497// Values returns the slice of values for the current page or nil if there are no values. 1498func (page AvailabilitySetListResultPage) Values() []AvailabilitySet { 1499 if page.aslr.IsEmpty() { 1500 return nil 1501 } 1502 return *page.aslr.Value 1503} 1504 1505// Creates a new instance of the AvailabilitySetListResultPage type. 1506func NewAvailabilitySetListResultPage(getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage { 1507 return AvailabilitySetListResultPage{fn: getNextPage} 1508} 1509 1510// AvailabilitySetProperties the instance view of a resource. 1511type AvailabilitySetProperties struct { 1512 // PlatformUpdateDomainCount - Update Domain count. 1513 PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"` 1514 // PlatformFaultDomainCount - Fault Domain count. 1515 PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` 1516 // VirtualMachines - A list of references to all virtual machines in the availability set. 1517 VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"` 1518 // Statuses - The resource status information. 1519 Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` 1520} 1521 1522// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should 1523// be assigned to. Only tags may be updated. 1524type AvailabilitySetUpdate struct { 1525 *AvailabilitySetProperties `json:"properties,omitempty"` 1526 // Sku - Sku of the availability set 1527 Sku *Sku `json:"sku,omitempty"` 1528 // Tags - Resource tags 1529 Tags map[string]*string `json:"tags"` 1530} 1531 1532// MarshalJSON is the custom marshaler for AvailabilitySetUpdate. 1533func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) { 1534 objectMap := make(map[string]interface{}) 1535 if asu.AvailabilitySetProperties != nil { 1536 objectMap["properties"] = asu.AvailabilitySetProperties 1537 } 1538 if asu.Sku != nil { 1539 objectMap["sku"] = asu.Sku 1540 } 1541 if asu.Tags != nil { 1542 objectMap["tags"] = asu.Tags 1543 } 1544 return json.Marshal(objectMap) 1545} 1546 1547// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct. 1548func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error { 1549 var m map[string]*json.RawMessage 1550 err := json.Unmarshal(body, &m) 1551 if err != nil { 1552 return err 1553 } 1554 for k, v := range m { 1555 switch k { 1556 case "properties": 1557 if v != nil { 1558 var availabilitySetProperties AvailabilitySetProperties 1559 err = json.Unmarshal(*v, &availabilitySetProperties) 1560 if err != nil { 1561 return err 1562 } 1563 asu.AvailabilitySetProperties = &availabilitySetProperties 1564 } 1565 case "sku": 1566 if v != nil { 1567 var sku Sku 1568 err = json.Unmarshal(*v, &sku) 1569 if err != nil { 1570 return err 1571 } 1572 asu.Sku = &sku 1573 } 1574 case "tags": 1575 if v != nil { 1576 var tags map[string]*string 1577 err = json.Unmarshal(*v, &tags) 1578 if err != nil { 1579 return err 1580 } 1581 asu.Tags = tags 1582 } 1583 } 1584 } 1585 1586 return nil 1587} 1588 1589// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and 1590// Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> 1591// Azure also enables you to see a screenshot of the VM from the hypervisor. 1592type BootDiagnostics struct { 1593 // Enabled - Whether boot diagnostics should be enabled on the Virtual Machine. 1594 Enabled *bool `json:"enabled,omitempty"` 1595 // StorageURI - Uri of the storage account to use for placing the console output and screenshot. 1596 StorageURI *string `json:"storageUri,omitempty"` 1597} 1598 1599// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics. 1600type BootDiagnosticsInstanceView struct { 1601 // ConsoleScreenshotBlobURI - The console screenshot blob URI. 1602 ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` 1603 // SerialConsoleLogBlobURI - The Linux serial console log blob Uri. 1604 SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` 1605 // Status - The boot diagnostics status information for the VM. <br><br> NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. 1606 Status *InstanceViewStatus `json:"status,omitempty"` 1607} 1608 1609// CloudError an error response from the Gallery service. 1610type CloudError struct { 1611 Error *APIError `json:"error,omitempty"` 1612} 1613 1614// ContainerService container service. 1615type ContainerService struct { 1616 autorest.Response `json:"-"` 1617 *ContainerServiceProperties `json:"properties,omitempty"` 1618 // ID - Resource Id 1619 ID *string `json:"id,omitempty"` 1620 // Name - Resource name 1621 Name *string `json:"name,omitempty"` 1622 // Type - Resource type 1623 Type *string `json:"type,omitempty"` 1624 // Location - Resource location 1625 Location *string `json:"location,omitempty"` 1626 // Tags - Resource tags 1627 Tags map[string]*string `json:"tags"` 1628} 1629 1630// MarshalJSON is the custom marshaler for ContainerService. 1631func (cs ContainerService) MarshalJSON() ([]byte, error) { 1632 objectMap := make(map[string]interface{}) 1633 if cs.ContainerServiceProperties != nil { 1634 objectMap["properties"] = cs.ContainerServiceProperties 1635 } 1636 if cs.ID != nil { 1637 objectMap["id"] = cs.ID 1638 } 1639 if cs.Name != nil { 1640 objectMap["name"] = cs.Name 1641 } 1642 if cs.Type != nil { 1643 objectMap["type"] = cs.Type 1644 } 1645 if cs.Location != nil { 1646 objectMap["location"] = cs.Location 1647 } 1648 if cs.Tags != nil { 1649 objectMap["tags"] = cs.Tags 1650 } 1651 return json.Marshal(objectMap) 1652} 1653 1654// UnmarshalJSON is the custom unmarshaler for ContainerService struct. 1655func (cs *ContainerService) UnmarshalJSON(body []byte) error { 1656 var m map[string]*json.RawMessage 1657 err := json.Unmarshal(body, &m) 1658 if err != nil { 1659 return err 1660 } 1661 for k, v := range m { 1662 switch k { 1663 case "properties": 1664 if v != nil { 1665 var containerServiceProperties ContainerServiceProperties 1666 err = json.Unmarshal(*v, &containerServiceProperties) 1667 if err != nil { 1668 return err 1669 } 1670 cs.ContainerServiceProperties = &containerServiceProperties 1671 } 1672 case "id": 1673 if v != nil { 1674 var ID string 1675 err = json.Unmarshal(*v, &ID) 1676 if err != nil { 1677 return err 1678 } 1679 cs.ID = &ID 1680 } 1681 case "name": 1682 if v != nil { 1683 var name string 1684 err = json.Unmarshal(*v, &name) 1685 if err != nil { 1686 return err 1687 } 1688 cs.Name = &name 1689 } 1690 case "type": 1691 if v != nil { 1692 var typeVar string 1693 err = json.Unmarshal(*v, &typeVar) 1694 if err != nil { 1695 return err 1696 } 1697 cs.Type = &typeVar 1698 } 1699 case "location": 1700 if v != nil { 1701 var location string 1702 err = json.Unmarshal(*v, &location) 1703 if err != nil { 1704 return err 1705 } 1706 cs.Location = &location 1707 } 1708 case "tags": 1709 if v != nil { 1710 var tags map[string]*string 1711 err = json.Unmarshal(*v, &tags) 1712 if err != nil { 1713 return err 1714 } 1715 cs.Tags = tags 1716 } 1717 } 1718 } 1719 1720 return nil 1721} 1722 1723// ContainerServiceAgentPoolProfile profile for the container service agent pool. 1724type ContainerServiceAgentPoolProfile struct { 1725 // Name - Unique name of the agent pool profile in the context of the subscription and resource group. 1726 Name *string `json:"name,omitempty"` 1727 // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. 1728 Count *int32 `json:"count,omitempty"` 1729 // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5' 1730 VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"` 1731 // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool. 1732 DNSPrefix *string `json:"dnsPrefix,omitempty"` 1733 // Fqdn - FDQN for the agent pool. 1734 Fqdn *string `json:"fqdn,omitempty"` 1735} 1736 1737// ContainerServiceCustomProfile properties to configure a custom container service cluster. 1738type ContainerServiceCustomProfile struct { 1739 // Orchestrator - The name of the custom orchestrator to use. 1740 Orchestrator *string `json:"orchestrator,omitempty"` 1741} 1742 1743// ContainerServiceDiagnosticsProfile ... 1744type ContainerServiceDiagnosticsProfile struct { 1745 // VMDiagnostics - Profile for the container service VM diagnostic agent. 1746 VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"` 1747} 1748 1749// ContainerServiceLinuxProfile profile for Linux VMs in the container service cluster. 1750type ContainerServiceLinuxProfile struct { 1751 // AdminUsername - The administrator username to use for Linux VMs. 1752 AdminUsername *string `json:"adminUsername,omitempty"` 1753 // SSH - The ssh key configuration for Linux VMs. 1754 SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"` 1755} 1756 1757// ContainerServiceListResult the response from the List Container Services operation. 1758type ContainerServiceListResult struct { 1759 autorest.Response `json:"-"` 1760 // Value - the list of container services. 1761 Value *[]ContainerService `json:"value,omitempty"` 1762 // NextLink - The URL to get the next set of container service results. 1763 NextLink *string `json:"nextLink,omitempty"` 1764} 1765 1766// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values. 1767type ContainerServiceListResultIterator struct { 1768 i int 1769 page ContainerServiceListResultPage 1770} 1771 1772// NextWithContext advances to the next value. If there was an error making 1773// the request the iterator does not advance and the error is returned. 1774func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) { 1775 if tracing.IsEnabled() { 1776 ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.NextWithContext") 1777 defer func() { 1778 sc := -1 1779 if iter.Response().Response.Response != nil { 1780 sc = iter.Response().Response.Response.StatusCode 1781 } 1782 tracing.EndSpan(ctx, sc, err) 1783 }() 1784 } 1785 iter.i++ 1786 if iter.i < len(iter.page.Values()) { 1787 return nil 1788 } 1789 err = iter.page.NextWithContext(ctx) 1790 if err != nil { 1791 iter.i-- 1792 return err 1793 } 1794 iter.i = 0 1795 return nil 1796} 1797 1798// Next advances to the next value. If there was an error making 1799// the request the iterator does not advance and the error is returned. 1800// Deprecated: Use NextWithContext() instead. 1801func (iter *ContainerServiceListResultIterator) Next() error { 1802 return iter.NextWithContext(context.Background()) 1803} 1804 1805// NotDone returns true if the enumeration should be started or is not yet complete. 1806func (iter ContainerServiceListResultIterator) NotDone() bool { 1807 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1808} 1809 1810// Response returns the raw server response from the last page request. 1811func (iter ContainerServiceListResultIterator) Response() ContainerServiceListResult { 1812 return iter.page.Response() 1813} 1814 1815// Value returns the current value or a zero-initialized value if the 1816// iterator has advanced beyond the end of the collection. 1817func (iter ContainerServiceListResultIterator) Value() ContainerService { 1818 if !iter.page.NotDone() { 1819 return ContainerService{} 1820 } 1821 return iter.page.Values()[iter.i] 1822} 1823 1824// Creates a new instance of the ContainerServiceListResultIterator type. 1825func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator { 1826 return ContainerServiceListResultIterator{page: page} 1827} 1828 1829// IsEmpty returns true if the ListResult contains no values. 1830func (cslr ContainerServiceListResult) IsEmpty() bool { 1831 return cslr.Value == nil || len(*cslr.Value) == 0 1832} 1833 1834// containerServiceListResultPreparer prepares a request to retrieve the next set of results. 1835// It returns nil if no more results exist. 1836func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) { 1837 if cslr.NextLink == nil || len(to.String(cslr.NextLink)) < 1 { 1838 return nil, nil 1839 } 1840 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1841 autorest.AsJSON(), 1842 autorest.AsGet(), 1843 autorest.WithBaseURL(to.String(cslr.NextLink))) 1844} 1845 1846// ContainerServiceListResultPage contains a page of ContainerService values. 1847type ContainerServiceListResultPage struct { 1848 fn func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error) 1849 cslr ContainerServiceListResult 1850} 1851 1852// NextWithContext advances to the next page of values. If there was an error making 1853// the request the page does not advance and the error is returned. 1854func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) { 1855 if tracing.IsEnabled() { 1856 ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext") 1857 defer func() { 1858 sc := -1 1859 if page.Response().Response.Response != nil { 1860 sc = page.Response().Response.Response.StatusCode 1861 } 1862 tracing.EndSpan(ctx, sc, err) 1863 }() 1864 } 1865 next, err := page.fn(ctx, page.cslr) 1866 if err != nil { 1867 return err 1868 } 1869 page.cslr = next 1870 return nil 1871} 1872 1873// Next advances to the next page of values. If there was an error making 1874// the request the page does not advance and the error is returned. 1875// Deprecated: Use NextWithContext() instead. 1876func (page *ContainerServiceListResultPage) Next() error { 1877 return page.NextWithContext(context.Background()) 1878} 1879 1880// NotDone returns true if the page enumeration should be started or is not yet complete. 1881func (page ContainerServiceListResultPage) NotDone() bool { 1882 return !page.cslr.IsEmpty() 1883} 1884 1885// Response returns the raw server response from the last page request. 1886func (page ContainerServiceListResultPage) Response() ContainerServiceListResult { 1887 return page.cslr 1888} 1889 1890// Values returns the slice of values for the current page or nil if there are no values. 1891func (page ContainerServiceListResultPage) Values() []ContainerService { 1892 if page.cslr.IsEmpty() { 1893 return nil 1894 } 1895 return *page.cslr.Value 1896} 1897 1898// Creates a new instance of the ContainerServiceListResultPage type. 1899func NewContainerServiceListResultPage(getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage { 1900 return ContainerServiceListResultPage{fn: getNextPage} 1901} 1902 1903// ContainerServiceMasterProfile profile for the container service master. 1904type ContainerServiceMasterProfile struct { 1905 // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. 1906 Count *int32 `json:"count,omitempty"` 1907 // DNSPrefix - DNS prefix to be used to create the FQDN for master. 1908 DNSPrefix *string `json:"dnsPrefix,omitempty"` 1909 // Fqdn - FDQN for the master. 1910 Fqdn *string `json:"fqdn,omitempty"` 1911} 1912 1913// ContainerServiceOrchestratorProfile profile for the container service orchestrator. 1914type ContainerServiceOrchestratorProfile struct { 1915 // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes' 1916 OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"` 1917} 1918 1919// ContainerServiceProperties properties of the container service. 1920type ContainerServiceProperties struct { 1921 // ProvisioningState - the current deployment or provisioning state, which only appears in the response. 1922 ProvisioningState *string `json:"provisioningState,omitempty"` 1923 // OrchestratorProfile - Properties of the orchestrator. 1924 OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"` 1925 // CustomProfile - Properties for custom clusters. 1926 CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"` 1927 // ServicePrincipalProfile - Properties for cluster service principals. 1928 ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` 1929 // MasterProfile - Properties of master agents. 1930 MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"` 1931 // AgentPoolProfiles - Properties of the agent pool. 1932 AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"` 1933 // WindowsProfile - Properties of Windows VMs. 1934 WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"` 1935 // LinuxProfile - Properties of Linux VMs. 1936 LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"` 1937 // DiagnosticsProfile - Properties of the diagnostic agent. 1938 DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 1939} 1940 1941// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 1942// long-running operation. 1943type ContainerServicesCreateOrUpdateFuture struct { 1944 azure.Future 1945} 1946 1947// Result returns the result of the asynchronous operation. 1948// If the operation has not completed it will return an error. 1949func (future *ContainerServicesCreateOrUpdateFuture) Result(client ContainerServicesClient) (cs ContainerService, err error) { 1950 var done bool 1951 done, err = future.Done(client) 1952 if err != nil { 1953 err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 1954 return 1955 } 1956 if !done { 1957 err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture") 1958 return 1959 } 1960 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1961 if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent { 1962 cs, err = client.CreateOrUpdateResponder(cs.Response.Response) 1963 if err != nil { 1964 err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request") 1965 } 1966 } 1967 return 1968} 1969 1970// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 1971// operation. 1972type ContainerServicesDeleteFuture struct { 1973 azure.Future 1974} 1975 1976// Result returns the result of the asynchronous operation. 1977// If the operation has not completed it will return an error. 1978func (future *ContainerServicesDeleteFuture) Result(client ContainerServicesClient) (ar autorest.Response, err error) { 1979 var done bool 1980 done, err = future.Done(client) 1981 if err != nil { 1982 err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure") 1983 return 1984 } 1985 if !done { 1986 err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture") 1987 return 1988 } 1989 ar.Response = future.Response() 1990 return 1991} 1992 1993// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster 1994// to use for manipulating Azure APIs. 1995type ContainerServiceServicePrincipalProfile struct { 1996 // ClientID - The ID for the service principal. 1997 ClientID *string `json:"clientId,omitempty"` 1998 // Secret - The secret password associated with the service principal. 1999 Secret *string `json:"secret,omitempty"` 2000} 2001 2002// ContainerServiceSSHConfiguration SSH configuration for Linux-based VMs running on Azure. 2003type ContainerServiceSSHConfiguration struct { 2004 // PublicKeys - the list of SSH public keys used to authenticate with Linux-based VMs. 2005 PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"` 2006} 2007 2008// ContainerServiceSSHPublicKey contains information about SSH certificate public key data. 2009type ContainerServiceSSHPublicKey struct { 2010 // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. 2011 KeyData *string `json:"keyData,omitempty"` 2012} 2013 2014// ContainerServiceVMDiagnostics profile for diagnostics on the container service VMs. 2015type ContainerServiceVMDiagnostics struct { 2016 // Enabled - Whether the VM diagnostic agent is provisioned on the VM. 2017 Enabled *bool `json:"enabled,omitempty"` 2018 // StorageURI - The URI of the storage account where diagnostics are stored. 2019 StorageURI *string `json:"storageUri,omitempty"` 2020} 2021 2022// ContainerServiceWindowsProfile profile for Windows VMs in the container service cluster. 2023type ContainerServiceWindowsProfile struct { 2024 // AdminUsername - The administrator username to use for Windows VMs. 2025 AdminUsername *string `json:"adminUsername,omitempty"` 2026 // AdminPassword - The administrator password to use for Windows VMs. 2027 AdminPassword *string `json:"adminPassword,omitempty"` 2028} 2029 2030// CreationData data used when creating a disk. 2031type CreationData struct { 2032 // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore' 2033 CreateOption DiskCreateOption `json:"createOption,omitempty"` 2034 // StorageAccountID - If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription 2035 StorageAccountID *string `json:"storageAccountId,omitempty"` 2036 // ImageReference - Disk source information. 2037 ImageReference *ImageDiskReference `json:"imageReference,omitempty"` 2038 // SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk. 2039 SourceURI *string `json:"sourceUri,omitempty"` 2040 // SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk. 2041 SourceResourceID *string `json:"sourceResourceId,omitempty"` 2042} 2043 2044// DataDisk describes a data disk. 2045type DataDisk struct { 2046 // Lun - 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 each data disk attached to a VM. 2047 Lun *int32 `json:"lun,omitempty"` 2048 // Name - The disk name. 2049 Name *string `json:"name,omitempty"` 2050 // Vhd - The virtual hard disk. 2051 Vhd *VirtualHardDisk `json:"vhd,omitempty"` 2052 // 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 provided, the destination virtual hard drive must not exist. 2053 Image *VirtualHardDisk `json:"image,omitempty"` 2054 // Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' 2055 Caching CachingTypes `json:"caching,omitempty"` 2056 // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. 2057 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 2058 // CreateOption - Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **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 element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' 2059 CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` 2060 // DiskSizeGB - 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. <br><br> This value cannot be larger than 1023 GB 2061 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 2062 // ManagedDisk - The managed disk parameters. 2063 ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` 2064} 2065 2066// DataDiskImage contains the data disk images information. 2067type DataDiskImage struct { 2068 // Lun - 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 each data disk attached to a VM. 2069 Lun *int32 `json:"lun,omitempty"` 2070} 2071 2072// DiagnosticsProfile specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2073// 2015-06-15. 2074type DiagnosticsProfile struct { 2075 // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. 2076 BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"` 2077} 2078 2079// DiffDiskSettings describes the parameters of differencing disk settings that can be be specified for 2080// operating system disk. <br><br> NOTE: The differencing disk settings can only be specified for managed 2081// disk. 2082type DiffDiskSettings struct { 2083 // Option - Specifies the differencing disk settings for operating system disk. Possible values include: 'Local' 2084 Option DiffDiskOptions `json:"option,omitempty"` 2085} 2086 2087// Disallowed describes the disallowed disk types. 2088type Disallowed struct { 2089 // DiskTypes - A list of disk types. 2090 DiskTypes *[]string `json:"diskTypes,omitempty"` 2091} 2092 2093// Disk disk resource. 2094type Disk struct { 2095 autorest.Response `json:"-"` 2096 // ManagedBy - A relative URI containing the ID of the VM that has the disk attached. 2097 ManagedBy *string `json:"managedBy,omitempty"` 2098 Sku *DiskSku `json:"sku,omitempty"` 2099 // Zones - The Logical zone list for Disk. 2100 Zones *[]string `json:"zones,omitempty"` 2101 *DiskProperties `json:"properties,omitempty"` 2102 // ID - Resource Id 2103 ID *string `json:"id,omitempty"` 2104 // Name - Resource name 2105 Name *string `json:"name,omitempty"` 2106 // Type - Resource type 2107 Type *string `json:"type,omitempty"` 2108 // Location - Resource location 2109 Location *string `json:"location,omitempty"` 2110 // Tags - Resource tags 2111 Tags map[string]*string `json:"tags"` 2112} 2113 2114// MarshalJSON is the custom marshaler for Disk. 2115func (d Disk) MarshalJSON() ([]byte, error) { 2116 objectMap := make(map[string]interface{}) 2117 if d.ManagedBy != nil { 2118 objectMap["managedBy"] = d.ManagedBy 2119 } 2120 if d.Sku != nil { 2121 objectMap["sku"] = d.Sku 2122 } 2123 if d.Zones != nil { 2124 objectMap["zones"] = d.Zones 2125 } 2126 if d.DiskProperties != nil { 2127 objectMap["properties"] = d.DiskProperties 2128 } 2129 if d.ID != nil { 2130 objectMap["id"] = d.ID 2131 } 2132 if d.Name != nil { 2133 objectMap["name"] = d.Name 2134 } 2135 if d.Type != nil { 2136 objectMap["type"] = d.Type 2137 } 2138 if d.Location != nil { 2139 objectMap["location"] = d.Location 2140 } 2141 if d.Tags != nil { 2142 objectMap["tags"] = d.Tags 2143 } 2144 return json.Marshal(objectMap) 2145} 2146 2147// UnmarshalJSON is the custom unmarshaler for Disk struct. 2148func (d *Disk) UnmarshalJSON(body []byte) error { 2149 var m map[string]*json.RawMessage 2150 err := json.Unmarshal(body, &m) 2151 if err != nil { 2152 return err 2153 } 2154 for k, v := range m { 2155 switch k { 2156 case "managedBy": 2157 if v != nil { 2158 var managedBy string 2159 err = json.Unmarshal(*v, &managedBy) 2160 if err != nil { 2161 return err 2162 } 2163 d.ManagedBy = &managedBy 2164 } 2165 case "sku": 2166 if v != nil { 2167 var sku DiskSku 2168 err = json.Unmarshal(*v, &sku) 2169 if err != nil { 2170 return err 2171 } 2172 d.Sku = &sku 2173 } 2174 case "zones": 2175 if v != nil { 2176 var zones []string 2177 err = json.Unmarshal(*v, &zones) 2178 if err != nil { 2179 return err 2180 } 2181 d.Zones = &zones 2182 } 2183 case "properties": 2184 if v != nil { 2185 var diskProperties DiskProperties 2186 err = json.Unmarshal(*v, &diskProperties) 2187 if err != nil { 2188 return err 2189 } 2190 d.DiskProperties = &diskProperties 2191 } 2192 case "id": 2193 if v != nil { 2194 var ID string 2195 err = json.Unmarshal(*v, &ID) 2196 if err != nil { 2197 return err 2198 } 2199 d.ID = &ID 2200 } 2201 case "name": 2202 if v != nil { 2203 var name string 2204 err = json.Unmarshal(*v, &name) 2205 if err != nil { 2206 return err 2207 } 2208 d.Name = &name 2209 } 2210 case "type": 2211 if v != nil { 2212 var typeVar string 2213 err = json.Unmarshal(*v, &typeVar) 2214 if err != nil { 2215 return err 2216 } 2217 d.Type = &typeVar 2218 } 2219 case "location": 2220 if v != nil { 2221 var location string 2222 err = json.Unmarshal(*v, &location) 2223 if err != nil { 2224 return err 2225 } 2226 d.Location = &location 2227 } 2228 case "tags": 2229 if v != nil { 2230 var tags map[string]*string 2231 err = json.Unmarshal(*v, &tags) 2232 if err != nil { 2233 return err 2234 } 2235 d.Tags = tags 2236 } 2237 } 2238 } 2239 2240 return nil 2241} 2242 2243// DiskEncryptionSettings describes a Encryption Settings for a Disk 2244type DiskEncryptionSettings struct { 2245 // DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret. 2246 DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"` 2247 // KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault. 2248 KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"` 2249 // Enabled - Specifies whether disk encryption should be enabled on the virtual machine. 2250 Enabled *bool `json:"enabled,omitempty"` 2251} 2252 2253// DiskInstanceView the instance view of the disk. 2254type DiskInstanceView struct { 2255 // Name - The disk name. 2256 Name *string `json:"name,omitempty"` 2257 // EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15 2258 EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"` 2259 // Statuses - The resource status information. 2260 Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` 2261} 2262 2263// DiskList the List Disks operation response. 2264type DiskList struct { 2265 autorest.Response `json:"-"` 2266 // Value - A list of disks. 2267 Value *[]Disk `json:"value,omitempty"` 2268 // NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks. 2269 NextLink *string `json:"nextLink,omitempty"` 2270} 2271 2272// DiskListIterator provides access to a complete listing of Disk values. 2273type DiskListIterator struct { 2274 i int 2275 page DiskListPage 2276} 2277 2278// NextWithContext advances to the next value. If there was an error making 2279// the request the iterator does not advance and the error is returned. 2280func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) { 2281 if tracing.IsEnabled() { 2282 ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext") 2283 defer func() { 2284 sc := -1 2285 if iter.Response().Response.Response != nil { 2286 sc = iter.Response().Response.Response.StatusCode 2287 } 2288 tracing.EndSpan(ctx, sc, err) 2289 }() 2290 } 2291 iter.i++ 2292 if iter.i < len(iter.page.Values()) { 2293 return nil 2294 } 2295 err = iter.page.NextWithContext(ctx) 2296 if err != nil { 2297 iter.i-- 2298 return err 2299 } 2300 iter.i = 0 2301 return nil 2302} 2303 2304// Next advances to the next value. If there was an error making 2305// the request the iterator does not advance and the error is returned. 2306// Deprecated: Use NextWithContext() instead. 2307func (iter *DiskListIterator) Next() error { 2308 return iter.NextWithContext(context.Background()) 2309} 2310 2311// NotDone returns true if the enumeration should be started or is not yet complete. 2312func (iter DiskListIterator) NotDone() bool { 2313 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2314} 2315 2316// Response returns the raw server response from the last page request. 2317func (iter DiskListIterator) Response() DiskList { 2318 return iter.page.Response() 2319} 2320 2321// Value returns the current value or a zero-initialized value if the 2322// iterator has advanced beyond the end of the collection. 2323func (iter DiskListIterator) Value() Disk { 2324 if !iter.page.NotDone() { 2325 return Disk{} 2326 } 2327 return iter.page.Values()[iter.i] 2328} 2329 2330// Creates a new instance of the DiskListIterator type. 2331func NewDiskListIterator(page DiskListPage) DiskListIterator { 2332 return DiskListIterator{page: page} 2333} 2334 2335// IsEmpty returns true if the ListResult contains no values. 2336func (dl DiskList) IsEmpty() bool { 2337 return dl.Value == nil || len(*dl.Value) == 0 2338} 2339 2340// diskListPreparer prepares a request to retrieve the next set of results. 2341// It returns nil if no more results exist. 2342func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) { 2343 if dl.NextLink == nil || len(to.String(dl.NextLink)) < 1 { 2344 return nil, nil 2345 } 2346 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2347 autorest.AsJSON(), 2348 autorest.AsGet(), 2349 autorest.WithBaseURL(to.String(dl.NextLink))) 2350} 2351 2352// DiskListPage contains a page of Disk values. 2353type DiskListPage struct { 2354 fn func(context.Context, DiskList) (DiskList, error) 2355 dl DiskList 2356} 2357 2358// NextWithContext advances to the next page of values. If there was an error making 2359// the request the page does not advance and the error is returned. 2360func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) { 2361 if tracing.IsEnabled() { 2362 ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext") 2363 defer func() { 2364 sc := -1 2365 if page.Response().Response.Response != nil { 2366 sc = page.Response().Response.Response.StatusCode 2367 } 2368 tracing.EndSpan(ctx, sc, err) 2369 }() 2370 } 2371 next, err := page.fn(ctx, page.dl) 2372 if err != nil { 2373 return err 2374 } 2375 page.dl = next 2376 return nil 2377} 2378 2379// Next advances to the next page of values. If there was an error making 2380// the request the page does not advance and the error is returned. 2381// Deprecated: Use NextWithContext() instead. 2382func (page *DiskListPage) Next() error { 2383 return page.NextWithContext(context.Background()) 2384} 2385 2386// NotDone returns true if the page enumeration should be started or is not yet complete. 2387func (page DiskListPage) NotDone() bool { 2388 return !page.dl.IsEmpty() 2389} 2390 2391// Response returns the raw server response from the last page request. 2392func (page DiskListPage) Response() DiskList { 2393 return page.dl 2394} 2395 2396// Values returns the slice of values for the current page or nil if there are no values. 2397func (page DiskListPage) Values() []Disk { 2398 if page.dl.IsEmpty() { 2399 return nil 2400 } 2401 return *page.dl.Value 2402} 2403 2404// Creates a new instance of the DiskListPage type. 2405func NewDiskListPage(getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage { 2406 return DiskListPage{fn: getNextPage} 2407} 2408 2409// DiskProperties disk resource properties. 2410type DiskProperties struct { 2411 // TimeCreated - The time when the disk was created. 2412 TimeCreated *date.Time `json:"timeCreated,omitempty"` 2413 // OsType - The Operating System type. Possible values include: 'Windows', 'Linux' 2414 OsType OperatingSystemTypes `json:"osType,omitempty"` 2415 // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created. 2416 CreationData *CreationData `json:"creationData,omitempty"` 2417 // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. 2418 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 2419 // EncryptionSettings - Encryption settings for disk or snapshot 2420 EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"` 2421 // ProvisioningState - The disk provisioning state. 2422 ProvisioningState *string `json:"provisioningState,omitempty"` 2423 // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. 2424 DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` 2425 // DiskMBpsReadWrite - 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 of 10. 2426 DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"` 2427} 2428 2429// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 2430// operation. 2431type DisksCreateOrUpdateFuture struct { 2432 azure.Future 2433} 2434 2435// Result returns the result of the asynchronous operation. 2436// If the operation has not completed it will return an error. 2437func (future *DisksCreateOrUpdateFuture) Result(client DisksClient) (d Disk, err error) { 2438 var done bool 2439 done, err = future.Done(client) 2440 if err != nil { 2441 err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 2442 return 2443 } 2444 if !done { 2445 err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture") 2446 return 2447 } 2448 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2449 if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { 2450 d, err = client.CreateOrUpdateResponder(d.Response.Response) 2451 if err != nil { 2452 err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request") 2453 } 2454 } 2455 return 2456} 2457 2458// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 2459type DisksDeleteFuture struct { 2460 azure.Future 2461} 2462 2463// Result returns the result of the asynchronous operation. 2464// If the operation has not completed it will return an error. 2465func (future *DisksDeleteFuture) Result(client DisksClient) (ar autorest.Response, err error) { 2466 var done bool 2467 done, err = future.Done(client) 2468 if err != nil { 2469 err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure") 2470 return 2471 } 2472 if !done { 2473 err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture") 2474 return 2475 } 2476 ar.Response = future.Response() 2477 return 2478} 2479 2480// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running 2481// operation. 2482type DisksGrantAccessFuture struct { 2483 azure.Future 2484} 2485 2486// Result returns the result of the asynchronous operation. 2487// If the operation has not completed it will return an error. 2488func (future *DisksGrantAccessFuture) Result(client DisksClient) (au AccessURI, err error) { 2489 var done bool 2490 done, err = future.Done(client) 2491 if err != nil { 2492 err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure") 2493 return 2494 } 2495 if !done { 2496 err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture") 2497 return 2498 } 2499 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2500 if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent { 2501 au, err = client.GrantAccessResponder(au.Response.Response) 2502 if err != nil { 2503 err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request") 2504 } 2505 } 2506 return 2507} 2508 2509// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. 2510type DiskSku struct { 2511 // Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS' 2512 Name DiskStorageAccountTypes `json:"name,omitempty"` 2513 // Tier - The sku tier. 2514 Tier *string `json:"tier,omitempty"` 2515} 2516 2517// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running 2518// operation. 2519type DisksRevokeAccessFuture struct { 2520 azure.Future 2521} 2522 2523// Result returns the result of the asynchronous operation. 2524// If the operation has not completed it will return an error. 2525func (future *DisksRevokeAccessFuture) Result(client DisksClient) (ar autorest.Response, err error) { 2526 var done bool 2527 done, err = future.Done(client) 2528 if err != nil { 2529 err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure") 2530 return 2531 } 2532 if !done { 2533 err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture") 2534 return 2535 } 2536 ar.Response = future.Response() 2537 return 2538} 2539 2540// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. 2541type DisksUpdateFuture struct { 2542 azure.Future 2543} 2544 2545// Result returns the result of the asynchronous operation. 2546// If the operation has not completed it will return an error. 2547func (future *DisksUpdateFuture) Result(client DisksClient) (d Disk, err error) { 2548 var done bool 2549 done, err = future.Done(client) 2550 if err != nil { 2551 err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure") 2552 return 2553 } 2554 if !done { 2555 err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture") 2556 return 2557 } 2558 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2559 if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { 2560 d, err = client.UpdateResponder(d.Response.Response) 2561 if err != nil { 2562 err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request") 2563 } 2564 } 2565 return 2566} 2567 2568// DiskUpdate disk update resource. 2569type DiskUpdate struct { 2570 *DiskUpdateProperties `json:"properties,omitempty"` 2571 // Tags - Resource tags 2572 Tags map[string]*string `json:"tags"` 2573 Sku *DiskSku `json:"sku,omitempty"` 2574} 2575 2576// MarshalJSON is the custom marshaler for DiskUpdate. 2577func (du DiskUpdate) MarshalJSON() ([]byte, error) { 2578 objectMap := make(map[string]interface{}) 2579 if du.DiskUpdateProperties != nil { 2580 objectMap["properties"] = du.DiskUpdateProperties 2581 } 2582 if du.Tags != nil { 2583 objectMap["tags"] = du.Tags 2584 } 2585 if du.Sku != nil { 2586 objectMap["sku"] = du.Sku 2587 } 2588 return json.Marshal(objectMap) 2589} 2590 2591// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct. 2592func (du *DiskUpdate) UnmarshalJSON(body []byte) error { 2593 var m map[string]*json.RawMessage 2594 err := json.Unmarshal(body, &m) 2595 if err != nil { 2596 return err 2597 } 2598 for k, v := range m { 2599 switch k { 2600 case "properties": 2601 if v != nil { 2602 var diskUpdateProperties DiskUpdateProperties 2603 err = json.Unmarshal(*v, &diskUpdateProperties) 2604 if err != nil { 2605 return err 2606 } 2607 du.DiskUpdateProperties = &diskUpdateProperties 2608 } 2609 case "tags": 2610 if v != nil { 2611 var tags map[string]*string 2612 err = json.Unmarshal(*v, &tags) 2613 if err != nil { 2614 return err 2615 } 2616 du.Tags = tags 2617 } 2618 case "sku": 2619 if v != nil { 2620 var sku DiskSku 2621 err = json.Unmarshal(*v, &sku) 2622 if err != nil { 2623 return err 2624 } 2625 du.Sku = &sku 2626 } 2627 } 2628 } 2629 2630 return nil 2631} 2632 2633// DiskUpdateProperties disk resource update properties. 2634type DiskUpdateProperties struct { 2635 // OsType - the Operating System type. Possible values include: 'Windows', 'Linux' 2636 OsType OperatingSystemTypes `json:"osType,omitempty"` 2637 // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. 2638 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 2639 // EncryptionSettings - Encryption settings for disk or snapshot 2640 EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"` 2641 // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. 2642 DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` 2643 // DiskMBpsReadWrite - 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 of 10. 2644 DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"` 2645} 2646 2647// EncryptionSettings encryption settings for disk or snapshot 2648type EncryptionSettings struct { 2649 // Enabled - Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. 2650 Enabled *bool `json:"enabled,omitempty"` 2651 // DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key 2652 DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"` 2653 // KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key 2654 KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"` 2655} 2656 2657// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 2658// operation. 2659type GalleriesCreateOrUpdateFuture struct { 2660 azure.Future 2661} 2662 2663// Result returns the result of the asynchronous operation. 2664// If the operation has not completed it will return an error. 2665func (future *GalleriesCreateOrUpdateFuture) Result(client GalleriesClient) (g Gallery, err error) { 2666 var done bool 2667 done, err = future.Done(client) 2668 if err != nil { 2669 err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 2670 return 2671 } 2672 if !done { 2673 err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture") 2674 return 2675 } 2676 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2677 if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent { 2678 g, err = client.CreateOrUpdateResponder(g.Response.Response) 2679 if err != nil { 2680 err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request") 2681 } 2682 } 2683 return 2684} 2685 2686// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 2687// operation. 2688type GalleriesDeleteFuture struct { 2689 azure.Future 2690} 2691 2692// Result returns the result of the asynchronous operation. 2693// If the operation has not completed it will return an error. 2694func (future *GalleriesDeleteFuture) Result(client GalleriesClient) (ar autorest.Response, err error) { 2695 var done bool 2696 done, err = future.Done(client) 2697 if err != nil { 2698 err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure") 2699 return 2700 } 2701 if !done { 2702 err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture") 2703 return 2704 } 2705 ar.Response = future.Response() 2706 return 2707} 2708 2709// Gallery specifies information about the Shared Image Gallery that you want to create or update. 2710type Gallery struct { 2711 autorest.Response `json:"-"` 2712 *GalleryProperties `json:"properties,omitempty"` 2713 // ID - Resource Id 2714 ID *string `json:"id,omitempty"` 2715 // Name - Resource name 2716 Name *string `json:"name,omitempty"` 2717 // Type - Resource type 2718 Type *string `json:"type,omitempty"` 2719 // Location - Resource location 2720 Location *string `json:"location,omitempty"` 2721 // Tags - Resource tags 2722 Tags map[string]*string `json:"tags"` 2723} 2724 2725// MarshalJSON is the custom marshaler for Gallery. 2726func (g Gallery) MarshalJSON() ([]byte, error) { 2727 objectMap := make(map[string]interface{}) 2728 if g.GalleryProperties != nil { 2729 objectMap["properties"] = g.GalleryProperties 2730 } 2731 if g.ID != nil { 2732 objectMap["id"] = g.ID 2733 } 2734 if g.Name != nil { 2735 objectMap["name"] = g.Name 2736 } 2737 if g.Type != nil { 2738 objectMap["type"] = g.Type 2739 } 2740 if g.Location != nil { 2741 objectMap["location"] = g.Location 2742 } 2743 if g.Tags != nil { 2744 objectMap["tags"] = g.Tags 2745 } 2746 return json.Marshal(objectMap) 2747} 2748 2749// UnmarshalJSON is the custom unmarshaler for Gallery struct. 2750func (g *Gallery) UnmarshalJSON(body []byte) error { 2751 var m map[string]*json.RawMessage 2752 err := json.Unmarshal(body, &m) 2753 if err != nil { 2754 return err 2755 } 2756 for k, v := range m { 2757 switch k { 2758 case "properties": 2759 if v != nil { 2760 var galleryProperties GalleryProperties 2761 err = json.Unmarshal(*v, &galleryProperties) 2762 if err != nil { 2763 return err 2764 } 2765 g.GalleryProperties = &galleryProperties 2766 } 2767 case "id": 2768 if v != nil { 2769 var ID string 2770 err = json.Unmarshal(*v, &ID) 2771 if err != nil { 2772 return err 2773 } 2774 g.ID = &ID 2775 } 2776 case "name": 2777 if v != nil { 2778 var name string 2779 err = json.Unmarshal(*v, &name) 2780 if err != nil { 2781 return err 2782 } 2783 g.Name = &name 2784 } 2785 case "type": 2786 if v != nil { 2787 var typeVar string 2788 err = json.Unmarshal(*v, &typeVar) 2789 if err != nil { 2790 return err 2791 } 2792 g.Type = &typeVar 2793 } 2794 case "location": 2795 if v != nil { 2796 var location string 2797 err = json.Unmarshal(*v, &location) 2798 if err != nil { 2799 return err 2800 } 2801 g.Location = &location 2802 } 2803 case "tags": 2804 if v != nil { 2805 var tags map[string]*string 2806 err = json.Unmarshal(*v, &tags) 2807 if err != nil { 2808 return err 2809 } 2810 g.Tags = tags 2811 } 2812 } 2813 } 2814 2815 return nil 2816} 2817 2818// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile. 2819type GalleryArtifactPublishingProfileBase struct { 2820 // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updateable. 2821 TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"` 2822 Source *GalleryArtifactSource `json:"source,omitempty"` 2823} 2824 2825// GalleryArtifactSource the source image from which the Image Version is going to be created. 2826type GalleryArtifactSource struct { 2827 ManagedImage *ManagedArtifact `json:"managedImage,omitempty"` 2828} 2829 2830// GalleryDataDiskImage this is the data disk image. 2831type GalleryDataDiskImage struct { 2832 // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. 2833 Lun *int32 `json:"lun,omitempty"` 2834 // SizeInGB - This property indicates the size of the VHD to be created. 2835 SizeInGB *int32 `json:"sizeInGB,omitempty"` 2836 // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' 2837 HostCaching HostCaching `json:"hostCaching,omitempty"` 2838} 2839 2840// GalleryDiskImage this is the disk image base class. 2841type GalleryDiskImage struct { 2842 // SizeInGB - This property indicates the size of the VHD to be created. 2843 SizeInGB *int32 `json:"sizeInGB,omitempty"` 2844 // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' 2845 HostCaching HostCaching `json:"hostCaching,omitempty"` 2846} 2847 2848// GalleryIdentifier describes the gallery unique name. 2849type GalleryIdentifier struct { 2850 // UniqueName - The unique name of the Shared Image Gallery. This name is generated automatically by Azure. 2851 UniqueName *string `json:"uniqueName,omitempty"` 2852} 2853 2854// GalleryImage specifies information about the gallery Image Definition that you want to create or update. 2855type GalleryImage struct { 2856 autorest.Response `json:"-"` 2857 *GalleryImageProperties `json:"properties,omitempty"` 2858 // ID - Resource Id 2859 ID *string `json:"id,omitempty"` 2860 // Name - Resource name 2861 Name *string `json:"name,omitempty"` 2862 // Type - Resource type 2863 Type *string `json:"type,omitempty"` 2864 // Location - Resource location 2865 Location *string `json:"location,omitempty"` 2866 // Tags - Resource tags 2867 Tags map[string]*string `json:"tags"` 2868} 2869 2870// MarshalJSON is the custom marshaler for GalleryImage. 2871func (gi GalleryImage) MarshalJSON() ([]byte, error) { 2872 objectMap := make(map[string]interface{}) 2873 if gi.GalleryImageProperties != nil { 2874 objectMap["properties"] = gi.GalleryImageProperties 2875 } 2876 if gi.ID != nil { 2877 objectMap["id"] = gi.ID 2878 } 2879 if gi.Name != nil { 2880 objectMap["name"] = gi.Name 2881 } 2882 if gi.Type != nil { 2883 objectMap["type"] = gi.Type 2884 } 2885 if gi.Location != nil { 2886 objectMap["location"] = gi.Location 2887 } 2888 if gi.Tags != nil { 2889 objectMap["tags"] = gi.Tags 2890 } 2891 return json.Marshal(objectMap) 2892} 2893 2894// UnmarshalJSON is the custom unmarshaler for GalleryImage struct. 2895func (gi *GalleryImage) UnmarshalJSON(body []byte) error { 2896 var m map[string]*json.RawMessage 2897 err := json.Unmarshal(body, &m) 2898 if err != nil { 2899 return err 2900 } 2901 for k, v := range m { 2902 switch k { 2903 case "properties": 2904 if v != nil { 2905 var galleryImageProperties GalleryImageProperties 2906 err = json.Unmarshal(*v, &galleryImageProperties) 2907 if err != nil { 2908 return err 2909 } 2910 gi.GalleryImageProperties = &galleryImageProperties 2911 } 2912 case "id": 2913 if v != nil { 2914 var ID string 2915 err = json.Unmarshal(*v, &ID) 2916 if err != nil { 2917 return err 2918 } 2919 gi.ID = &ID 2920 } 2921 case "name": 2922 if v != nil { 2923 var name string 2924 err = json.Unmarshal(*v, &name) 2925 if err != nil { 2926 return err 2927 } 2928 gi.Name = &name 2929 } 2930 case "type": 2931 if v != nil { 2932 var typeVar string 2933 err = json.Unmarshal(*v, &typeVar) 2934 if err != nil { 2935 return err 2936 } 2937 gi.Type = &typeVar 2938 } 2939 case "location": 2940 if v != nil { 2941 var location string 2942 err = json.Unmarshal(*v, &location) 2943 if err != nil { 2944 return err 2945 } 2946 gi.Location = &location 2947 } 2948 case "tags": 2949 if v != nil { 2950 var tags map[string]*string 2951 err = json.Unmarshal(*v, &tags) 2952 if err != nil { 2953 return err 2954 } 2955 gi.Tags = tags 2956 } 2957 } 2958 } 2959 2960 return nil 2961} 2962 2963// GalleryImageIdentifier this is the gallery Image Definition identifier. 2964type GalleryImageIdentifier struct { 2965 // Publisher - The name of the gallery Image Definition publisher. 2966 Publisher *string `json:"publisher,omitempty"` 2967 // Offer - The name of the gallery Image Definition offer. 2968 Offer *string `json:"offer,omitempty"` 2969 // Sku - The name of the gallery Image Definition SKU. 2970 Sku *string `json:"sku,omitempty"` 2971} 2972 2973// GalleryImageList the List Gallery Images operation response. 2974type GalleryImageList struct { 2975 autorest.Response `json:"-"` 2976 // Value - A list of Shared Image Gallery images. 2977 Value *[]GalleryImage `json:"value,omitempty"` 2978 // NextLink - 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. 2979 NextLink *string `json:"nextLink,omitempty"` 2980} 2981 2982// GalleryImageListIterator provides access to a complete listing of GalleryImage values. 2983type GalleryImageListIterator struct { 2984 i int 2985 page GalleryImageListPage 2986} 2987 2988// NextWithContext advances to the next value. If there was an error making 2989// the request the iterator does not advance and the error is returned. 2990func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) { 2991 if tracing.IsEnabled() { 2992 ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext") 2993 defer func() { 2994 sc := -1 2995 if iter.Response().Response.Response != nil { 2996 sc = iter.Response().Response.Response.StatusCode 2997 } 2998 tracing.EndSpan(ctx, sc, err) 2999 }() 3000 } 3001 iter.i++ 3002 if iter.i < len(iter.page.Values()) { 3003 return nil 3004 } 3005 err = iter.page.NextWithContext(ctx) 3006 if err != nil { 3007 iter.i-- 3008 return err 3009 } 3010 iter.i = 0 3011 return nil 3012} 3013 3014// Next advances to the next value. If there was an error making 3015// the request the iterator does not advance and the error is returned. 3016// Deprecated: Use NextWithContext() instead. 3017func (iter *GalleryImageListIterator) Next() error { 3018 return iter.NextWithContext(context.Background()) 3019} 3020 3021// NotDone returns true if the enumeration should be started or is not yet complete. 3022func (iter GalleryImageListIterator) NotDone() bool { 3023 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3024} 3025 3026// Response returns the raw server response from the last page request. 3027func (iter GalleryImageListIterator) Response() GalleryImageList { 3028 return iter.page.Response() 3029} 3030 3031// Value returns the current value or a zero-initialized value if the 3032// iterator has advanced beyond the end of the collection. 3033func (iter GalleryImageListIterator) Value() GalleryImage { 3034 if !iter.page.NotDone() { 3035 return GalleryImage{} 3036 } 3037 return iter.page.Values()[iter.i] 3038} 3039 3040// Creates a new instance of the GalleryImageListIterator type. 3041func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator { 3042 return GalleryImageListIterator{page: page} 3043} 3044 3045// IsEmpty returns true if the ListResult contains no values. 3046func (gil GalleryImageList) IsEmpty() bool { 3047 return gil.Value == nil || len(*gil.Value) == 0 3048} 3049 3050// galleryImageListPreparer prepares a request to retrieve the next set of results. 3051// It returns nil if no more results exist. 3052func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) { 3053 if gil.NextLink == nil || len(to.String(gil.NextLink)) < 1 { 3054 return nil, nil 3055 } 3056 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3057 autorest.AsJSON(), 3058 autorest.AsGet(), 3059 autorest.WithBaseURL(to.String(gil.NextLink))) 3060} 3061 3062// GalleryImageListPage contains a page of GalleryImage values. 3063type GalleryImageListPage struct { 3064 fn func(context.Context, GalleryImageList) (GalleryImageList, error) 3065 gil GalleryImageList 3066} 3067 3068// NextWithContext advances to the next page of values. If there was an error making 3069// the request the page does not advance and the error is returned. 3070func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) { 3071 if tracing.IsEnabled() { 3072 ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext") 3073 defer func() { 3074 sc := -1 3075 if page.Response().Response.Response != nil { 3076 sc = page.Response().Response.Response.StatusCode 3077 } 3078 tracing.EndSpan(ctx, sc, err) 3079 }() 3080 } 3081 next, err := page.fn(ctx, page.gil) 3082 if err != nil { 3083 return err 3084 } 3085 page.gil = next 3086 return nil 3087} 3088 3089// Next advances to the next page of values. If there was an error making 3090// the request the page does not advance and the error is returned. 3091// Deprecated: Use NextWithContext() instead. 3092func (page *GalleryImageListPage) Next() error { 3093 return page.NextWithContext(context.Background()) 3094} 3095 3096// NotDone returns true if the page enumeration should be started or is not yet complete. 3097func (page GalleryImageListPage) NotDone() bool { 3098 return !page.gil.IsEmpty() 3099} 3100 3101// Response returns the raw server response from the last page request. 3102func (page GalleryImageListPage) Response() GalleryImageList { 3103 return page.gil 3104} 3105 3106// Values returns the slice of values for the current page or nil if there are no values. 3107func (page GalleryImageListPage) Values() []GalleryImage { 3108 if page.gil.IsEmpty() { 3109 return nil 3110 } 3111 return *page.gil.Value 3112} 3113 3114// Creates a new instance of the GalleryImageListPage type. 3115func NewGalleryImageListPage(getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage { 3116 return GalleryImageListPage{fn: getNextPage} 3117} 3118 3119// GalleryImageProperties describes the properties of a gallery Image Definition. 3120type GalleryImageProperties struct { 3121 // Description - The description of this gallery Image Definition resource. This property is updateable. 3122 Description *string `json:"description,omitempty"` 3123 // Eula - The Eula agreement for the gallery Image Definition. 3124 Eula *string `json:"eula,omitempty"` 3125 // PrivacyStatementURI - The privacy statement uri. 3126 PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"` 3127 // ReleaseNoteURI - The release note uri. 3128 ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"` 3129 // OsType - 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. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux' 3130 OsType OperatingSystemTypes `json:"osType,omitempty"` 3131 // OsState - The allowed values for OS State are 'Generalized'. Possible values include: 'Generalized', 'Specialized' 3132 OsState OperatingSystemStateTypes `json:"osState,omitempty"` 3133 // EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updateable. 3134 EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` 3135 Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` 3136 Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"` 3137 Disallowed *Disallowed `json:"disallowed,omitempty"` 3138 PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"` 3139 // ProvisioningState - The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating' 3140 ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"` 3141} 3142 3143// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 3144// long-running operation. 3145type GalleryImagesCreateOrUpdateFuture struct { 3146 azure.Future 3147} 3148 3149// Result returns the result of the asynchronous operation. 3150// If the operation has not completed it will return an error. 3151func (future *GalleryImagesCreateOrUpdateFuture) Result(client GalleryImagesClient) (gi GalleryImage, err error) { 3152 var done bool 3153 done, err = future.Done(client) 3154 if err != nil { 3155 err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 3156 return 3157 } 3158 if !done { 3159 err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture") 3160 return 3161 } 3162 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3163 if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent { 3164 gi, err = client.CreateOrUpdateResponder(gi.Response.Response) 3165 if err != nil { 3166 err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request") 3167 } 3168 } 3169 return 3170} 3171 3172// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 3173// operation. 3174type GalleryImagesDeleteFuture struct { 3175 azure.Future 3176} 3177 3178// Result returns the result of the asynchronous operation. 3179// If the operation has not completed it will return an error. 3180func (future *GalleryImagesDeleteFuture) Result(client GalleryImagesClient) (ar autorest.Response, err error) { 3181 var done bool 3182 done, err = future.Done(client) 3183 if err != nil { 3184 err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure") 3185 return 3186 } 3187 if !done { 3188 err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture") 3189 return 3190 } 3191 ar.Response = future.Response() 3192 return 3193} 3194 3195// GalleryImageVersion specifies information about the gallery Image Version that you want to create or 3196// update. 3197type GalleryImageVersion struct { 3198 autorest.Response `json:"-"` 3199 *GalleryImageVersionProperties `json:"properties,omitempty"` 3200 // ID - Resource Id 3201 ID *string `json:"id,omitempty"` 3202 // Name - Resource name 3203 Name *string `json:"name,omitempty"` 3204 // Type - Resource type 3205 Type *string `json:"type,omitempty"` 3206 // Location - Resource location 3207 Location *string `json:"location,omitempty"` 3208 // Tags - Resource tags 3209 Tags map[string]*string `json:"tags"` 3210} 3211 3212// MarshalJSON is the custom marshaler for GalleryImageVersion. 3213func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) { 3214 objectMap := make(map[string]interface{}) 3215 if giv.GalleryImageVersionProperties != nil { 3216 objectMap["properties"] = giv.GalleryImageVersionProperties 3217 } 3218 if giv.ID != nil { 3219 objectMap["id"] = giv.ID 3220 } 3221 if giv.Name != nil { 3222 objectMap["name"] = giv.Name 3223 } 3224 if giv.Type != nil { 3225 objectMap["type"] = giv.Type 3226 } 3227 if giv.Location != nil { 3228 objectMap["location"] = giv.Location 3229 } 3230 if giv.Tags != nil { 3231 objectMap["tags"] = giv.Tags 3232 } 3233 return json.Marshal(objectMap) 3234} 3235 3236// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct. 3237func (giv *GalleryImageVersion) UnmarshalJSON(body []byte) error { 3238 var m map[string]*json.RawMessage 3239 err := json.Unmarshal(body, &m) 3240 if err != nil { 3241 return err 3242 } 3243 for k, v := range m { 3244 switch k { 3245 case "properties": 3246 if v != nil { 3247 var galleryImageVersionProperties GalleryImageVersionProperties 3248 err = json.Unmarshal(*v, &galleryImageVersionProperties) 3249 if err != nil { 3250 return err 3251 } 3252 giv.GalleryImageVersionProperties = &galleryImageVersionProperties 3253 } 3254 case "id": 3255 if v != nil { 3256 var ID string 3257 err = json.Unmarshal(*v, &ID) 3258 if err != nil { 3259 return err 3260 } 3261 giv.ID = &ID 3262 } 3263 case "name": 3264 if v != nil { 3265 var name string 3266 err = json.Unmarshal(*v, &name) 3267 if err != nil { 3268 return err 3269 } 3270 giv.Name = &name 3271 } 3272 case "type": 3273 if v != nil { 3274 var typeVar string 3275 err = json.Unmarshal(*v, &typeVar) 3276 if err != nil { 3277 return err 3278 } 3279 giv.Type = &typeVar 3280 } 3281 case "location": 3282 if v != nil { 3283 var location string 3284 err = json.Unmarshal(*v, &location) 3285 if err != nil { 3286 return err 3287 } 3288 giv.Location = &location 3289 } 3290 case "tags": 3291 if v != nil { 3292 var tags map[string]*string 3293 err = json.Unmarshal(*v, &tags) 3294 if err != nil { 3295 return err 3296 } 3297 giv.Tags = tags 3298 } 3299 } 3300 } 3301 3302 return nil 3303} 3304 3305// GalleryImageVersionList the List Gallery Image version operation response. 3306type GalleryImageVersionList struct { 3307 autorest.Response `json:"-"` 3308 // Value - A list of gallery Image Versions. 3309 Value *[]GalleryImageVersion `json:"value,omitempty"` 3310 // NextLink - The uri to fetch the next page of gallery Image Versions. Call ListNext() with this to fetch the next page of gallery Image Versions. 3311 NextLink *string `json:"nextLink,omitempty"` 3312} 3313 3314// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values. 3315type GalleryImageVersionListIterator struct { 3316 i int 3317 page GalleryImageVersionListPage 3318} 3319 3320// NextWithContext advances to the next value. If there was an error making 3321// the request the iterator does not advance and the error is returned. 3322func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) { 3323 if tracing.IsEnabled() { 3324 ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext") 3325 defer func() { 3326 sc := -1 3327 if iter.Response().Response.Response != nil { 3328 sc = iter.Response().Response.Response.StatusCode 3329 } 3330 tracing.EndSpan(ctx, sc, err) 3331 }() 3332 } 3333 iter.i++ 3334 if iter.i < len(iter.page.Values()) { 3335 return nil 3336 } 3337 err = iter.page.NextWithContext(ctx) 3338 if err != nil { 3339 iter.i-- 3340 return err 3341 } 3342 iter.i = 0 3343 return nil 3344} 3345 3346// Next advances to the next value. If there was an error making 3347// the request the iterator does not advance and the error is returned. 3348// Deprecated: Use NextWithContext() instead. 3349func (iter *GalleryImageVersionListIterator) Next() error { 3350 return iter.NextWithContext(context.Background()) 3351} 3352 3353// NotDone returns true if the enumeration should be started or is not yet complete. 3354func (iter GalleryImageVersionListIterator) NotDone() bool { 3355 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3356} 3357 3358// Response returns the raw server response from the last page request. 3359func (iter GalleryImageVersionListIterator) Response() GalleryImageVersionList { 3360 return iter.page.Response() 3361} 3362 3363// Value returns the current value or a zero-initialized value if the 3364// iterator has advanced beyond the end of the collection. 3365func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion { 3366 if !iter.page.NotDone() { 3367 return GalleryImageVersion{} 3368 } 3369 return iter.page.Values()[iter.i] 3370} 3371 3372// Creates a new instance of the GalleryImageVersionListIterator type. 3373func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator { 3374 return GalleryImageVersionListIterator{page: page} 3375} 3376 3377// IsEmpty returns true if the ListResult contains no values. 3378func (givl GalleryImageVersionList) IsEmpty() bool { 3379 return givl.Value == nil || len(*givl.Value) == 0 3380} 3381 3382// galleryImageVersionListPreparer prepares a request to retrieve the next set of results. 3383// It returns nil if no more results exist. 3384func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) { 3385 if givl.NextLink == nil || len(to.String(givl.NextLink)) < 1 { 3386 return nil, nil 3387 } 3388 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3389 autorest.AsJSON(), 3390 autorest.AsGet(), 3391 autorest.WithBaseURL(to.String(givl.NextLink))) 3392} 3393 3394// GalleryImageVersionListPage contains a page of GalleryImageVersion values. 3395type GalleryImageVersionListPage struct { 3396 fn func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error) 3397 givl GalleryImageVersionList 3398} 3399 3400// NextWithContext advances to the next page of values. If there was an error making 3401// the request the page does not advance and the error is returned. 3402func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) { 3403 if tracing.IsEnabled() { 3404 ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext") 3405 defer func() { 3406 sc := -1 3407 if page.Response().Response.Response != nil { 3408 sc = page.Response().Response.Response.StatusCode 3409 } 3410 tracing.EndSpan(ctx, sc, err) 3411 }() 3412 } 3413 next, err := page.fn(ctx, page.givl) 3414 if err != nil { 3415 return err 3416 } 3417 page.givl = next 3418 return nil 3419} 3420 3421// Next advances to the next page of values. If there was an error making 3422// the request the page does not advance and the error is returned. 3423// Deprecated: Use NextWithContext() instead. 3424func (page *GalleryImageVersionListPage) Next() error { 3425 return page.NextWithContext(context.Background()) 3426} 3427 3428// NotDone returns true if the page enumeration should be started or is not yet complete. 3429func (page GalleryImageVersionListPage) NotDone() bool { 3430 return !page.givl.IsEmpty() 3431} 3432 3433// Response returns the raw server response from the last page request. 3434func (page GalleryImageVersionListPage) Response() GalleryImageVersionList { 3435 return page.givl 3436} 3437 3438// Values returns the slice of values for the current page or nil if there are no values. 3439func (page GalleryImageVersionListPage) Values() []GalleryImageVersion { 3440 if page.givl.IsEmpty() { 3441 return nil 3442 } 3443 return *page.givl.Value 3444} 3445 3446// Creates a new instance of the GalleryImageVersionListPage type. 3447func NewGalleryImageVersionListPage(getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage { 3448 return GalleryImageVersionListPage{fn: getNextPage} 3449} 3450 3451// GalleryImageVersionProperties describes the properties of a gallery Image Version. 3452type GalleryImageVersionProperties struct { 3453 PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"` 3454 // ProvisioningState - The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating' 3455 ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"` 3456 StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"` 3457 ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"` 3458} 3459 3460// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version. 3461type GalleryImageVersionPublishingProfile struct { 3462 // ReplicaCount - 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. This property is updateable. 3463 ReplicaCount *int32 `json:"replicaCount,omitempty"` 3464 // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. 3465 ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"` 3466 // PublishedDate - The timestamp for when the gallery Image Version is published. 3467 PublishedDate *date.Time `json:"publishedDate,omitempty"` 3468 // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updateable. 3469 EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` 3470 // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updateable. 3471 TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"` 3472 Source *GalleryArtifactSource `json:"source,omitempty"` 3473} 3474 3475// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 3476// long-running operation. 3477type GalleryImageVersionsCreateOrUpdateFuture struct { 3478 azure.Future 3479} 3480 3481// Result returns the result of the asynchronous operation. 3482// If the operation has not completed it will return an error. 3483func (future *GalleryImageVersionsCreateOrUpdateFuture) Result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) { 3484 var done bool 3485 done, err = future.Done(client) 3486 if err != nil { 3487 err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 3488 return 3489 } 3490 if !done { 3491 err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture") 3492 return 3493 } 3494 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3495 if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent { 3496 giv, err = client.CreateOrUpdateResponder(giv.Response.Response) 3497 if err != nil { 3498 err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request") 3499 } 3500 } 3501 return 3502} 3503 3504// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a 3505// long-running operation. 3506type GalleryImageVersionsDeleteFuture struct { 3507 azure.Future 3508} 3509 3510// Result returns the result of the asynchronous operation. 3511// If the operation has not completed it will return an error. 3512func (future *GalleryImageVersionsDeleteFuture) Result(client GalleryImageVersionsClient) (ar autorest.Response, err error) { 3513 var done bool 3514 done, err = future.Done(client) 3515 if err != nil { 3516 err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure") 3517 return 3518 } 3519 if !done { 3520 err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture") 3521 return 3522 } 3523 ar.Response = future.Response() 3524 return 3525} 3526 3527// GalleryImageVersionStorageProfile this is the storage profile of a gallery Image Version. 3528type GalleryImageVersionStorageProfile struct { 3529 OsDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"` 3530 // DataDiskImages - A list of data disk images. 3531 DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"` 3532} 3533 3534// GalleryList the List Galleries operation response. 3535type GalleryList struct { 3536 autorest.Response `json:"-"` 3537 // Value - A list of galleries. 3538 Value *[]Gallery `json:"value,omitempty"` 3539 // NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries. 3540 NextLink *string `json:"nextLink,omitempty"` 3541} 3542 3543// GalleryListIterator provides access to a complete listing of Gallery values. 3544type GalleryListIterator struct { 3545 i int 3546 page GalleryListPage 3547} 3548 3549// NextWithContext advances to the next value. If there was an error making 3550// the request the iterator does not advance and the error is returned. 3551func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) { 3552 if tracing.IsEnabled() { 3553 ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext") 3554 defer func() { 3555 sc := -1 3556 if iter.Response().Response.Response != nil { 3557 sc = iter.Response().Response.Response.StatusCode 3558 } 3559 tracing.EndSpan(ctx, sc, err) 3560 }() 3561 } 3562 iter.i++ 3563 if iter.i < len(iter.page.Values()) { 3564 return nil 3565 } 3566 err = iter.page.NextWithContext(ctx) 3567 if err != nil { 3568 iter.i-- 3569 return err 3570 } 3571 iter.i = 0 3572 return nil 3573} 3574 3575// Next advances to the next value. If there was an error making 3576// the request the iterator does not advance and the error is returned. 3577// Deprecated: Use NextWithContext() instead. 3578func (iter *GalleryListIterator) Next() error { 3579 return iter.NextWithContext(context.Background()) 3580} 3581 3582// NotDone returns true if the enumeration should be started or is not yet complete. 3583func (iter GalleryListIterator) NotDone() bool { 3584 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3585} 3586 3587// Response returns the raw server response from the last page request. 3588func (iter GalleryListIterator) Response() GalleryList { 3589 return iter.page.Response() 3590} 3591 3592// Value returns the current value or a zero-initialized value if the 3593// iterator has advanced beyond the end of the collection. 3594func (iter GalleryListIterator) Value() Gallery { 3595 if !iter.page.NotDone() { 3596 return Gallery{} 3597 } 3598 return iter.page.Values()[iter.i] 3599} 3600 3601// Creates a new instance of the GalleryListIterator type. 3602func NewGalleryListIterator(page GalleryListPage) GalleryListIterator { 3603 return GalleryListIterator{page: page} 3604} 3605 3606// IsEmpty returns true if the ListResult contains no values. 3607func (gl GalleryList) IsEmpty() bool { 3608 return gl.Value == nil || len(*gl.Value) == 0 3609} 3610 3611// galleryListPreparer prepares a request to retrieve the next set of results. 3612// It returns nil if no more results exist. 3613func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) { 3614 if gl.NextLink == nil || len(to.String(gl.NextLink)) < 1 { 3615 return nil, nil 3616 } 3617 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3618 autorest.AsJSON(), 3619 autorest.AsGet(), 3620 autorest.WithBaseURL(to.String(gl.NextLink))) 3621} 3622 3623// GalleryListPage contains a page of Gallery values. 3624type GalleryListPage struct { 3625 fn func(context.Context, GalleryList) (GalleryList, error) 3626 gl GalleryList 3627} 3628 3629// NextWithContext advances to the next page of values. If there was an error making 3630// the request the page does not advance and the error is returned. 3631func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) { 3632 if tracing.IsEnabled() { 3633 ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext") 3634 defer func() { 3635 sc := -1 3636 if page.Response().Response.Response != nil { 3637 sc = page.Response().Response.Response.StatusCode 3638 } 3639 tracing.EndSpan(ctx, sc, err) 3640 }() 3641 } 3642 next, err := page.fn(ctx, page.gl) 3643 if err != nil { 3644 return err 3645 } 3646 page.gl = next 3647 return nil 3648} 3649 3650// Next advances to the next page of values. If there was an error making 3651// the request the page does not advance and the error is returned. 3652// Deprecated: Use NextWithContext() instead. 3653func (page *GalleryListPage) Next() error { 3654 return page.NextWithContext(context.Background()) 3655} 3656 3657// NotDone returns true if the page enumeration should be started or is not yet complete. 3658func (page GalleryListPage) NotDone() bool { 3659 return !page.gl.IsEmpty() 3660} 3661 3662// Response returns the raw server response from the last page request. 3663func (page GalleryListPage) Response() GalleryList { 3664 return page.gl 3665} 3666 3667// Values returns the slice of values for the current page or nil if there are no values. 3668func (page GalleryListPage) Values() []Gallery { 3669 if page.gl.IsEmpty() { 3670 return nil 3671 } 3672 return *page.gl.Value 3673} 3674 3675// Creates a new instance of the GalleryListPage type. 3676func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage { 3677 return GalleryListPage{fn: getNextPage} 3678} 3679 3680// GalleryOSDiskImage this is the OS disk image. 3681type GalleryOSDiskImage struct { 3682 // SizeInGB - This property indicates the size of the VHD to be created. 3683 SizeInGB *int32 `json:"sizeInGB,omitempty"` 3684 // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' 3685 HostCaching HostCaching `json:"hostCaching,omitempty"` 3686} 3687 3688// GalleryProperties describes the properties of a Shared Image Gallery. 3689type GalleryProperties struct { 3690 // Description - The description of this Shared Image Gallery resource. This property is updateable. 3691 Description *string `json:"description,omitempty"` 3692 Identifier *GalleryIdentifier `json:"identifier,omitempty"` 3693 // ProvisioningState - The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating' 3694 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 3695} 3696 3697// GrantAccessData data used for requesting a SAS. 3698type GrantAccessData struct { 3699 // Access - Possible values include: 'None', 'Read' 3700 Access AccessLevel `json:"access,omitempty"` 3701 // DurationInSeconds - Time duration in seconds until the SAS access expires. 3702 DurationInSeconds *int32 `json:"durationInSeconds,omitempty"` 3703} 3704 3705// HardwareProfile specifies the hardware settings for the virtual machine. 3706type HardwareProfile struct { 3707 // VMSize - Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> The available VM sizes depend on region and availability set. For a list of available sizes use these APIs: <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24' 3708 VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"` 3709} 3710 3711// Image the source user image virtual hard disk. The virtual hard disk will be copied before being 3712// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not 3713// exist. 3714type Image struct { 3715 autorest.Response `json:"-"` 3716 *ImageProperties `json:"properties,omitempty"` 3717 // ID - Resource Id 3718 ID *string `json:"id,omitempty"` 3719 // Name - Resource name 3720 Name *string `json:"name,omitempty"` 3721 // Type - Resource type 3722 Type *string `json:"type,omitempty"` 3723 // Location - Resource location 3724 Location *string `json:"location,omitempty"` 3725 // Tags - Resource tags 3726 Tags map[string]*string `json:"tags"` 3727} 3728 3729// MarshalJSON is the custom marshaler for Image. 3730func (i Image) MarshalJSON() ([]byte, error) { 3731 objectMap := make(map[string]interface{}) 3732 if i.ImageProperties != nil { 3733 objectMap["properties"] = i.ImageProperties 3734 } 3735 if i.ID != nil { 3736 objectMap["id"] = i.ID 3737 } 3738 if i.Name != nil { 3739 objectMap["name"] = i.Name 3740 } 3741 if i.Type != nil { 3742 objectMap["type"] = i.Type 3743 } 3744 if i.Location != nil { 3745 objectMap["location"] = i.Location 3746 } 3747 if i.Tags != nil { 3748 objectMap["tags"] = i.Tags 3749 } 3750 return json.Marshal(objectMap) 3751} 3752 3753// UnmarshalJSON is the custom unmarshaler for Image struct. 3754func (i *Image) UnmarshalJSON(body []byte) error { 3755 var m map[string]*json.RawMessage 3756 err := json.Unmarshal(body, &m) 3757 if err != nil { 3758 return err 3759 } 3760 for k, v := range m { 3761 switch k { 3762 case "properties": 3763 if v != nil { 3764 var imageProperties ImageProperties 3765 err = json.Unmarshal(*v, &imageProperties) 3766 if err != nil { 3767 return err 3768 } 3769 i.ImageProperties = &imageProperties 3770 } 3771 case "id": 3772 if v != nil { 3773 var ID string 3774 err = json.Unmarshal(*v, &ID) 3775 if err != nil { 3776 return err 3777 } 3778 i.ID = &ID 3779 } 3780 case "name": 3781 if v != nil { 3782 var name string 3783 err = json.Unmarshal(*v, &name) 3784 if err != nil { 3785 return err 3786 } 3787 i.Name = &name 3788 } 3789 case "type": 3790 if v != nil { 3791 var typeVar string 3792 err = json.Unmarshal(*v, &typeVar) 3793 if err != nil { 3794 return err 3795 } 3796 i.Type = &typeVar 3797 } 3798 case "location": 3799 if v != nil { 3800 var location string 3801 err = json.Unmarshal(*v, &location) 3802 if err != nil { 3803 return err 3804 } 3805 i.Location = &location 3806 } 3807 case "tags": 3808 if v != nil { 3809 var tags map[string]*string 3810 err = json.Unmarshal(*v, &tags) 3811 if err != nil { 3812 return err 3813 } 3814 i.Tags = tags 3815 } 3816 } 3817 } 3818 3819 return nil 3820} 3821 3822// ImageDataDisk describes a data disk. 3823type ImageDataDisk struct { 3824 // Lun - 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 each data disk attached to a VM. 3825 Lun *int32 `json:"lun,omitempty"` 3826 // Snapshot - The snapshot. 3827 Snapshot *SubResource `json:"snapshot,omitempty"` 3828 // ManagedDisk - The managedDisk. 3829 ManagedDisk *SubResource `json:"managedDisk,omitempty"` 3830 // BlobURI - The Virtual Hard Disk. 3831 BlobURI *string `json:"blobUri,omitempty"` 3832 // Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' 3833 Caching CachingTypes `json:"caching,omitempty"` 3834 // DiskSizeGB - 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. <br><br> This value cannot be larger than 1023 GB 3835 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 3836 // StorageAccountType - 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. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' 3837 StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` 3838} 3839 3840// ImageDiskReference the source image used for creating the disk. 3841type ImageDiskReference struct { 3842 // ID - A relative uri containing either a Platform Image Repository or user image reference. 3843 ID *string `json:"id,omitempty"` 3844 // Lun - 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 is null. 3845 Lun *int32 `json:"lun,omitempty"` 3846} 3847 3848// ImageListResult the List Image operation response. 3849type ImageListResult struct { 3850 autorest.Response `json:"-"` 3851 // Value - The list of Images. 3852 Value *[]Image `json:"value,omitempty"` 3853 // NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images. 3854 NextLink *string `json:"nextLink,omitempty"` 3855} 3856 3857// ImageListResultIterator provides access to a complete listing of Image values. 3858type ImageListResultIterator struct { 3859 i int 3860 page ImageListResultPage 3861} 3862 3863// NextWithContext advances to the next value. If there was an error making 3864// the request the iterator does not advance and the error is returned. 3865func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) { 3866 if tracing.IsEnabled() { 3867 ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext") 3868 defer func() { 3869 sc := -1 3870 if iter.Response().Response.Response != nil { 3871 sc = iter.Response().Response.Response.StatusCode 3872 } 3873 tracing.EndSpan(ctx, sc, err) 3874 }() 3875 } 3876 iter.i++ 3877 if iter.i < len(iter.page.Values()) { 3878 return nil 3879 } 3880 err = iter.page.NextWithContext(ctx) 3881 if err != nil { 3882 iter.i-- 3883 return err 3884 } 3885 iter.i = 0 3886 return nil 3887} 3888 3889// Next advances to the next value. If there was an error making 3890// the request the iterator does not advance and the error is returned. 3891// Deprecated: Use NextWithContext() instead. 3892func (iter *ImageListResultIterator) Next() error { 3893 return iter.NextWithContext(context.Background()) 3894} 3895 3896// NotDone returns true if the enumeration should be started or is not yet complete. 3897func (iter ImageListResultIterator) NotDone() bool { 3898 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3899} 3900 3901// Response returns the raw server response from the last page request. 3902func (iter ImageListResultIterator) Response() ImageListResult { 3903 return iter.page.Response() 3904} 3905 3906// Value returns the current value or a zero-initialized value if the 3907// iterator has advanced beyond the end of the collection. 3908func (iter ImageListResultIterator) Value() Image { 3909 if !iter.page.NotDone() { 3910 return Image{} 3911 } 3912 return iter.page.Values()[iter.i] 3913} 3914 3915// Creates a new instance of the ImageListResultIterator type. 3916func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator { 3917 return ImageListResultIterator{page: page} 3918} 3919 3920// IsEmpty returns true if the ListResult contains no values. 3921func (ilr ImageListResult) IsEmpty() bool { 3922 return ilr.Value == nil || len(*ilr.Value) == 0 3923} 3924 3925// imageListResultPreparer prepares a request to retrieve the next set of results. 3926// It returns nil if no more results exist. 3927func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) { 3928 if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { 3929 return nil, nil 3930 } 3931 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3932 autorest.AsJSON(), 3933 autorest.AsGet(), 3934 autorest.WithBaseURL(to.String(ilr.NextLink))) 3935} 3936 3937// ImageListResultPage contains a page of Image values. 3938type ImageListResultPage struct { 3939 fn func(context.Context, ImageListResult) (ImageListResult, error) 3940 ilr ImageListResult 3941} 3942 3943// NextWithContext advances to the next page of values. If there was an error making 3944// the request the page does not advance and the error is returned. 3945func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) { 3946 if tracing.IsEnabled() { 3947 ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext") 3948 defer func() { 3949 sc := -1 3950 if page.Response().Response.Response != nil { 3951 sc = page.Response().Response.Response.StatusCode 3952 } 3953 tracing.EndSpan(ctx, sc, err) 3954 }() 3955 } 3956 next, err := page.fn(ctx, page.ilr) 3957 if err != nil { 3958 return err 3959 } 3960 page.ilr = next 3961 return nil 3962} 3963 3964// Next advances to the next page of values. If there was an error making 3965// the request the page does not advance and the error is returned. 3966// Deprecated: Use NextWithContext() instead. 3967func (page *ImageListResultPage) Next() error { 3968 return page.NextWithContext(context.Background()) 3969} 3970 3971// NotDone returns true if the page enumeration should be started or is not yet complete. 3972func (page ImageListResultPage) NotDone() bool { 3973 return !page.ilr.IsEmpty() 3974} 3975 3976// Response returns the raw server response from the last page request. 3977func (page ImageListResultPage) Response() ImageListResult { 3978 return page.ilr 3979} 3980 3981// Values returns the slice of values for the current page or nil if there are no values. 3982func (page ImageListResultPage) Values() []Image { 3983 if page.ilr.IsEmpty() { 3984 return nil 3985 } 3986 return *page.ilr.Value 3987} 3988 3989// Creates a new instance of the ImageListResultPage type. 3990func NewImageListResultPage(getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage { 3991 return ImageListResultPage{fn: getNextPage} 3992} 3993 3994// ImageOSDisk describes an Operating System disk. 3995type ImageOSDisk struct { 3996 // OsType - 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. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux' 3997 OsType OperatingSystemTypes `json:"osType,omitempty"` 3998 // OsState - The OS State. Possible values include: 'Generalized', 'Specialized' 3999 OsState OperatingSystemStateTypes `json:"osState,omitempty"` 4000 // Snapshot - The snapshot. 4001 Snapshot *SubResource `json:"snapshot,omitempty"` 4002 // ManagedDisk - The managedDisk. 4003 ManagedDisk *SubResource `json:"managedDisk,omitempty"` 4004 // BlobURI - The Virtual Hard Disk. 4005 BlobURI *string `json:"blobUri,omitempty"` 4006 // Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' 4007 Caching CachingTypes `json:"caching,omitempty"` 4008 // DiskSizeGB - 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. <br><br> This value cannot be larger than 1023 GB 4009 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 4010 // StorageAccountType - Specifies the storage account type for the managed disk. UltraSSD_LRS cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' 4011 StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` 4012} 4013 4014// ImageProperties describes the properties of an Image. 4015type ImageProperties struct { 4016 // SourceVirtualMachine - The source virtual machine from which Image is created. 4017 SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"` 4018 // StorageProfile - Specifies the storage settings for the virtual machine disks. 4019 StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"` 4020 // ProvisioningState - The provisioning state. 4021 ProvisioningState *string `json:"provisioningState,omitempty"` 4022} 4023 4024// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace 4025// images. 4026type ImagePurchasePlan struct { 4027 // Name - The plan ID. 4028 Name *string `json:"name,omitempty"` 4029 // Publisher - The publisher ID. 4030 Publisher *string `json:"publisher,omitempty"` 4031 // Product - The product ID. 4032 Product *string `json:"product,omitempty"` 4033} 4034 4035// ImageReference specifies information about the image to use. You can specify information about platform 4036// images, marketplace images, or virtual machine images. This element is required when you want to use a 4037// platform image, marketplace image, or virtual machine image, but is not used in other creation 4038// operations. 4039type ImageReference struct { 4040 // Publisher - The image publisher. 4041 Publisher *string `json:"publisher,omitempty"` 4042 // Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine. 4043 Offer *string `json:"offer,omitempty"` 4044 // Sku - The image SKU. 4045 Sku *string `json:"sku,omitempty"` 4046 // Version - 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'. Major, Minor, and Build are decimal numbers. 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 after deploy time even if a new version becomes available. 4047 Version *string `json:"version,omitempty"` 4048 // ID - Resource Id 4049 ID *string `json:"id,omitempty"` 4050} 4051 4052// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 4053// operation. 4054type ImagesCreateOrUpdateFuture struct { 4055 azure.Future 4056} 4057 4058// Result returns the result of the asynchronous operation. 4059// If the operation has not completed it will return an error. 4060func (future *ImagesCreateOrUpdateFuture) Result(client ImagesClient) (i Image, err error) { 4061 var done bool 4062 done, err = future.Done(client) 4063 if err != nil { 4064 err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 4065 return 4066 } 4067 if !done { 4068 err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture") 4069 return 4070 } 4071 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4072 if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { 4073 i, err = client.CreateOrUpdateResponder(i.Response.Response) 4074 if err != nil { 4075 err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") 4076 } 4077 } 4078 return 4079} 4080 4081// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 4082type ImagesDeleteFuture struct { 4083 azure.Future 4084} 4085 4086// Result returns the result of the asynchronous operation. 4087// If the operation has not completed it will return an error. 4088func (future *ImagesDeleteFuture) Result(client ImagesClient) (ar autorest.Response, err error) { 4089 var done bool 4090 done, err = future.Done(client) 4091 if err != nil { 4092 err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure") 4093 return 4094 } 4095 if !done { 4096 err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture") 4097 return 4098 } 4099 ar.Response = future.Response() 4100 return 4101} 4102 4103// ImageStorageProfile describes a storage profile. 4104type ImageStorageProfile struct { 4105 // OsDisk - Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). 4106 OsDisk *ImageOSDisk `json:"osDisk,omitempty"` 4107 // DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). 4108 DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"` 4109 // ZoneResilient - 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 Storage (ZRS). 4110 ZoneResilient *bool `json:"zoneResilient,omitempty"` 4111} 4112 4113// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. 4114type ImagesUpdateFuture struct { 4115 azure.Future 4116} 4117 4118// Result returns the result of the asynchronous operation. 4119// If the operation has not completed it will return an error. 4120func (future *ImagesUpdateFuture) Result(client ImagesClient) (i Image, err error) { 4121 var done bool 4122 done, err = future.Done(client) 4123 if err != nil { 4124 err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure") 4125 return 4126 } 4127 if !done { 4128 err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture") 4129 return 4130 } 4131 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4132 if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { 4133 i, err = client.UpdateResponder(i.Response.Response) 4134 if err != nil { 4135 err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request") 4136 } 4137 } 4138 return 4139} 4140 4141// ImageUpdate the source user image virtual hard disk. Only tags may be updated. 4142type ImageUpdate struct { 4143 *ImageProperties `json:"properties,omitempty"` 4144 // Tags - Resource tags 4145 Tags map[string]*string `json:"tags"` 4146} 4147 4148// MarshalJSON is the custom marshaler for ImageUpdate. 4149func (iu ImageUpdate) MarshalJSON() ([]byte, error) { 4150 objectMap := make(map[string]interface{}) 4151 if iu.ImageProperties != nil { 4152 objectMap["properties"] = iu.ImageProperties 4153 } 4154 if iu.Tags != nil { 4155 objectMap["tags"] = iu.Tags 4156 } 4157 return json.Marshal(objectMap) 4158} 4159 4160// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct. 4161func (iu *ImageUpdate) UnmarshalJSON(body []byte) error { 4162 var m map[string]*json.RawMessage 4163 err := json.Unmarshal(body, &m) 4164 if err != nil { 4165 return err 4166 } 4167 for k, v := range m { 4168 switch k { 4169 case "properties": 4170 if v != nil { 4171 var imageProperties ImageProperties 4172 err = json.Unmarshal(*v, &imageProperties) 4173 if err != nil { 4174 return err 4175 } 4176 iu.ImageProperties = &imageProperties 4177 } 4178 case "tags": 4179 if v != nil { 4180 var tags map[string]*string 4181 err = json.Unmarshal(*v, &tags) 4182 if err != nil { 4183 return err 4184 } 4185 iu.Tags = tags 4186 } 4187 } 4188 } 4189 4190 return nil 4191} 4192 4193// InnerError inner error details. 4194type InnerError struct { 4195 // Exceptiontype - The exception type. 4196 Exceptiontype *string `json:"exceptiontype,omitempty"` 4197 // Errordetail - The internal error message or exception dump. 4198 Errordetail *string `json:"errordetail,omitempty"` 4199} 4200 4201// InstanceViewStatus instance view status. 4202type InstanceViewStatus struct { 4203 // Code - The status code. 4204 Code *string `json:"code,omitempty"` 4205 // Level - The level code. Possible values include: 'Info', 'Warning', 'Error' 4206 Level StatusLevelTypes `json:"level,omitempty"` 4207 // DisplayStatus - The short localizable label for the status. 4208 DisplayStatus *string `json:"displayStatus,omitempty"` 4209 // Message - The detailed status message, including for alerts and error messages. 4210 Message *string `json:"message,omitempty"` 4211 // Time - The time of the status. 4212 Time *date.Time `json:"time,omitempty"` 4213} 4214 4215// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used 4216// to unwrap the encryptionKey 4217type KeyVaultAndKeyReference struct { 4218 // SourceVault - Resource id of the KeyVault containing the key or secret 4219 SourceVault *SourceVault `json:"sourceVault,omitempty"` 4220 // KeyURL - Url pointing to a key or secret in KeyVault 4221 KeyURL *string `json:"keyUrl,omitempty"` 4222} 4223 4224// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key 4225type KeyVaultAndSecretReference struct { 4226 // SourceVault - Resource id of the KeyVault containing the key or secret 4227 SourceVault *SourceVault `json:"sourceVault,omitempty"` 4228 // SecretURL - Url pointing to a key or secret in KeyVault 4229 SecretURL *string `json:"secretUrl,omitempty"` 4230} 4231 4232// KeyVaultKeyReference describes a reference to Key Vault Key 4233type KeyVaultKeyReference struct { 4234 // KeyURL - The URL referencing a key encryption key in Key Vault. 4235 KeyURL *string `json:"keyUrl,omitempty"` 4236 // SourceVault - The relative URL of the Key Vault containing the key. 4237 SourceVault *SubResource `json:"sourceVault,omitempty"` 4238} 4239 4240// KeyVaultSecretReference describes a reference to Key Vault Secret 4241type KeyVaultSecretReference struct { 4242 // SecretURL - The URL referencing a secret in a Key Vault. 4243 SecretURL *string `json:"secretUrl,omitempty"` 4244 // SourceVault - The relative URL of the Key Vault containing the secret. 4245 SourceVault *SubResource `json:"sourceVault,omitempty"` 4246} 4247 4248// LinuxConfiguration specifies the Linux operating system settings on the virtual machine. <br><br>For a 4249// list of supported Linux distributions, see [Linux on Azure-Endorsed 4250// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) 4251// <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed 4252// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). 4253type LinuxConfiguration struct { 4254 // DisablePasswordAuthentication - Specifies whether password authentication should be disabled. 4255 DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` 4256 // SSH - Specifies the ssh key configuration for a Linux OS. 4257 SSH *SSHConfiguration `json:"ssh,omitempty"` 4258 // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> 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 so that extensions can be added to the VM later. 4259 ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` 4260} 4261 4262// ListUsagesResult the List Usages operation response. 4263type ListUsagesResult struct { 4264 autorest.Response `json:"-"` 4265 // Value - The list of compute resource usages. 4266 Value *[]Usage `json:"value,omitempty"` 4267 // NextLink - 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. 4268 NextLink *string `json:"nextLink,omitempty"` 4269} 4270 4271// ListUsagesResultIterator provides access to a complete listing of Usage values. 4272type ListUsagesResultIterator struct { 4273 i int 4274 page ListUsagesResultPage 4275} 4276 4277// NextWithContext advances to the next value. If there was an error making 4278// the request the iterator does not advance and the error is returned. 4279func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) { 4280 if tracing.IsEnabled() { 4281 ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext") 4282 defer func() { 4283 sc := -1 4284 if iter.Response().Response.Response != nil { 4285 sc = iter.Response().Response.Response.StatusCode 4286 } 4287 tracing.EndSpan(ctx, sc, err) 4288 }() 4289 } 4290 iter.i++ 4291 if iter.i < len(iter.page.Values()) { 4292 return nil 4293 } 4294 err = iter.page.NextWithContext(ctx) 4295 if err != nil { 4296 iter.i-- 4297 return err 4298 } 4299 iter.i = 0 4300 return nil 4301} 4302 4303// Next advances to the next value. If there was an error making 4304// the request the iterator does not advance and the error is returned. 4305// Deprecated: Use NextWithContext() instead. 4306func (iter *ListUsagesResultIterator) Next() error { 4307 return iter.NextWithContext(context.Background()) 4308} 4309 4310// NotDone returns true if the enumeration should be started or is not yet complete. 4311func (iter ListUsagesResultIterator) NotDone() bool { 4312 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4313} 4314 4315// Response returns the raw server response from the last page request. 4316func (iter ListUsagesResultIterator) Response() ListUsagesResult { 4317 return iter.page.Response() 4318} 4319 4320// Value returns the current value or a zero-initialized value if the 4321// iterator has advanced beyond the end of the collection. 4322func (iter ListUsagesResultIterator) Value() Usage { 4323 if !iter.page.NotDone() { 4324 return Usage{} 4325 } 4326 return iter.page.Values()[iter.i] 4327} 4328 4329// Creates a new instance of the ListUsagesResultIterator type. 4330func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator { 4331 return ListUsagesResultIterator{page: page} 4332} 4333 4334// IsEmpty returns true if the ListResult contains no values. 4335func (lur ListUsagesResult) IsEmpty() bool { 4336 return lur.Value == nil || len(*lur.Value) == 0 4337} 4338 4339// listUsagesResultPreparer prepares a request to retrieve the next set of results. 4340// It returns nil if no more results exist. 4341func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) { 4342 if lur.NextLink == nil || len(to.String(lur.NextLink)) < 1 { 4343 return nil, nil 4344 } 4345 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4346 autorest.AsJSON(), 4347 autorest.AsGet(), 4348 autorest.WithBaseURL(to.String(lur.NextLink))) 4349} 4350 4351// ListUsagesResultPage contains a page of Usage values. 4352type ListUsagesResultPage struct { 4353 fn func(context.Context, ListUsagesResult) (ListUsagesResult, error) 4354 lur ListUsagesResult 4355} 4356 4357// NextWithContext advances to the next page of values. If there was an error making 4358// the request the page does not advance and the error is returned. 4359func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) { 4360 if tracing.IsEnabled() { 4361 ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext") 4362 defer func() { 4363 sc := -1 4364 if page.Response().Response.Response != nil { 4365 sc = page.Response().Response.Response.StatusCode 4366 } 4367 tracing.EndSpan(ctx, sc, err) 4368 }() 4369 } 4370 next, err := page.fn(ctx, page.lur) 4371 if err != nil { 4372 return err 4373 } 4374 page.lur = next 4375 return nil 4376} 4377 4378// Next advances to the next page of values. If there was an error making 4379// the request the page does not advance and the error is returned. 4380// Deprecated: Use NextWithContext() instead. 4381func (page *ListUsagesResultPage) Next() error { 4382 return page.NextWithContext(context.Background()) 4383} 4384 4385// NotDone returns true if the page enumeration should be started or is not yet complete. 4386func (page ListUsagesResultPage) NotDone() bool { 4387 return !page.lur.IsEmpty() 4388} 4389 4390// Response returns the raw server response from the last page request. 4391func (page ListUsagesResultPage) Response() ListUsagesResult { 4392 return page.lur 4393} 4394 4395// Values returns the slice of values for the current page or nil if there are no values. 4396func (page ListUsagesResultPage) Values() []Usage { 4397 if page.lur.IsEmpty() { 4398 return nil 4399 } 4400 return *page.lur.Value 4401} 4402 4403// Creates a new instance of the ListUsagesResultPage type. 4404func NewListUsagesResultPage(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage { 4405 return ListUsagesResultPage{fn: getNextPage} 4406} 4407 4408// ListVirtualMachineExtensionImage ... 4409type ListVirtualMachineExtensionImage struct { 4410 autorest.Response `json:"-"` 4411 Value *[]VirtualMachineExtensionImage `json:"value,omitempty"` 4412} 4413 4414// ListVirtualMachineImageResource ... 4415type ListVirtualMachineImageResource struct { 4416 autorest.Response `json:"-"` 4417 Value *[]VirtualMachineImageResource `json:"value,omitempty"` 4418} 4419 4420// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results 4421// of a long-running operation. 4422type LogAnalyticsExportRequestRateByIntervalFuture struct { 4423 azure.Future 4424} 4425 4426// Result returns the result of the asynchronous operation. 4427// If the operation has not completed it will return an error. 4428func (future *LogAnalyticsExportRequestRateByIntervalFuture) Result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) { 4429 var done bool 4430 done, err = future.Done(client) 4431 if err != nil { 4432 err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure") 4433 return 4434 } 4435 if !done { 4436 err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture") 4437 return 4438 } 4439 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4440 if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent { 4441 laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response) 4442 if err != nil { 4443 err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request") 4444 } 4445 } 4446 return 4447} 4448 4449// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a 4450// long-running operation. 4451type LogAnalyticsExportThrottledRequestsFuture struct { 4452 azure.Future 4453} 4454 4455// Result returns the result of the asynchronous operation. 4456// If the operation has not completed it will return an error. 4457func (future *LogAnalyticsExportThrottledRequestsFuture) Result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) { 4458 var done bool 4459 done, err = future.Done(client) 4460 if err != nil { 4461 err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure") 4462 return 4463 } 4464 if !done { 4465 err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture") 4466 return 4467 } 4468 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4469 if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent { 4470 laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response) 4471 if err != nil { 4472 err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request") 4473 } 4474 } 4475 return 4476} 4477 4478// LogAnalyticsInputBase api input base class for LogAnalytics Api. 4479type LogAnalyticsInputBase struct { 4480 // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. 4481 BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` 4482 // FromTime - From time of the query 4483 FromTime *date.Time `json:"fromTime,omitempty"` 4484 // ToTime - To time of the query 4485 ToTime *date.Time `json:"toTime,omitempty"` 4486 // GroupByThrottlePolicy - Group query result by Throttle Policy applied. 4487 GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` 4488 // GroupByOperationName - Group query result by by Operation Name. 4489 GroupByOperationName *bool `json:"groupByOperationName,omitempty"` 4490 // GroupByResourceName - Group query result by Resource Name. 4491 GroupByResourceName *bool `json:"groupByResourceName,omitempty"` 4492} 4493 4494// LogAnalyticsOperationResult logAnalytics operation status response 4495type LogAnalyticsOperationResult struct { 4496 autorest.Response `json:"-"` 4497 // Properties - LogAnalyticsOutput 4498 Properties *LogAnalyticsOutput `json:"properties,omitempty"` 4499} 4500 4501// LogAnalyticsOutput logAnalytics output properties 4502type LogAnalyticsOutput struct { 4503 // Output - Output file Uri path to blob container. 4504 Output *string `json:"output,omitempty"` 4505} 4506 4507// MaintenanceRedeployStatus maintenance Operation Status. 4508type MaintenanceRedeployStatus struct { 4509 // IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance. 4510 IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"` 4511 // PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window. 4512 PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"` 4513 // PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window. 4514 PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"` 4515 // MaintenanceWindowStartTime - Start Time for the Maintenance Window. 4516 MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"` 4517 // MaintenanceWindowEndTime - End Time for the Maintenance Window. 4518 MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"` 4519 // LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted' 4520 LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"` 4521 // LastOperationMessage - Message returned for the last Maintenance Operation. 4522 LastOperationMessage *string `json:"lastOperationMessage,omitempty"` 4523} 4524 4525// ManagedArtifact the managed artifact. 4526type ManagedArtifact struct { 4527 // ID - The managed artifact id. 4528 ID *string `json:"id,omitempty"` 4529} 4530 4531// ManagedDiskParameters the parameters of a managed disk. 4532type ManagedDiskParameters struct { 4533 // StorageAccountType - 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. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' 4534 StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` 4535 // ID - Resource Id 4536 ID *string `json:"id,omitempty"` 4537} 4538 4539// NetworkInterfaceReference describes a network interface reference. 4540type NetworkInterfaceReference struct { 4541 *NetworkInterfaceReferenceProperties `json:"properties,omitempty"` 4542 // ID - Resource Id 4543 ID *string `json:"id,omitempty"` 4544} 4545 4546// MarshalJSON is the custom marshaler for NetworkInterfaceReference. 4547func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) { 4548 objectMap := make(map[string]interface{}) 4549 if nir.NetworkInterfaceReferenceProperties != nil { 4550 objectMap["properties"] = nir.NetworkInterfaceReferenceProperties 4551 } 4552 if nir.ID != nil { 4553 objectMap["id"] = nir.ID 4554 } 4555 return json.Marshal(objectMap) 4556} 4557 4558// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct. 4559func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error { 4560 var m map[string]*json.RawMessage 4561 err := json.Unmarshal(body, &m) 4562 if err != nil { 4563 return err 4564 } 4565 for k, v := range m { 4566 switch k { 4567 case "properties": 4568 if v != nil { 4569 var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties 4570 err = json.Unmarshal(*v, &networkInterfaceReferenceProperties) 4571 if err != nil { 4572 return err 4573 } 4574 nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties 4575 } 4576 case "id": 4577 if v != nil { 4578 var ID string 4579 err = json.Unmarshal(*v, &ID) 4580 if err != nil { 4581 return err 4582 } 4583 nir.ID = &ID 4584 } 4585 } 4586 } 4587 4588 return nil 4589} 4590 4591// NetworkInterfaceReferenceProperties describes a network interface reference properties. 4592type NetworkInterfaceReferenceProperties struct { 4593 // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. 4594 Primary *bool `json:"primary,omitempty"` 4595} 4596 4597// NetworkProfile specifies the network interfaces of the virtual machine. 4598type NetworkProfile struct { 4599 // NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine. 4600 NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"` 4601} 4602 4603// OperationListResult the List Compute Operation operation response. 4604type OperationListResult struct { 4605 autorest.Response `json:"-"` 4606 // Value - The list of compute operations 4607 Value *[]OperationValue `json:"value,omitempty"` 4608} 4609 4610// OperationValue describes the properties of a Compute Operation value. 4611type OperationValue struct { 4612 // Origin - The origin of the compute operation. 4613 Origin *string `json:"origin,omitempty"` 4614 // Name - The name of the compute operation. 4615 Name *string `json:"name,omitempty"` 4616 *OperationValueDisplay `json:"display,omitempty"` 4617} 4618 4619// MarshalJSON is the custom marshaler for OperationValue. 4620func (ov OperationValue) MarshalJSON() ([]byte, error) { 4621 objectMap := make(map[string]interface{}) 4622 if ov.Origin != nil { 4623 objectMap["origin"] = ov.Origin 4624 } 4625 if ov.Name != nil { 4626 objectMap["name"] = ov.Name 4627 } 4628 if ov.OperationValueDisplay != nil { 4629 objectMap["display"] = ov.OperationValueDisplay 4630 } 4631 return json.Marshal(objectMap) 4632} 4633 4634// UnmarshalJSON is the custom unmarshaler for OperationValue struct. 4635func (ov *OperationValue) UnmarshalJSON(body []byte) error { 4636 var m map[string]*json.RawMessage 4637 err := json.Unmarshal(body, &m) 4638 if err != nil { 4639 return err 4640 } 4641 for k, v := range m { 4642 switch k { 4643 case "origin": 4644 if v != nil { 4645 var origin string 4646 err = json.Unmarshal(*v, &origin) 4647 if err != nil { 4648 return err 4649 } 4650 ov.Origin = &origin 4651 } 4652 case "name": 4653 if v != nil { 4654 var name string 4655 err = json.Unmarshal(*v, &name) 4656 if err != nil { 4657 return err 4658 } 4659 ov.Name = &name 4660 } 4661 case "display": 4662 if v != nil { 4663 var operationValueDisplay OperationValueDisplay 4664 err = json.Unmarshal(*v, &operationValueDisplay) 4665 if err != nil { 4666 return err 4667 } 4668 ov.OperationValueDisplay = &operationValueDisplay 4669 } 4670 } 4671 } 4672 4673 return nil 4674} 4675 4676// OperationValueDisplay describes the properties of a Compute Operation Value Display. 4677type OperationValueDisplay struct { 4678 // Operation - The display name of the compute operation. 4679 Operation *string `json:"operation,omitempty"` 4680 // Resource - The display name of the resource the operation applies to. 4681 Resource *string `json:"resource,omitempty"` 4682 // Description - The description of the operation. 4683 Description *string `json:"description,omitempty"` 4684 // Provider - The resource provider for the operation. 4685 Provider *string `json:"provider,omitempty"` 4686} 4687 4688// OSDisk specifies information about the operating system disk used by the virtual machine. <br><br> For 4689// more information about disks, see [About disks and VHDs for Azure virtual 4690// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). 4691type OSDisk struct { 4692 // OsType - 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. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux' 4693 OsType OperatingSystemTypes `json:"osType,omitempty"` 4694 // EncryptionSettings - Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15 4695 EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"` 4696 // Name - The disk name. 4697 Name *string `json:"name,omitempty"` 4698 // Vhd - The virtual hard disk. 4699 Vhd *VirtualHardDisk `json:"vhd,omitempty"` 4700 // 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 provided, the destination virtual hard drive must not exist. 4701 Image *VirtualHardDisk `json:"image,omitempty"` 4702 // Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' 4703 Caching CachingTypes `json:"caching,omitempty"` 4704 // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. 4705 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 4706 // DiffDiskSettings - Specifies the differencing Disk Settings for the operating system disk used by the virtual machine. 4707 DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` 4708 // CreateOption - Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **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 element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' 4709 CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` 4710 // DiskSizeGB - 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. <br><br> This value cannot be larger than 1023 GB 4711 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 4712 // ManagedDisk - The managed disk parameters. 4713 ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` 4714} 4715 4716// OSDiskImage contains the os disk image information. 4717type OSDiskImage struct { 4718 // OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux' 4719 OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"` 4720} 4721 4722// OSProfile specifies the operating system settings for the virtual machine. 4723type OSProfile struct { 4724 // ComputerName - Specifies the host OS name of the virtual machine. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). 4725 ComputerName *string `json:"computerName,omitempty"` 4726 // AdminUsername - Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) 4727 AdminUsername *string `json:"adminUsername,omitempty"` 4728 // AdminPassword - Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) 4729 AdminPassword *string `json:"adminPassword,omitempty"` 4730 // CustomData - 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. The maximum length of the binary array is 65535 bytes. <br><br> 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/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) 4731 CustomData *string `json:"customData,omitempty"` 4732 // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. 4733 WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` 4734 // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). 4735 LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` 4736 // Secrets - Specifies set of certificates that should be installed onto the virtual machine. 4737 Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` 4738 // AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine. <br><br>This may only be set to False when no extensions are present on the virtual machine. 4739 AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"` 4740} 4741 4742// Plan specifies information about the marketplace image used to create the virtual machine. This element 4743// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable 4744// the image for programmatic use. In the Azure portal, find the marketplace image that you want to use 4745// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and 4746// then click **Save**. 4747type Plan struct { 4748 // Name - The plan ID. 4749 Name *string `json:"name,omitempty"` 4750 // Publisher - The publisher ID. 4751 Publisher *string `json:"publisher,omitempty"` 4752 // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. 4753 Product *string `json:"product,omitempty"` 4754 // PromotionCode - The promotion code. 4755 PromotionCode *string `json:"promotionCode,omitempty"` 4756} 4757 4758// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace. 4759type PurchasePlan struct { 4760 // Publisher - The publisher ID. 4761 Publisher *string `json:"publisher,omitempty"` 4762 // Name - The plan ID. 4763 Name *string `json:"name,omitempty"` 4764 // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. 4765 Product *string `json:"product,omitempty"` 4766} 4767 4768// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this 4769// Image Definition. These properties are updateable. 4770type RecommendedMachineConfiguration struct { 4771 VCPUs *ResourceRange `json:"vCPUs,omitempty"` 4772 Memory *ResourceRange `json:"memory,omitempty"` 4773} 4774 4775// RecoveryWalkResponse response after calling a manual recovery walk 4776type RecoveryWalkResponse struct { 4777 autorest.Response `json:"-"` 4778 // WalkPerformed - Whether the recovery walk was performed 4779 WalkPerformed *bool `json:"walkPerformed,omitempty"` 4780 // NextPlatformUpdateDomain - The next update domain that needs to be walked. Null means walk spanning all update domains has been completed 4781 NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"` 4782} 4783 4784// RegionalReplicationStatus this is the regional replication status. 4785type RegionalReplicationStatus struct { 4786 // Region - The region to which the gallery Image Version is being replicated to. 4787 Region *string `json:"region,omitempty"` 4788 // State - This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed' 4789 State ReplicationState `json:"state,omitempty"` 4790 // Details - The details of the replication status. 4791 Details *string `json:"details,omitempty"` 4792 // Progress - It indicates progress of the replication job. 4793 Progress *int32 `json:"progress,omitempty"` 4794} 4795 4796// ReplicationStatus this is the replication status of the gallery Image Version. 4797type ReplicationStatus struct { 4798 // AggregatedState - This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' 4799 AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"` 4800 // Summary - This is a summary of replication status for each region. 4801 Summary *[]RegionalReplicationStatus `json:"summary,omitempty"` 4802} 4803 4804// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api. 4805type RequestRateByIntervalInput struct { 4806 // IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins' 4807 IntervalLength IntervalInMins `json:"intervalLength,omitempty"` 4808 // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. 4809 BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` 4810 // FromTime - From time of the query 4811 FromTime *date.Time `json:"fromTime,omitempty"` 4812 // ToTime - To time of the query 4813 ToTime *date.Time `json:"toTime,omitempty"` 4814 // GroupByThrottlePolicy - Group query result by Throttle Policy applied. 4815 GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` 4816 // GroupByOperationName - Group query result by by Operation Name. 4817 GroupByOperationName *bool `json:"groupByOperationName,omitempty"` 4818 // GroupByResourceName - Group query result by Resource Name. 4819 GroupByResourceName *bool `json:"groupByResourceName,omitempty"` 4820} 4821 4822// Resource the Resource model definition. 4823type Resource struct { 4824 // ID - Resource Id 4825 ID *string `json:"id,omitempty"` 4826 // Name - Resource name 4827 Name *string `json:"name,omitempty"` 4828 // Type - Resource type 4829 Type *string `json:"type,omitempty"` 4830 // Location - Resource location 4831 Location *string `json:"location,omitempty"` 4832 // Tags - Resource tags 4833 Tags map[string]*string `json:"tags"` 4834} 4835 4836// MarshalJSON is the custom marshaler for Resource. 4837func (r Resource) MarshalJSON() ([]byte, error) { 4838 objectMap := make(map[string]interface{}) 4839 if r.ID != nil { 4840 objectMap["id"] = r.ID 4841 } 4842 if r.Name != nil { 4843 objectMap["name"] = r.Name 4844 } 4845 if r.Type != nil { 4846 objectMap["type"] = r.Type 4847 } 4848 if r.Location != nil { 4849 objectMap["location"] = r.Location 4850 } 4851 if r.Tags != nil { 4852 objectMap["tags"] = r.Tags 4853 } 4854 return json.Marshal(objectMap) 4855} 4856 4857// ResourceRange describes the resource range. 4858type ResourceRange struct { 4859 // Min - The minimum number of the resource. 4860 Min *int32 `json:"min,omitempty"` 4861 // Max - The maximum number of the resource. 4862 Max *int32 `json:"max,omitempty"` 4863} 4864 4865// ResourceSku describes an available Compute SKU. 4866type ResourceSku struct { 4867 // ResourceType - The type of resource the SKU applies to. 4868 ResourceType *string `json:"resourceType,omitempty"` 4869 // Name - The name of SKU. 4870 Name *string `json:"name,omitempty"` 4871 // Tier - Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic** 4872 Tier *string `json:"tier,omitempty"` 4873 // Size - The Size of the SKU. 4874 Size *string `json:"size,omitempty"` 4875 // Family - The Family of this particular SKU. 4876 Family *string `json:"family,omitempty"` 4877 // Kind - The Kind of resources that are supported in this SKU. 4878 Kind *string `json:"kind,omitempty"` 4879 // Capacity - Specifies the number of virtual machines in the scale set. 4880 Capacity *ResourceSkuCapacity `json:"capacity,omitempty"` 4881 // Locations - The set of locations that the SKU is available. 4882 Locations *[]string `json:"locations,omitempty"` 4883 // LocationInfo - A list of locations and availability zones in those locations where the SKU is available. 4884 LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"` 4885 // APIVersions - The api versions that support this SKU. 4886 APIVersions *[]string `json:"apiVersions,omitempty"` 4887 // Costs - Metadata for retrieving price info. 4888 Costs *[]ResourceSkuCosts `json:"costs,omitempty"` 4889 // Capabilities - A name value pair to describe the capability. 4890 Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` 4891 // Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. 4892 Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"` 4893} 4894 4895// ResourceSkuCapabilities describes The SKU capabilites object. 4896type ResourceSkuCapabilities struct { 4897 // Name - An invariant to describe the feature. 4898 Name *string `json:"name,omitempty"` 4899 // Value - An invariant if the feature is measured by quantity. 4900 Value *string `json:"value,omitempty"` 4901} 4902 4903// ResourceSkuCapacity describes scaling information of a SKU. 4904type ResourceSkuCapacity struct { 4905 // Minimum - The minimum capacity. 4906 Minimum *int64 `json:"minimum,omitempty"` 4907 // Maximum - The maximum capacity that can be set. 4908 Maximum *int64 `json:"maximum,omitempty"` 4909 // Default - The default capacity. 4910 Default *int64 `json:"default,omitempty"` 4911 // ScaleType - The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone' 4912 ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` 4913} 4914 4915// ResourceSkuCosts describes metadata for retrieving price info. 4916type ResourceSkuCosts struct { 4917 // MeterID - Used for querying price from commerce. 4918 MeterID *string `json:"meterID,omitempty"` 4919 // Quantity - The multiplier is needed to extend the base metered cost. 4920 Quantity *int64 `json:"quantity,omitempty"` 4921 // ExtendedUnit - An invariant to show the extended unit. 4922 ExtendedUnit *string `json:"extendedUnit,omitempty"` 4923} 4924 4925// ResourceSkuLocationInfo ... 4926type ResourceSkuLocationInfo struct { 4927 // Location - Location of the SKU 4928 Location *string `json:"location,omitempty"` 4929 // Zones - List of availability zones where the SKU is supported. 4930 Zones *[]string `json:"zones,omitempty"` 4931} 4932 4933// ResourceSkuRestrictionInfo ... 4934type ResourceSkuRestrictionInfo struct { 4935 // Locations - Locations where the SKU is restricted 4936 Locations *[]string `json:"locations,omitempty"` 4937 // Zones - List of availability zones where the SKU is restricted. 4938 Zones *[]string `json:"zones,omitempty"` 4939} 4940 4941// ResourceSkuRestrictions describes scaling information of a SKU. 4942type ResourceSkuRestrictions struct { 4943 // Type - The type of restrictions. Possible values include: 'Location', 'Zone' 4944 Type ResourceSkuRestrictionsType `json:"type,omitempty"` 4945 // Values - The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. 4946 Values *[]string `json:"values,omitempty"` 4947 // RestrictionInfo - The information about the restriction where the SKU cannot be used. 4948 RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"` 4949 // ReasonCode - The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription' 4950 ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"` 4951} 4952 4953// ResourceSkusResult the Compute List Skus operation response. 4954type ResourceSkusResult struct { 4955 autorest.Response `json:"-"` 4956 // Value - The list of skus available for the subscription. 4957 Value *[]ResourceSku `json:"value,omitempty"` 4958 // NextLink - The uri to fetch the next page of Compute Skus. Call ListNext() with this to fetch the next page of VMSS Skus. 4959 NextLink *string `json:"nextLink,omitempty"` 4960} 4961 4962// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values. 4963type ResourceSkusResultIterator struct { 4964 i int 4965 page ResourceSkusResultPage 4966} 4967 4968// NextWithContext advances to the next value. If there was an error making 4969// the request the iterator does not advance and the error is returned. 4970func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) { 4971 if tracing.IsEnabled() { 4972 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext") 4973 defer func() { 4974 sc := -1 4975 if iter.Response().Response.Response != nil { 4976 sc = iter.Response().Response.Response.StatusCode 4977 } 4978 tracing.EndSpan(ctx, sc, err) 4979 }() 4980 } 4981 iter.i++ 4982 if iter.i < len(iter.page.Values()) { 4983 return nil 4984 } 4985 err = iter.page.NextWithContext(ctx) 4986 if err != nil { 4987 iter.i-- 4988 return err 4989 } 4990 iter.i = 0 4991 return nil 4992} 4993 4994// Next advances to the next value. If there was an error making 4995// the request the iterator does not advance and the error is returned. 4996// Deprecated: Use NextWithContext() instead. 4997func (iter *ResourceSkusResultIterator) Next() error { 4998 return iter.NextWithContext(context.Background()) 4999} 5000 5001// NotDone returns true if the enumeration should be started or is not yet complete. 5002func (iter ResourceSkusResultIterator) NotDone() bool { 5003 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5004} 5005 5006// Response returns the raw server response from the last page request. 5007func (iter ResourceSkusResultIterator) Response() ResourceSkusResult { 5008 return iter.page.Response() 5009} 5010 5011// Value returns the current value or a zero-initialized value if the 5012// iterator has advanced beyond the end of the collection. 5013func (iter ResourceSkusResultIterator) Value() ResourceSku { 5014 if !iter.page.NotDone() { 5015 return ResourceSku{} 5016 } 5017 return iter.page.Values()[iter.i] 5018} 5019 5020// Creates a new instance of the ResourceSkusResultIterator type. 5021func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator { 5022 return ResourceSkusResultIterator{page: page} 5023} 5024 5025// IsEmpty returns true if the ListResult contains no values. 5026func (rsr ResourceSkusResult) IsEmpty() bool { 5027 return rsr.Value == nil || len(*rsr.Value) == 0 5028} 5029 5030// resourceSkusResultPreparer prepares a request to retrieve the next set of results. 5031// It returns nil if no more results exist. 5032func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) { 5033 if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 { 5034 return nil, nil 5035 } 5036 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5037 autorest.AsJSON(), 5038 autorest.AsGet(), 5039 autorest.WithBaseURL(to.String(rsr.NextLink))) 5040} 5041 5042// ResourceSkusResultPage contains a page of ResourceSku values. 5043type ResourceSkusResultPage struct { 5044 fn func(context.Context, ResourceSkusResult) (ResourceSkusResult, error) 5045 rsr ResourceSkusResult 5046} 5047 5048// NextWithContext advances to the next page of values. If there was an error making 5049// the request the page does not advance and the error is returned. 5050func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) { 5051 if tracing.IsEnabled() { 5052 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext") 5053 defer func() { 5054 sc := -1 5055 if page.Response().Response.Response != nil { 5056 sc = page.Response().Response.Response.StatusCode 5057 } 5058 tracing.EndSpan(ctx, sc, err) 5059 }() 5060 } 5061 next, err := page.fn(ctx, page.rsr) 5062 if err != nil { 5063 return err 5064 } 5065 page.rsr = next 5066 return nil 5067} 5068 5069// Next advances to the next page of values. If there was an error making 5070// the request the page does not advance and the error is returned. 5071// Deprecated: Use NextWithContext() instead. 5072func (page *ResourceSkusResultPage) Next() error { 5073 return page.NextWithContext(context.Background()) 5074} 5075 5076// NotDone returns true if the page enumeration should be started or is not yet complete. 5077func (page ResourceSkusResultPage) NotDone() bool { 5078 return !page.rsr.IsEmpty() 5079} 5080 5081// Response returns the raw server response from the last page request. 5082func (page ResourceSkusResultPage) Response() ResourceSkusResult { 5083 return page.rsr 5084} 5085 5086// Values returns the slice of values for the current page or nil if there are no values. 5087func (page ResourceSkusResultPage) Values() []ResourceSku { 5088 if page.rsr.IsEmpty() { 5089 return nil 5090 } 5091 return *page.rsr.Value 5092} 5093 5094// Creates a new instance of the ResourceSkusResultPage type. 5095func NewResourceSkusResultPage(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage { 5096 return ResourceSkusResultPage{fn: getNextPage} 5097} 5098 5099// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation. 5100type RollbackStatusInfo struct { 5101 // SuccessfullyRolledbackInstanceCount - The number of instances which have been successfully rolled back. 5102 SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"` 5103 // FailedRolledbackInstanceCount - The number of instances which failed to rollback. 5104 FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"` 5105 // RollbackError - Error details if OS rollback failed. 5106 RollbackError *APIError `json:"rollbackError,omitempty"` 5107} 5108 5109// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade. 5110type RollingUpgradePolicy struct { 5111 // MaxBatchInstancePercent - 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, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. 5112 MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"` 5113 // MaxUnhealthyInstancePercent - 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, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. 5114 MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"` 5115 // MaxUnhealthyUpgradedInstancePercent - 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 upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. 5116 MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"` 5117 // PauseTimeBetweenBatches - 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 in ISO 8601 format. The default value is 0 seconds (PT0S). 5118 PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"` 5119} 5120 5121// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade 5122// state. 5123type RollingUpgradeProgressInfo struct { 5124 // SuccessfulInstanceCount - The number of instances that have been successfully upgraded. 5125 SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"` 5126 // FailedInstanceCount - The number of instances that have failed to be upgraded successfully. 5127 FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"` 5128 // InProgressInstanceCount - The number of instances that are currently being upgraded. 5129 InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"` 5130 // PendingInstanceCount - The number of instances that have not yet begun to be upgraded. 5131 PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"` 5132} 5133 5134// RollingUpgradeRunningStatus information about the current running state of the overall upgrade. 5135type RollingUpgradeRunningStatus struct { 5136 // Code - Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted' 5137 Code RollingUpgradeStatusCode `json:"code,omitempty"` 5138 // StartTime - Start time of the upgrade. 5139 StartTime *date.Time `json:"startTime,omitempty"` 5140 // LastAction - The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel' 5141 LastAction RollingUpgradeActionType `json:"lastAction,omitempty"` 5142 // LastActionTime - Last action time of the upgrade. 5143 LastActionTime *date.Time `json:"lastActionTime,omitempty"` 5144} 5145 5146// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade. 5147type RollingUpgradeStatusInfo struct { 5148 autorest.Response `json:"-"` 5149 *RollingUpgradeStatusInfoProperties `json:"properties,omitempty"` 5150 // ID - Resource Id 5151 ID *string `json:"id,omitempty"` 5152 // Name - Resource name 5153 Name *string `json:"name,omitempty"` 5154 // Type - Resource type 5155 Type *string `json:"type,omitempty"` 5156 // Location - Resource location 5157 Location *string `json:"location,omitempty"` 5158 // Tags - Resource tags 5159 Tags map[string]*string `json:"tags"` 5160} 5161 5162// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo. 5163func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) { 5164 objectMap := make(map[string]interface{}) 5165 if rusi.RollingUpgradeStatusInfoProperties != nil { 5166 objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties 5167 } 5168 if rusi.ID != nil { 5169 objectMap["id"] = rusi.ID 5170 } 5171 if rusi.Name != nil { 5172 objectMap["name"] = rusi.Name 5173 } 5174 if rusi.Type != nil { 5175 objectMap["type"] = rusi.Type 5176 } 5177 if rusi.Location != nil { 5178 objectMap["location"] = rusi.Location 5179 } 5180 if rusi.Tags != nil { 5181 objectMap["tags"] = rusi.Tags 5182 } 5183 return json.Marshal(objectMap) 5184} 5185 5186// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct. 5187func (rusi *RollingUpgradeStatusInfo) UnmarshalJSON(body []byte) error { 5188 var m map[string]*json.RawMessage 5189 err := json.Unmarshal(body, &m) 5190 if err != nil { 5191 return err 5192 } 5193 for k, v := range m { 5194 switch k { 5195 case "properties": 5196 if v != nil { 5197 var rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties 5198 err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties) 5199 if err != nil { 5200 return err 5201 } 5202 rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties 5203 } 5204 case "id": 5205 if v != nil { 5206 var ID string 5207 err = json.Unmarshal(*v, &ID) 5208 if err != nil { 5209 return err 5210 } 5211 rusi.ID = &ID 5212 } 5213 case "name": 5214 if v != nil { 5215 var name string 5216 err = json.Unmarshal(*v, &name) 5217 if err != nil { 5218 return err 5219 } 5220 rusi.Name = &name 5221 } 5222 case "type": 5223 if v != nil { 5224 var typeVar string 5225 err = json.Unmarshal(*v, &typeVar) 5226 if err != nil { 5227 return err 5228 } 5229 rusi.Type = &typeVar 5230 } 5231 case "location": 5232 if v != nil { 5233 var location string 5234 err = json.Unmarshal(*v, &location) 5235 if err != nil { 5236 return err 5237 } 5238 rusi.Location = &location 5239 } 5240 case "tags": 5241 if v != nil { 5242 var tags map[string]*string 5243 err = json.Unmarshal(*v, &tags) 5244 if err != nil { 5245 return err 5246 } 5247 rusi.Tags = tags 5248 } 5249 } 5250 } 5251 5252 return nil 5253} 5254 5255// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade. 5256type RollingUpgradeStatusInfoProperties struct { 5257 // Policy - The rolling upgrade policies applied for this upgrade. 5258 Policy *RollingUpgradePolicy `json:"policy,omitempty"` 5259 // RunningStatus - Information about the current running state of the overall upgrade. 5260 RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"` 5261 // Progress - Information about the number of virtual machine instances in each upgrade state. 5262 Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"` 5263 // Error - Error details for this upgrade, if there are any. 5264 Error *APIError `json:"error,omitempty"` 5265} 5266 5267// RunCommandDocument describes the properties of a Run Command. 5268type RunCommandDocument struct { 5269 autorest.Response `json:"-"` 5270 // Script - The script to be executed. 5271 Script *[]string `json:"script,omitempty"` 5272 // Parameters - The parameters used by the script. 5273 Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"` 5274 // Schema - The VM run command schema. 5275 Schema *string `json:"$schema,omitempty"` 5276 // ID - The VM run command id. 5277 ID *string `json:"id,omitempty"` 5278 // OsType - The Operating System type. Possible values include: 'Windows', 'Linux' 5279 OsType OperatingSystemTypes `json:"osType,omitempty"` 5280 // Label - The VM run command label. 5281 Label *string `json:"label,omitempty"` 5282 // Description - The VM run command description. 5283 Description *string `json:"description,omitempty"` 5284} 5285 5286// RunCommandDocumentBase describes the properties of a Run Command metadata. 5287type RunCommandDocumentBase struct { 5288 // Schema - The VM run command schema. 5289 Schema *string `json:"$schema,omitempty"` 5290 // ID - The VM run command id. 5291 ID *string `json:"id,omitempty"` 5292 // OsType - The Operating System type. Possible values include: 'Windows', 'Linux' 5293 OsType OperatingSystemTypes `json:"osType,omitempty"` 5294 // Label - The VM run command label. 5295 Label *string `json:"label,omitempty"` 5296 // Description - The VM run command description. 5297 Description *string `json:"description,omitempty"` 5298} 5299 5300// RunCommandInput capture Virtual Machine parameters. 5301type RunCommandInput struct { 5302 // CommandID - The run command id. 5303 CommandID *string `json:"commandId,omitempty"` 5304 // Script - Optional. The script to be executed. When this value is given, the given script will override the default script of the command. 5305 Script *[]string `json:"script,omitempty"` 5306 // Parameters - The run command parameters. 5307 Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"` 5308} 5309 5310// RunCommandInputParameter describes the properties of a run command parameter. 5311type RunCommandInputParameter struct { 5312 // Name - The run command parameter name. 5313 Name *string `json:"name,omitempty"` 5314 // Value - The run command parameter value. 5315 Value *string `json:"value,omitempty"` 5316} 5317 5318// RunCommandListResult the List Virtual Machine operation response. 5319type RunCommandListResult struct { 5320 autorest.Response `json:"-"` 5321 // Value - The list of virtual machine run commands. 5322 Value *[]RunCommandDocumentBase `json:"value,omitempty"` 5323 // NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. 5324 NextLink *string `json:"nextLink,omitempty"` 5325} 5326 5327// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values. 5328type RunCommandListResultIterator struct { 5329 i int 5330 page RunCommandListResultPage 5331} 5332 5333// NextWithContext advances to the next value. If there was an error making 5334// the request the iterator does not advance and the error is returned. 5335func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) { 5336 if tracing.IsEnabled() { 5337 ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext") 5338 defer func() { 5339 sc := -1 5340 if iter.Response().Response.Response != nil { 5341 sc = iter.Response().Response.Response.StatusCode 5342 } 5343 tracing.EndSpan(ctx, sc, err) 5344 }() 5345 } 5346 iter.i++ 5347 if iter.i < len(iter.page.Values()) { 5348 return nil 5349 } 5350 err = iter.page.NextWithContext(ctx) 5351 if err != nil { 5352 iter.i-- 5353 return err 5354 } 5355 iter.i = 0 5356 return nil 5357} 5358 5359// Next advances to the next value. If there was an error making 5360// the request the iterator does not advance and the error is returned. 5361// Deprecated: Use NextWithContext() instead. 5362func (iter *RunCommandListResultIterator) Next() error { 5363 return iter.NextWithContext(context.Background()) 5364} 5365 5366// NotDone returns true if the enumeration should be started or is not yet complete. 5367func (iter RunCommandListResultIterator) NotDone() bool { 5368 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5369} 5370 5371// Response returns the raw server response from the last page request. 5372func (iter RunCommandListResultIterator) Response() RunCommandListResult { 5373 return iter.page.Response() 5374} 5375 5376// Value returns the current value or a zero-initialized value if the 5377// iterator has advanced beyond the end of the collection. 5378func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase { 5379 if !iter.page.NotDone() { 5380 return RunCommandDocumentBase{} 5381 } 5382 return iter.page.Values()[iter.i] 5383} 5384 5385// Creates a new instance of the RunCommandListResultIterator type. 5386func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator { 5387 return RunCommandListResultIterator{page: page} 5388} 5389 5390// IsEmpty returns true if the ListResult contains no values. 5391func (rclr RunCommandListResult) IsEmpty() bool { 5392 return rclr.Value == nil || len(*rclr.Value) == 0 5393} 5394 5395// runCommandListResultPreparer prepares a request to retrieve the next set of results. 5396// It returns nil if no more results exist. 5397func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) { 5398 if rclr.NextLink == nil || len(to.String(rclr.NextLink)) < 1 { 5399 return nil, nil 5400 } 5401 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5402 autorest.AsJSON(), 5403 autorest.AsGet(), 5404 autorest.WithBaseURL(to.String(rclr.NextLink))) 5405} 5406 5407// RunCommandListResultPage contains a page of RunCommandDocumentBase values. 5408type RunCommandListResultPage struct { 5409 fn func(context.Context, RunCommandListResult) (RunCommandListResult, error) 5410 rclr RunCommandListResult 5411} 5412 5413// NextWithContext advances to the next page of values. If there was an error making 5414// the request the page does not advance and the error is returned. 5415func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) { 5416 if tracing.IsEnabled() { 5417 ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext") 5418 defer func() { 5419 sc := -1 5420 if page.Response().Response.Response != nil { 5421 sc = page.Response().Response.Response.StatusCode 5422 } 5423 tracing.EndSpan(ctx, sc, err) 5424 }() 5425 } 5426 next, err := page.fn(ctx, page.rclr) 5427 if err != nil { 5428 return err 5429 } 5430 page.rclr = next 5431 return nil 5432} 5433 5434// Next advances to the next page of values. If there was an error making 5435// the request the page does not advance and the error is returned. 5436// Deprecated: Use NextWithContext() instead. 5437func (page *RunCommandListResultPage) Next() error { 5438 return page.NextWithContext(context.Background()) 5439} 5440 5441// NotDone returns true if the page enumeration should be started or is not yet complete. 5442func (page RunCommandListResultPage) NotDone() bool { 5443 return !page.rclr.IsEmpty() 5444} 5445 5446// Response returns the raw server response from the last page request. 5447func (page RunCommandListResultPage) Response() RunCommandListResult { 5448 return page.rclr 5449} 5450 5451// Values returns the slice of values for the current page or nil if there are no values. 5452func (page RunCommandListResultPage) Values() []RunCommandDocumentBase { 5453 if page.rclr.IsEmpty() { 5454 return nil 5455 } 5456 return *page.rclr.Value 5457} 5458 5459// Creates a new instance of the RunCommandListResultPage type. 5460func NewRunCommandListResultPage(getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage { 5461 return RunCommandListResultPage{fn: getNextPage} 5462} 5463 5464// RunCommandParameterDefinition describes the properties of a run command parameter. 5465type RunCommandParameterDefinition struct { 5466 // Name - The run command parameter name. 5467 Name *string `json:"name,omitempty"` 5468 // Type - The run command parameter type. 5469 Type *string `json:"type,omitempty"` 5470 // DefaultValue - The run command parameter default value. 5471 DefaultValue *string `json:"defaultValue,omitempty"` 5472 // Required - The run command parameter required. 5473 Required *bool `json:"required,omitempty"` 5474} 5475 5476// RunCommandResult ... 5477type RunCommandResult struct { 5478 autorest.Response `json:"-"` 5479 // Value - Run command operation response. 5480 Value *[]InstanceViewStatus `json:"value,omitempty"` 5481} 5482 5483// Sku describes a virtual machine scale set sku. 5484type Sku struct { 5485 // Name - The sku name. 5486 Name *string `json:"name,omitempty"` 5487 // Tier - Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic** 5488 Tier *string `json:"tier,omitempty"` 5489 // Capacity - Specifies the number of virtual machines in the scale set. 5490 Capacity *int64 `json:"capacity,omitempty"` 5491} 5492 5493// Snapshot snapshot resource. 5494type Snapshot struct { 5495 autorest.Response `json:"-"` 5496 // ManagedBy - Unused. Always Null. 5497 ManagedBy *string `json:"managedBy,omitempty"` 5498 Sku *SnapshotSku `json:"sku,omitempty"` 5499 *SnapshotProperties `json:"properties,omitempty"` 5500 // ID - Resource Id 5501 ID *string `json:"id,omitempty"` 5502 // Name - Resource name 5503 Name *string `json:"name,omitempty"` 5504 // Type - Resource type 5505 Type *string `json:"type,omitempty"` 5506 // Location - Resource location 5507 Location *string `json:"location,omitempty"` 5508 // Tags - Resource tags 5509 Tags map[string]*string `json:"tags"` 5510} 5511 5512// MarshalJSON is the custom marshaler for Snapshot. 5513func (s Snapshot) MarshalJSON() ([]byte, error) { 5514 objectMap := make(map[string]interface{}) 5515 if s.ManagedBy != nil { 5516 objectMap["managedBy"] = s.ManagedBy 5517 } 5518 if s.Sku != nil { 5519 objectMap["sku"] = s.Sku 5520 } 5521 if s.SnapshotProperties != nil { 5522 objectMap["properties"] = s.SnapshotProperties 5523 } 5524 if s.ID != nil { 5525 objectMap["id"] = s.ID 5526 } 5527 if s.Name != nil { 5528 objectMap["name"] = s.Name 5529 } 5530 if s.Type != nil { 5531 objectMap["type"] = s.Type 5532 } 5533 if s.Location != nil { 5534 objectMap["location"] = s.Location 5535 } 5536 if s.Tags != nil { 5537 objectMap["tags"] = s.Tags 5538 } 5539 return json.Marshal(objectMap) 5540} 5541 5542// UnmarshalJSON is the custom unmarshaler for Snapshot struct. 5543func (s *Snapshot) UnmarshalJSON(body []byte) error { 5544 var m map[string]*json.RawMessage 5545 err := json.Unmarshal(body, &m) 5546 if err != nil { 5547 return err 5548 } 5549 for k, v := range m { 5550 switch k { 5551 case "managedBy": 5552 if v != nil { 5553 var managedBy string 5554 err = json.Unmarshal(*v, &managedBy) 5555 if err != nil { 5556 return err 5557 } 5558 s.ManagedBy = &managedBy 5559 } 5560 case "sku": 5561 if v != nil { 5562 var sku SnapshotSku 5563 err = json.Unmarshal(*v, &sku) 5564 if err != nil { 5565 return err 5566 } 5567 s.Sku = &sku 5568 } 5569 case "properties": 5570 if v != nil { 5571 var snapshotProperties SnapshotProperties 5572 err = json.Unmarshal(*v, &snapshotProperties) 5573 if err != nil { 5574 return err 5575 } 5576 s.SnapshotProperties = &snapshotProperties 5577 } 5578 case "id": 5579 if v != nil { 5580 var ID string 5581 err = json.Unmarshal(*v, &ID) 5582 if err != nil { 5583 return err 5584 } 5585 s.ID = &ID 5586 } 5587 case "name": 5588 if v != nil { 5589 var name string 5590 err = json.Unmarshal(*v, &name) 5591 if err != nil { 5592 return err 5593 } 5594 s.Name = &name 5595 } 5596 case "type": 5597 if v != nil { 5598 var typeVar string 5599 err = json.Unmarshal(*v, &typeVar) 5600 if err != nil { 5601 return err 5602 } 5603 s.Type = &typeVar 5604 } 5605 case "location": 5606 if v != nil { 5607 var location string 5608 err = json.Unmarshal(*v, &location) 5609 if err != nil { 5610 return err 5611 } 5612 s.Location = &location 5613 } 5614 case "tags": 5615 if v != nil { 5616 var tags map[string]*string 5617 err = json.Unmarshal(*v, &tags) 5618 if err != nil { 5619 return err 5620 } 5621 s.Tags = tags 5622 } 5623 } 5624 } 5625 5626 return nil 5627} 5628 5629// SnapshotList the List Snapshots operation response. 5630type SnapshotList struct { 5631 autorest.Response `json:"-"` 5632 // Value - A list of snapshots. 5633 Value *[]Snapshot `json:"value,omitempty"` 5634 // NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots. 5635 NextLink *string `json:"nextLink,omitempty"` 5636} 5637 5638// SnapshotListIterator provides access to a complete listing of Snapshot values. 5639type SnapshotListIterator struct { 5640 i int 5641 page SnapshotListPage 5642} 5643 5644// NextWithContext advances to the next value. If there was an error making 5645// the request the iterator does not advance and the error is returned. 5646func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) { 5647 if tracing.IsEnabled() { 5648 ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext") 5649 defer func() { 5650 sc := -1 5651 if iter.Response().Response.Response != nil { 5652 sc = iter.Response().Response.Response.StatusCode 5653 } 5654 tracing.EndSpan(ctx, sc, err) 5655 }() 5656 } 5657 iter.i++ 5658 if iter.i < len(iter.page.Values()) { 5659 return nil 5660 } 5661 err = iter.page.NextWithContext(ctx) 5662 if err != nil { 5663 iter.i-- 5664 return err 5665 } 5666 iter.i = 0 5667 return nil 5668} 5669 5670// Next advances to the next value. If there was an error making 5671// the request the iterator does not advance and the error is returned. 5672// Deprecated: Use NextWithContext() instead. 5673func (iter *SnapshotListIterator) Next() error { 5674 return iter.NextWithContext(context.Background()) 5675} 5676 5677// NotDone returns true if the enumeration should be started or is not yet complete. 5678func (iter SnapshotListIterator) NotDone() bool { 5679 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5680} 5681 5682// Response returns the raw server response from the last page request. 5683func (iter SnapshotListIterator) Response() SnapshotList { 5684 return iter.page.Response() 5685} 5686 5687// Value returns the current value or a zero-initialized value if the 5688// iterator has advanced beyond the end of the collection. 5689func (iter SnapshotListIterator) Value() Snapshot { 5690 if !iter.page.NotDone() { 5691 return Snapshot{} 5692 } 5693 return iter.page.Values()[iter.i] 5694} 5695 5696// Creates a new instance of the SnapshotListIterator type. 5697func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator { 5698 return SnapshotListIterator{page: page} 5699} 5700 5701// IsEmpty returns true if the ListResult contains no values. 5702func (sl SnapshotList) IsEmpty() bool { 5703 return sl.Value == nil || len(*sl.Value) == 0 5704} 5705 5706// snapshotListPreparer prepares a request to retrieve the next set of results. 5707// It returns nil if no more results exist. 5708func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) { 5709 if sl.NextLink == nil || len(to.String(sl.NextLink)) < 1 { 5710 return nil, nil 5711 } 5712 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5713 autorest.AsJSON(), 5714 autorest.AsGet(), 5715 autorest.WithBaseURL(to.String(sl.NextLink))) 5716} 5717 5718// SnapshotListPage contains a page of Snapshot values. 5719type SnapshotListPage struct { 5720 fn func(context.Context, SnapshotList) (SnapshotList, error) 5721 sl SnapshotList 5722} 5723 5724// NextWithContext advances to the next page of values. If there was an error making 5725// the request the page does not advance and the error is returned. 5726func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) { 5727 if tracing.IsEnabled() { 5728 ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext") 5729 defer func() { 5730 sc := -1 5731 if page.Response().Response.Response != nil { 5732 sc = page.Response().Response.Response.StatusCode 5733 } 5734 tracing.EndSpan(ctx, sc, err) 5735 }() 5736 } 5737 next, err := page.fn(ctx, page.sl) 5738 if err != nil { 5739 return err 5740 } 5741 page.sl = next 5742 return nil 5743} 5744 5745// Next advances to the next page of values. If there was an error making 5746// the request the page does not advance and the error is returned. 5747// Deprecated: Use NextWithContext() instead. 5748func (page *SnapshotListPage) Next() error { 5749 return page.NextWithContext(context.Background()) 5750} 5751 5752// NotDone returns true if the page enumeration should be started or is not yet complete. 5753func (page SnapshotListPage) NotDone() bool { 5754 return !page.sl.IsEmpty() 5755} 5756 5757// Response returns the raw server response from the last page request. 5758func (page SnapshotListPage) Response() SnapshotList { 5759 return page.sl 5760} 5761 5762// Values returns the slice of values for the current page or nil if there are no values. 5763func (page SnapshotListPage) Values() []Snapshot { 5764 if page.sl.IsEmpty() { 5765 return nil 5766 } 5767 return *page.sl.Value 5768} 5769 5770// Creates a new instance of the SnapshotListPage type. 5771func NewSnapshotListPage(getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage { 5772 return SnapshotListPage{fn: getNextPage} 5773} 5774 5775// SnapshotProperties snapshot resource properties. 5776type SnapshotProperties struct { 5777 // TimeCreated - The time when the disk was created. 5778 TimeCreated *date.Time `json:"timeCreated,omitempty"` 5779 // OsType - The Operating System type. Possible values include: 'Windows', 'Linux' 5780 OsType OperatingSystemTypes `json:"osType,omitempty"` 5781 // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created. 5782 CreationData *CreationData `json:"creationData,omitempty"` 5783 // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. 5784 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 5785 // EncryptionSettings - Encryption settings for disk or snapshot 5786 EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"` 5787 // ProvisioningState - The disk provisioning state. 5788 ProvisioningState *string `json:"provisioningState,omitempty"` 5789} 5790 5791// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 5792// operation. 5793type SnapshotsCreateOrUpdateFuture struct { 5794 azure.Future 5795} 5796 5797// Result returns the result of the asynchronous operation. 5798// If the operation has not completed it will return an error. 5799func (future *SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) { 5800 var done bool 5801 done, err = future.Done(client) 5802 if err != nil { 5803 err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 5804 return 5805 } 5806 if !done { 5807 err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture") 5808 return 5809 } 5810 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5811 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 5812 s, err = client.CreateOrUpdateResponder(s.Response.Response) 5813 if err != nil { 5814 err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") 5815 } 5816 } 5817 return 5818} 5819 5820// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 5821// operation. 5822type SnapshotsDeleteFuture struct { 5823 azure.Future 5824} 5825 5826// Result returns the result of the asynchronous operation. 5827// If the operation has not completed it will return an error. 5828func (future *SnapshotsDeleteFuture) Result(client SnapshotsClient) (ar autorest.Response, err error) { 5829 var done bool 5830 done, err = future.Done(client) 5831 if err != nil { 5832 err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure") 5833 return 5834 } 5835 if !done { 5836 err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture") 5837 return 5838 } 5839 ar.Response = future.Response() 5840 return 5841} 5842 5843// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running 5844// operation. 5845type SnapshotsGrantAccessFuture struct { 5846 azure.Future 5847} 5848 5849// Result returns the result of the asynchronous operation. 5850// If the operation has not completed it will return an error. 5851func (future *SnapshotsGrantAccessFuture) Result(client SnapshotsClient) (au AccessURI, err error) { 5852 var done bool 5853 done, err = future.Done(client) 5854 if err != nil { 5855 err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure") 5856 return 5857 } 5858 if !done { 5859 err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture") 5860 return 5861 } 5862 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5863 if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent { 5864 au, err = client.GrantAccessResponder(au.Response.Response) 5865 if err != nil { 5866 err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request") 5867 } 5868 } 5869 return 5870} 5871 5872// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. 5873type SnapshotSku struct { 5874 // Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS' 5875 Name SnapshotStorageAccountTypes `json:"name,omitempty"` 5876 // Tier - The sku tier. 5877 Tier *string `json:"tier,omitempty"` 5878} 5879 5880// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running 5881// operation. 5882type SnapshotsRevokeAccessFuture struct { 5883 azure.Future 5884} 5885 5886// Result returns the result of the asynchronous operation. 5887// If the operation has not completed it will return an error. 5888func (future *SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (ar autorest.Response, err error) { 5889 var done bool 5890 done, err = future.Done(client) 5891 if err != nil { 5892 err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure") 5893 return 5894 } 5895 if !done { 5896 err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture") 5897 return 5898 } 5899 ar.Response = future.Response() 5900 return 5901} 5902 5903// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 5904// operation. 5905type SnapshotsUpdateFuture struct { 5906 azure.Future 5907} 5908 5909// Result returns the result of the asynchronous operation. 5910// If the operation has not completed it will return an error. 5911func (future *SnapshotsUpdateFuture) Result(client SnapshotsClient) (s Snapshot, err error) { 5912 var done bool 5913 done, err = future.Done(client) 5914 if err != nil { 5915 err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure") 5916 return 5917 } 5918 if !done { 5919 err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture") 5920 return 5921 } 5922 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5923 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 5924 s, err = client.UpdateResponder(s.Response.Response) 5925 if err != nil { 5926 err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request") 5927 } 5928 } 5929 return 5930} 5931 5932// SnapshotUpdate snapshot update resource. 5933type SnapshotUpdate struct { 5934 *SnapshotUpdateProperties `json:"properties,omitempty"` 5935 // Tags - Resource tags 5936 Tags map[string]*string `json:"tags"` 5937 Sku *SnapshotSku `json:"sku,omitempty"` 5938} 5939 5940// MarshalJSON is the custom marshaler for SnapshotUpdate. 5941func (su SnapshotUpdate) MarshalJSON() ([]byte, error) { 5942 objectMap := make(map[string]interface{}) 5943 if su.SnapshotUpdateProperties != nil { 5944 objectMap["properties"] = su.SnapshotUpdateProperties 5945 } 5946 if su.Tags != nil { 5947 objectMap["tags"] = su.Tags 5948 } 5949 if su.Sku != nil { 5950 objectMap["sku"] = su.Sku 5951 } 5952 return json.Marshal(objectMap) 5953} 5954 5955// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct. 5956func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error { 5957 var m map[string]*json.RawMessage 5958 err := json.Unmarshal(body, &m) 5959 if err != nil { 5960 return err 5961 } 5962 for k, v := range m { 5963 switch k { 5964 case "properties": 5965 if v != nil { 5966 var snapshotUpdateProperties SnapshotUpdateProperties 5967 err = json.Unmarshal(*v, &snapshotUpdateProperties) 5968 if err != nil { 5969 return err 5970 } 5971 su.SnapshotUpdateProperties = &snapshotUpdateProperties 5972 } 5973 case "tags": 5974 if v != nil { 5975 var tags map[string]*string 5976 err = json.Unmarshal(*v, &tags) 5977 if err != nil { 5978 return err 5979 } 5980 su.Tags = tags 5981 } 5982 case "sku": 5983 if v != nil { 5984 var sku SnapshotSku 5985 err = json.Unmarshal(*v, &sku) 5986 if err != nil { 5987 return err 5988 } 5989 su.Sku = &sku 5990 } 5991 } 5992 } 5993 5994 return nil 5995} 5996 5997// SnapshotUpdateProperties snapshot resource update properties. 5998type SnapshotUpdateProperties struct { 5999 // OsType - the Operating System type. Possible values include: 'Windows', 'Linux' 6000 OsType OperatingSystemTypes `json:"osType,omitempty"` 6001 // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. 6002 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 6003 // EncryptionSettings - Encryption settings for disk or snapshot 6004 EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"` 6005} 6006 6007// SourceVault the vault id is an Azure Resource Manager Resoure id in the form 6008// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} 6009type SourceVault struct { 6010 // ID - Resource Id 6011 ID *string `json:"id,omitempty"` 6012} 6013 6014// SSHConfiguration SSH configuration for Linux based VMs running on Azure 6015type SSHConfiguration struct { 6016 // PublicKeys - The list of SSH public keys used to authenticate with linux based VMs. 6017 PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` 6018} 6019 6020// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where 6021// the public key is placed. 6022type SSHPublicKey struct { 6023 // Path - 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: /home/user/.ssh/authorized_keys 6024 Path *string `json:"path,omitempty"` 6025 // KeyData - 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. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). 6026 KeyData *string `json:"keyData,omitempty"` 6027} 6028 6029// StorageProfile specifies the storage settings for the virtual machine disks. 6030type StorageProfile struct { 6031 // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. 6032 ImageReference *ImageReference `json:"imageReference,omitempty"` 6033 // OsDisk - Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). 6034 OsDisk *OSDisk `json:"osDisk,omitempty"` 6035 // DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). 6036 DataDisks *[]DataDisk `json:"dataDisks,omitempty"` 6037} 6038 6039// SubResource ... 6040type SubResource struct { 6041 // ID - Resource Id 6042 ID *string `json:"id,omitempty"` 6043} 6044 6045// SubResourceReadOnly ... 6046type SubResourceReadOnly struct { 6047 // ID - Resource Id 6048 ID *string `json:"id,omitempty"` 6049} 6050 6051// TargetRegion describes the target region information. 6052type TargetRegion struct { 6053 // Name - The name of the region. 6054 Name *string `json:"name,omitempty"` 6055 // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updateable. 6056 RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"` 6057} 6058 6059// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api. 6060type ThrottledRequestsInput struct { 6061 // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. 6062 BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` 6063 // FromTime - From time of the query 6064 FromTime *date.Time `json:"fromTime,omitempty"` 6065 // ToTime - To time of the query 6066 ToTime *date.Time `json:"toTime,omitempty"` 6067 // GroupByThrottlePolicy - Group query result by Throttle Policy applied. 6068 GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` 6069 // GroupByOperationName - Group query result by by Operation Name. 6070 GroupByOperationName *bool `json:"groupByOperationName,omitempty"` 6071 // GroupByResourceName - Group query result by Resource Name. 6072 GroupByResourceName *bool `json:"groupByResourceName,omitempty"` 6073} 6074 6075// UpdateResource the Update Resource model definition. 6076type UpdateResource struct { 6077 // Tags - Resource tags 6078 Tags map[string]*string `json:"tags"` 6079} 6080 6081// MarshalJSON is the custom marshaler for UpdateResource. 6082func (ur UpdateResource) MarshalJSON() ([]byte, error) { 6083 objectMap := make(map[string]interface{}) 6084 if ur.Tags != nil { 6085 objectMap["tags"] = ur.Tags 6086 } 6087 return json.Marshal(objectMap) 6088} 6089 6090// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response. 6091type UpgradeOperationHistoricalStatusInfo struct { 6092 // Properties - Information about the properties of the upgrade operation. 6093 Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"` 6094 // Type - Resource type 6095 Type *string `json:"type,omitempty"` 6096 // Location - Resource location 6097 Location *string `json:"location,omitempty"` 6098} 6099 6100// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale 6101// Set. 6102type UpgradeOperationHistoricalStatusInfoProperties struct { 6103 // RunningStatus - Information about the overall status of the upgrade operation. 6104 RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"` 6105 // Progress - Counts of the VM's in each state. 6106 Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"` 6107 // Error - Error Details for this upgrade if there are any. 6108 Error *APIError `json:"error,omitempty"` 6109 // StartedBy - Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform' 6110 StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"` 6111 // TargetImageReference - Image Reference details 6112 TargetImageReference *ImageReference `json:"targetImageReference,omitempty"` 6113 // RollbackInfo - Information about OS rollback if performed 6114 RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"` 6115} 6116 6117// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade. 6118type UpgradeOperationHistoryStatus struct { 6119 // Code - Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted' 6120 Code UpgradeState `json:"code,omitempty"` 6121 // StartTime - Start time of the upgrade. 6122 StartTime *date.Time `json:"startTime,omitempty"` 6123 // EndTime - End time of the upgrade. 6124 EndTime *date.Time `json:"endTime,omitempty"` 6125} 6126 6127// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling. 6128type UpgradePolicy struct { 6129 // Mode - Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling' 6130 Mode UpgradeMode `json:"mode,omitempty"` 6131 // RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade. 6132 RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"` 6133 // AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade. 6134 AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"` 6135} 6136 6137// Usage describes Compute Resource Usage. 6138type Usage struct { 6139 // Unit - An enum describing the unit of usage measurement. 6140 Unit *string `json:"unit,omitempty"` 6141 // CurrentValue - The current usage of the resource. 6142 CurrentValue *int32 `json:"currentValue,omitempty"` 6143 // Limit - The maximum permitted usage of the resource. 6144 Limit *int64 `json:"limit,omitempty"` 6145 // Name - The name of the type of usage. 6146 Name *UsageName `json:"name,omitempty"` 6147} 6148 6149// UsageName the Usage Names. 6150type UsageName struct { 6151 // Value - The name of the resource. 6152 Value *string `json:"value,omitempty"` 6153 // LocalizedValue - The localized name of the resource. 6154 LocalizedValue *string `json:"localizedValue,omitempty"` 6155} 6156 6157// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate 6158// should reside on the VM. 6159type VaultCertificate struct { 6160 // CertificateURL - 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 key vault](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 following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} 6161 CertificateURL *string `json:"certificateUrl,omitempty"` 6162 // CertificateStore - For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbpring>.prv for private key. Both of these files are .pem formatted. 6163 CertificateStore *string `json:"certificateStore,omitempty"` 6164} 6165 6166// VaultSecretGroup describes a set of certificates which are all in the same Key Vault. 6167type VaultSecretGroup struct { 6168 // SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates. 6169 SourceVault *SubResource `json:"sourceVault,omitempty"` 6170 // VaultCertificates - The list of key vault references in SourceVault which contain certificates. 6171 VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"` 6172} 6173 6174// VirtualHardDisk describes the uri of a disk. 6175type VirtualHardDisk struct { 6176 // URI - Specifies the virtual hard disk's uri. 6177 URI *string `json:"uri,omitempty"` 6178} 6179 6180// VirtualMachine describes a Virtual Machine. 6181type VirtualMachine struct { 6182 autorest.Response `json:"-"` 6183 // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must 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, Get Started ->**. Enter any required information and then click **Save**. 6184 Plan *Plan `json:"plan,omitempty"` 6185 *VirtualMachineProperties `json:"properties,omitempty"` 6186 // Resources - The virtual machine child extension resources. 6187 Resources *[]VirtualMachineExtension `json:"resources,omitempty"` 6188 // Identity - The identity of the virtual machine, if configured. 6189 Identity *VirtualMachineIdentity `json:"identity,omitempty"` 6190 // Zones - The virtual machine zones. 6191 Zones *[]string `json:"zones,omitempty"` 6192 // ID - Resource Id 6193 ID *string `json:"id,omitempty"` 6194 // Name - Resource name 6195 Name *string `json:"name,omitempty"` 6196 // Type - Resource type 6197 Type *string `json:"type,omitempty"` 6198 // Location - Resource location 6199 Location *string `json:"location,omitempty"` 6200 // Tags - Resource tags 6201 Tags map[string]*string `json:"tags"` 6202} 6203 6204// MarshalJSON is the custom marshaler for VirtualMachine. 6205func (VM VirtualMachine) MarshalJSON() ([]byte, error) { 6206 objectMap := make(map[string]interface{}) 6207 if VM.Plan != nil { 6208 objectMap["plan"] = VM.Plan 6209 } 6210 if VM.VirtualMachineProperties != nil { 6211 objectMap["properties"] = VM.VirtualMachineProperties 6212 } 6213 if VM.Resources != nil { 6214 objectMap["resources"] = VM.Resources 6215 } 6216 if VM.Identity != nil { 6217 objectMap["identity"] = VM.Identity 6218 } 6219 if VM.Zones != nil { 6220 objectMap["zones"] = VM.Zones 6221 } 6222 if VM.ID != nil { 6223 objectMap["id"] = VM.ID 6224 } 6225 if VM.Name != nil { 6226 objectMap["name"] = VM.Name 6227 } 6228 if VM.Type != nil { 6229 objectMap["type"] = VM.Type 6230 } 6231 if VM.Location != nil { 6232 objectMap["location"] = VM.Location 6233 } 6234 if VM.Tags != nil { 6235 objectMap["tags"] = VM.Tags 6236 } 6237 return json.Marshal(objectMap) 6238} 6239 6240// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct. 6241func (VM *VirtualMachine) UnmarshalJSON(body []byte) error { 6242 var m map[string]*json.RawMessage 6243 err := json.Unmarshal(body, &m) 6244 if err != nil { 6245 return err 6246 } 6247 for k, v := range m { 6248 switch k { 6249 case "plan": 6250 if v != nil { 6251 var plan Plan 6252 err = json.Unmarshal(*v, &plan) 6253 if err != nil { 6254 return err 6255 } 6256 VM.Plan = &plan 6257 } 6258 case "properties": 6259 if v != nil { 6260 var virtualMachineProperties VirtualMachineProperties 6261 err = json.Unmarshal(*v, &virtualMachineProperties) 6262 if err != nil { 6263 return err 6264 } 6265 VM.VirtualMachineProperties = &virtualMachineProperties 6266 } 6267 case "resources": 6268 if v != nil { 6269 var resources []VirtualMachineExtension 6270 err = json.Unmarshal(*v, &resources) 6271 if err != nil { 6272 return err 6273 } 6274 VM.Resources = &resources 6275 } 6276 case "identity": 6277 if v != nil { 6278 var identity VirtualMachineIdentity 6279 err = json.Unmarshal(*v, &identity) 6280 if err != nil { 6281 return err 6282 } 6283 VM.Identity = &identity 6284 } 6285 case "zones": 6286 if v != nil { 6287 var zones []string 6288 err = json.Unmarshal(*v, &zones) 6289 if err != nil { 6290 return err 6291 } 6292 VM.Zones = &zones 6293 } 6294 case "id": 6295 if v != nil { 6296 var ID string 6297 err = json.Unmarshal(*v, &ID) 6298 if err != nil { 6299 return err 6300 } 6301 VM.ID = &ID 6302 } 6303 case "name": 6304 if v != nil { 6305 var name string 6306 err = json.Unmarshal(*v, &name) 6307 if err != nil { 6308 return err 6309 } 6310 VM.Name = &name 6311 } 6312 case "type": 6313 if v != nil { 6314 var typeVar string 6315 err = json.Unmarshal(*v, &typeVar) 6316 if err != nil { 6317 return err 6318 } 6319 VM.Type = &typeVar 6320 } 6321 case "location": 6322 if v != nil { 6323 var location string 6324 err = json.Unmarshal(*v, &location) 6325 if err != nil { 6326 return err 6327 } 6328 VM.Location = &location 6329 } 6330 case "tags": 6331 if v != nil { 6332 var tags map[string]*string 6333 err = json.Unmarshal(*v, &tags) 6334 if err != nil { 6335 return err 6336 } 6337 VM.Tags = tags 6338 } 6339 } 6340 } 6341 6342 return nil 6343} 6344 6345// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine. 6346type VirtualMachineAgentInstanceView struct { 6347 // VMAgentVersion - The VM Agent full version. 6348 VMAgentVersion *string `json:"vmAgentVersion,omitempty"` 6349 // ExtensionHandlers - The virtual machine extension handler instance view. 6350 ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"` 6351 // Statuses - The resource status information. 6352 Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` 6353} 6354 6355// VirtualMachineCaptureParameters capture Virtual Machine parameters. 6356type VirtualMachineCaptureParameters struct { 6357 // VhdPrefix - The captured virtual hard disk's name prefix. 6358 VhdPrefix *string `json:"vhdPrefix,omitempty"` 6359 // DestinationContainerName - The destination container name. 6360 DestinationContainerName *string `json:"destinationContainerName,omitempty"` 6361 // OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict. 6362 OverwriteVhds *bool `json:"overwriteVhds,omitempty"` 6363} 6364 6365// VirtualMachineCaptureResult output of virtual machine capture operation. 6366type VirtualMachineCaptureResult struct { 6367 autorest.Response `json:"-"` 6368 // Schema - the schema of the captured virtual machine 6369 Schema *string `json:"$schema,omitempty"` 6370 // ContentVersion - the version of the content 6371 ContentVersion *string `json:"contentVersion,omitempty"` 6372 // Parameters - parameters of the captured virtual machine 6373 Parameters interface{} `json:"parameters,omitempty"` 6374 // Resources - a list of resource items of the captured virtual machine 6375 Resources *[]interface{} `json:"resources,omitempty"` 6376 // ID - Resource Id 6377 ID *string `json:"id,omitempty"` 6378} 6379 6380// VirtualMachineExtension describes a Virtual Machine Extension. 6381type VirtualMachineExtension struct { 6382 autorest.Response `json:"-"` 6383 *VirtualMachineExtensionProperties `json:"properties,omitempty"` 6384 // ID - Resource Id 6385 ID *string `json:"id,omitempty"` 6386 // Name - Resource name 6387 Name *string `json:"name,omitempty"` 6388 // Type - Resource type 6389 Type *string `json:"type,omitempty"` 6390 // Location - Resource location 6391 Location *string `json:"location,omitempty"` 6392 // Tags - Resource tags 6393 Tags map[string]*string `json:"tags"` 6394} 6395 6396// MarshalJSON is the custom marshaler for VirtualMachineExtension. 6397func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) { 6398 objectMap := make(map[string]interface{}) 6399 if vme.VirtualMachineExtensionProperties != nil { 6400 objectMap["properties"] = vme.VirtualMachineExtensionProperties 6401 } 6402 if vme.ID != nil { 6403 objectMap["id"] = vme.ID 6404 } 6405 if vme.Name != nil { 6406 objectMap["name"] = vme.Name 6407 } 6408 if vme.Type != nil { 6409 objectMap["type"] = vme.Type 6410 } 6411 if vme.Location != nil { 6412 objectMap["location"] = vme.Location 6413 } 6414 if vme.Tags != nil { 6415 objectMap["tags"] = vme.Tags 6416 } 6417 return json.Marshal(objectMap) 6418} 6419 6420// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct. 6421func (vme *VirtualMachineExtension) UnmarshalJSON(body []byte) error { 6422 var m map[string]*json.RawMessage 6423 err := json.Unmarshal(body, &m) 6424 if err != nil { 6425 return err 6426 } 6427 for k, v := range m { 6428 switch k { 6429 case "properties": 6430 if v != nil { 6431 var virtualMachineExtensionProperties VirtualMachineExtensionProperties 6432 err = json.Unmarshal(*v, &virtualMachineExtensionProperties) 6433 if err != nil { 6434 return err 6435 } 6436 vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties 6437 } 6438 case "id": 6439 if v != nil { 6440 var ID string 6441 err = json.Unmarshal(*v, &ID) 6442 if err != nil { 6443 return err 6444 } 6445 vme.ID = &ID 6446 } 6447 case "name": 6448 if v != nil { 6449 var name string 6450 err = json.Unmarshal(*v, &name) 6451 if err != nil { 6452 return err 6453 } 6454 vme.Name = &name 6455 } 6456 case "type": 6457 if v != nil { 6458 var typeVar string 6459 err = json.Unmarshal(*v, &typeVar) 6460 if err != nil { 6461 return err 6462 } 6463 vme.Type = &typeVar 6464 } 6465 case "location": 6466 if v != nil { 6467 var location string 6468 err = json.Unmarshal(*v, &location) 6469 if err != nil { 6470 return err 6471 } 6472 vme.Location = &location 6473 } 6474 case "tags": 6475 if v != nil { 6476 var tags map[string]*string 6477 err = json.Unmarshal(*v, &tags) 6478 if err != nil { 6479 return err 6480 } 6481 vme.Tags = tags 6482 } 6483 } 6484 } 6485 6486 return nil 6487} 6488 6489// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler. 6490type VirtualMachineExtensionHandlerInstanceView struct { 6491 // Type - Specifies the type of the extension; an example is "CustomScriptExtension". 6492 Type *string `json:"type,omitempty"` 6493 // TypeHandlerVersion - Specifies the version of the script handler. 6494 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 6495 // Status - The extension handler status. 6496 Status *InstanceViewStatus `json:"status,omitempty"` 6497} 6498 6499// VirtualMachineExtensionImage describes a Virtual Machine Extension Image. 6500type VirtualMachineExtensionImage struct { 6501 autorest.Response `json:"-"` 6502 *VirtualMachineExtensionImageProperties `json:"properties,omitempty"` 6503 // ID - Resource Id 6504 ID *string `json:"id,omitempty"` 6505 // Name - Resource name 6506 Name *string `json:"name,omitempty"` 6507 // Type - Resource type 6508 Type *string `json:"type,omitempty"` 6509 // Location - Resource location 6510 Location *string `json:"location,omitempty"` 6511 // Tags - Resource tags 6512 Tags map[string]*string `json:"tags"` 6513} 6514 6515// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage. 6516func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) { 6517 objectMap := make(map[string]interface{}) 6518 if vmei.VirtualMachineExtensionImageProperties != nil { 6519 objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties 6520 } 6521 if vmei.ID != nil { 6522 objectMap["id"] = vmei.ID 6523 } 6524 if vmei.Name != nil { 6525 objectMap["name"] = vmei.Name 6526 } 6527 if vmei.Type != nil { 6528 objectMap["type"] = vmei.Type 6529 } 6530 if vmei.Location != nil { 6531 objectMap["location"] = vmei.Location 6532 } 6533 if vmei.Tags != nil { 6534 objectMap["tags"] = vmei.Tags 6535 } 6536 return json.Marshal(objectMap) 6537} 6538 6539// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct. 6540func (vmei *VirtualMachineExtensionImage) UnmarshalJSON(body []byte) error { 6541 var m map[string]*json.RawMessage 6542 err := json.Unmarshal(body, &m) 6543 if err != nil { 6544 return err 6545 } 6546 for k, v := range m { 6547 switch k { 6548 case "properties": 6549 if v != nil { 6550 var virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties 6551 err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties) 6552 if err != nil { 6553 return err 6554 } 6555 vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties 6556 } 6557 case "id": 6558 if v != nil { 6559 var ID string 6560 err = json.Unmarshal(*v, &ID) 6561 if err != nil { 6562 return err 6563 } 6564 vmei.ID = &ID 6565 } 6566 case "name": 6567 if v != nil { 6568 var name string 6569 err = json.Unmarshal(*v, &name) 6570 if err != nil { 6571 return err 6572 } 6573 vmei.Name = &name 6574 } 6575 case "type": 6576 if v != nil { 6577 var typeVar string 6578 err = json.Unmarshal(*v, &typeVar) 6579 if err != nil { 6580 return err 6581 } 6582 vmei.Type = &typeVar 6583 } 6584 case "location": 6585 if v != nil { 6586 var location string 6587 err = json.Unmarshal(*v, &location) 6588 if err != nil { 6589 return err 6590 } 6591 vmei.Location = &location 6592 } 6593 case "tags": 6594 if v != nil { 6595 var tags map[string]*string 6596 err = json.Unmarshal(*v, &tags) 6597 if err != nil { 6598 return err 6599 } 6600 vmei.Tags = tags 6601 } 6602 } 6603 } 6604 6605 return nil 6606} 6607 6608// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image. 6609type VirtualMachineExtensionImageProperties struct { 6610 // OperatingSystem - The operating system this extension supports. 6611 OperatingSystem *string `json:"operatingSystem,omitempty"` 6612 // ComputeRole - The type of role (IaaS or PaaS) this extension supports. 6613 ComputeRole *string `json:"computeRole,omitempty"` 6614 // HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema. 6615 HandlerSchema *string `json:"handlerSchema,omitempty"` 6616 // VMScaleSetEnabled - 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 wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. 6617 VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"` 6618 // SupportsMultipleExtensions - Whether the handler can support multiple extensions. 6619 SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"` 6620} 6621 6622// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension. 6623type VirtualMachineExtensionInstanceView struct { 6624 // Name - The virtual machine extension name. 6625 Name *string `json:"name,omitempty"` 6626 // Type - Specifies the type of the extension; an example is "CustomScriptExtension". 6627 Type *string `json:"type,omitempty"` 6628 // TypeHandlerVersion - Specifies the version of the script handler. 6629 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 6630 // Substatuses - The resource status information. 6631 Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"` 6632 // Statuses - The resource status information. 6633 Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` 6634} 6635 6636// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension. 6637type VirtualMachineExtensionProperties struct { 6638 // ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed. 6639 ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` 6640 // Publisher - The name of the extension handler publisher. 6641 Publisher *string `json:"publisher,omitempty"` 6642 // Type - Specifies the type of the extension; an example is "CustomScriptExtension". 6643 Type *string `json:"type,omitempty"` 6644 // TypeHandlerVersion - Specifies the version of the script handler. 6645 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 6646 // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. 6647 AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` 6648 // Settings - Json formatted public settings for the extension. 6649 Settings interface{} `json:"settings,omitempty"` 6650 // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. 6651 ProtectedSettings interface{} `json:"protectedSettings,omitempty"` 6652 // ProvisioningState - The provisioning state, which only appears in the response. 6653 ProvisioningState *string `json:"provisioningState,omitempty"` 6654 // InstanceView - The virtual machine extension instance view. 6655 InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"` 6656} 6657 6658// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of 6659// a long-running operation. 6660type VirtualMachineExtensionsCreateOrUpdateFuture struct { 6661 azure.Future 6662} 6663 6664// Result returns the result of the asynchronous operation. 6665// If the operation has not completed it will return an error. 6666func (future *VirtualMachineExtensionsCreateOrUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) { 6667 var done bool 6668 done, err = future.Done(client) 6669 if err != nil { 6670 err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 6671 return 6672 } 6673 if !done { 6674 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture") 6675 return 6676 } 6677 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6678 if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent { 6679 vme, err = client.CreateOrUpdateResponder(vme.Response.Response) 6680 if err != nil { 6681 err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") 6682 } 6683 } 6684 return 6685} 6686 6687// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a 6688// long-running operation. 6689type VirtualMachineExtensionsDeleteFuture struct { 6690 azure.Future 6691} 6692 6693// Result returns the result of the asynchronous operation. 6694// If the operation has not completed it will return an error. 6695func (future *VirtualMachineExtensionsDeleteFuture) Result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) { 6696 var done bool 6697 done, err = future.Done(client) 6698 if err != nil { 6699 err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") 6700 return 6701 } 6702 if !done { 6703 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture") 6704 return 6705 } 6706 ar.Response = future.Response() 6707 return 6708} 6709 6710// VirtualMachineExtensionsListResult the List Extension operation response 6711type VirtualMachineExtensionsListResult struct { 6712 autorest.Response `json:"-"` 6713 // Value - The list of extensions 6714 Value *[]VirtualMachineExtension `json:"value,omitempty"` 6715} 6716 6717// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a 6718// long-running operation. 6719type VirtualMachineExtensionsUpdateFuture struct { 6720 azure.Future 6721} 6722 6723// Result returns the result of the asynchronous operation. 6724// If the operation has not completed it will return an error. 6725func (future *VirtualMachineExtensionsUpdateFuture) Result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) { 6726 var done bool 6727 done, err = future.Done(client) 6728 if err != nil { 6729 err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") 6730 return 6731 } 6732 if !done { 6733 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture") 6734 return 6735 } 6736 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6737 if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent { 6738 vme, err = client.UpdateResponder(vme.Response.Response) 6739 if err != nil { 6740 err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") 6741 } 6742 } 6743 return 6744} 6745 6746// VirtualMachineExtensionUpdate describes a Virtual Machine Extension. 6747type VirtualMachineExtensionUpdate struct { 6748 *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` 6749 // Tags - Resource tags 6750 Tags map[string]*string `json:"tags"` 6751} 6752 6753// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate. 6754func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) { 6755 objectMap := make(map[string]interface{}) 6756 if vmeu.VirtualMachineExtensionUpdateProperties != nil { 6757 objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties 6758 } 6759 if vmeu.Tags != nil { 6760 objectMap["tags"] = vmeu.Tags 6761 } 6762 return json.Marshal(objectMap) 6763} 6764 6765// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct. 6766func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error { 6767 var m map[string]*json.RawMessage 6768 err := json.Unmarshal(body, &m) 6769 if err != nil { 6770 return err 6771 } 6772 for k, v := range m { 6773 switch k { 6774 case "properties": 6775 if v != nil { 6776 var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties 6777 err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties) 6778 if err != nil { 6779 return err 6780 } 6781 vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties 6782 } 6783 case "tags": 6784 if v != nil { 6785 var tags map[string]*string 6786 err = json.Unmarshal(*v, &tags) 6787 if err != nil { 6788 return err 6789 } 6790 vmeu.Tags = tags 6791 } 6792 } 6793 } 6794 6795 return nil 6796} 6797 6798// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension. 6799type VirtualMachineExtensionUpdateProperties struct { 6800 // ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed. 6801 ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` 6802 // Publisher - The name of the extension handler publisher. 6803 Publisher *string `json:"publisher,omitempty"` 6804 // Type - Specifies the type of the extension; an example is "CustomScriptExtension". 6805 Type *string `json:"type,omitempty"` 6806 // TypeHandlerVersion - Specifies the version of the script handler. 6807 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 6808 // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. 6809 AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` 6810 // Settings - Json formatted public settings for the extension. 6811 Settings interface{} `json:"settings,omitempty"` 6812 // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. 6813 ProtectedSettings interface{} `json:"protectedSettings,omitempty"` 6814} 6815 6816// VirtualMachineHealthStatus the health status of the VM. 6817type VirtualMachineHealthStatus struct { 6818 // Status - The health status information for the VM. 6819 Status *InstanceViewStatus `json:"status,omitempty"` 6820} 6821 6822// VirtualMachineIdentity identity for the virtual machine. 6823type VirtualMachineIdentity struct { 6824 // PrincipalID - The principal id of virtual machine identity. This property will only be provided for a system assigned identity. 6825 PrincipalID *string `json:"principalId,omitempty"` 6826 // TenantID - The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. 6827 TenantID *string `json:"tenantId,omitempty"` 6828 // Type - The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' 6829 Type ResourceIdentityType `json:"type,omitempty"` 6830 // UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. 6831 UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` 6832} 6833 6834// MarshalJSON is the custom marshaler for VirtualMachineIdentity. 6835func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) { 6836 objectMap := make(map[string]interface{}) 6837 if vmi.PrincipalID != nil { 6838 objectMap["principalId"] = vmi.PrincipalID 6839 } 6840 if vmi.TenantID != nil { 6841 objectMap["tenantId"] = vmi.TenantID 6842 } 6843 if vmi.Type != "" { 6844 objectMap["type"] = vmi.Type 6845 } 6846 if vmi.UserAssignedIdentities != nil { 6847 objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities 6848 } 6849 return json.Marshal(objectMap) 6850} 6851 6852// VirtualMachineIdentityUserAssignedIdentitiesValue ... 6853type VirtualMachineIdentityUserAssignedIdentitiesValue struct { 6854 // PrincipalID - The principal id of user assigned identity. 6855 PrincipalID *string `json:"principalId,omitempty"` 6856 // ClientID - The client id of user assigned identity. 6857 ClientID *string `json:"clientId,omitempty"` 6858} 6859 6860// VirtualMachineImage describes a Virtual Machine Image. 6861type VirtualMachineImage struct { 6862 autorest.Response `json:"-"` 6863 *VirtualMachineImageProperties `json:"properties,omitempty"` 6864 // Name - The name of the resource. 6865 Name *string `json:"name,omitempty"` 6866 // Location - The supported Azure location of the resource. 6867 Location *string `json:"location,omitempty"` 6868 // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). 6869 Tags map[string]*string `json:"tags"` 6870 // ID - Resource Id 6871 ID *string `json:"id,omitempty"` 6872} 6873 6874// MarshalJSON is the custom marshaler for VirtualMachineImage. 6875func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) { 6876 objectMap := make(map[string]interface{}) 6877 if vmi.VirtualMachineImageProperties != nil { 6878 objectMap["properties"] = vmi.VirtualMachineImageProperties 6879 } 6880 if vmi.Name != nil { 6881 objectMap["name"] = vmi.Name 6882 } 6883 if vmi.Location != nil { 6884 objectMap["location"] = vmi.Location 6885 } 6886 if vmi.Tags != nil { 6887 objectMap["tags"] = vmi.Tags 6888 } 6889 if vmi.ID != nil { 6890 objectMap["id"] = vmi.ID 6891 } 6892 return json.Marshal(objectMap) 6893} 6894 6895// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct. 6896func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error { 6897 var m map[string]*json.RawMessage 6898 err := json.Unmarshal(body, &m) 6899 if err != nil { 6900 return err 6901 } 6902 for k, v := range m { 6903 switch k { 6904 case "properties": 6905 if v != nil { 6906 var virtualMachineImageProperties VirtualMachineImageProperties 6907 err = json.Unmarshal(*v, &virtualMachineImageProperties) 6908 if err != nil { 6909 return err 6910 } 6911 vmi.VirtualMachineImageProperties = &virtualMachineImageProperties 6912 } 6913 case "name": 6914 if v != nil { 6915 var name string 6916 err = json.Unmarshal(*v, &name) 6917 if err != nil { 6918 return err 6919 } 6920 vmi.Name = &name 6921 } 6922 case "location": 6923 if v != nil { 6924 var location string 6925 err = json.Unmarshal(*v, &location) 6926 if err != nil { 6927 return err 6928 } 6929 vmi.Location = &location 6930 } 6931 case "tags": 6932 if v != nil { 6933 var tags map[string]*string 6934 err = json.Unmarshal(*v, &tags) 6935 if err != nil { 6936 return err 6937 } 6938 vmi.Tags = tags 6939 } 6940 case "id": 6941 if v != nil { 6942 var ID string 6943 err = json.Unmarshal(*v, &ID) 6944 if err != nil { 6945 return err 6946 } 6947 vmi.ID = &ID 6948 } 6949 } 6950 } 6951 6952 return nil 6953} 6954 6955// VirtualMachineImageProperties describes the properties of a Virtual Machine Image. 6956type VirtualMachineImageProperties struct { 6957 Plan *PurchasePlan `json:"plan,omitempty"` 6958 OsDiskImage *OSDiskImage `json:"osDiskImage,omitempty"` 6959 DataDiskImages *[]DataDiskImage `json:"dataDiskImages,omitempty"` 6960 AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"` 6961} 6962 6963// VirtualMachineImageResource virtual machine image resource information. 6964type VirtualMachineImageResource struct { 6965 // Name - The name of the resource. 6966 Name *string `json:"name,omitempty"` 6967 // Location - The supported Azure location of the resource. 6968 Location *string `json:"location,omitempty"` 6969 // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). 6970 Tags map[string]*string `json:"tags"` 6971 // ID - Resource Id 6972 ID *string `json:"id,omitempty"` 6973} 6974 6975// MarshalJSON is the custom marshaler for VirtualMachineImageResource. 6976func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) { 6977 objectMap := make(map[string]interface{}) 6978 if vmir.Name != nil { 6979 objectMap["name"] = vmir.Name 6980 } 6981 if vmir.Location != nil { 6982 objectMap["location"] = vmir.Location 6983 } 6984 if vmir.Tags != nil { 6985 objectMap["tags"] = vmir.Tags 6986 } 6987 if vmir.ID != nil { 6988 objectMap["id"] = vmir.ID 6989 } 6990 return json.Marshal(objectMap) 6991} 6992 6993// VirtualMachineInstanceView the instance view of a virtual machine. 6994type VirtualMachineInstanceView struct { 6995 autorest.Response `json:"-"` 6996 // PlatformUpdateDomain - Specifies the update domain of the virtual machine. 6997 PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` 6998 // PlatformFaultDomain - Specifies the fault domain of the virtual machine. 6999 PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` 7000 // ComputerName - The computer name assigned to the virtual machine. 7001 ComputerName *string `json:"computerName,omitempty"` 7002 // OsName - The Operating System running on the virtual machine. 7003 OsName *string `json:"osName,omitempty"` 7004 // OsVersion - The version of Operating System running on the virtual machine. 7005 OsVersion *string `json:"osVersion,omitempty"` 7006 // RdpThumbPrint - The Remote desktop certificate thumbprint. 7007 RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` 7008 // VMAgent - The VM Agent running on the virtual machine. 7009 VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` 7010 // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine. 7011 MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` 7012 // Disks - The virtual machine disk information. 7013 Disks *[]DiskInstanceView `json:"disks,omitempty"` 7014 // Extensions - The extensions information. 7015 Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` 7016 // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. 7017 BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` 7018 // Statuses - The resource status information. 7019 Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` 7020} 7021 7022// VirtualMachineListResult the List Virtual Machine operation response. 7023type VirtualMachineListResult struct { 7024 autorest.Response `json:"-"` 7025 // Value - The list of virtual machines. 7026 Value *[]VirtualMachine `json:"value,omitempty"` 7027 // NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines. 7028 NextLink *string `json:"nextLink,omitempty"` 7029} 7030 7031// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values. 7032type VirtualMachineListResultIterator struct { 7033 i int 7034 page VirtualMachineListResultPage 7035} 7036 7037// NextWithContext advances to the next value. If there was an error making 7038// the request the iterator does not advance and the error is returned. 7039func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) { 7040 if tracing.IsEnabled() { 7041 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext") 7042 defer func() { 7043 sc := -1 7044 if iter.Response().Response.Response != nil { 7045 sc = iter.Response().Response.Response.StatusCode 7046 } 7047 tracing.EndSpan(ctx, sc, err) 7048 }() 7049 } 7050 iter.i++ 7051 if iter.i < len(iter.page.Values()) { 7052 return nil 7053 } 7054 err = iter.page.NextWithContext(ctx) 7055 if err != nil { 7056 iter.i-- 7057 return err 7058 } 7059 iter.i = 0 7060 return nil 7061} 7062 7063// Next advances to the next value. If there was an error making 7064// the request the iterator does not advance and the error is returned. 7065// Deprecated: Use NextWithContext() instead. 7066func (iter *VirtualMachineListResultIterator) Next() error { 7067 return iter.NextWithContext(context.Background()) 7068} 7069 7070// NotDone returns true if the enumeration should be started or is not yet complete. 7071func (iter VirtualMachineListResultIterator) NotDone() bool { 7072 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7073} 7074 7075// Response returns the raw server response from the last page request. 7076func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult { 7077 return iter.page.Response() 7078} 7079 7080// Value returns the current value or a zero-initialized value if the 7081// iterator has advanced beyond the end of the collection. 7082func (iter VirtualMachineListResultIterator) Value() VirtualMachine { 7083 if !iter.page.NotDone() { 7084 return VirtualMachine{} 7085 } 7086 return iter.page.Values()[iter.i] 7087} 7088 7089// Creates a new instance of the VirtualMachineListResultIterator type. 7090func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator { 7091 return VirtualMachineListResultIterator{page: page} 7092} 7093 7094// IsEmpty returns true if the ListResult contains no values. 7095func (vmlr VirtualMachineListResult) IsEmpty() bool { 7096 return vmlr.Value == nil || len(*vmlr.Value) == 0 7097} 7098 7099// virtualMachineListResultPreparer prepares a request to retrieve the next set of results. 7100// It returns nil if no more results exist. 7101func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) { 7102 if vmlr.NextLink == nil || len(to.String(vmlr.NextLink)) < 1 { 7103 return nil, nil 7104 } 7105 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7106 autorest.AsJSON(), 7107 autorest.AsGet(), 7108 autorest.WithBaseURL(to.String(vmlr.NextLink))) 7109} 7110 7111// VirtualMachineListResultPage contains a page of VirtualMachine values. 7112type VirtualMachineListResultPage struct { 7113 fn func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error) 7114 vmlr VirtualMachineListResult 7115} 7116 7117// NextWithContext advances to the next page of values. If there was an error making 7118// the request the page does not advance and the error is returned. 7119func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) { 7120 if tracing.IsEnabled() { 7121 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext") 7122 defer func() { 7123 sc := -1 7124 if page.Response().Response.Response != nil { 7125 sc = page.Response().Response.Response.StatusCode 7126 } 7127 tracing.EndSpan(ctx, sc, err) 7128 }() 7129 } 7130 next, err := page.fn(ctx, page.vmlr) 7131 if err != nil { 7132 return err 7133 } 7134 page.vmlr = next 7135 return nil 7136} 7137 7138// Next advances to the next page of values. If there was an error making 7139// the request the page does not advance and the error is returned. 7140// Deprecated: Use NextWithContext() instead. 7141func (page *VirtualMachineListResultPage) Next() error { 7142 return page.NextWithContext(context.Background()) 7143} 7144 7145// NotDone returns true if the page enumeration should be started or is not yet complete. 7146func (page VirtualMachineListResultPage) NotDone() bool { 7147 return !page.vmlr.IsEmpty() 7148} 7149 7150// Response returns the raw server response from the last page request. 7151func (page VirtualMachineListResultPage) Response() VirtualMachineListResult { 7152 return page.vmlr 7153} 7154 7155// Values returns the slice of values for the current page or nil if there are no values. 7156func (page VirtualMachineListResultPage) Values() []VirtualMachine { 7157 if page.vmlr.IsEmpty() { 7158 return nil 7159 } 7160 return *page.vmlr.Value 7161} 7162 7163// Creates a new instance of the VirtualMachineListResultPage type. 7164func NewVirtualMachineListResultPage(getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage { 7165 return VirtualMachineListResultPage{fn: getNextPage} 7166} 7167 7168// VirtualMachineProperties describes the properties of a Virtual Machine. 7169type VirtualMachineProperties struct { 7170 // HardwareProfile - Specifies the hardware settings for the virtual machine. 7171 HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` 7172 // StorageProfile - Specifies the storage settings for the virtual machine disks. 7173 StorageProfile *StorageProfile `json:"storageProfile,omitempty"` 7174 // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine. 7175 AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` 7176 // OsProfile - Specifies the operating system settings for the virtual machine. 7177 OsProfile *OSProfile `json:"osProfile,omitempty"` 7178 // NetworkProfile - Specifies the network interfaces of the virtual machine. 7179 NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` 7180 // DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. 7181 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 7182 // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. 7183 AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` 7184 // ProvisioningState - The provisioning state, which only appears in the response. 7185 ProvisioningState *string `json:"provisioningState,omitempty"` 7186 // InstanceView - The virtual machine instance view. 7187 InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"` 7188 // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15 7189 LicenseType *string `json:"licenseType,omitempty"` 7190 // VMID - 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 BIOS commands. 7191 VMID *string `json:"vmId,omitempty"` 7192} 7193 7194// VirtualMachineReimageParameters paramaters for Reimaging Virtual Machine. Default value for OSDisk : 7195// true. 7196type VirtualMachineReimageParameters struct { 7197 // TempDisk - Specified whether to reimage temp disk. Default value: false. 7198 TempDisk *bool `json:"tempDisk,omitempty"` 7199} 7200 7201// VirtualMachineScaleSet describes a Virtual Machine Scale Set. 7202type VirtualMachineScaleSet struct { 7203 autorest.Response `json:"-"` 7204 // Sku - The virtual machine scale set sku. 7205 Sku *Sku `json:"sku,omitempty"` 7206 // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must 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, Get Started ->**. Enter any required information and then click **Save**. 7207 Plan *Plan `json:"plan,omitempty"` 7208 *VirtualMachineScaleSetProperties `json:"properties,omitempty"` 7209 // Identity - The identity of the virtual machine scale set, if configured. 7210 Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` 7211 // Zones - The virtual machine scale set zones. 7212 Zones *[]string `json:"zones,omitempty"` 7213 // ID - Resource Id 7214 ID *string `json:"id,omitempty"` 7215 // Name - Resource name 7216 Name *string `json:"name,omitempty"` 7217 // Type - Resource type 7218 Type *string `json:"type,omitempty"` 7219 // Location - Resource location 7220 Location *string `json:"location,omitempty"` 7221 // Tags - Resource tags 7222 Tags map[string]*string `json:"tags"` 7223} 7224 7225// MarshalJSON is the custom marshaler for VirtualMachineScaleSet. 7226func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) { 7227 objectMap := make(map[string]interface{}) 7228 if vmss.Sku != nil { 7229 objectMap["sku"] = vmss.Sku 7230 } 7231 if vmss.Plan != nil { 7232 objectMap["plan"] = vmss.Plan 7233 } 7234 if vmss.VirtualMachineScaleSetProperties != nil { 7235 objectMap["properties"] = vmss.VirtualMachineScaleSetProperties 7236 } 7237 if vmss.Identity != nil { 7238 objectMap["identity"] = vmss.Identity 7239 } 7240 if vmss.Zones != nil { 7241 objectMap["zones"] = vmss.Zones 7242 } 7243 if vmss.ID != nil { 7244 objectMap["id"] = vmss.ID 7245 } 7246 if vmss.Name != nil { 7247 objectMap["name"] = vmss.Name 7248 } 7249 if vmss.Type != nil { 7250 objectMap["type"] = vmss.Type 7251 } 7252 if vmss.Location != nil { 7253 objectMap["location"] = vmss.Location 7254 } 7255 if vmss.Tags != nil { 7256 objectMap["tags"] = vmss.Tags 7257 } 7258 return json.Marshal(objectMap) 7259} 7260 7261// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct. 7262func (vmss *VirtualMachineScaleSet) UnmarshalJSON(body []byte) error { 7263 var m map[string]*json.RawMessage 7264 err := json.Unmarshal(body, &m) 7265 if err != nil { 7266 return err 7267 } 7268 for k, v := range m { 7269 switch k { 7270 case "sku": 7271 if v != nil { 7272 var sku Sku 7273 err = json.Unmarshal(*v, &sku) 7274 if err != nil { 7275 return err 7276 } 7277 vmss.Sku = &sku 7278 } 7279 case "plan": 7280 if v != nil { 7281 var plan Plan 7282 err = json.Unmarshal(*v, &plan) 7283 if err != nil { 7284 return err 7285 } 7286 vmss.Plan = &plan 7287 } 7288 case "properties": 7289 if v != nil { 7290 var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties 7291 err = json.Unmarshal(*v, &virtualMachineScaleSetProperties) 7292 if err != nil { 7293 return err 7294 } 7295 vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties 7296 } 7297 case "identity": 7298 if v != nil { 7299 var identity VirtualMachineScaleSetIdentity 7300 err = json.Unmarshal(*v, &identity) 7301 if err != nil { 7302 return err 7303 } 7304 vmss.Identity = &identity 7305 } 7306 case "zones": 7307 if v != nil { 7308 var zones []string 7309 err = json.Unmarshal(*v, &zones) 7310 if err != nil { 7311 return err 7312 } 7313 vmss.Zones = &zones 7314 } 7315 case "id": 7316 if v != nil { 7317 var ID string 7318 err = json.Unmarshal(*v, &ID) 7319 if err != nil { 7320 return err 7321 } 7322 vmss.ID = &ID 7323 } 7324 case "name": 7325 if v != nil { 7326 var name string 7327 err = json.Unmarshal(*v, &name) 7328 if err != nil { 7329 return err 7330 } 7331 vmss.Name = &name 7332 } 7333 case "type": 7334 if v != nil { 7335 var typeVar string 7336 err = json.Unmarshal(*v, &typeVar) 7337 if err != nil { 7338 return err 7339 } 7340 vmss.Type = &typeVar 7341 } 7342 case "location": 7343 if v != nil { 7344 var location string 7345 err = json.Unmarshal(*v, &location) 7346 if err != nil { 7347 return err 7348 } 7349 vmss.Location = &location 7350 } 7351 case "tags": 7352 if v != nil { 7353 var tags map[string]*string 7354 err = json.Unmarshal(*v, &tags) 7355 if err != nil { 7356 return err 7357 } 7358 vmss.Tags = tags 7359 } 7360 } 7361 } 7362 7363 return nil 7364} 7365 7366// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk. 7367type VirtualMachineScaleSetDataDisk struct { 7368 // Name - The disk name. 7369 Name *string `json:"name,omitempty"` 7370 // Lun - 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 each data disk attached to a VM. 7371 Lun *int32 `json:"lun,omitempty"` 7372 // Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' 7373 Caching CachingTypes `json:"caching,omitempty"` 7374 // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. 7375 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 7376 // CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' 7377 CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` 7378 // DiskSizeGB - 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. <br><br> This value cannot be larger than 1023 GB 7379 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 7380 // ManagedDisk - The managed disk parameters. 7381 ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` 7382} 7383 7384// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension. 7385type VirtualMachineScaleSetExtension struct { 7386 autorest.Response `json:"-"` 7387 // Name - The name of the extension. 7388 Name *string `json:"name,omitempty"` 7389 *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` 7390 // ID - Resource Id 7391 ID *string `json:"id,omitempty"` 7392} 7393 7394// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension. 7395func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) { 7396 objectMap := make(map[string]interface{}) 7397 if vmsse.Name != nil { 7398 objectMap["name"] = vmsse.Name 7399 } 7400 if vmsse.VirtualMachineScaleSetExtensionProperties != nil { 7401 objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties 7402 } 7403 if vmsse.ID != nil { 7404 objectMap["id"] = vmsse.ID 7405 } 7406 return json.Marshal(objectMap) 7407} 7408 7409// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct. 7410func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error { 7411 var m map[string]*json.RawMessage 7412 err := json.Unmarshal(body, &m) 7413 if err != nil { 7414 return err 7415 } 7416 for k, v := range m { 7417 switch k { 7418 case "name": 7419 if v != nil { 7420 var name string 7421 err = json.Unmarshal(*v, &name) 7422 if err != nil { 7423 return err 7424 } 7425 vmsse.Name = &name 7426 } 7427 case "properties": 7428 if v != nil { 7429 var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties 7430 err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties) 7431 if err != nil { 7432 return err 7433 } 7434 vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties 7435 } 7436 case "id": 7437 if v != nil { 7438 var ID string 7439 err = json.Unmarshal(*v, &ID) 7440 if err != nil { 7441 return err 7442 } 7443 vmsse.ID = &ID 7444 } 7445 } 7446 } 7447 7448 return nil 7449} 7450 7451// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response. 7452type VirtualMachineScaleSetExtensionListResult struct { 7453 autorest.Response `json:"-"` 7454 // Value - The list of VM scale set extensions. 7455 Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"` 7456 // NextLink - 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. 7457 NextLink *string `json:"nextLink,omitempty"` 7458} 7459 7460// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of 7461// VirtualMachineScaleSetExtension values. 7462type VirtualMachineScaleSetExtensionListResultIterator struct { 7463 i int 7464 page VirtualMachineScaleSetExtensionListResultPage 7465} 7466 7467// NextWithContext advances to the next value. If there was an error making 7468// the request the iterator does not advance and the error is returned. 7469func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) { 7470 if tracing.IsEnabled() { 7471 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext") 7472 defer func() { 7473 sc := -1 7474 if iter.Response().Response.Response != nil { 7475 sc = iter.Response().Response.Response.StatusCode 7476 } 7477 tracing.EndSpan(ctx, sc, err) 7478 }() 7479 } 7480 iter.i++ 7481 if iter.i < len(iter.page.Values()) { 7482 return nil 7483 } 7484 err = iter.page.NextWithContext(ctx) 7485 if err != nil { 7486 iter.i-- 7487 return err 7488 } 7489 iter.i = 0 7490 return nil 7491} 7492 7493// Next advances to the next value. If there was an error making 7494// the request the iterator does not advance and the error is returned. 7495// Deprecated: Use NextWithContext() instead. 7496func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error { 7497 return iter.NextWithContext(context.Background()) 7498} 7499 7500// NotDone returns true if the enumeration should be started or is not yet complete. 7501func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool { 7502 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7503} 7504 7505// Response returns the raw server response from the last page request. 7506func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult { 7507 return iter.page.Response() 7508} 7509 7510// Value returns the current value or a zero-initialized value if the 7511// iterator has advanced beyond the end of the collection. 7512func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension { 7513 if !iter.page.NotDone() { 7514 return VirtualMachineScaleSetExtension{} 7515 } 7516 return iter.page.Values()[iter.i] 7517} 7518 7519// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type. 7520func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator { 7521 return VirtualMachineScaleSetExtensionListResultIterator{page: page} 7522} 7523 7524// IsEmpty returns true if the ListResult contains no values. 7525func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool { 7526 return vmsselr.Value == nil || len(*vmsselr.Value) == 0 7527} 7528 7529// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results. 7530// It returns nil if no more results exist. 7531func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) { 7532 if vmsselr.NextLink == nil || len(to.String(vmsselr.NextLink)) < 1 { 7533 return nil, nil 7534 } 7535 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7536 autorest.AsJSON(), 7537 autorest.AsGet(), 7538 autorest.WithBaseURL(to.String(vmsselr.NextLink))) 7539} 7540 7541// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values. 7542type VirtualMachineScaleSetExtensionListResultPage struct { 7543 fn func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error) 7544 vmsselr VirtualMachineScaleSetExtensionListResult 7545} 7546 7547// NextWithContext advances to the next page of values. If there was an error making 7548// the request the page does not advance and the error is returned. 7549func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) { 7550 if tracing.IsEnabled() { 7551 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext") 7552 defer func() { 7553 sc := -1 7554 if page.Response().Response.Response != nil { 7555 sc = page.Response().Response.Response.StatusCode 7556 } 7557 tracing.EndSpan(ctx, sc, err) 7558 }() 7559 } 7560 next, err := page.fn(ctx, page.vmsselr) 7561 if err != nil { 7562 return err 7563 } 7564 page.vmsselr = next 7565 return nil 7566} 7567 7568// Next advances to the next page of values. If there was an error making 7569// the request the page does not advance and the error is returned. 7570// Deprecated: Use NextWithContext() instead. 7571func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error { 7572 return page.NextWithContext(context.Background()) 7573} 7574 7575// NotDone returns true if the page enumeration should be started or is not yet complete. 7576func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool { 7577 return !page.vmsselr.IsEmpty() 7578} 7579 7580// Response returns the raw server response from the last page request. 7581func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult { 7582 return page.vmsselr 7583} 7584 7585// Values returns the slice of values for the current page or nil if there are no values. 7586func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension { 7587 if page.vmsselr.IsEmpty() { 7588 return nil 7589 } 7590 return *page.vmsselr.Value 7591} 7592 7593// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type. 7594func NewVirtualMachineScaleSetExtensionListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage { 7595 return VirtualMachineScaleSetExtensionListResultPage{fn: getNextPage} 7596} 7597 7598// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile. 7599type VirtualMachineScaleSetExtensionProfile struct { 7600 // Extensions - The virtual machine scale set child extension resources. 7601 Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"` 7602} 7603 7604// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set 7605// Extension. 7606type VirtualMachineScaleSetExtensionProperties struct { 7607 // ForceUpdateTag - 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 not changed. 7608 ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` 7609 // Publisher - The name of the extension handler publisher. 7610 Publisher *string `json:"publisher,omitempty"` 7611 // Type - Specifies the type of the extension; an example is "CustomScriptExtension". 7612 Type *string `json:"type,omitempty"` 7613 // TypeHandlerVersion - Specifies the version of the script handler. 7614 TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` 7615 // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. 7616 AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"` 7617 // Settings - Json formatted public settings for the extension. 7618 Settings interface{} `json:"settings,omitempty"` 7619 // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. 7620 ProtectedSettings interface{} `json:"protectedSettings,omitempty"` 7621 // ProvisioningState - The provisioning state, which only appears in the response. 7622 ProvisioningState *string `json:"provisioningState,omitempty"` 7623} 7624 7625// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the 7626// results of a long-running operation. 7627type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct { 7628 azure.Future 7629} 7630 7631// Result returns the result of the asynchronous operation. 7632// If the operation has not completed it will return an error. 7633func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) { 7634 var done bool 7635 done, err = future.Done(client) 7636 if err != nil { 7637 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 7638 return 7639 } 7640 if !done { 7641 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture") 7642 return 7643 } 7644 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7645 if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent { 7646 vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response) 7647 if err != nil { 7648 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request") 7649 } 7650 } 7651 return 7652} 7653 7654// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of 7655// a long-running operation. 7656type VirtualMachineScaleSetExtensionsDeleteFuture struct { 7657 azure.Future 7658} 7659 7660// Result returns the result of the asynchronous operation. 7661// If the operation has not completed it will return an error. 7662func (future *VirtualMachineScaleSetExtensionsDeleteFuture) Result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) { 7663 var done bool 7664 done, err = future.Done(client) 7665 if err != nil { 7666 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") 7667 return 7668 } 7669 if !done { 7670 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture") 7671 return 7672 } 7673 ar.Response = future.Response() 7674 return 7675} 7676 7677// VirtualMachineScaleSetIdentity identity for the virtual machine scale set. 7678type VirtualMachineScaleSetIdentity struct { 7679 // PrincipalID - The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity. 7680 PrincipalID *string `json:"principalId,omitempty"` 7681 // TenantID - The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity. 7682 TenantID *string `json:"tenantId,omitempty"` 7683 // Type - The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' 7684 Type ResourceIdentityType `json:"type,omitempty"` 7685 // UserAssignedIdentities - 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 form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. 7686 UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` 7687} 7688 7689// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity. 7690func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) { 7691 objectMap := make(map[string]interface{}) 7692 if vmssi.PrincipalID != nil { 7693 objectMap["principalId"] = vmssi.PrincipalID 7694 } 7695 if vmssi.TenantID != nil { 7696 objectMap["tenantId"] = vmssi.TenantID 7697 } 7698 if vmssi.Type != "" { 7699 objectMap["type"] = vmssi.Type 7700 } 7701 if vmssi.UserAssignedIdentities != nil { 7702 objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities 7703 } 7704 return json.Marshal(objectMap) 7705} 7706 7707// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ... 7708type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct { 7709 // PrincipalID - The principal id of user assigned identity. 7710 PrincipalID *string `json:"principalId,omitempty"` 7711 // ClientID - The client id of user assigned identity. 7712 ClientID *string `json:"clientId,omitempty"` 7713} 7714 7715// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set. 7716type VirtualMachineScaleSetInstanceView struct { 7717 autorest.Response `json:"-"` 7718 // VirtualMachine - The instance view status summary for the virtual machine scale set. 7719 VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"` 7720 // Extensions - The extensions information. 7721 Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"` 7722 // Statuses - The resource status information. 7723 Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` 7724} 7725 7726// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of 7727// a virtual machine scale set. 7728type VirtualMachineScaleSetInstanceViewStatusesSummary struct { 7729 // StatusesSummary - The extensions information. 7730 StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` 7731} 7732 7733// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP 7734// configuration. 7735type VirtualMachineScaleSetIPConfiguration struct { 7736 // Name - The IP configuration name. 7737 Name *string `json:"name,omitempty"` 7738 *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"` 7739 // ID - Resource Id 7740 ID *string `json:"id,omitempty"` 7741} 7742 7743// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration. 7744func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) { 7745 objectMap := make(map[string]interface{}) 7746 if vmssic.Name != nil { 7747 objectMap["name"] = vmssic.Name 7748 } 7749 if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil { 7750 objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties 7751 } 7752 if vmssic.ID != nil { 7753 objectMap["id"] = vmssic.ID 7754 } 7755 return json.Marshal(objectMap) 7756} 7757 7758// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct. 7759func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte) error { 7760 var m map[string]*json.RawMessage 7761 err := json.Unmarshal(body, &m) 7762 if err != nil { 7763 return err 7764 } 7765 for k, v := range m { 7766 switch k { 7767 case "name": 7768 if v != nil { 7769 var name string 7770 err = json.Unmarshal(*v, &name) 7771 if err != nil { 7772 return err 7773 } 7774 vmssic.Name = &name 7775 } 7776 case "properties": 7777 if v != nil { 7778 var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties 7779 err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties) 7780 if err != nil { 7781 return err 7782 } 7783 vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties 7784 } 7785 case "id": 7786 if v != nil { 7787 var ID string 7788 err = json.Unmarshal(*v, &ID) 7789 if err != nil { 7790 return err 7791 } 7792 vmssic.ID = &ID 7793 } 7794 } 7795 } 7796 7797 return nil 7798} 7799 7800// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's 7801// IP configuration properties. 7802type VirtualMachineScaleSetIPConfigurationProperties struct { 7803 // Subnet - Specifies the identifier of the subnet. 7804 Subnet *APIEntityReference `json:"subnet,omitempty"` 7805 // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. 7806 Primary *bool `json:"primary,omitempty"` 7807 // PublicIPAddressConfiguration - The publicIPAddressConfiguration. 7808 PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` 7809 // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' 7810 PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` 7811 // ApplicationGatewayBackendAddressPools - Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. 7812 ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` 7813 // ApplicationSecurityGroups - Specifies an array of references to application security group. 7814 ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"` 7815 // LoadBalancerBackendAddressPools - 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 load balancer. Multiple scale sets cannot use the same load balancer. 7816 LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` 7817 // LoadBalancerInboundNatPools - 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 load balancer. Multiple scale sets cannot use the same load balancer 7818 LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` 7819} 7820 7821// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address. 7822type VirtualMachineScaleSetIPTag struct { 7823 // IPTagType - IP tag type. Example: FirstPartyUsage. 7824 IPTagType *string `json:"ipTagType,omitempty"` 7825 // Tag - IP tag associated with the public IP. Example: SQL, Storage etc. 7826 Tag *string `json:"tag,omitempty"` 7827} 7828 7829// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History 7830// operation response. 7831type VirtualMachineScaleSetListOSUpgradeHistory struct { 7832 autorest.Response `json:"-"` 7833 // Value - The list of OS upgrades performed on the virtual machine scale set. 7834 Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"` 7835 // NextLink - The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades. 7836 NextLink *string `json:"nextLink,omitempty"` 7837} 7838 7839// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of 7840// UpgradeOperationHistoricalStatusInfo values. 7841type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct { 7842 i int 7843 page VirtualMachineScaleSetListOSUpgradeHistoryPage 7844} 7845 7846// NextWithContext advances to the next value. If there was an error making 7847// the request the iterator does not advance and the error is returned. 7848func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) { 7849 if tracing.IsEnabled() { 7850 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext") 7851 defer func() { 7852 sc := -1 7853 if iter.Response().Response.Response != nil { 7854 sc = iter.Response().Response.Response.StatusCode 7855 } 7856 tracing.EndSpan(ctx, sc, err) 7857 }() 7858 } 7859 iter.i++ 7860 if iter.i < len(iter.page.Values()) { 7861 return nil 7862 } 7863 err = iter.page.NextWithContext(ctx) 7864 if err != nil { 7865 iter.i-- 7866 return err 7867 } 7868 iter.i = 0 7869 return nil 7870} 7871 7872// Next advances to the next value. If there was an error making 7873// the request the iterator does not advance and the error is returned. 7874// Deprecated: Use NextWithContext() instead. 7875func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error { 7876 return iter.NextWithContext(context.Background()) 7877} 7878 7879// NotDone returns true if the enumeration should be started or is not yet complete. 7880func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool { 7881 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7882} 7883 7884// Response returns the raw server response from the last page request. 7885func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory { 7886 return iter.page.Response() 7887} 7888 7889// Value returns the current value or a zero-initialized value if the 7890// iterator has advanced beyond the end of the collection. 7891func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo { 7892 if !iter.page.NotDone() { 7893 return UpgradeOperationHistoricalStatusInfo{} 7894 } 7895 return iter.page.Values()[iter.i] 7896} 7897 7898// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type. 7899func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator { 7900 return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page} 7901} 7902 7903// IsEmpty returns true if the ListResult contains no values. 7904func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool { 7905 return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0 7906} 7907 7908// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results. 7909// It returns nil if no more results exist. 7910func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) { 7911 if vmsslouh.NextLink == nil || len(to.String(vmsslouh.NextLink)) < 1 { 7912 return nil, nil 7913 } 7914 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7915 autorest.AsJSON(), 7916 autorest.AsGet(), 7917 autorest.WithBaseURL(to.String(vmsslouh.NextLink))) 7918} 7919 7920// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo 7921// values. 7922type VirtualMachineScaleSetListOSUpgradeHistoryPage struct { 7923 fn func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error) 7924 vmsslouh VirtualMachineScaleSetListOSUpgradeHistory 7925} 7926 7927// NextWithContext advances to the next page of values. If there was an error making 7928// the request the page does not advance and the error is returned. 7929func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) { 7930 if tracing.IsEnabled() { 7931 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext") 7932 defer func() { 7933 sc := -1 7934 if page.Response().Response.Response != nil { 7935 sc = page.Response().Response.Response.StatusCode 7936 } 7937 tracing.EndSpan(ctx, sc, err) 7938 }() 7939 } 7940 next, err := page.fn(ctx, page.vmsslouh) 7941 if err != nil { 7942 return err 7943 } 7944 page.vmsslouh = next 7945 return nil 7946} 7947 7948// Next advances to the next page of values. If there was an error making 7949// the request the page does not advance and the error is returned. 7950// Deprecated: Use NextWithContext() instead. 7951func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error { 7952 return page.NextWithContext(context.Background()) 7953} 7954 7955// NotDone returns true if the page enumeration should be started or is not yet complete. 7956func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool { 7957 return !page.vmsslouh.IsEmpty() 7958} 7959 7960// Response returns the raw server response from the last page request. 7961func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory { 7962 return page.vmsslouh 7963} 7964 7965// Values returns the slice of values for the current page or nil if there are no values. 7966func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo { 7967 if page.vmsslouh.IsEmpty() { 7968 return nil 7969 } 7970 return *page.vmsslouh.Value 7971} 7972 7973// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type. 7974func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage { 7975 return VirtualMachineScaleSetListOSUpgradeHistoryPage{fn: getNextPage} 7976} 7977 7978// VirtualMachineScaleSetListResult the List Virtual Machine operation response. 7979type VirtualMachineScaleSetListResult struct { 7980 autorest.Response `json:"-"` 7981 // Value - The list of virtual machine scale sets. 7982 Value *[]VirtualMachineScaleSet `json:"value,omitempty"` 7983 // NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS. 7984 NextLink *string `json:"nextLink,omitempty"` 7985} 7986 7987// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet 7988// values. 7989type VirtualMachineScaleSetListResultIterator struct { 7990 i int 7991 page VirtualMachineScaleSetListResultPage 7992} 7993 7994// NextWithContext advances to the next value. If there was an error making 7995// the request the iterator does not advance and the error is returned. 7996func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) { 7997 if tracing.IsEnabled() { 7998 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext") 7999 defer func() { 8000 sc := -1 8001 if iter.Response().Response.Response != nil { 8002 sc = iter.Response().Response.Response.StatusCode 8003 } 8004 tracing.EndSpan(ctx, sc, err) 8005 }() 8006 } 8007 iter.i++ 8008 if iter.i < len(iter.page.Values()) { 8009 return nil 8010 } 8011 err = iter.page.NextWithContext(ctx) 8012 if err != nil { 8013 iter.i-- 8014 return err 8015 } 8016 iter.i = 0 8017 return nil 8018} 8019 8020// Next advances to the next value. If there was an error making 8021// the request the iterator does not advance and the error is returned. 8022// Deprecated: Use NextWithContext() instead. 8023func (iter *VirtualMachineScaleSetListResultIterator) Next() error { 8024 return iter.NextWithContext(context.Background()) 8025} 8026 8027// NotDone returns true if the enumeration should be started or is not yet complete. 8028func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool { 8029 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8030} 8031 8032// Response returns the raw server response from the last page request. 8033func (iter VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult { 8034 return iter.page.Response() 8035} 8036 8037// Value returns the current value or a zero-initialized value if the 8038// iterator has advanced beyond the end of the collection. 8039func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet { 8040 if !iter.page.NotDone() { 8041 return VirtualMachineScaleSet{} 8042 } 8043 return iter.page.Values()[iter.i] 8044} 8045 8046// Creates a new instance of the VirtualMachineScaleSetListResultIterator type. 8047func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator { 8048 return VirtualMachineScaleSetListResultIterator{page: page} 8049} 8050 8051// IsEmpty returns true if the ListResult contains no values. 8052func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool { 8053 return vmsslr.Value == nil || len(*vmsslr.Value) == 0 8054} 8055 8056// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results. 8057// It returns nil if no more results exist. 8058func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) { 8059 if vmsslr.NextLink == nil || len(to.String(vmsslr.NextLink)) < 1 { 8060 return nil, nil 8061 } 8062 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8063 autorest.AsJSON(), 8064 autorest.AsGet(), 8065 autorest.WithBaseURL(to.String(vmsslr.NextLink))) 8066} 8067 8068// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values. 8069type VirtualMachineScaleSetListResultPage struct { 8070 fn func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error) 8071 vmsslr VirtualMachineScaleSetListResult 8072} 8073 8074// NextWithContext advances to the next page of values. If there was an error making 8075// the request the page does not advance and the error is returned. 8076func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) { 8077 if tracing.IsEnabled() { 8078 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext") 8079 defer func() { 8080 sc := -1 8081 if page.Response().Response.Response != nil { 8082 sc = page.Response().Response.Response.StatusCode 8083 } 8084 tracing.EndSpan(ctx, sc, err) 8085 }() 8086 } 8087 next, err := page.fn(ctx, page.vmsslr) 8088 if err != nil { 8089 return err 8090 } 8091 page.vmsslr = next 8092 return nil 8093} 8094 8095// Next advances to the next page of values. If there was an error making 8096// the request the page does not advance and the error is returned. 8097// Deprecated: Use NextWithContext() instead. 8098func (page *VirtualMachineScaleSetListResultPage) Next() error { 8099 return page.NextWithContext(context.Background()) 8100} 8101 8102// NotDone returns true if the page enumeration should be started or is not yet complete. 8103func (page VirtualMachineScaleSetListResultPage) NotDone() bool { 8104 return !page.vmsslr.IsEmpty() 8105} 8106 8107// Response returns the raw server response from the last page request. 8108func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult { 8109 return page.vmsslr 8110} 8111 8112// Values returns the slice of values for the current page or nil if there are no values. 8113func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet { 8114 if page.vmsslr.IsEmpty() { 8115 return nil 8116 } 8117 return *page.vmsslr.Value 8118} 8119 8120// Creates a new instance of the VirtualMachineScaleSetListResultPage type. 8121func NewVirtualMachineScaleSetListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage { 8122 return VirtualMachineScaleSetListResultPage{fn: getNextPage} 8123} 8124 8125// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response. 8126type VirtualMachineScaleSetListSkusResult struct { 8127 autorest.Response `json:"-"` 8128 // Value - The list of skus available for the virtual machine scale set. 8129 Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"` 8130 // NextLink - 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. 8131 NextLink *string `json:"nextLink,omitempty"` 8132} 8133 8134// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of 8135// VirtualMachineScaleSetSku values. 8136type VirtualMachineScaleSetListSkusResultIterator struct { 8137 i int 8138 page VirtualMachineScaleSetListSkusResultPage 8139} 8140 8141// NextWithContext advances to the next value. If there was an error making 8142// the request the iterator does not advance and the error is returned. 8143func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) { 8144 if tracing.IsEnabled() { 8145 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext") 8146 defer func() { 8147 sc := -1 8148 if iter.Response().Response.Response != nil { 8149 sc = iter.Response().Response.Response.StatusCode 8150 } 8151 tracing.EndSpan(ctx, sc, err) 8152 }() 8153 } 8154 iter.i++ 8155 if iter.i < len(iter.page.Values()) { 8156 return nil 8157 } 8158 err = iter.page.NextWithContext(ctx) 8159 if err != nil { 8160 iter.i-- 8161 return err 8162 } 8163 iter.i = 0 8164 return nil 8165} 8166 8167// Next advances to the next value. If there was an error making 8168// the request the iterator does not advance and the error is returned. 8169// Deprecated: Use NextWithContext() instead. 8170func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error { 8171 return iter.NextWithContext(context.Background()) 8172} 8173 8174// NotDone returns true if the enumeration should be started or is not yet complete. 8175func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool { 8176 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8177} 8178 8179// Response returns the raw server response from the last page request. 8180func (iter VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult { 8181 return iter.page.Response() 8182} 8183 8184// Value returns the current value or a zero-initialized value if the 8185// iterator has advanced beyond the end of the collection. 8186func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku { 8187 if !iter.page.NotDone() { 8188 return VirtualMachineScaleSetSku{} 8189 } 8190 return iter.page.Values()[iter.i] 8191} 8192 8193// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type. 8194func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator { 8195 return VirtualMachineScaleSetListSkusResultIterator{page: page} 8196} 8197 8198// IsEmpty returns true if the ListResult contains no values. 8199func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool { 8200 return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0 8201} 8202 8203// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results. 8204// It returns nil if no more results exist. 8205func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) { 8206 if vmsslsr.NextLink == nil || len(to.String(vmsslsr.NextLink)) < 1 { 8207 return nil, nil 8208 } 8209 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8210 autorest.AsJSON(), 8211 autorest.AsGet(), 8212 autorest.WithBaseURL(to.String(vmsslsr.NextLink))) 8213} 8214 8215// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values. 8216type VirtualMachineScaleSetListSkusResultPage struct { 8217 fn func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error) 8218 vmsslsr VirtualMachineScaleSetListSkusResult 8219} 8220 8221// NextWithContext advances to the next page of values. If there was an error making 8222// the request the page does not advance and the error is returned. 8223func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) { 8224 if tracing.IsEnabled() { 8225 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext") 8226 defer func() { 8227 sc := -1 8228 if page.Response().Response.Response != nil { 8229 sc = page.Response().Response.Response.StatusCode 8230 } 8231 tracing.EndSpan(ctx, sc, err) 8232 }() 8233 } 8234 next, err := page.fn(ctx, page.vmsslsr) 8235 if err != nil { 8236 return err 8237 } 8238 page.vmsslsr = next 8239 return nil 8240} 8241 8242// Next advances to the next page of values. If there was an error making 8243// the request the page does not advance and the error is returned. 8244// Deprecated: Use NextWithContext() instead. 8245func (page *VirtualMachineScaleSetListSkusResultPage) Next() error { 8246 return page.NextWithContext(context.Background()) 8247} 8248 8249// NotDone returns true if the page enumeration should be started or is not yet complete. 8250func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool { 8251 return !page.vmsslsr.IsEmpty() 8252} 8253 8254// Response returns the raw server response from the last page request. 8255func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult { 8256 return page.vmsslsr 8257} 8258 8259// Values returns the slice of values for the current page or nil if there are no values. 8260func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku { 8261 if page.vmsslsr.IsEmpty() { 8262 return nil 8263 } 8264 return *page.vmsslsr.Value 8265} 8266 8267// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type. 8268func NewVirtualMachineScaleSetListSkusResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage { 8269 return VirtualMachineScaleSetListSkusResultPage{fn: getNextPage} 8270} 8271 8272// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response. 8273type VirtualMachineScaleSetListWithLinkResult struct { 8274 autorest.Response `json:"-"` 8275 // Value - The list of virtual machine scale sets. 8276 Value *[]VirtualMachineScaleSet `json:"value,omitempty"` 8277 // NextLink - 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. 8278 NextLink *string `json:"nextLink,omitempty"` 8279} 8280 8281// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of 8282// VirtualMachineScaleSet values. 8283type VirtualMachineScaleSetListWithLinkResultIterator struct { 8284 i int 8285 page VirtualMachineScaleSetListWithLinkResultPage 8286} 8287 8288// NextWithContext advances to the next value. If there was an error making 8289// the request the iterator does not advance and the error is returned. 8290func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) { 8291 if tracing.IsEnabled() { 8292 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext") 8293 defer func() { 8294 sc := -1 8295 if iter.Response().Response.Response != nil { 8296 sc = iter.Response().Response.Response.StatusCode 8297 } 8298 tracing.EndSpan(ctx, sc, err) 8299 }() 8300 } 8301 iter.i++ 8302 if iter.i < len(iter.page.Values()) { 8303 return nil 8304 } 8305 err = iter.page.NextWithContext(ctx) 8306 if err != nil { 8307 iter.i-- 8308 return err 8309 } 8310 iter.i = 0 8311 return nil 8312} 8313 8314// Next advances to the next value. If there was an error making 8315// the request the iterator does not advance and the error is returned. 8316// Deprecated: Use NextWithContext() instead. 8317func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error { 8318 return iter.NextWithContext(context.Background()) 8319} 8320 8321// NotDone returns true if the enumeration should be started or is not yet complete. 8322func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool { 8323 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8324} 8325 8326// Response returns the raw server response from the last page request. 8327func (iter VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult { 8328 return iter.page.Response() 8329} 8330 8331// Value returns the current value or a zero-initialized value if the 8332// iterator has advanced beyond the end of the collection. 8333func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet { 8334 if !iter.page.NotDone() { 8335 return VirtualMachineScaleSet{} 8336 } 8337 return iter.page.Values()[iter.i] 8338} 8339 8340// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type. 8341func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator { 8342 return VirtualMachineScaleSetListWithLinkResultIterator{page: page} 8343} 8344 8345// IsEmpty returns true if the ListResult contains no values. 8346func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool { 8347 return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0 8348} 8349 8350// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results. 8351// It returns nil if no more results exist. 8352func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) { 8353 if vmsslwlr.NextLink == nil || len(to.String(vmsslwlr.NextLink)) < 1 { 8354 return nil, nil 8355 } 8356 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8357 autorest.AsJSON(), 8358 autorest.AsGet(), 8359 autorest.WithBaseURL(to.String(vmsslwlr.NextLink))) 8360} 8361 8362// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values. 8363type VirtualMachineScaleSetListWithLinkResultPage struct { 8364 fn func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error) 8365 vmsslwlr VirtualMachineScaleSetListWithLinkResult 8366} 8367 8368// NextWithContext advances to the next page of values. If there was an error making 8369// the request the page does not advance and the error is returned. 8370func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) { 8371 if tracing.IsEnabled() { 8372 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext") 8373 defer func() { 8374 sc := -1 8375 if page.Response().Response.Response != nil { 8376 sc = page.Response().Response.Response.StatusCode 8377 } 8378 tracing.EndSpan(ctx, sc, err) 8379 }() 8380 } 8381 next, err := page.fn(ctx, page.vmsslwlr) 8382 if err != nil { 8383 return err 8384 } 8385 page.vmsslwlr = next 8386 return nil 8387} 8388 8389// Next advances to the next page of values. If there was an error making 8390// the request the page does not advance and the error is returned. 8391// Deprecated: Use NextWithContext() instead. 8392func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error { 8393 return page.NextWithContext(context.Background()) 8394} 8395 8396// NotDone returns true if the page enumeration should be started or is not yet complete. 8397func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool { 8398 return !page.vmsslwlr.IsEmpty() 8399} 8400 8401// Response returns the raw server response from the last page request. 8402func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult { 8403 return page.vmsslwlr 8404} 8405 8406// Values returns the slice of values for the current page or nil if there are no values. 8407func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet { 8408 if page.vmsslwlr.IsEmpty() { 8409 return nil 8410 } 8411 return *page.vmsslwlr.Value 8412} 8413 8414// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type. 8415func NewVirtualMachineScaleSetListWithLinkResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage { 8416 return VirtualMachineScaleSetListWithLinkResultPage{fn: getNextPage} 8417} 8418 8419// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk. 8420type VirtualMachineScaleSetManagedDiskParameters struct { 8421 // StorageAccountType - 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. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' 8422 StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` 8423} 8424 8425// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's 8426// network configurations. 8427type VirtualMachineScaleSetNetworkConfiguration struct { 8428 // Name - The network configuration name. 8429 Name *string `json:"name,omitempty"` 8430 *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"` 8431 // ID - Resource Id 8432 ID *string `json:"id,omitempty"` 8433} 8434 8435// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration. 8436func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) { 8437 objectMap := make(map[string]interface{}) 8438 if vmssnc.Name != nil { 8439 objectMap["name"] = vmssnc.Name 8440 } 8441 if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil { 8442 objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties 8443 } 8444 if vmssnc.ID != nil { 8445 objectMap["id"] = vmssnc.ID 8446 } 8447 return json.Marshal(objectMap) 8448} 8449 8450// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct. 8451func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error { 8452 var m map[string]*json.RawMessage 8453 err := json.Unmarshal(body, &m) 8454 if err != nil { 8455 return err 8456 } 8457 for k, v := range m { 8458 switch k { 8459 case "name": 8460 if v != nil { 8461 var name string 8462 err = json.Unmarshal(*v, &name) 8463 if err != nil { 8464 return err 8465 } 8466 vmssnc.Name = &name 8467 } 8468 case "properties": 8469 if v != nil { 8470 var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties 8471 err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties) 8472 if err != nil { 8473 return err 8474 } 8475 vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties 8476 } 8477 case "id": 8478 if v != nil { 8479 var ID string 8480 err = json.Unmarshal(*v, &ID) 8481 if err != nil { 8482 return err 8483 } 8484 vmssnc.ID = &ID 8485 } 8486 } 8487 } 8488 8489 return nil 8490} 8491 8492// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network 8493// configuration's DNS settings. 8494type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct { 8495 // DNSServers - List of DNS servers IP addresses 8496 DNSServers *[]string `json:"dnsServers,omitempty"` 8497} 8498 8499// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network 8500// profile's IP configuration. 8501type VirtualMachineScaleSetNetworkConfigurationProperties struct { 8502 // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. 8503 Primary *bool `json:"primary,omitempty"` 8504 // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled. 8505 EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` 8506 // NetworkSecurityGroup - The network security group. 8507 NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` 8508 // DNSSettings - The dns settings to be applied on the network interfaces. 8509 DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` 8510 // IPConfigurations - Specifies the IP configurations of the network interface. 8511 IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"` 8512 // EnableIPForwarding - Whether IP forwarding enabled on this NIC. 8513 EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` 8514} 8515 8516// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile. 8517type VirtualMachineScaleSetNetworkProfile struct { 8518 // HealthProbe - 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: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. 8519 HealthProbe *APIEntityReference `json:"healthProbe,omitempty"` 8520 // NetworkInterfaceConfigurations - The list of network configurations. 8521 NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` 8522} 8523 8524// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk. 8525type VirtualMachineScaleSetOSDisk struct { 8526 // Name - The disk name. 8527 Name *string `json:"name,omitempty"` 8528 // Caching - Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' 8529 Caching CachingTypes `json:"caching,omitempty"` 8530 // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. 8531 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 8532 // CreateOption - Specifies how the virtual machines in the scale set should be created.<br><br> 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 image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach' 8533 CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"` 8534 // DiffDiskSettings - Specifies the differencing Disk Settings for the operating system disk used by the virtual machine scale set. 8535 DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` 8536 // DiskSizeGB - 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. <br><br> This value cannot be larger than 1023 GB 8537 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 8538 // OsType - 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. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux' 8539 OsType OperatingSystemTypes `json:"osType,omitempty"` 8540 // Image - Specifies information about the unmanaged user image to base the scale set on. 8541 Image *VirtualHardDisk `json:"image,omitempty"` 8542 // VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set. 8543 VhdContainers *[]string `json:"vhdContainers,omitempty"` 8544 // ManagedDisk - The managed disk parameters. 8545 ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` 8546} 8547 8548// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile. 8549type VirtualMachineScaleSetOSProfile struct { 8550 // ComputerNamePrefix - 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. 8551 ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"` 8552 // AdminUsername - Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) 8553 AdminUsername *string `json:"adminUsername,omitempty"` 8554 // AdminPassword - Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) 8555 AdminPassword *string `json:"adminPassword,omitempty"` 8556 // CustomData - 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. The maximum length of the binary array is 65535 bytes. <br><br> 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/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) 8557 CustomData *string `json:"customData,omitempty"` 8558 // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. 8559 WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` 8560 // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). 8561 LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` 8562 // Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set. 8563 Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` 8564} 8565 8566// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set. 8567type VirtualMachineScaleSetProperties struct { 8568 // UpgradePolicy - The upgrade policy. 8569 UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` 8570 // VirtualMachineProfile - The virtual machine profile. 8571 VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"` 8572 // ProvisioningState - The provisioning state, which only appears in the response. 8573 ProvisioningState *string `json:"provisioningState,omitempty"` 8574 // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned. 8575 Overprovision *bool `json:"overprovision,omitempty"` 8576 // UniqueID - Specifies the ID which uniquely identifies a Virtual Machine Scale Set. 8577 UniqueID *string `json:"uniqueId,omitempty"` 8578 // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. 8579 SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` 8580 // ZoneBalance - Whether to force stictly even Virtual Machine distribution cross x-zones in case there is zone outage. 8581 ZoneBalance *bool `json:"zoneBalance,omitempty"` 8582 // PlatformFaultDomainCount - Fault Domain count for each placement group. 8583 PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` 8584} 8585 8586// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP 8587// Configuration's PublicIPAddress configuration 8588type VirtualMachineScaleSetPublicIPAddressConfiguration struct { 8589 // Name - The publicIP address configuration name. 8590 Name *string `json:"name,omitempty"` 8591 *VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"` 8592} 8593 8594// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration. 8595func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) { 8596 objectMap := make(map[string]interface{}) 8597 if vmsspiac.Name != nil { 8598 objectMap["name"] = vmsspiac.Name 8599 } 8600 if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil { 8601 objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties 8602 } 8603 return json.Marshal(objectMap) 8604} 8605 8606// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct. 8607func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(body []byte) error { 8608 var m map[string]*json.RawMessage 8609 err := json.Unmarshal(body, &m) 8610 if err != nil { 8611 return err 8612 } 8613 for k, v := range m { 8614 switch k { 8615 case "name": 8616 if v != nil { 8617 var name string 8618 err = json.Unmarshal(*v, &name) 8619 if err != nil { 8620 return err 8621 } 8622 vmsspiac.Name = &name 8623 } 8624 case "properties": 8625 if v != nil { 8626 var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties 8627 err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties) 8628 if err != nil { 8629 return err 8630 } 8631 vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties 8632 } 8633 } 8634 } 8635 8636 return nil 8637} 8638 8639// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets 8640// network configuration's DNS settings. 8641type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct { 8642 // DomainNameLabel - The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created 8643 DomainNameLabel *string `json:"domainNameLabel,omitempty"` 8644} 8645 8646// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP 8647// Configuration's PublicIPAddress configuration 8648type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct { 8649 // IdleTimeoutInMinutes - The idle timeout of the public IP address. 8650 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 8651 // DNSSettings - The dns settings to be applied on the publicIP addresses . 8652 DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` 8653 // IPTags - The list of IP tags associated with the public IP address. 8654 IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"` 8655 // PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses. 8656 PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` 8657} 8658 8659// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters. 8660type VirtualMachineScaleSetReimageParameters struct { 8661 // InstanceIds - 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 machines in the virtual machine scale set. 8662 InstanceIds *[]string `json:"instanceIds,omitempty"` 8663 // TempDisk - Specified whether to reimage temp disk. Default value: false. 8664 TempDisk *bool `json:"tempDisk,omitempty"` 8665} 8666 8667// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the 8668// results of a long-running operation. 8669type VirtualMachineScaleSetRollingUpgradesCancelFuture struct { 8670 azure.Future 8671} 8672 8673// Result returns the result of the asynchronous operation. 8674// If the operation has not completed it will return an error. 8675func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { 8676 var done bool 8677 done, err = future.Done(client) 8678 if err != nil { 8679 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure") 8680 return 8681 } 8682 if !done { 8683 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture") 8684 return 8685 } 8686 ar.Response = future.Response() 8687 return 8688} 8689 8690// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and 8691// retrieving the results of a long-running operation. 8692type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct { 8693 azure.Future 8694} 8695 8696// Result returns the result of the asynchronous operation. 8697// If the operation has not completed it will return an error. 8698func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { 8699 var done bool 8700 done, err = future.Done(client) 8701 if err != nil { 8702 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure") 8703 return 8704 } 8705 if !done { 8706 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture") 8707 return 8708 } 8709 ar.Response = future.Response() 8710 return 8711} 8712 8713// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving 8714// the results of a long-running operation. 8715type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct { 8716 azure.Future 8717} 8718 8719// Result returns the result of the asynchronous operation. 8720// If the operation has not completed it will return an error. 8721func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { 8722 var done bool 8723 done, err = future.Done(client) 8724 if err != nil { 8725 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure") 8726 return 8727 } 8728 if !done { 8729 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture") 8730 return 8731 } 8732 ar.Response = future.Response() 8733 return 8734} 8735 8736// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of 8737// a long-running operation. 8738type VirtualMachineScaleSetsCreateOrUpdateFuture struct { 8739 azure.Future 8740} 8741 8742// Result returns the result of the asynchronous operation. 8743// If the operation has not completed it will return an error. 8744func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) { 8745 var done bool 8746 done, err = future.Done(client) 8747 if err != nil { 8748 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 8749 return 8750 } 8751 if !done { 8752 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture") 8753 return 8754 } 8755 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8756 if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent { 8757 vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response) 8758 if err != nil { 8759 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request") 8760 } 8761 } 8762 return 8763} 8764 8765// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a 8766// long-running operation. 8767type VirtualMachineScaleSetsDeallocateFuture struct { 8768 azure.Future 8769} 8770 8771// Result returns the result of the asynchronous operation. 8772// If the operation has not completed it will return an error. 8773func (future *VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8774 var done bool 8775 done, err = future.Done(client) 8776 if err != nil { 8777 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure") 8778 return 8779 } 8780 if !done { 8781 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture") 8782 return 8783 } 8784 ar.Response = future.Response() 8785 return 8786} 8787 8788// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a 8789// long-running operation. 8790type VirtualMachineScaleSetsDeleteFuture struct { 8791 azure.Future 8792} 8793 8794// Result returns the result of the asynchronous operation. 8795// If the operation has not completed it will return an error. 8796func (future *VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8797 var done bool 8798 done, err = future.Done(client) 8799 if err != nil { 8800 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure") 8801 return 8802 } 8803 if !done { 8804 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture") 8805 return 8806 } 8807 ar.Response = future.Response() 8808 return 8809} 8810 8811// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of 8812// a long-running operation. 8813type VirtualMachineScaleSetsDeleteInstancesFuture struct { 8814 azure.Future 8815} 8816 8817// Result returns the result of the asynchronous operation. 8818// If the operation has not completed it will return an error. 8819func (future *VirtualMachineScaleSetsDeleteInstancesFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8820 var done bool 8821 done, err = future.Done(client) 8822 if err != nil { 8823 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure") 8824 return 8825 } 8826 if !done { 8827 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture") 8828 return 8829 } 8830 ar.Response = future.Response() 8831 return 8832} 8833 8834// VirtualMachineScaleSetSku describes an available virtual machine scale set sku. 8835type VirtualMachineScaleSetSku struct { 8836 // ResourceType - The type of resource the sku applies to. 8837 ResourceType *string `json:"resourceType,omitempty"` 8838 // Sku - The Sku. 8839 Sku *Sku `json:"sku,omitempty"` 8840 // Capacity - Specifies the number of virtual machines in the scale set. 8841 Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"` 8842} 8843 8844// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku. 8845type VirtualMachineScaleSetSkuCapacity struct { 8846 // Minimum - The minimum capacity. 8847 Minimum *int64 `json:"minimum,omitempty"` 8848 // Maximum - The maximum capacity that can be set. 8849 Maximum *int64 `json:"maximum,omitempty"` 8850 // DefaultCapacity - The default capacity. 8851 DefaultCapacity *int64 `json:"defaultCapacity,omitempty"` 8852 // ScaleType - The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone' 8853 ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"` 8854} 8855 8856// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results 8857// of a long-running operation. 8858type VirtualMachineScaleSetsPerformMaintenanceFuture struct { 8859 azure.Future 8860} 8861 8862// Result returns the result of the asynchronous operation. 8863// If the operation has not completed it will return an error. 8864func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8865 var done bool 8866 done, err = future.Done(client) 8867 if err != nil { 8868 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") 8869 return 8870 } 8871 if !done { 8872 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture") 8873 return 8874 } 8875 ar.Response = future.Response() 8876 return 8877} 8878 8879// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a 8880// long-running operation. 8881type VirtualMachineScaleSetsPowerOffFuture struct { 8882 azure.Future 8883} 8884 8885// Result returns the result of the asynchronous operation. 8886// If the operation has not completed it will return an error. 8887func (future *VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8888 var done bool 8889 done, err = future.Done(client) 8890 if err != nil { 8891 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure") 8892 return 8893 } 8894 if !done { 8895 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture") 8896 return 8897 } 8898 ar.Response = future.Response() 8899 return 8900} 8901 8902// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a 8903// long-running operation. 8904type VirtualMachineScaleSetsRedeployFuture struct { 8905 azure.Future 8906} 8907 8908// Result returns the result of the asynchronous operation. 8909// If the operation has not completed it will return an error. 8910func (future *VirtualMachineScaleSetsRedeployFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8911 var done bool 8912 done, err = future.Done(client) 8913 if err != nil { 8914 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure") 8915 return 8916 } 8917 if !done { 8918 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture") 8919 return 8920 } 8921 ar.Response = future.Response() 8922 return 8923} 8924 8925// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a 8926// long-running operation. 8927type VirtualMachineScaleSetsReimageAllFuture struct { 8928 azure.Future 8929} 8930 8931// Result returns the result of the asynchronous operation. 8932// If the operation has not completed it will return an error. 8933func (future *VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8934 var done bool 8935 done, err = future.Done(client) 8936 if err != nil { 8937 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure") 8938 return 8939 } 8940 if !done { 8941 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture") 8942 return 8943 } 8944 ar.Response = future.Response() 8945 return 8946} 8947 8948// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a 8949// long-running operation. 8950type VirtualMachineScaleSetsReimageFuture struct { 8951 azure.Future 8952} 8953 8954// Result returns the result of the asynchronous operation. 8955// If the operation has not completed it will return an error. 8956func (future *VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8957 var done bool 8958 done, err = future.Done(client) 8959 if err != nil { 8960 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure") 8961 return 8962 } 8963 if !done { 8964 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture") 8965 return 8966 } 8967 ar.Response = future.Response() 8968 return 8969} 8970 8971// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a 8972// long-running operation. 8973type VirtualMachineScaleSetsRestartFuture struct { 8974 azure.Future 8975} 8976 8977// Result returns the result of the asynchronous operation. 8978// If the operation has not completed it will return an error. 8979func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 8980 var done bool 8981 done, err = future.Done(client) 8982 if err != nil { 8983 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure") 8984 return 8985 } 8986 if !done { 8987 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture") 8988 return 8989 } 8990 ar.Response = future.Response() 8991 return 8992} 8993 8994// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a 8995// long-running operation. 8996type VirtualMachineScaleSetsStartFuture struct { 8997 azure.Future 8998} 8999 9000// Result returns the result of the asynchronous operation. 9001// If the operation has not completed it will return an error. 9002func (future *VirtualMachineScaleSetsStartFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 9003 var done bool 9004 done, err = future.Done(client) 9005 if err != nil { 9006 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure") 9007 return 9008 } 9009 if !done { 9010 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture") 9011 return 9012 } 9013 ar.Response = future.Response() 9014 return 9015} 9016 9017// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile. 9018type VirtualMachineScaleSetStorageProfile struct { 9019 // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. 9020 ImageReference *ImageReference `json:"imageReference,omitempty"` 9021 // OsDisk - Specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). 9022 OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"` 9023 // DataDisks - Specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). 9024 DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` 9025} 9026 9027// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a 9028// long-running operation. 9029type VirtualMachineScaleSetsUpdateFuture struct { 9030 azure.Future 9031} 9032 9033// Result returns the result of the asynchronous operation. 9034// If the operation has not completed it will return an error. 9035func (future *VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) { 9036 var done bool 9037 done, err = future.Done(client) 9038 if err != nil { 9039 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure") 9040 return 9041 } 9042 if !done { 9043 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture") 9044 return 9045 } 9046 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9047 if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent { 9048 vmss, err = client.UpdateResponder(vmss.Response.Response) 9049 if err != nil { 9050 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request") 9051 } 9052 } 9053 return 9054} 9055 9056// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of 9057// a long-running operation. 9058type VirtualMachineScaleSetsUpdateInstancesFuture struct { 9059 azure.Future 9060} 9061 9062// Result returns the result of the asynchronous operation. 9063// If the operation has not completed it will return an error. 9064func (future *VirtualMachineScaleSetsUpdateInstancesFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { 9065 var done bool 9066 done, err = future.Done(client) 9067 if err != nil { 9068 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure") 9069 return 9070 } 9071 if !done { 9072 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture") 9073 return 9074 } 9075 ar.Response = future.Response() 9076 return 9077} 9078 9079// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set. 9080type VirtualMachineScaleSetUpdate struct { 9081 // Sku - The virtual machine scale set sku. 9082 Sku *Sku `json:"sku,omitempty"` 9083 // Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images. 9084 Plan *Plan `json:"plan,omitempty"` 9085 *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"` 9086 // Identity - The identity of the virtual machine scale set, if configured. 9087 Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` 9088 // Tags - Resource tags 9089 Tags map[string]*string `json:"tags"` 9090} 9091 9092// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate. 9093func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) { 9094 objectMap := make(map[string]interface{}) 9095 if vmssu.Sku != nil { 9096 objectMap["sku"] = vmssu.Sku 9097 } 9098 if vmssu.Plan != nil { 9099 objectMap["plan"] = vmssu.Plan 9100 } 9101 if vmssu.VirtualMachineScaleSetUpdateProperties != nil { 9102 objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties 9103 } 9104 if vmssu.Identity != nil { 9105 objectMap["identity"] = vmssu.Identity 9106 } 9107 if vmssu.Tags != nil { 9108 objectMap["tags"] = vmssu.Tags 9109 } 9110 return json.Marshal(objectMap) 9111} 9112 9113// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct. 9114func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error { 9115 var m map[string]*json.RawMessage 9116 err := json.Unmarshal(body, &m) 9117 if err != nil { 9118 return err 9119 } 9120 for k, v := range m { 9121 switch k { 9122 case "sku": 9123 if v != nil { 9124 var sku Sku 9125 err = json.Unmarshal(*v, &sku) 9126 if err != nil { 9127 return err 9128 } 9129 vmssu.Sku = &sku 9130 } 9131 case "plan": 9132 if v != nil { 9133 var plan Plan 9134 err = json.Unmarshal(*v, &plan) 9135 if err != nil { 9136 return err 9137 } 9138 vmssu.Plan = &plan 9139 } 9140 case "properties": 9141 if v != nil { 9142 var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties 9143 err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties) 9144 if err != nil { 9145 return err 9146 } 9147 vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties 9148 } 9149 case "identity": 9150 if v != nil { 9151 var identity VirtualMachineScaleSetIdentity 9152 err = json.Unmarshal(*v, &identity) 9153 if err != nil { 9154 return err 9155 } 9156 vmssu.Identity = &identity 9157 } 9158 case "tags": 9159 if v != nil { 9160 var tags map[string]*string 9161 err = json.Unmarshal(*v, &tags) 9162 if err != nil { 9163 return err 9164 } 9165 vmssu.Tags = tags 9166 } 9167 } 9168 } 9169 9170 return nil 9171} 9172 9173// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP 9174// configuration. 9175type VirtualMachineScaleSetUpdateIPConfiguration struct { 9176 // Name - The IP configuration name. 9177 Name *string `json:"name,omitempty"` 9178 *VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"` 9179 // ID - Resource Id 9180 ID *string `json:"id,omitempty"` 9181} 9182 9183// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration. 9184func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) { 9185 objectMap := make(map[string]interface{}) 9186 if vmssuic.Name != nil { 9187 objectMap["name"] = vmssuic.Name 9188 } 9189 if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil { 9190 objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties 9191 } 9192 if vmssuic.ID != nil { 9193 objectMap["id"] = vmssuic.ID 9194 } 9195 return json.Marshal(objectMap) 9196} 9197 9198// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct. 9199func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error { 9200 var m map[string]*json.RawMessage 9201 err := json.Unmarshal(body, &m) 9202 if err != nil { 9203 return err 9204 } 9205 for k, v := range m { 9206 switch k { 9207 case "name": 9208 if v != nil { 9209 var name string 9210 err = json.Unmarshal(*v, &name) 9211 if err != nil { 9212 return err 9213 } 9214 vmssuic.Name = &name 9215 } 9216 case "properties": 9217 if v != nil { 9218 var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties 9219 err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties) 9220 if err != nil { 9221 return err 9222 } 9223 vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties 9224 } 9225 case "id": 9226 if v != nil { 9227 var ID string 9228 err = json.Unmarshal(*v, &ID) 9229 if err != nil { 9230 return err 9231 } 9232 vmssuic.ID = &ID 9233 } 9234 } 9235 } 9236 9237 return nil 9238} 9239 9240// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network 9241// profile's IP configuration properties. 9242type VirtualMachineScaleSetUpdateIPConfigurationProperties struct { 9243 // Subnet - The subnet. 9244 Subnet *APIEntityReference `json:"subnet,omitempty"` 9245 // Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. 9246 Primary *bool `json:"primary,omitempty"` 9247 // PublicIPAddressConfiguration - The publicIPAddressConfiguration. 9248 PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` 9249 // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' 9250 PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` 9251 // ApplicationGatewayBackendAddressPools - The application gateway backend address pools. 9252 ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` 9253 // ApplicationSecurityGroups - Specifies an array of references to application security group. 9254 ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"` 9255 // LoadBalancerBackendAddressPools - The load balancer backend address pools. 9256 LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` 9257 // LoadBalancerInboundNatPools - The load balancer inbound nat pools. 9258 LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` 9259} 9260 9261// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's 9262// network configurations. 9263type VirtualMachineScaleSetUpdateNetworkConfiguration struct { 9264 // Name - The network configuration name. 9265 Name *string `json:"name,omitempty"` 9266 *VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"` 9267 // ID - Resource Id 9268 ID *string `json:"id,omitempty"` 9269} 9270 9271// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration. 9272func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) { 9273 objectMap := make(map[string]interface{}) 9274 if vmssunc.Name != nil { 9275 objectMap["name"] = vmssunc.Name 9276 } 9277 if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil { 9278 objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties 9279 } 9280 if vmssunc.ID != nil { 9281 objectMap["id"] = vmssunc.ID 9282 } 9283 return json.Marshal(objectMap) 9284} 9285 9286// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct. 9287func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error { 9288 var m map[string]*json.RawMessage 9289 err := json.Unmarshal(body, &m) 9290 if err != nil { 9291 return err 9292 } 9293 for k, v := range m { 9294 switch k { 9295 case "name": 9296 if v != nil { 9297 var name string 9298 err = json.Unmarshal(*v, &name) 9299 if err != nil { 9300 return err 9301 } 9302 vmssunc.Name = &name 9303 } 9304 case "properties": 9305 if v != nil { 9306 var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties 9307 err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties) 9308 if err != nil { 9309 return err 9310 } 9311 vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties 9312 } 9313 case "id": 9314 if v != nil { 9315 var ID string 9316 err = json.Unmarshal(*v, &ID) 9317 if err != nil { 9318 return err 9319 } 9320 vmssunc.ID = &ID 9321 } 9322 } 9323 } 9324 9325 return nil 9326} 9327 9328// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set 9329// updatable network profile's IP configuration.Use this object for updating network profile's IP 9330// Configuration. 9331type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct { 9332 // Primary - Whether this is a primary NIC on a virtual machine. 9333 Primary *bool `json:"primary,omitempty"` 9334 // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled. 9335 EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` 9336 // NetworkSecurityGroup - The network security group. 9337 NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` 9338 // DNSSettings - The dns settings to be applied on the network interfaces. 9339 DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` 9340 // IPConfigurations - The virtual machine scale set IP Configuration. 9341 IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"` 9342 // EnableIPForwarding - Whether IP forwarding enabled on this NIC. 9343 EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` 9344} 9345 9346// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile. 9347type VirtualMachineScaleSetUpdateNetworkProfile struct { 9348 // NetworkInterfaceConfigurations - The list of network configurations. 9349 NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` 9350} 9351 9352// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update 9353// Object. This should be used for Updating VMSS OS Disk. 9354type VirtualMachineScaleSetUpdateOSDisk struct { 9355 // Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' 9356 Caching CachingTypes `json:"caching,omitempty"` 9357 // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. 9358 WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` 9359 // DiskSizeGB - 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. <br><br> This value cannot be larger than 1023 GB 9360 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 9361 // Image - The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. 9362 Image *VirtualHardDisk `json:"image,omitempty"` 9363 // VhdContainers - The list of virtual hard disk container uris. 9364 VhdContainers *[]string `json:"vhdContainers,omitempty"` 9365 // ManagedDisk - The managed disk parameters. 9366 ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` 9367} 9368 9369// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile. 9370type VirtualMachineScaleSetUpdateOSProfile struct { 9371 // CustomData - A base-64 encoded string of custom data. 9372 CustomData *string `json:"customData,omitempty"` 9373 // WindowsConfiguration - The Windows Configuration of the OS profile. 9374 WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` 9375 // LinuxConfiguration - The Linux Configuration of the OS profile. 9376 LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` 9377 // Secrets - The List of certificates for addition to the VM. 9378 Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` 9379} 9380 9381// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set. 9382type VirtualMachineScaleSetUpdateProperties struct { 9383 // UpgradePolicy - The upgrade policy. 9384 UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` 9385 // VirtualMachineProfile - The virtual machine profile. 9386 VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"` 9387 // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned. 9388 Overprovision *bool `json:"overprovision,omitempty"` 9389 // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. 9390 SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` 9391} 9392 9393// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP 9394// Configuration's PublicIPAddress configuration 9395type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct { 9396 // Name - The publicIP address configuration name. 9397 Name *string `json:"name,omitempty"` 9398 *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"` 9399} 9400 9401// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration. 9402func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) { 9403 objectMap := make(map[string]interface{}) 9404 if vmssupiac.Name != nil { 9405 objectMap["name"] = vmssupiac.Name 9406 } 9407 if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil { 9408 objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties 9409 } 9410 return json.Marshal(objectMap) 9411} 9412 9413// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct. 9414func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error { 9415 var m map[string]*json.RawMessage 9416 err := json.Unmarshal(body, &m) 9417 if err != nil { 9418 return err 9419 } 9420 for k, v := range m { 9421 switch k { 9422 case "name": 9423 if v != nil { 9424 var name string 9425 err = json.Unmarshal(*v, &name) 9426 if err != nil { 9427 return err 9428 } 9429 vmssupiac.Name = &name 9430 } 9431 case "properties": 9432 if v != nil { 9433 var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties 9434 err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties) 9435 if err != nil { 9436 return err 9437 } 9438 vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties 9439 } 9440 } 9441 } 9442 9443 return nil 9444} 9445 9446// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale 9447// set IP Configuration's PublicIPAddress configuration 9448type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct { 9449 // IdleTimeoutInMinutes - The idle timeout of the public IP address. 9450 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 9451 // DNSSettings - The dns settings to be applied on the publicIP addresses . 9452 DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` 9453} 9454 9455// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile. 9456type VirtualMachineScaleSetUpdateStorageProfile struct { 9457 // ImageReference - The image reference. 9458 ImageReference *ImageReference `json:"imageReference,omitempty"` 9459 // OsDisk - The OS disk. 9460 OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"` 9461 // DataDisks - The data disks. 9462 DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` 9463} 9464 9465// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile. 9466type VirtualMachineScaleSetUpdateVMProfile struct { 9467 // OsProfile - The virtual machine scale set OS profile. 9468 OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"` 9469 // StorageProfile - The virtual machine scale set storage profile. 9470 StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"` 9471 // NetworkProfile - The virtual machine scale set network profile. 9472 NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"` 9473 // DiagnosticsProfile - The virtual machine scale set diagnostics profile. 9474 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 9475 // ExtensionProfile - The virtual machine scale set extension profile. 9476 ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` 9477 // LicenseType - The license type, which is for bring your own license scenario. 9478 LicenseType *string `json:"licenseType,omitempty"` 9479} 9480 9481// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine. 9482type VirtualMachineScaleSetVM struct { 9483 autorest.Response `json:"-"` 9484 // InstanceID - The virtual machine instance ID. 9485 InstanceID *string `json:"instanceId,omitempty"` 9486 // Sku - The virtual machine SKU. 9487 Sku *Sku `json:"sku,omitempty"` 9488 *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"` 9489 // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must 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, Get Started ->**. Enter any required information and then click **Save**. 9490 Plan *Plan `json:"plan,omitempty"` 9491 // Resources - The virtual machine child extension resources. 9492 Resources *[]VirtualMachineExtension `json:"resources,omitempty"` 9493 // Zones - The virtual machine zones. 9494 Zones *[]string `json:"zones,omitempty"` 9495 // ID - Resource Id 9496 ID *string `json:"id,omitempty"` 9497 // Name - Resource name 9498 Name *string `json:"name,omitempty"` 9499 // Type - Resource type 9500 Type *string `json:"type,omitempty"` 9501 // Location - Resource location 9502 Location *string `json:"location,omitempty"` 9503 // Tags - Resource tags 9504 Tags map[string]*string `json:"tags"` 9505} 9506 9507// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM. 9508func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) { 9509 objectMap := make(map[string]interface{}) 9510 if vmssv.InstanceID != nil { 9511 objectMap["instanceId"] = vmssv.InstanceID 9512 } 9513 if vmssv.Sku != nil { 9514 objectMap["sku"] = vmssv.Sku 9515 } 9516 if vmssv.VirtualMachineScaleSetVMProperties != nil { 9517 objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties 9518 } 9519 if vmssv.Plan != nil { 9520 objectMap["plan"] = vmssv.Plan 9521 } 9522 if vmssv.Resources != nil { 9523 objectMap["resources"] = vmssv.Resources 9524 } 9525 if vmssv.Zones != nil { 9526 objectMap["zones"] = vmssv.Zones 9527 } 9528 if vmssv.ID != nil { 9529 objectMap["id"] = vmssv.ID 9530 } 9531 if vmssv.Name != nil { 9532 objectMap["name"] = vmssv.Name 9533 } 9534 if vmssv.Type != nil { 9535 objectMap["type"] = vmssv.Type 9536 } 9537 if vmssv.Location != nil { 9538 objectMap["location"] = vmssv.Location 9539 } 9540 if vmssv.Tags != nil { 9541 objectMap["tags"] = vmssv.Tags 9542 } 9543 return json.Marshal(objectMap) 9544} 9545 9546// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct. 9547func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error { 9548 var m map[string]*json.RawMessage 9549 err := json.Unmarshal(body, &m) 9550 if err != nil { 9551 return err 9552 } 9553 for k, v := range m { 9554 switch k { 9555 case "instanceId": 9556 if v != nil { 9557 var instanceID string 9558 err = json.Unmarshal(*v, &instanceID) 9559 if err != nil { 9560 return err 9561 } 9562 vmssv.InstanceID = &instanceID 9563 } 9564 case "sku": 9565 if v != nil { 9566 var sku Sku 9567 err = json.Unmarshal(*v, &sku) 9568 if err != nil { 9569 return err 9570 } 9571 vmssv.Sku = &sku 9572 } 9573 case "properties": 9574 if v != nil { 9575 var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties 9576 err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties) 9577 if err != nil { 9578 return err 9579 } 9580 vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties 9581 } 9582 case "plan": 9583 if v != nil { 9584 var plan Plan 9585 err = json.Unmarshal(*v, &plan) 9586 if err != nil { 9587 return err 9588 } 9589 vmssv.Plan = &plan 9590 } 9591 case "resources": 9592 if v != nil { 9593 var resources []VirtualMachineExtension 9594 err = json.Unmarshal(*v, &resources) 9595 if err != nil { 9596 return err 9597 } 9598 vmssv.Resources = &resources 9599 } 9600 case "zones": 9601 if v != nil { 9602 var zones []string 9603 err = json.Unmarshal(*v, &zones) 9604 if err != nil { 9605 return err 9606 } 9607 vmssv.Zones = &zones 9608 } 9609 case "id": 9610 if v != nil { 9611 var ID string 9612 err = json.Unmarshal(*v, &ID) 9613 if err != nil { 9614 return err 9615 } 9616 vmssv.ID = &ID 9617 } 9618 case "name": 9619 if v != nil { 9620 var name string 9621 err = json.Unmarshal(*v, &name) 9622 if err != nil { 9623 return err 9624 } 9625 vmssv.Name = &name 9626 } 9627 case "type": 9628 if v != nil { 9629 var typeVar string 9630 err = json.Unmarshal(*v, &typeVar) 9631 if err != nil { 9632 return err 9633 } 9634 vmssv.Type = &typeVar 9635 } 9636 case "location": 9637 if v != nil { 9638 var location string 9639 err = json.Unmarshal(*v, &location) 9640 if err != nil { 9641 return err 9642 } 9643 vmssv.Location = &location 9644 } 9645 case "tags": 9646 if v != nil { 9647 var tags map[string]*string 9648 err = json.Unmarshal(*v, &tags) 9649 if err != nil { 9650 return err 9651 } 9652 vmssv.Tags = tags 9653 } 9654 } 9655 } 9656 9657 return nil 9658} 9659 9660// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine 9661// scale set. 9662type VirtualMachineScaleSetVMExtensionsSummary struct { 9663 // Name - The extension name. 9664 Name *string `json:"name,omitempty"` 9665 // StatusesSummary - The extensions information. 9666 StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` 9667} 9668 9669// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale 9670// set. 9671type VirtualMachineScaleSetVMInstanceIDs struct { 9672 // InstanceIds - 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 machines in the virtual machine scale set. 9673 InstanceIds *[]string `json:"instanceIds,omitempty"` 9674} 9675 9676// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM 9677// scale set. 9678type VirtualMachineScaleSetVMInstanceRequiredIDs struct { 9679 // InstanceIds - The virtual machine scale set instance ids. 9680 InstanceIds *[]string `json:"instanceIds,omitempty"` 9681} 9682 9683// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM. 9684type VirtualMachineScaleSetVMInstanceView struct { 9685 autorest.Response `json:"-"` 9686 // PlatformUpdateDomain - The Update Domain count. 9687 PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` 9688 // PlatformFaultDomain - The Fault Domain count. 9689 PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` 9690 // RdpThumbPrint - The Remote desktop certificate thumbprint. 9691 RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` 9692 // VMAgent - The VM Agent running on the virtual machine. 9693 VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` 9694 // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine. 9695 MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` 9696 // Disks - The disks information. 9697 Disks *[]DiskInstanceView `json:"disks,omitempty"` 9698 // Extensions - The extensions information. 9699 Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` 9700 // VMHealth - The health status for the VM. 9701 VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"` 9702 // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. 9703 BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` 9704 // Statuses - The resource status information. 9705 Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` 9706 // PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. 9707 PlacementGroupID *string `json:"placementGroupId,omitempty"` 9708} 9709 9710// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response. 9711type VirtualMachineScaleSetVMListResult struct { 9712 autorest.Response `json:"-"` 9713 // Value - The list of virtual machine scale sets VMs. 9714 Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"` 9715 // NextLink - 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 9716 NextLink *string `json:"nextLink,omitempty"` 9717} 9718 9719// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of 9720// VirtualMachineScaleSetVM values. 9721type VirtualMachineScaleSetVMListResultIterator struct { 9722 i int 9723 page VirtualMachineScaleSetVMListResultPage 9724} 9725 9726// NextWithContext advances to the next value. If there was an error making 9727// the request the iterator does not advance and the error is returned. 9728func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) { 9729 if tracing.IsEnabled() { 9730 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext") 9731 defer func() { 9732 sc := -1 9733 if iter.Response().Response.Response != nil { 9734 sc = iter.Response().Response.Response.StatusCode 9735 } 9736 tracing.EndSpan(ctx, sc, err) 9737 }() 9738 } 9739 iter.i++ 9740 if iter.i < len(iter.page.Values()) { 9741 return nil 9742 } 9743 err = iter.page.NextWithContext(ctx) 9744 if err != nil { 9745 iter.i-- 9746 return err 9747 } 9748 iter.i = 0 9749 return nil 9750} 9751 9752// Next advances to the next value. If there was an error making 9753// the request the iterator does not advance and the error is returned. 9754// Deprecated: Use NextWithContext() instead. 9755func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error { 9756 return iter.NextWithContext(context.Background()) 9757} 9758 9759// NotDone returns true if the enumeration should be started or is not yet complete. 9760func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool { 9761 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9762} 9763 9764// Response returns the raw server response from the last page request. 9765func (iter VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult { 9766 return iter.page.Response() 9767} 9768 9769// Value returns the current value or a zero-initialized value if the 9770// iterator has advanced beyond the end of the collection. 9771func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM { 9772 if !iter.page.NotDone() { 9773 return VirtualMachineScaleSetVM{} 9774 } 9775 return iter.page.Values()[iter.i] 9776} 9777 9778// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type. 9779func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator { 9780 return VirtualMachineScaleSetVMListResultIterator{page: page} 9781} 9782 9783// IsEmpty returns true if the ListResult contains no values. 9784func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool { 9785 return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0 9786} 9787 9788// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results. 9789// It returns nil if no more results exist. 9790func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) { 9791 if vmssvlr.NextLink == nil || len(to.String(vmssvlr.NextLink)) < 1 { 9792 return nil, nil 9793 } 9794 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9795 autorest.AsJSON(), 9796 autorest.AsGet(), 9797 autorest.WithBaseURL(to.String(vmssvlr.NextLink))) 9798} 9799 9800// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values. 9801type VirtualMachineScaleSetVMListResultPage struct { 9802 fn func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error) 9803 vmssvlr VirtualMachineScaleSetVMListResult 9804} 9805 9806// NextWithContext advances to the next page of values. If there was an error making 9807// the request the page does not advance and the error is returned. 9808func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) { 9809 if tracing.IsEnabled() { 9810 ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext") 9811 defer func() { 9812 sc := -1 9813 if page.Response().Response.Response != nil { 9814 sc = page.Response().Response.Response.StatusCode 9815 } 9816 tracing.EndSpan(ctx, sc, err) 9817 }() 9818 } 9819 next, err := page.fn(ctx, page.vmssvlr) 9820 if err != nil { 9821 return err 9822 } 9823 page.vmssvlr = next 9824 return nil 9825} 9826 9827// Next advances to the next page of values. If there was an error making 9828// the request the page does not advance and the error is returned. 9829// Deprecated: Use NextWithContext() instead. 9830func (page *VirtualMachineScaleSetVMListResultPage) Next() error { 9831 return page.NextWithContext(context.Background()) 9832} 9833 9834// NotDone returns true if the page enumeration should be started or is not yet complete. 9835func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool { 9836 return !page.vmssvlr.IsEmpty() 9837} 9838 9839// Response returns the raw server response from the last page request. 9840func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult { 9841 return page.vmssvlr 9842} 9843 9844// Values returns the slice of values for the current page or nil if there are no values. 9845func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM { 9846 if page.vmssvlr.IsEmpty() { 9847 return nil 9848 } 9849 return *page.vmssvlr.Value 9850} 9851 9852// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type. 9853func NewVirtualMachineScaleSetVMListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage { 9854 return VirtualMachineScaleSetVMListResultPage{fn: getNextPage} 9855} 9856 9857// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile. 9858type VirtualMachineScaleSetVMProfile struct { 9859 // OsProfile - Specifies the operating system settings for the virtual machines in the scale set. 9860 OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"` 9861 // StorageProfile - Specifies the storage settings for the virtual machine disks. 9862 StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"` 9863 // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. 9864 AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` 9865 // NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set. 9866 NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"` 9867 // DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. 9868 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 9869 // ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set. 9870 ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` 9871 // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15 9872 LicenseType *string `json:"licenseType,omitempty"` 9873 // Priority - Specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' 9874 Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` 9875 // EvictionPolicy - Specifies the eviction policy for virtual machines in a low priority scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' 9876 EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` 9877} 9878 9879// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual 9880// machine. 9881type VirtualMachineScaleSetVMProperties struct { 9882 // LatestModelApplied - Specifies whether the latest model has been applied to the virtual machine. 9883 LatestModelApplied *bool `json:"latestModelApplied,omitempty"` 9884 // VMID - Azure VM unique ID. 9885 VMID *string `json:"vmId,omitempty"` 9886 // InstanceView - The virtual machine instance view. 9887 InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"` 9888 // HardwareProfile - Specifies the hardware settings for the virtual machine. 9889 HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` 9890 // StorageProfile - Specifies the storage settings for the virtual machine disks. 9891 StorageProfile *StorageProfile `json:"storageProfile,omitempty"` 9892 // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. 9893 AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` 9894 // OsProfile - Specifies the operating system settings for the virtual machine. 9895 OsProfile *OSProfile `json:"osProfile,omitempty"` 9896 // NetworkProfile - Specifies the network interfaces of the virtual machine. 9897 NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` 9898 // DiagnosticsProfile - Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. 9899 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 9900 // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. 9901 AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` 9902 // ProvisioningState - The provisioning state, which only appears in the response. 9903 ProvisioningState *string `json:"provisioningState,omitempty"` 9904 // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15 9905 LicenseType *string `json:"licenseType,omitempty"` 9906} 9907 9908// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters. 9909type VirtualMachineScaleSetVMReimageParameters struct { 9910 // TempDisk - Specified whether to reimage temp disk. Default value: false. 9911 TempDisk *bool `json:"tempDisk,omitempty"` 9912} 9913 9914// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a 9915// long-running operation. 9916type VirtualMachineScaleSetVMsDeallocateFuture struct { 9917 azure.Future 9918} 9919 9920// Result returns the result of the asynchronous operation. 9921// If the operation has not completed it will return an error. 9922func (future *VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 9923 var done bool 9924 done, err = future.Done(client) 9925 if err != nil { 9926 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure") 9927 return 9928 } 9929 if !done { 9930 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture") 9931 return 9932 } 9933 ar.Response = future.Response() 9934 return 9935} 9936 9937// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a 9938// long-running operation. 9939type VirtualMachineScaleSetVMsDeleteFuture struct { 9940 azure.Future 9941} 9942 9943// Result returns the result of the asynchronous operation. 9944// If the operation has not completed it will return an error. 9945func (future *VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 9946 var done bool 9947 done, err = future.Done(client) 9948 if err != nil { 9949 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure") 9950 return 9951 } 9952 if !done { 9953 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture") 9954 return 9955 } 9956 ar.Response = future.Response() 9957 return 9958} 9959 9960// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the 9961// results of a long-running operation. 9962type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct { 9963 azure.Future 9964} 9965 9966// Result returns the result of the asynchronous operation. 9967// If the operation has not completed it will return an error. 9968func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 9969 var done bool 9970 done, err = future.Done(client) 9971 if err != nil { 9972 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") 9973 return 9974 } 9975 if !done { 9976 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture") 9977 return 9978 } 9979 ar.Response = future.Response() 9980 return 9981} 9982 9983// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a 9984// long-running operation. 9985type VirtualMachineScaleSetVMsPowerOffFuture struct { 9986 azure.Future 9987} 9988 9989// Result returns the result of the asynchronous operation. 9990// If the operation has not completed it will return an error. 9991func (future *VirtualMachineScaleSetVMsPowerOffFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 9992 var done bool 9993 done, err = future.Done(client) 9994 if err != nil { 9995 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure") 9996 return 9997 } 9998 if !done { 9999 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture") 10000 return 10001 } 10002 ar.Response = future.Response() 10003 return 10004} 10005 10006// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a 10007// long-running operation. 10008type VirtualMachineScaleSetVMsRedeployFuture struct { 10009 azure.Future 10010} 10011 10012// Result returns the result of the asynchronous operation. 10013// If the operation has not completed it will return an error. 10014func (future *VirtualMachineScaleSetVMsRedeployFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 10015 var done bool 10016 done, err = future.Done(client) 10017 if err != nil { 10018 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure") 10019 return 10020 } 10021 if !done { 10022 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture") 10023 return 10024 } 10025 ar.Response = future.Response() 10026 return 10027} 10028 10029// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a 10030// long-running operation. 10031type VirtualMachineScaleSetVMsReimageAllFuture struct { 10032 azure.Future 10033} 10034 10035// Result returns the result of the asynchronous operation. 10036// If the operation has not completed it will return an error. 10037func (future *VirtualMachineScaleSetVMsReimageAllFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 10038 var done bool 10039 done, err = future.Done(client) 10040 if err != nil { 10041 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure") 10042 return 10043 } 10044 if !done { 10045 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture") 10046 return 10047 } 10048 ar.Response = future.Response() 10049 return 10050} 10051 10052// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a 10053// long-running operation. 10054type VirtualMachineScaleSetVMsReimageFuture struct { 10055 azure.Future 10056} 10057 10058// Result returns the result of the asynchronous operation. 10059// If the operation has not completed it will return an error. 10060func (future *VirtualMachineScaleSetVMsReimageFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 10061 var done bool 10062 done, err = future.Done(client) 10063 if err != nil { 10064 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure") 10065 return 10066 } 10067 if !done { 10068 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture") 10069 return 10070 } 10071 ar.Response = future.Response() 10072 return 10073} 10074 10075// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a 10076// long-running operation. 10077type VirtualMachineScaleSetVMsRestartFuture struct { 10078 azure.Future 10079} 10080 10081// Result returns the result of the asynchronous operation. 10082// If the operation has not completed it will return an error. 10083func (future *VirtualMachineScaleSetVMsRestartFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 10084 var done bool 10085 done, err = future.Done(client) 10086 if err != nil { 10087 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure") 10088 return 10089 } 10090 if !done { 10091 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture") 10092 return 10093 } 10094 ar.Response = future.Response() 10095 return 10096} 10097 10098// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a 10099// long-running operation. 10100type VirtualMachineScaleSetVMsRunCommandFuture struct { 10101 azure.Future 10102} 10103 10104// Result returns the result of the asynchronous operation. 10105// If the operation has not completed it will return an error. 10106func (future *VirtualMachineScaleSetVMsRunCommandFuture) Result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) { 10107 var done bool 10108 done, err = future.Done(client) 10109 if err != nil { 10110 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure") 10111 return 10112 } 10113 if !done { 10114 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture") 10115 return 10116 } 10117 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10118 if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent { 10119 rcr, err = client.RunCommandResponder(rcr.Response.Response) 10120 if err != nil { 10121 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request") 10122 } 10123 } 10124 return 10125} 10126 10127// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a 10128// long-running operation. 10129type VirtualMachineScaleSetVMsStartFuture struct { 10130 azure.Future 10131} 10132 10133// Result returns the result of the asynchronous operation. 10134// If the operation has not completed it will return an error. 10135func (future *VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { 10136 var done bool 10137 done, err = future.Done(client) 10138 if err != nil { 10139 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure") 10140 return 10141 } 10142 if !done { 10143 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture") 10144 return 10145 } 10146 ar.Response = future.Response() 10147 return 10148} 10149 10150// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a 10151// long-running operation. 10152type VirtualMachineScaleSetVMsUpdateFuture struct { 10153 azure.Future 10154} 10155 10156// Result returns the result of the asynchronous operation. 10157// If the operation has not completed it will return an error. 10158func (future *VirtualMachineScaleSetVMsUpdateFuture) Result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) { 10159 var done bool 10160 done, err = future.Done(client) 10161 if err != nil { 10162 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure") 10163 return 10164 } 10165 if !done { 10166 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture") 10167 return 10168 } 10169 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10170 if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent { 10171 vmssv, err = client.UpdateResponder(vmssv.Response.Response) 10172 if err != nil { 10173 err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request") 10174 } 10175 } 10176 return 10177} 10178 10179// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running 10180// operation. 10181type VirtualMachinesCaptureFuture struct { 10182 azure.Future 10183} 10184 10185// Result returns the result of the asynchronous operation. 10186// If the operation has not completed it will return an error. 10187func (future *VirtualMachinesCaptureFuture) Result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) { 10188 var done bool 10189 done, err = future.Done(client) 10190 if err != nil { 10191 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure") 10192 return 10193 } 10194 if !done { 10195 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture") 10196 return 10197 } 10198 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10199 if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent { 10200 vmcr, err = client.CaptureResponder(vmcr.Response.Response) 10201 if err != nil { 10202 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request") 10203 } 10204 } 10205 return 10206} 10207 10208// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a 10209// long-running operation. 10210type VirtualMachinesConvertToManagedDisksFuture struct { 10211 azure.Future 10212} 10213 10214// Result returns the result of the asynchronous operation. 10215// If the operation has not completed it will return an error. 10216func (future *VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10217 var done bool 10218 done, err = future.Done(client) 10219 if err != nil { 10220 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure") 10221 return 10222 } 10223 if !done { 10224 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture") 10225 return 10226 } 10227 ar.Response = future.Response() 10228 return 10229} 10230 10231// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 10232// long-running operation. 10233type VirtualMachinesCreateOrUpdateFuture struct { 10234 azure.Future 10235} 10236 10237// Result returns the result of the asynchronous operation. 10238// If the operation has not completed it will return an error. 10239func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) { 10240 var done bool 10241 done, err = future.Done(client) 10242 if err != nil { 10243 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 10244 return 10245 } 10246 if !done { 10247 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture") 10248 return 10249 } 10250 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10251 if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent { 10252 VM, err = client.CreateOrUpdateResponder(VM.Response.Response) 10253 if err != nil { 10254 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request") 10255 } 10256 } 10257 return 10258} 10259 10260// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a 10261// long-running operation. 10262type VirtualMachinesDeallocateFuture struct { 10263 azure.Future 10264} 10265 10266// Result returns the result of the asynchronous operation. 10267// If the operation has not completed it will return an error. 10268func (future *VirtualMachinesDeallocateFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10269 var done bool 10270 done, err = future.Done(client) 10271 if err != nil { 10272 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure") 10273 return 10274 } 10275 if !done { 10276 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture") 10277 return 10278 } 10279 ar.Response = future.Response() 10280 return 10281} 10282 10283// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 10284// operation. 10285type VirtualMachinesDeleteFuture struct { 10286 azure.Future 10287} 10288 10289// Result returns the result of the asynchronous operation. 10290// If the operation has not completed it will return an error. 10291func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10292 var done bool 10293 done, err = future.Done(client) 10294 if err != nil { 10295 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure") 10296 return 10297 } 10298 if !done { 10299 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture") 10300 return 10301 } 10302 ar.Response = future.Response() 10303 return 10304} 10305 10306// VirtualMachineSize describes the properties of a VM size. 10307type VirtualMachineSize struct { 10308 // Name - The name of the virtual machine size. 10309 Name *string `json:"name,omitempty"` 10310 // NumberOfCores - The number of cores supported by the virtual machine size. 10311 NumberOfCores *int32 `json:"numberOfCores,omitempty"` 10312 // OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size. 10313 OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"` 10314 // ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size. 10315 ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"` 10316 // MemoryInMB - The amount of memory, in MB, supported by the virtual machine size. 10317 MemoryInMB *int32 `json:"memoryInMB,omitempty"` 10318 // MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size. 10319 MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"` 10320} 10321 10322// VirtualMachineSizeListResult the List Virtual Machine operation response. 10323type VirtualMachineSizeListResult struct { 10324 autorest.Response `json:"-"` 10325 // Value - The list of virtual machine sizes. 10326 Value *[]VirtualMachineSize `json:"value,omitempty"` 10327} 10328 10329// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a 10330// long-running operation. 10331type VirtualMachinesPerformMaintenanceFuture struct { 10332 azure.Future 10333} 10334 10335// Result returns the result of the asynchronous operation. 10336// If the operation has not completed it will return an error. 10337func (future *VirtualMachinesPerformMaintenanceFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10338 var done bool 10339 done, err = future.Done(client) 10340 if err != nil { 10341 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") 10342 return 10343 } 10344 if !done { 10345 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture") 10346 return 10347 } 10348 ar.Response = future.Response() 10349 return 10350} 10351 10352// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running 10353// operation. 10354type VirtualMachinesPowerOffFuture struct { 10355 azure.Future 10356} 10357 10358// Result returns the result of the asynchronous operation. 10359// If the operation has not completed it will return an error. 10360func (future *VirtualMachinesPowerOffFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10361 var done bool 10362 done, err = future.Done(client) 10363 if err != nil { 10364 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure") 10365 return 10366 } 10367 if !done { 10368 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture") 10369 return 10370 } 10371 ar.Response = future.Response() 10372 return 10373} 10374 10375// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running 10376// operation. 10377type VirtualMachinesRedeployFuture struct { 10378 azure.Future 10379} 10380 10381// Result returns the result of the asynchronous operation. 10382// If the operation has not completed it will return an error. 10383func (future *VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10384 var done bool 10385 done, err = future.Done(client) 10386 if err != nil { 10387 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure") 10388 return 10389 } 10390 if !done { 10391 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture") 10392 return 10393 } 10394 ar.Response = future.Response() 10395 return 10396} 10397 10398// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running 10399// operation. 10400type VirtualMachinesReimageFuture struct { 10401 azure.Future 10402} 10403 10404// Result returns the result of the asynchronous operation. 10405// If the operation has not completed it will return an error. 10406func (future *VirtualMachinesReimageFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10407 var done bool 10408 done, err = future.Done(client) 10409 if err != nil { 10410 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure") 10411 return 10412 } 10413 if !done { 10414 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture") 10415 return 10416 } 10417 ar.Response = future.Response() 10418 return 10419} 10420 10421// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running 10422// operation. 10423type VirtualMachinesRestartFuture struct { 10424 azure.Future 10425} 10426 10427// Result returns the result of the asynchronous operation. 10428// If the operation has not completed it will return an error. 10429func (future *VirtualMachinesRestartFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10430 var done bool 10431 done, err = future.Done(client) 10432 if err != nil { 10433 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure") 10434 return 10435 } 10436 if !done { 10437 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture") 10438 return 10439 } 10440 ar.Response = future.Response() 10441 return 10442} 10443 10444// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a 10445// long-running operation. 10446type VirtualMachinesRunCommandFuture struct { 10447 azure.Future 10448} 10449 10450// Result returns the result of the asynchronous operation. 10451// If the operation has not completed it will return an error. 10452func (future *VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClient) (rcr RunCommandResult, err error) { 10453 var done bool 10454 done, err = future.Done(client) 10455 if err != nil { 10456 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure") 10457 return 10458 } 10459 if !done { 10460 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture") 10461 return 10462 } 10463 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10464 if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent { 10465 rcr, err = client.RunCommandResponder(rcr.Response.Response) 10466 if err != nil { 10467 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request") 10468 } 10469 } 10470 return 10471} 10472 10473// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running 10474// operation. 10475type VirtualMachinesStartFuture struct { 10476 azure.Future 10477} 10478 10479// Result returns the result of the asynchronous operation. 10480// If the operation has not completed it will return an error. 10481func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) { 10482 var done bool 10483 done, err = future.Done(client) 10484 if err != nil { 10485 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure") 10486 return 10487 } 10488 if !done { 10489 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture") 10490 return 10491 } 10492 ar.Response = future.Response() 10493 return 10494} 10495 10496// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view 10497// status summary. 10498type VirtualMachineStatusCodeCount struct { 10499 // Code - The instance view status code. 10500 Code *string `json:"code,omitempty"` 10501 // Count - The number of instances having a particular status code. 10502 Count *int32 `json:"count,omitempty"` 10503} 10504 10505// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 10506// operation. 10507type VirtualMachinesUpdateFuture struct { 10508 azure.Future 10509} 10510 10511// Result returns the result of the asynchronous operation. 10512// If the operation has not completed it will return an error. 10513func (future *VirtualMachinesUpdateFuture) Result(client VirtualMachinesClient) (VM VirtualMachine, err error) { 10514 var done bool 10515 done, err = future.Done(client) 10516 if err != nil { 10517 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure") 10518 return 10519 } 10520 if !done { 10521 err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture") 10522 return 10523 } 10524 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10525 if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent { 10526 VM, err = client.UpdateResponder(VM.Response.Response) 10527 if err != nil { 10528 err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request") 10529 } 10530 } 10531 return 10532} 10533 10534// VirtualMachineUpdate describes a Virtual Machine Update. 10535type VirtualMachineUpdate struct { 10536 // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must 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, Get Started ->**. Enter any required information and then click **Save**. 10537 Plan *Plan `json:"plan,omitempty"` 10538 *VirtualMachineProperties `json:"properties,omitempty"` 10539 // Identity - The identity of the virtual machine, if configured. 10540 Identity *VirtualMachineIdentity `json:"identity,omitempty"` 10541 // Zones - The virtual machine zones. 10542 Zones *[]string `json:"zones,omitempty"` 10543 // Tags - Resource tags 10544 Tags map[string]*string `json:"tags"` 10545} 10546 10547// MarshalJSON is the custom marshaler for VirtualMachineUpdate. 10548func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) { 10549 objectMap := make(map[string]interface{}) 10550 if vmu.Plan != nil { 10551 objectMap["plan"] = vmu.Plan 10552 } 10553 if vmu.VirtualMachineProperties != nil { 10554 objectMap["properties"] = vmu.VirtualMachineProperties 10555 } 10556 if vmu.Identity != nil { 10557 objectMap["identity"] = vmu.Identity 10558 } 10559 if vmu.Zones != nil { 10560 objectMap["zones"] = vmu.Zones 10561 } 10562 if vmu.Tags != nil { 10563 objectMap["tags"] = vmu.Tags 10564 } 10565 return json.Marshal(objectMap) 10566} 10567 10568// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct. 10569func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error { 10570 var m map[string]*json.RawMessage 10571 err := json.Unmarshal(body, &m) 10572 if err != nil { 10573 return err 10574 } 10575 for k, v := range m { 10576 switch k { 10577 case "plan": 10578 if v != nil { 10579 var plan Plan 10580 err = json.Unmarshal(*v, &plan) 10581 if err != nil { 10582 return err 10583 } 10584 vmu.Plan = &plan 10585 } 10586 case "properties": 10587 if v != nil { 10588 var virtualMachineProperties VirtualMachineProperties 10589 err = json.Unmarshal(*v, &virtualMachineProperties) 10590 if err != nil { 10591 return err 10592 } 10593 vmu.VirtualMachineProperties = &virtualMachineProperties 10594 } 10595 case "identity": 10596 if v != nil { 10597 var identity VirtualMachineIdentity 10598 err = json.Unmarshal(*v, &identity) 10599 if err != nil { 10600 return err 10601 } 10602 vmu.Identity = &identity 10603 } 10604 case "zones": 10605 if v != nil { 10606 var zones []string 10607 err = json.Unmarshal(*v, &zones) 10608 if err != nil { 10609 return err 10610 } 10611 vmu.Zones = &zones 10612 } 10613 case "tags": 10614 if v != nil { 10615 var tags map[string]*string 10616 err = json.Unmarshal(*v, &tags) 10617 if err != nil { 10618 return err 10619 } 10620 vmu.Tags = tags 10621 } 10622 } 10623 } 10624 10625 return nil 10626} 10627 10628// WindowsConfiguration specifies Windows operating system settings on the virtual machine. 10629type WindowsConfiguration struct { 10630 // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> 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 so that extensions can be added to the VM later. 10631 ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` 10632 // EnableAutomaticUpdates - Indicates whether virtual machine is enabled for automatic updates. 10633 EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` 10634 // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" 10635 TimeZone *string `json:"timeZone,omitempty"` 10636 // AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. 10637 AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"` 10638 // WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. 10639 WinRM *WinRMConfiguration `json:"winRM,omitempty"` 10640} 10641 10642// WinRMConfiguration describes Windows Remote Management configuration of the VM 10643type WinRMConfiguration struct { 10644 // Listeners - The list of Windows Remote Management listeners 10645 Listeners *[]WinRMListener `json:"listeners,omitempty"` 10646} 10647 10648// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener 10649type WinRMListener struct { 10650 // Protocol - Specifies the protocol of listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'HTTP', 'HTTPS' 10651 Protocol ProtocolTypes `json:"protocol,omitempty"` 10652 // CertificateURL - 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 key vault](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 following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} 10653 CertificateURL *string `json:"certificateUrl,omitempty"` 10654} 10655