From cbbe566dc7dd5df1cfc6c65292f38a60674550aa Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 26 May 2020 13:52:37 +0800 Subject: [PATCH 1/9] Refresh vendor, update import path and fix compile errors --- .../compute/availability_set_resource.go | 2 +- .../services/compute/client/client.go | 2 +- .../compute/dedicated_host_group_resource.go | 2 +- .../compute/dedicated_host_resource.go | 2 +- .../compute/disk_encryption_set_resource.go | 2 +- .../services/compute/encryption_settings.go | 2 +- azurerm/internal/services/compute/helpers.go | 2 +- .../services/compute/image_data_source.go | 2 +- .../services/compute/image_resource.go | 2 +- .../compute/linux_virtual_machine_resource.go | 2 +- ...inux_virtual_machine_scale_set_resource.go | 2 +- .../services/compute/managed_disk_resource.go | 6 +- .../services/compute/network_interface.go | 2 +- ...ated_virtual_machine_scale_set_resource.go | 2 +- .../compute/platform_image_data_source.go | 2 +- .../proximity_placement_group_resource.go | 2 +- .../compute/shared_image_data_source.go | 2 +- .../compute/shared_image_gallery_resource.go | 2 +- .../services/compute/shared_image_resource.go | 2 +- .../shared_image_version_data_source.go | 2 +- .../compute/shared_image_version_resource.go | 2 +- .../shared_image_versions_data_source.go | 2 +- .../services/compute/shared_schema.go | 2 +- .../services/compute/snapshot_resource.go | 2 +- azurerm/internal/services/compute/ssh_keys.go | 2 +- .../compute/tests/image_resource_test.go | 2 +- .../tests/managed_disk_resource_test.go | 2 +- ...hine_data_disk_attachment_resource_test.go | 2 +- ...ual_machine_managed_disks_resource_test.go | 2 +- .../tests/virtual_machine_resource_test.go | 2 +- ...virtual_machine_scale_set_resource_test.go | 2 +- ...l_machine_unmanaged_disks_resource_test.go | 2 +- .../services/compute/virtual_machine.go | 2 +- ...l_machine_data_disk_attachment_resource.go | 2 +- .../virtual_machine_extension_resource.go | 2 +- .../compute/virtual_machine_import.go | 2 +- .../compute/virtual_machine_instance.go | 2 +- .../compute/virtual_machine_instance_test.go | 2 +- .../compute/virtual_machine_resource.go | 2 +- .../compute/virtual_machine_scale_set.go | 2 +- ...al_machine_scale_set_extension_resource.go | 2 +- .../virtual_machine_scale_set_import.go | 2 +- .../virtual_machine_scale_set_resource.go | 2 +- .../virtual_machine_scale_set_update.go | 2 +- .../windows_virtual_machine_resource.go | 2 +- ...dows_virtual_machine_scale_set_resource.go | 2 +- ...esource_arm_site_recovery_replicated_vm.go | 2 +- .../compute/availabilitysets.go | 14 +- .../compute/client.go | 0 .../compute/containerservices.go | 0 .../compute/dedicatedhostgroups.go | 12 +- .../compute/dedicatedhosts.go | 10 +- .../compute/diskencryptionsets.go | 12 +- .../compute/disks.go | 19 +- .../compute/galleries.go | 12 +- .../compute/galleryapplications.go | 10 +- .../compute/galleryapplicationversions.go | 10 +- .../compute/galleryimages.go | 10 +- .../compute/galleryimageversions.go | 10 +- .../compute/images.go | 12 +- .../compute/loganalytics.go | 4 +- .../compute/models.go | 896 ++++++++++++------ .../compute/operations.go | 2 +- .../compute/proximityplacementgroups.go | 12 +- .../compute/resourceskus.go | 0 .../compute/snapshots.go | 18 +- .../mgmt/2019-12-01/compute/sshpublickeys.go | 652 +++++++++++++ .../compute/usage.go | 2 +- .../compute/version.go | 2 +- .../compute/virtualmachineextensionimages.go | 6 +- .../compute/virtualmachineextensions.go | 10 +- .../compute/virtualmachineimages.go | 10 +- .../compute/virtualmachineruncommands.go | 4 +- .../compute/virtualmachines.go | 118 ++- .../virtualmachinescalesetextensions.go | 10 +- .../virtualmachinescalesetrollingupgrades.go | 8 +- .../compute/virtualmachinescalesets.go | 118 ++- .../virtualmachinescalesetvmextensions.go | 10 +- .../compute/virtualmachinescalesetvms.go | 106 ++- .../compute/virtualmachinesizes.go | 2 +- vendor/modules.txt | 2 +- 81 files changed, 1687 insertions(+), 534 deletions(-) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/availabilitysets.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/client.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/containerservices.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/dedicatedhostgroups.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/dedicatedhosts.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/diskencryptionsets.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/disks.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleries.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleryapplications.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleryapplicationversions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleryimages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleryimageversions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/images.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/loganalytics.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/models.go (96%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/operations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/proximityplacementgroups.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/resourceskus.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/snapshots.go (98%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/usage.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/version.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachineextensionimages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachineextensions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachineimages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachineruncommands.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachines.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesetextensions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesetrollingupgrades.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesets.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesetvmextensions.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesetvms.go (93%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinesizes.go (99%) diff --git a/azurerm/internal/services/compute/availability_set_resource.go b/azurerm/internal/services/compute/availability_set_resource.go index 2a75ed13d1c9..066255252eab 100644 --- a/azurerm/internal/services/compute/availability_set_resource.go +++ b/azurerm/internal/services/compute/availability_set_resource.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/client/client.go b/azurerm/internal/services/compute/client/client.go index 99dfe90f137a..f725e460acae 100644 --- a/azurerm/internal/services/compute/client/client.go +++ b/azurerm/internal/services/compute/client/client.go @@ -1,7 +1,7 @@ package client import ( - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common" ) diff --git a/azurerm/internal/services/compute/dedicated_host_group_resource.go b/azurerm/internal/services/compute/dedicated_host_group_resource.go index b850ec379392..d1d0e2798adf 100644 --- a/azurerm/internal/services/compute/dedicated_host_group_resource.go +++ b/azurerm/internal/services/compute/dedicated_host_group_resource.go @@ -9,7 +9,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/dedicated_host_resource.go b/azurerm/internal/services/compute/dedicated_host_resource.go index 6f08255d0f98..7c898b7f6716 100644 --- a/azurerm/internal/services/compute/dedicated_host_resource.go +++ b/azurerm/internal/services/compute/dedicated_host_resource.go @@ -15,7 +15,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute/parse" azSchema "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tf/schema" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/disk_encryption_set_resource.go b/azurerm/internal/services/compute/disk_encryption_set_resource.go index 7dbe23d3c7bf..9fd9521cc548 100644 --- a/azurerm/internal/services/compute/disk_encryption_set_resource.go +++ b/azurerm/internal/services/compute/disk_encryption_set_resource.go @@ -6,7 +6,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" diff --git a/azurerm/internal/services/compute/encryption_settings.go b/azurerm/internal/services/compute/encryption_settings.go index 7ca0f20815ce..42692c5923d0 100644 --- a/azurerm/internal/services/compute/encryption_settings.go +++ b/azurerm/internal/services/compute/encryption_settings.go @@ -1,7 +1,7 @@ package compute import ( - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" ) diff --git a/azurerm/internal/services/compute/helpers.go b/azurerm/internal/services/compute/helpers.go index 9ecb4efb9c9a..a9d54c15540d 100644 --- a/azurerm/internal/services/compute/helpers.go +++ b/azurerm/internal/services/compute/helpers.go @@ -1,7 +1,7 @@ package compute import ( - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" ) diff --git a/azurerm/internal/services/compute/image_data_source.go b/azurerm/internal/services/compute/image_data_source.go index 1027d088915d..76d34064761b 100644 --- a/azurerm/internal/services/compute/image_data_source.go +++ b/azurerm/internal/services/compute/image_data_source.go @@ -7,7 +7,7 @@ import ( "sort" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/image_resource.go b/azurerm/internal/services/compute/image_resource.go index e8fc2da5f22f..c0ce724d54bf 100644 --- a/azurerm/internal/services/compute/image_resource.go +++ b/azurerm/internal/services/compute/image_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/linux_virtual_machine_resource.go b/azurerm/internal/services/compute/linux_virtual_machine_resource.go index d7d6e45513d1..e68b6fdcd08b 100644 --- a/azurerm/internal/services/compute/linux_virtual_machine_resource.go +++ b/azurerm/internal/services/compute/linux_virtual_machine_resource.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/go-azure-helpers/response" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" diff --git a/azurerm/internal/services/compute/linux_virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/linux_virtual_machine_scale_set_resource.go index 7d5abf9d8de1..d66a46812519 100644 --- a/azurerm/internal/services/compute/linux_virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/linux_virtual_machine_scale_set_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/managed_disk_resource.go b/azurerm/internal/services/compute/managed_disk_resource.go index 144620d9f529..090bcca14db4 100644 --- a/azurerm/internal/services/compute/managed_disk_resource.go +++ b/azurerm/internal/services/compute/managed_disk_resource.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" @@ -203,7 +203,7 @@ func resourceArmManagedDiskCreateUpdate(d *schema.ResourceData, meta interface{} if d.HasChange("disk_mbps_read_write") { v := d.Get("disk_mbps_read_write") - diskMBps := int32(v.(int)) + diskMBps := int64(v.(int)) props.DiskMBpsReadWrite = &diskMBps } } else if d.HasChange("disk_iops_read_write") || d.HasChange("disk_mbps_read_write") { @@ -341,7 +341,7 @@ func resourceArmManagedDiskUpdate(d *schema.ResourceData, meta interface{}) erro if d.HasChange("disk_mbps_read_write") { v := d.Get("disk_mbps_read_write") - diskMBps := int32(v.(int)) + diskMBps := int64(v.(int)) diskUpdate.DiskMBpsReadWrite = &diskMBps } } else if d.HasChange("disk_iops_read_write") || d.HasChange("disk_mbps_read_write") { diff --git a/azurerm/internal/services/compute/network_interface.go b/azurerm/internal/services/compute/network_interface.go index 3f18da73ece0..207c19622901 100644 --- a/azurerm/internal/services/compute/network_interface.go +++ b/azurerm/internal/services/compute/network_interface.go @@ -3,7 +3,7 @@ package compute import ( "context" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-03-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network/parse" diff --git a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go index ff220dfba9e3..ec4475c3d1c7 100644 --- a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/platform_image_data_source.go b/azurerm/internal/services/compute/platform_image_data_source.go index 51b2685c0077..ee8273b4185d 100644 --- a/azurerm/internal/services/compute/platform_image_data_source.go +++ b/azurerm/internal/services/compute/platform_image_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" diff --git a/azurerm/internal/services/compute/proximity_placement_group_resource.go b/azurerm/internal/services/compute/proximity_placement_group_resource.go index 4a2a1cfd6575..70d9f2b7eaec 100644 --- a/azurerm/internal/services/compute/proximity_placement_group_resource.go +++ b/azurerm/internal/services/compute/proximity_placement_group_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/shared_image_data_source.go b/azurerm/internal/services/compute/shared_image_data_source.go index a2049ed56a37..74e6db7519de 100644 --- a/azurerm/internal/services/compute/shared_image_data_source.go +++ b/azurerm/internal/services/compute/shared_image_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" diff --git a/azurerm/internal/services/compute/shared_image_gallery_resource.go b/azurerm/internal/services/compute/shared_image_gallery_resource.go index 09767c913ed9..021f4e5a46b5 100644 --- a/azurerm/internal/services/compute/shared_image_gallery_resource.go +++ b/azurerm/internal/services/compute/shared_image_gallery_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/go-azure-helpers/response" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/shared_image_resource.go b/azurerm/internal/services/compute/shared_image_resource.go index b82c86efb8f2..79b60dfe300f 100644 --- a/azurerm/internal/services/compute/shared_image_resource.go +++ b/azurerm/internal/services/compute/shared_image_resource.go @@ -6,7 +6,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" diff --git a/azurerm/internal/services/compute/shared_image_version_data_source.go b/azurerm/internal/services/compute/shared_image_version_data_source.go index 95c8ea153a49..829c18984bef 100644 --- a/azurerm/internal/services/compute/shared_image_version_data_source.go +++ b/azurerm/internal/services/compute/shared_image_version_data_source.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" diff --git a/azurerm/internal/services/compute/shared_image_version_resource.go b/azurerm/internal/services/compute/shared_image_version_resource.go index d108f7e84e90..c40af0812073 100644 --- a/azurerm/internal/services/compute/shared_image_version_resource.go +++ b/azurerm/internal/services/compute/shared_image_version_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/go-azure-helpers/response" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/shared_image_versions_data_source.go b/azurerm/internal/services/compute/shared_image_versions_data_source.go index ad4ca24b33c5..b2adfdf481ca 100644 --- a/azurerm/internal/services/compute/shared_image_versions_data_source.go +++ b/azurerm/internal/services/compute/shared_image_versions_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" diff --git a/azurerm/internal/services/compute/shared_schema.go b/azurerm/internal/services/compute/shared_schema.go index bc0e0e3cef9b..d82cf43d96d3 100644 --- a/azurerm/internal/services/compute/shared_schema.go +++ b/azurerm/internal/services/compute/shared_schema.go @@ -3,7 +3,7 @@ package compute import ( "fmt" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/snapshot_resource.go b/azurerm/internal/services/compute/snapshot_resource.go index 92b2109aa3a1..61eb8bd95d3b 100644 --- a/azurerm/internal/services/compute/snapshot_resource.go +++ b/azurerm/internal/services/compute/snapshot_resource.go @@ -6,7 +6,7 @@ import ( "regexp" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/ssh_keys.go b/azurerm/internal/services/compute/ssh_keys.go index 6573a191e9a6..7274d85d85ea 100644 --- a/azurerm/internal/services/compute/ssh_keys.go +++ b/azurerm/internal/services/compute/ssh_keys.go @@ -9,7 +9,7 @@ import ( "golang.org/x/crypto/ssh" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" diff --git a/azurerm/internal/services/compute/tests/image_resource_test.go b/azurerm/internal/services/compute/tests/image_resource_test.go index 5fc6d0c0eef5..7de70cf5819f 100644 --- a/azurerm/internal/services/compute/tests/image_resource_test.go +++ b/azurerm/internal/services/compute/tests/image_resource_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/tests/managed_disk_resource_test.go b/azurerm/internal/services/compute/tests/managed_disk_resource_test.go index ff01ef330d8e..ae425e72f8ad 100644 --- a/azurerm/internal/services/compute/tests/managed_disk_resource_test.go +++ b/azurerm/internal/services/compute/tests/managed_disk_resource_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/acceptance" diff --git a/azurerm/internal/services/compute/tests/virtual_machine_data_disk_attachment_resource_test.go b/azurerm/internal/services/compute/tests/virtual_machine_data_disk_attachment_resource_test.go index 047552d8d595..623599575878 100644 --- a/azurerm/internal/services/compute/tests/virtual_machine_data_disk_attachment_resource_test.go +++ b/azurerm/internal/services/compute/tests/virtual_machine_data_disk_attachment_resource_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/tests/virtual_machine_managed_disks_resource_test.go b/azurerm/internal/services/compute/tests/virtual_machine_managed_disks_resource_test.go index c1557348607f..d741bea193cf 100644 --- a/azurerm/internal/services/compute/tests/virtual_machine_managed_disks_resource_test.go +++ b/azurerm/internal/services/compute/tests/virtual_machine_managed_disks_resource_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/tests/virtual_machine_resource_test.go b/azurerm/internal/services/compute/tests/virtual_machine_resource_test.go index dd0d25058bd9..9e90c456392d 100644 --- a/azurerm/internal/services/compute/tests/virtual_machine_resource_test.go +++ b/azurerm/internal/services/compute/tests/virtual_machine_resource_test.go @@ -9,7 +9,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/acceptance" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/azurerm/internal/services/compute/tests/virtual_machine_scale_set_resource_test.go b/azurerm/internal/services/compute/tests/virtual_machine_scale_set_resource_test.go index 24cea333554e..36302acced83 100644 --- a/azurerm/internal/services/compute/tests/virtual_machine_scale_set_resource_test.go +++ b/azurerm/internal/services/compute/tests/virtual_machine_scale_set_resource_test.go @@ -11,7 +11,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/acceptance" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/azurerm/internal/services/compute/tests/virtual_machine_unmanaged_disks_resource_test.go b/azurerm/internal/services/compute/tests/virtual_machine_unmanaged_disks_resource_test.go index fae78b114785..a4f37402df89 100644 --- a/azurerm/internal/services/compute/tests/virtual_machine_unmanaged_disks_resource_test.go +++ b/azurerm/internal/services/compute/tests/virtual_machine_unmanaged_disks_resource_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/acceptance" diff --git a/azurerm/internal/services/compute/virtual_machine.go b/azurerm/internal/services/compute/virtual_machine.go index 5f323b400c60..fd03f4b96ad8 100644 --- a/azurerm/internal/services/compute/virtual_machine.go +++ b/azurerm/internal/services/compute/virtual_machine.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/suppress" diff --git a/azurerm/internal/services/compute/virtual_machine_data_disk_attachment_resource.go b/azurerm/internal/services/compute/virtual_machine_data_disk_attachment_resource.go index 0291a90680a4..47032c6b79c3 100644 --- a/azurerm/internal/services/compute/virtual_machine_data_disk_attachment_resource.go +++ b/azurerm/internal/services/compute/virtual_machine_data_disk_attachment_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/virtual_machine_extension_resource.go b/azurerm/internal/services/compute/virtual_machine_extension_resource.go index cf0f127b647b..2f95c8f8424d 100644 --- a/azurerm/internal/services/compute/virtual_machine_extension_resource.go +++ b/azurerm/internal/services/compute/virtual_machine_extension_resource.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/structure" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" diff --git a/azurerm/internal/services/compute/virtual_machine_import.go b/azurerm/internal/services/compute/virtual_machine_import.go index 21987de2aef7..95dbc632f402 100644 --- a/azurerm/internal/services/compute/virtual_machine_import.go +++ b/azurerm/internal/services/compute/virtual_machine_import.go @@ -3,7 +3,7 @@ package compute import ( "fmt" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute/parse" diff --git a/azurerm/internal/services/compute/virtual_machine_instance.go b/azurerm/internal/services/compute/virtual_machine_instance.go index 04ca3fd43b16..182dbcdf7b9d 100644 --- a/azurerm/internal/services/compute/virtual_machine_instance.go +++ b/azurerm/internal/services/compute/virtual_machine_instance.go @@ -3,7 +3,7 @@ package compute import ( "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" ) // virtualMachineShouldBeStarted determines if the Virtual Machine should be started after diff --git a/azurerm/internal/services/compute/virtual_machine_instance_test.go b/azurerm/internal/services/compute/virtual_machine_instance_test.go index 45decd6834a5..c8f32f449022 100644 --- a/azurerm/internal/services/compute/virtual_machine_instance_test.go +++ b/azurerm/internal/services/compute/virtual_machine_instance_test.go @@ -3,7 +3,7 @@ package compute import ( "testing" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" ) diff --git a/azurerm/internal/services/compute/virtual_machine_resource.go b/azurerm/internal/services/compute/virtual_machine_resource.go index 0c0526a485f4..6de07205914f 100644 --- a/azurerm/internal/services/compute/virtual_machine_resource.go +++ b/azurerm/internal/services/compute/virtual_machine_resource.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-03-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" diff --git a/azurerm/internal/services/compute/virtual_machine_scale_set.go b/azurerm/internal/services/compute/virtual_machine_scale_set.go index 11eb1b0b283f..dd7e70bcddfd 100644 --- a/azurerm/internal/services/compute/virtual_machine_scale_set.go +++ b/azurerm/internal/services/compute/virtual_machine_scale_set.go @@ -3,7 +3,7 @@ package compute import ( "fmt" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/compute/virtual_machine_scale_set_extension_resource.go b/azurerm/internal/services/compute/virtual_machine_scale_set_extension_resource.go index c377bd9ed864..60bc8786abe2 100644 --- a/azurerm/internal/services/compute/virtual_machine_scale_set_extension_resource.go +++ b/azurerm/internal/services/compute/virtual_machine_scale_set_extension_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/go-azure-helpers/response" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/structure" diff --git a/azurerm/internal/services/compute/virtual_machine_scale_set_import.go b/azurerm/internal/services/compute/virtual_machine_scale_set_import.go index 3ebea2ed4cab..84226d320b17 100644 --- a/azurerm/internal/services/compute/virtual_machine_scale_set_import.go +++ b/azurerm/internal/services/compute/virtual_machine_scale_set_import.go @@ -3,7 +3,7 @@ package compute import ( "fmt" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute/parse" diff --git a/azurerm/internal/services/compute/virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/virtual_machine_scale_set_resource.go index cc447702d17f..b1a8897d98f8 100644 --- a/azurerm/internal/services/compute/virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/virtual_machine_scale_set_resource.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tags" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts" diff --git a/azurerm/internal/services/compute/virtual_machine_scale_set_update.go b/azurerm/internal/services/compute/virtual_machine_scale_set_update.go index e335548d6b09..06be93e822e6 100644 --- a/azurerm/internal/services/compute/virtual_machine_scale_set_update.go +++ b/azurerm/internal/services/compute/virtual_machine_scale_set_update.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute/client" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute/parse" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" diff --git a/azurerm/internal/services/compute/windows_virtual_machine_resource.go b/azurerm/internal/services/compute/windows_virtual_machine_resource.go index 04ee00d365d1..c8910c3dbdad 100644 --- a/azurerm/internal/services/compute/windows_virtual_machine_resource.go +++ b/azurerm/internal/services/compute/windows_virtual_machine_resource.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/go-azure-helpers/response" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" diff --git a/azurerm/internal/services/compute/windows_virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/windows_virtual_machine_scale_set_resource.go index ee3b8fc9e3eb..00409c6c626c 100644 --- a/azurerm/internal/services/compute/windows_virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/windows_virtual_machine_scale_set_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/internal/services/recoveryservices/resource_arm_site_recovery_replicated_vm.go b/azurerm/internal/services/recoveryservices/resource_arm_site_recovery_replicated_vm.go index df6a5771b126..034be20d4106 100644 --- a/azurerm/internal/services/recoveryservices/resource_arm_site_recovery_replicated_vm.go +++ b/azurerm/internal/services/recoveryservices/resource_arm_site_recovery_replicated_vm.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go index e48404446dae..fa23adc38c6e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go @@ -87,7 +87,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -240,7 +240,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -315,7 +315,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -429,7 +429,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -503,7 +503,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -620,7 +620,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go index e51c1a78779e..2ae90747f6f5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go @@ -100,7 +100,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -178,7 +178,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -253,7 +253,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +329,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -439,7 +439,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -553,7 +553,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go index 5632e73935a4..53126ca84248 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go @@ -95,7 +95,7 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,7 +175,7 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -259,7 +259,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -340,7 +340,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -450,7 +450,7 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go index a6013cb97615..12874d026a55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go @@ -96,7 +96,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -176,7 +176,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -259,7 +259,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -331,7 +331,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,7 +443,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -554,7 +554,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go index fc2d8e0526c5..420deb654794 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go @@ -66,6 +66,8 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "disk.DiskProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, }}, {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, @@ -96,12 +98,13 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } disk.ManagedBy = nil + disk.ManagedByExtended = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -177,7 +180,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -260,7 +263,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -339,7 +342,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -419,7 +422,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -531,7 +534,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -640,7 +643,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -718,7 +721,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go index f9e53940b654..e4f6dad9233a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go @@ -81,7 +81,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -240,7 +240,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -312,7 +312,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -424,7 +424,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -533,7 +533,7 @@ func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go index 5c17994e5078..1968d2533b70 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go @@ -86,7 +86,7 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -167,7 +167,7 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -251,7 +251,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +329,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -442,7 +442,7 @@ func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go index d0f81b22c2eb..795f6c8e8a42 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go @@ -103,7 +103,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -186,7 +186,7 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -273,7 +273,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -356,7 +356,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -471,7 +471,7 @@ func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go index 549aab2e4315..c88030f69eaa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go @@ -97,7 +97,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -177,7 +177,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -260,7 +260,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,7 +337,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -449,7 +449,7 @@ func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go index 02f3a946544f..223b938ebc62 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go @@ -99,7 +99,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -181,7 +181,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,7 +267,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -350,7 +350,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -464,7 +464,7 @@ func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go index 5355c93cfa5e..aadeb4529069 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go @@ -80,7 +80,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -240,7 +240,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -428,7 +428,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -536,7 +536,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go index ae013a0fe315..e6e20676f0fc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go @@ -86,7 +86,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go index 8ea028bad6f5..6b5eb1bc6477 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go @@ -29,7 +29,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" // AccessLevel enumerates the values for access level. type AccessLevel string @@ -266,6 +266,21 @@ func PossibleDiffDiskOptionsValues() []DiffDiskOptions { return []DiffDiskOptions{Local} } +// DiffDiskPlacement enumerates the values for diff disk placement. +type DiffDiskPlacement string + +const ( + // CacheDisk ... + CacheDisk DiffDiskPlacement = "CacheDisk" + // ResourceDisk ... + ResourceDisk DiffDiskPlacement = "ResourceDisk" +) + +// PossibleDiffDiskPlacementValues returns an array of possible values for the DiffDiskPlacement const type. +func PossibleDiffDiskPlacementValues() []DiffDiskPlacement { + return []DiffDiskPlacement{CacheDisk, ResourceDisk} +} + // DiskCreateOption enumerates the values for disk create option. type DiskCreateOption string @@ -277,7 +292,8 @@ const ( Copy DiskCreateOption = "Copy" // Empty Create an empty data disk of a size given by diskSizeGB. Empty DiskCreateOption = "Empty" - // FromImage Create a new disk from a platform image specified by the given imageReference. + // FromImage Create a new disk from a platform image specified by the given imageReference or + // galleryImageReference. FromImage DiskCreateOption = "FromImage" // Import Create a disk by importing from a blob specified by a sourceUri in a storage account specified by // storageAccountId. @@ -544,6 +560,51 @@ func PossibleOperatingSystemTypesValues() []OperatingSystemTypes { return []OperatingSystemTypes{Linux, Windows} } +// OrchestrationServiceNames enumerates the values for orchestration service names. +type OrchestrationServiceNames string + +const ( + // AutomaticRepairs ... + AutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs" +) + +// PossibleOrchestrationServiceNamesValues returns an array of possible values for the OrchestrationServiceNames const type. +func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames { + return []OrchestrationServiceNames{AutomaticRepairs} +} + +// OrchestrationServiceState enumerates the values for orchestration service state. +type OrchestrationServiceState string + +const ( + // NotRunning ... + NotRunning OrchestrationServiceState = "NotRunning" + // Running ... + Running OrchestrationServiceState = "Running" + // Suspended ... + Suspended OrchestrationServiceState = "Suspended" +) + +// PossibleOrchestrationServiceStateValues returns an array of possible values for the OrchestrationServiceState const type. +func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState { + return []OrchestrationServiceState{NotRunning, Running, Suspended} +} + +// OrchestrationServiceStateAction enumerates the values for orchestration service state action. +type OrchestrationServiceStateAction string + +const ( + // Resume ... + Resume OrchestrationServiceStateAction = "Resume" + // Suspend ... + Suspend OrchestrationServiceStateAction = "Suspend" +) + +// PossibleOrchestrationServiceStateActionValues returns an array of possible values for the OrchestrationServiceStateAction const type. +func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction { + return []OrchestrationServiceStateAction{Resume, Suspend} +} + // PassNames enumerates the values for pass names. type PassNames string @@ -864,6 +925,8 @@ func PossibleStatusLevelTypesValues() []StatusLevelTypes { type StorageAccountType string const ( + // StorageAccountTypePremiumLRS ... + StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" // StorageAccountTypeStandardLRS ... StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" // StorageAccountTypeStandardZRS ... @@ -872,7 +935,7 @@ const ( // PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type. func PossibleStorageAccountTypeValues() []StorageAccountType { - return []StorageAccountType{StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS} + return []StorageAccountType{StorageAccountTypePremiumLRS, StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS} } // StorageAccountTypes enumerates the values for storage account types. @@ -1726,12 +1789,6 @@ type AvailabilitySetUpdate struct { Sku *Sku `json:"sku,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for AvailabilitySetUpdate. @@ -1785,33 +1842,6 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error { } asu.Tags = tags } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - asu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - asu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - asu.Type = &typeVar - } } } @@ -2265,6 +2295,8 @@ type CreationData struct { StorageAccountID *string `json:"storageAccountId,omitempty"` // ImageReference - Disk source information. ImageReference *ImageDiskReference `json:"imageReference,omitempty"` + // GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk. + GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"` // SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk. SourceURI *string `json:"sourceUri,omitempty"` // SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk. @@ -2309,6 +2341,14 @@ type DataDiskImage struct { Lun *int32 `json:"lun,omitempty"` } +// DataDiskImageEncryption contains encryption settings for a data disk image. +type DataDiskImageEncryption struct { + // 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. + Lun *int32 `json:"lun,omitempty"` + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + // DedicatedHost specifies information about the Dedicated host. type DedicatedHost struct { autorest.Response `json:"-"` @@ -2716,12 +2756,6 @@ type DedicatedHostGroupUpdate struct { Zones *[]string `json:"zones,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate. @@ -2775,33 +2809,6 @@ func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error { } dhgu.Tags = tags } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dhgu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dhgu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dhgu.Type = &typeVar - } } } @@ -3071,12 +3078,6 @@ type DedicatedHostUpdate struct { *DedicatedHostProperties `json:"properties,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for DedicatedHostUpdate. @@ -3118,33 +3119,6 @@ func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error { } dhu.Tags = tags } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dhu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dhu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dhu.Type = &typeVar - } } } @@ -3163,6 +3137,8 @@ type DiagnosticsProfile struct { type DiffDiskSettings struct { // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local' Option DiffDiskOptions `json:"option,omitempty"` + // Placement - Specifies the ephemeral disk placement for operating system disk.

Possible values are:

**CacheDisk**

**ResourceDisk**

Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.

Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk' + Placement DiffDiskPlacement `json:"placement,omitempty"` } // Disallowed describes the disallowed disk types. @@ -3175,8 +3151,10 @@ type Disallowed struct { type Disk struct { autorest.Response `json:"-"` // ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. - ManagedBy *string `json:"managedBy,omitempty"` - Sku *DiskSku `json:"sku,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` + // ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + ManagedByExtended *[]string `json:"managedByExtended,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` // Zones - The Logical zone list for Disk. Zones *[]string `json:"zones,omitempty"` *DiskProperties `json:"properties,omitempty"` @@ -3231,6 +3209,15 @@ func (d *Disk) UnmarshalJSON(body []byte) error { } d.ManagedBy = &managedBy } + case "managedByExtended": + if v != nil { + var managedByExtended []string + err = json.Unmarshal(*v, &managedByExtended) + if err != nil { + return err + } + d.ManagedByExtended = &managedByExtended + } case "sku": if v != nil { var sku DiskSku @@ -3724,6 +3711,12 @@ type DiskEncryptionSetUpdateProperties struct { ActiveKey *KeyVaultAndKeyReference `json:"activeKey,omitempty"` } +// DiskImageEncryption this is the disk image encryption base class. +type DiskImageEncryption struct { + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + // DiskInstanceView the instance view of the disk. type DiskInstanceView struct { // Name - The disk name. @@ -3903,11 +3896,19 @@ type DiskProperties struct { // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` // 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. - DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"` + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` + // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` + // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` // DiskState - READ-ONLY; The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload' DiskState DiskState `json:"diskState,omitempty"` // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. Encryption *Encryption `json:"encryption,omitempty"` + // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + MaxShares *int32 `json:"maxShares,omitempty"` + // ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"` } // DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -4125,7 +4126,13 @@ type DiskUpdateProperties struct { // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` // 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. - DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"` + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` + // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` + // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` + // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + MaxShares *int32 `json:"maxShares,omitempty"` // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. Encryption *Encryption `json:"encryption,omitempty"` } @@ -4138,6 +4145,14 @@ type Encryption struct { Type EncryptionType `json:"type,omitempty"` } +// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data +// disks in the gallery artifact. +type EncryptionImages struct { + OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"` + // DataDiskImages - A list of encryption specifications for data disk images. + DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"` +} + // EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on // the key vault before it can be used to encrypt disks. type EncryptionSetIdentity struct { @@ -4706,14 +4721,14 @@ func (future *GalleryApplicationsUpdateFuture) Result(client GalleryApplications // update. type GalleryApplicationUpdate struct { *GalleryApplicationProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for GalleryApplicationUpdate. @@ -4746,15 +4761,6 @@ func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error { } gau.GalleryApplicationProperties = &galleryApplicationProperties } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - gau.Tags = tags - } case "id": if v != nil { var ID string @@ -4782,6 +4788,15 @@ func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error { } gau.Type = &typeVar } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gau.Tags = tags + } } } @@ -5062,7 +5077,7 @@ type GalleryApplicationVersionPublishingProfile struct { PublishedDate *date.Time `json:"publishedDate,omitempty"` // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } @@ -5151,14 +5166,14 @@ func (future *GalleryApplicationVersionsUpdateFuture) Result(client GalleryAppli // want to update. type GalleryApplicationVersionUpdate struct { *GalleryApplicationVersionProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate. @@ -5191,15 +5206,6 @@ func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error { } gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - gavu.Tags = tags - } case "id": if v != nil { var ID string @@ -5227,6 +5233,15 @@ func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error { } gavu.Type = &typeVar } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gavu.Tags = tags + } } } @@ -5245,7 +5260,7 @@ type GalleryArtifactPublishingProfileBase struct { PublishedDate *date.Time `json:"publishedDate,omitempty"` // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } @@ -5652,14 +5667,14 @@ func (future *GalleryImagesUpdateFuture) Result(client GalleryImagesClient) (gi // GalleryImageUpdate specifies information about the gallery Image Definition that you want to update. type GalleryImageUpdate struct { *GalleryImageProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for GalleryImageUpdate. @@ -5692,15 +5707,6 @@ func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error { } giu.GalleryImageProperties = &galleryImageProperties } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - giu.Tags = tags - } case "id": if v != nil { var ID string @@ -5728,6 +5734,15 @@ func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error { } giu.Type = &typeVar } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + giu.Tags = tags + } } } @@ -6003,7 +6018,7 @@ type GalleryImageVersionPublishingProfile struct { PublishedDate *date.Time `json:"publishedDate,omitempty"` // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } @@ -6099,14 +6114,14 @@ func (future *GalleryImageVersionsUpdateFuture) Result(client GalleryImageVersio // GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update. type GalleryImageVersionUpdate struct { *GalleryImageVersionProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for GalleryImageVersionUpdate. @@ -6139,15 +6154,6 @@ func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error { } givu.GalleryImageVersionProperties = &galleryImageVersionProperties } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - givu.Tags = tags - } case "id": if v != nil { var ID string @@ -6175,6 +6181,15 @@ func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error { } givu.Type = &typeVar } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + givu.Tags = tags + } } } @@ -6348,14 +6363,14 @@ type GalleryProperties struct { // GalleryUpdate specifies information about the Shared Image Gallery that you want to update. type GalleryUpdate struct { *GalleryProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } // MarshalJSON is the custom marshaler for GalleryUpdate. @@ -6388,15 +6403,6 @@ func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error { } gu.GalleryProperties = &galleryProperties } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - gu.Tags = tags - } case "id": if v != nil { var ID string @@ -6424,6 +6430,15 @@ func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error { } gu.Type = &typeVar } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gu.Tags = tags + } } } @@ -6786,7 +6801,7 @@ type ImagePurchasePlan struct { // 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. NOTE: Image reference publisher and offer can only be set when you create the scale set +// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. type ImageReference struct { // Publisher - The image publisher. Publisher *string `json:"publisher,omitempty"` @@ -6896,12 +6911,6 @@ type ImageUpdate struct { *ImageProperties `json:"properties,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for ImageUpdate. @@ -6943,33 +6952,6 @@ func (iu *ImageUpdate) UnmarshalJSON(body []byte) error { } iu.Tags = tags } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - iu.Type = &typeVar - } } } @@ -7467,6 +7449,22 @@ type OperationValueDisplay struct { Provider *string `json:"provider,omitempty"` } +// OrchestrationServiceStateInput the input for OrchestrationServiceState +type OrchestrationServiceStateInput struct { + // ServiceName - The name of the service. Possible values include: 'AutomaticRepairs' + ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` + // Action - The action to be performed. Possible values include: 'Resume', 'Suspend' + Action OrchestrationServiceStateAction `json:"action,omitempty"` +} + +// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set. +type OrchestrationServiceSummary struct { + // ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName' + ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` + // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended' + ServiceState OrchestrationServiceState `json:"serviceState,omitempty"` +} + // OSDisk specifies information about the operating system disk used by the virtual machine.

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). @@ -7481,7 +7479,7 @@ type OSDisk struct { Vhd *VirtualHardDisk `json:"vhd,omitempty"` // 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. Image *VirtualHardDisk `json:"image,omitempty"` - // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None** for Standard storage. **ReadOnly** for Premium storage. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' Caching CachingTypes `json:"caching,omitempty"` // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` @@ -7501,6 +7499,12 @@ type OSDiskImage struct { OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"` } +// OSDiskImageEncryption contains encryption settings for an OS disk image. +type OSDiskImageEncryption struct { + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + // OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot // be changed once VM is provisioned. type OSProfile struct { @@ -7510,7 +7514,7 @@ type OSProfile struct { AdminUsername *string `json:"adminUsername,omitempty"` // AdminPassword - Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

**Max-length (Windows):** 123 characters

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

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)

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) AdminPassword *string `json:"adminPassword,omitempty"` - // 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.

**Note: Do not pass any secrets or passwords in customData property**

This property cannot be updated after the VM is created.

customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://docs.microsoft.com/azure/virtual-machines/custom-data)

For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + // 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.

**Note: Do not pass any secrets or passwords in customData property**

This property cannot be updated after the VM is created.

customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) CustomData *string `json:"customData,omitempty"` // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` @@ -7806,12 +7810,6 @@ type ProximityPlacementGroupProperties struct { type ProximityPlacementGroupUpdate struct { // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate. @@ -8552,6 +8550,12 @@ type ScheduledEventsProfile struct { TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"` } +// ShareInfoElement ... +type ShareInfoElement struct { + // VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. + VMURI *string `json:"vmUri,omitempty"` +} + // Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware // the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU // name. @@ -9100,6 +9104,324 @@ type SSHPublicKey struct { KeyData *string `json:"keyData,omitempty"` } +// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair. +type SSHPublicKeyGenerateKeyPairResult struct { + autorest.Response `json:"-"` + // PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret. + PrivateKey *string `json:"privateKey,omitempty"` + // PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format. + PublicKey *string `json:"publicKey,omitempty"` + // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} + ID *string `json:"id,omitempty"` +} + +// SSHPublicKeyResource specifies information about the SSH public key. +type SSHPublicKeyResource struct { + autorest.Response `json:"-"` + // SSHPublicKeyResourceProperties - Properties of the SSH public key. + *SSHPublicKeyResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SSHPublicKeyResource. +func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spkr.SSHPublicKeyResourceProperties != nil { + objectMap["properties"] = spkr.SSHPublicKeyResourceProperties + } + if spkr.Location != nil { + objectMap["location"] = spkr.Location + } + if spkr.Tags != nil { + objectMap["tags"] = spkr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct. +func (spkr *SSHPublicKeyResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties + err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties) + if err != nil { + return err + } + spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spkr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spkr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spkr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + spkr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spkr.Tags = tags + } + } + } + + return nil +} + +// SSHPublicKeyResourceProperties properties of the SSH public key. +type SSHPublicKeyResourceProperties struct { + // PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. + PublicKey *string `json:"publicKey,omitempty"` +} + +// SSHPublicKeysGroupListResult the list SSH public keys operation response. +type SSHPublicKeysGroupListResult struct { + autorest.Response `json:"-"` + // Value - The list of SSH public keys + Value *[]SSHPublicKeyResource `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys. + NextLink *string `json:"nextLink,omitempty"` +} + +// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource +// values. +type SSHPublicKeysGroupListResultIterator struct { + i int + page SSHPublicKeysGroupListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SSHPublicKeysGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SSHPublicKeysGroupListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource { + if !iter.page.NotDone() { + return SSHPublicKeyResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SSHPublicKeysGroupListResultIterator type. +func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator { + return SSHPublicKeysGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool { + return spkglr.Value == nil || len(*spkglr.Value) == 0 +} + +// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if spkglr.NextLink == nil || len(to.String(spkglr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spkglr.NextLink))) +} + +// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values. +type SSHPublicKeysGroupListResultPage struct { + fn func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error) + spkglr SSHPublicKeysGroupListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.spkglr) + if err != nil { + return err + } + page.spkglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SSHPublicKeysGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SSHPublicKeysGroupListResultPage) NotDone() bool { + return !page.spkglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult { + return page.spkglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource { + if page.spkglr.IsEmpty() { + return nil + } + return *page.spkglr.Value +} + +// Creates a new instance of the SSHPublicKeysGroupListResultPage type. +func NewSSHPublicKeysGroupListResultPage(getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage { + return SSHPublicKeysGroupListResultPage{fn: getNextPage} +} + +// SSHPublicKeyUpdateResource specifies information about the SSH public key. +type SSHPublicKeyUpdateResource struct { + // SSHPublicKeyResourceProperties - Properties of the SSH public key. + *SSHPublicKeyResourceProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource. +func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spkur.SSHPublicKeyResourceProperties != nil { + objectMap["properties"] = spkur.SSHPublicKeyResourceProperties + } + if spkur.Tags != nil { + objectMap["tags"] = spkur.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct. +func (spkur *SSHPublicKeyUpdateResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties + err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties) + if err != nil { + return err + } + spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spkur.Tags = tags + } + } + } + + return nil +} + // StorageProfile specifies the storage settings for the virtual machine disks. type StorageProfile struct { // 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. @@ -9136,8 +9458,9 @@ type TargetRegion struct { Name *string `json:"name,omitempty"` // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable. RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + Encryption *EncryptionImages `json:"encryption,omitempty"` } // TerminateNotificationProfile ... @@ -9168,19 +9491,34 @@ type ThrottledRequestsInput struct { type UpdateResource struct { // Tags - Resource tags Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for UpdateResource. +func (ur UpdateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ur.Tags != nil { + objectMap["tags"] = ur.Tags + } + return json.Marshal(objectMap) +} + +// UpdateResourceDefinition the Update Resource model definition. +type UpdateResourceDefinition struct { // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for UpdateResource. -func (ur UpdateResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for UpdateResourceDefinition. +func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ur.Tags != nil { - objectMap["tags"] = ur.Tags + if urd.Tags != nil { + objectMap["tags"] = urd.Tags } return json.Marshal(objectMap) } @@ -9824,12 +10162,6 @@ type VirtualMachineExtensionUpdate struct { *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate. @@ -9871,33 +10203,6 @@ func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error { } vmeu.Tags = tags } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmeu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vmeu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vmeu.Type = &typeVar - } } } @@ -10327,7 +10632,7 @@ type VirtualMachineScaleSet struct { *VirtualMachineScaleSetProperties `json:"properties,omitempty"` // Identity - The identity of the virtual machine scale set, if configured. Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` - // Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set. + // Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set Zones *[]string `json:"zones,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` @@ -10939,6 +11244,8 @@ type VirtualMachineScaleSetInstanceView struct { Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"` // Statuses - The resource status information. Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + // OrchestrationServices - READ-ONLY; The orchestration services information. + OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"` } // VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of @@ -11799,7 +12106,7 @@ type VirtualMachineScaleSetProperties struct { DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` // UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set. UniqueID *string `json:"uniqueId,omitempty"` - // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. + // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. ZoneBalance *bool `json:"zoneBalance,omitempty"` @@ -12223,6 +12530,29 @@ func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachine return } +// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture") + return + } + ar.Response = future.Response() + return +} + // VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualMachineScaleSetsStartFuture struct { @@ -12319,12 +12649,6 @@ type VirtualMachineScaleSetUpdate struct { Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate. @@ -12402,33 +12726,6 @@ func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error { } vmssu.Tags = tags } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmssu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vmssu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vmssu.Type = &typeVar - } } } @@ -12436,7 +12733,8 @@ func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error { } // VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP -// configuration. +// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the +// new subnet are in the same virtual network type VirtualMachineScaleSetUpdateIPConfiguration struct { // Name - The IP configuration name. Name *string `json:"name,omitempty"` @@ -12503,8 +12801,7 @@ func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body [ } // VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network -// profile's IP configuration properties. NOTE: The subnet of a scale set may be modified as long as the -// original subnet and the new subnet are in the same virtual network. +// profile's IP configuration properties. type VirtualMachineScaleSetUpdateIPConfigurationProperties struct { // Subnet - The subnet. Subnet *APIEntityReference `json:"subnet,omitempty"` @@ -12658,7 +12955,7 @@ type VirtualMachineScaleSetUpdateProperties struct { Overprovision *bool `json:"overprovision,omitempty"` // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` - // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines.NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. + // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` @@ -13930,12 +14227,6 @@ type VirtualMachineUpdate struct { Zones *[]string `json:"zones,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineUpdate. @@ -14013,33 +14304,6 @@ func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error { } vmu.Tags = tags } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vmu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vmu.Type = &typeVar - } } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go index 5f835c9c6b11..891fba0f646c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go @@ -76,7 +76,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go index ee21ab969ac7..3abf4a32b0c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go @@ -87,7 +87,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -242,7 +242,7 @@ func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -429,7 +429,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -543,7 +543,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go index 046a45bfb1bb..e3f4980da291 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go @@ -65,6 +65,8 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, }}, {Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, @@ -95,7 +97,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,7 +177,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +259,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,7 +337,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -415,7 +417,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -527,7 +529,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -635,7 +637,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -712,7 +714,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go new file mode 100644 index 000000000000..d12c7d867660 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go @@ -0,0 +1,652 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SSHPublicKeysClient is the compute Client +type SSHPublicKeysClient struct { + BaseClient +} + +// NewSSHPublicKeysClient creates an instance of the SSHPublicKeysClient client. +func NewSSHPublicKeysClient(subscriptionID string) SSHPublicKeysClient { + return NewSSHPublicKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSSHPublicKeysClientWithBaseURI creates an instance of the SSHPublicKeysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSSHPublicKeysClientWithBaseURI(baseURI string, subscriptionID string) SSHPublicKeysClient { + return SSHPublicKeysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a new SSH public key resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +// parameters - parameters supplied to create the SSH public key. +func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client SSHPublicKeysClient) CreatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) CreateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete an SSH public key. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SSHPublicKeysClient) DeletePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GenerateKeyPair generates and returns a public/private key pair and populates the SSH public key resource with the +// public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key +// resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyGenerateKeyPairResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.GenerateKeyPair") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GenerateKeyPairPreparer(ctx, resourceGroupName, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", nil, "Failure preparing request") + return + } + + resp, err := client.GenerateKeyPairSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure sending request") + return + } + + result, err = client.GenerateKeyPairResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request") + } + + return +} + +// GenerateKeyPairPreparer prepares the GenerateKeyPair request. +func (client SSHPublicKeysClient) GenerateKeyPairPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GenerateKeyPairSender sends the GenerateKeyPair request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) GenerateKeyPairSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GenerateKeyPairResponder handles the response to the GenerateKeyPair request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) GenerateKeyPairResponder(resp *http.Response) (result SSHPublicKeyGenerateKeyPairResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get retrieves information about an SSH public key. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SSHPublicKeysClient) GetPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) GetResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all of the SSH public keys in the specified resource group. Use the nextLink property in +// the response to get the next page of SSH public keys. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.spkglr.Response.Response != nil { + sc = result.spkglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.spkglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.spkglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SSHPublicKeysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) ListByResourceGroupResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client SSHPublicKeysClient) listByResourceGroupNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) { + req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client SSHPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// ListBySubscription lists all of the SSH public keys in the subscription. Use the nextLink property in the response +// to get the next page of SSH public keys. +func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (result SSHPublicKeysGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription") + defer func() { + sc := -1 + if result.spkglr.Response.Response != nil { + sc = result.spkglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.spkglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.spkglr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client SSHPublicKeysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) ListBySubscriptionResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client SSHPublicKeysClient) listBySubscriptionNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) { + req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client SSHPublicKeysClient) ListBySubscriptionComplete(ctx context.Context) (result SSHPublicKeysGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBySubscription(ctx) + return +} + +// Update updates a new SSH public key resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +// parameters - parameters supplied to update the SSH public key. +func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SSHPublicKeysClient) UpdatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) UpdateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go index 896a2f230c9d..7ec1c40267e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go @@ -92,7 +92,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go index cbadbc9459f4..69ef1e6763e4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " compute/2019-07-01" + return "Azure-SDK-For-Go/" + Version() + " compute/2019-12-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go index 43785bcc9185..62d2dfefdf26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go @@ -87,7 +87,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex "version": autorest.Encode("path", version), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -239,7 +239,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte "type": autorest.Encode("path", typeParameter), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go index e5e7a178b6aa..545d45a63bf8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go @@ -83,7 +83,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context. "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -163,7 +163,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +247,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -327,7 +327,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -403,7 +403,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go index ac4ffaea25f0..431ac3ae3c28 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go @@ -92,7 +92,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati "version": autorest.Encode("path", version), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -258,7 +258,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,7 +332,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -410,7 +410,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go index 97b91a18818b..9a670358b39b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go @@ -93,7 +93,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -174,7 +174,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go index e3f4955e9c85..b73c77f84777 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go @@ -90,7 +90,7 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -169,7 +169,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,7 +267,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -347,7 +347,7 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -422,7 +422,7 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -507,7 +507,7 @@ func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, reso "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -583,7 +583,7 @@ func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGro "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -662,7 +662,7 @@ func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, re "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -738,7 +738,7 @@ func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -850,7 +850,7 @@ func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusO "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -966,7 +966,7 @@ func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Conte "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1047,7 +1047,7 @@ func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1154,7 +1154,7 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1233,7 +1233,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1313,7 +1313,7 @@ func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1388,7 +1388,7 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1464,7 +1464,7 @@ func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1544,7 +1544,7 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1626,7 +1626,7 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1666,6 +1666,82 @@ func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (re return } +// SimulateEviction the operation to simulate the eviction of spot virtual machine. The eviction will occur within 30 +// minutes of calling the API +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.SimulateEviction") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", nil, "Failure preparing request") + return + } + + resp, err := client.SimulateEvictionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure sending request") + return + } + + result, err = client.SimulateEvictionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure responding to request") + } + + return +} + +// SimulateEvictionPreparer prepares the SimulateEviction request. +func (client VirtualMachinesClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SimulateEvictionSender sends the SimulateEviction request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + // Start the operation to start a virtual machine. // Parameters: // resourceGroupName - the name of the resource group. @@ -1704,7 +1780,7 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1780,7 +1856,7 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go index 2fa341f0ab11..97605bcbf059 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go @@ -83,7 +83,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context. "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +248,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -328,7 +328,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -438,7 +438,7 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context. "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go index 4d6c96a9a7f5..e5653cbc2628 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go @@ -81,7 +81,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -234,7 +234,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -310,7 +310,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go index c1260b56a5aa..0de99343073e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go @@ -178,7 +178,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -258,7 +258,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -338,7 +338,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -420,7 +420,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -505,7 +505,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "platformUpdateDomain": autorest.Encode("query", platformUpdateDomain), @@ -582,7 +582,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, res "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -658,7 +658,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -735,7 +735,7 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx cont "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -847,7 +847,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -958,7 +958,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1073,7 +1073,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1183,7 +1183,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1268,7 +1268,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1355,7 +1355,7 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1437,7 +1437,7 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1519,7 +1519,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1600,7 +1600,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1642,6 +1642,84 @@ func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response return } +// SetOrchestrationServiceState changes ServiceState property for a given service +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the virtual machine scale set to create or update. +// parameters - the input object for SetOrchestrationServiceState API. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (result VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.SetOrchestrationServiceState") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SetOrchestrationServiceStatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure preparing request") + return + } + + result, err = client.SetOrchestrationServiceStateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", result.Response(), "Failure sending request") + return + } + + return +} + +// SetOrchestrationServiceStatePreparer prepares the SetOrchestrationServiceState request. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetOrchestrationServiceStateSender sends the SetOrchestrationServiceState request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(req *http.Request) (future VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// SetOrchestrationServiceStateResponder handles the response to the SetOrchestrationServiceState request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // Start starts one or more virtual machines in a VM scale set. // Parameters: // resourceGroupName - the name of the resource group. @@ -1681,7 +1759,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1762,7 +1840,7 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1847,7 +1925,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go index 7ead82f40e1e..bf1427b10660 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go @@ -86,7 +86,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -168,7 +168,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -254,7 +254,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -336,7 +336,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -414,7 +414,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go index ab94b738f180..7e611cfb12b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go @@ -85,7 +85,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -246,7 +246,7 @@ func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, r "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -327,7 +327,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -407,7 +407,7 @@ func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context, "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -525,7 +525,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -606,7 +606,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -689,7 +689,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -767,7 +767,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -850,7 +850,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -927,7 +927,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1011,7 +1011,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1051,6 +1051,84 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Res return } +// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set. The eviction will +// occur within 30 minutes of calling the API +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.SimulateEviction") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", nil, "Failure preparing request") + return + } + + resp, err := client.SimulateEvictionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure sending request") + return + } + + result, err = client.SimulateEvictionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure responding to request") + } + + return +} + +// SimulateEvictionPreparer prepares the SimulateEviction request. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SimulateEvictionSender sends the SimulateEviction request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + // Start starts a virtual machine in a VM scale set. // Parameters: // resourceGroupName - the name of the resource group. @@ -1091,7 +1169,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1190,7 +1268,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go index c4fffc18cbe9..0eb7702a3b48 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go @@ -92,7 +92,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/modules.txt b/vendor/modules.txt index af7dbaadc686..fd358b886da5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -16,7 +16,7 @@ github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2019-08-01/batch github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2019-04-15/cdn github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices -github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute +github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2018-09-01/containerregistry github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-02-01/containerservice From e23aff4608a4fb0c6269349e82e17168ee975607 Mon Sep 17 00:00:00 2001 From: arcturusZhang Date: Wed, 3 Jun 2020 17:53:15 +0800 Subject: [PATCH 2/9] Update code and acc tests --- ...ated_virtual_machine_scale_set_resource.go | 21 ++++- ...tual_machine_resource_orchestrated_test.go | 30 +++---- ...virtual_machine_scale_set_resource_test.go | 79 +++++++++++++------ ...tual_machine_resource_orchestrated_test.go | 26 ++---- ...ed_virtual_machine_scale_set.html.markdown | 9 +-- 5 files changed, 94 insertions(+), 71 deletions(-) diff --git a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go index ec4475c3d1c7..9b2a4a9219e6 100644 --- a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go @@ -60,8 +60,9 @@ func resourceArmOrchestratedVirtualMachineScaleSet() *schema.Resource { "single_placement_group": { Type: schema.TypeBool, - Required: true, - ForceNew: true, + Optional: true, + Default: false, + ValidateFunc:validateBoolIsFalse, }, // the VMO mode can only be deployed into one zone for now, and its zone will also be assigned to all its VM instances @@ -103,7 +104,7 @@ func resourceArmOrchestratedVirtualMachineScaleSetCreateUpdate(d *schema.Resourc Tags: tags.Expand(d.Get("tags").(map[string]interface{})), VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{ PlatformFaultDomainCount: utils.Int32(int32(d.Get("platform_fault_domain_count").(int))), - SinglePlacementGroup: utils.Bool(d.Get("single_placement_group").(bool)), + SinglePlacementGroup: utils.Bool(d.Get("single_placement_group").(bool)), }, Zones: azure.ExpandZones(d.Get("zones").([]interface{})), } @@ -189,3 +190,17 @@ func resourceArmOrchestratedVirtualMachineScaleSetDelete(d *schema.ResourceData, return nil } + +func validateBoolIsFalse(i interface{}, k string) (warnings []string, errors []error) { + v, ok := i.(bool) + if !ok { + errors = append(errors, fmt.Errorf("expected type of %s to be boolean", k)) + return + } + + if v { + errors = append(errors, fmt.Errorf("%q can only be false", k)) + } + + return +} diff --git a/azurerm/internal/services/compute/tests/linux_virtual_machine_resource_orchestrated_test.go b/azurerm/internal/services/compute/tests/linux_virtual_machine_resource_orchestrated_test.go index 4f36914e5cfd..014923718ae1 100644 --- a/azurerm/internal/services/compute/tests/linux_virtual_machine_resource_orchestrated_test.go +++ b/azurerm/internal/services/compute/tests/linux_virtual_machine_resource_orchestrated_test.go @@ -81,10 +81,7 @@ func TestAccAzureRMLinuxVirtualMachine_orchestratedMultipleNonZonal(t *testing.T } func testAccAzureRMLinuxVirtualMachine_orchestratedZonal(data acceptance.TestData) string { - // in VMSS VMO mode, the `platform_fault_domain_count` has different acceptable values for different locations, - // therefore this location is fixed to EastUS2 to make sure the acceptance test has no issues about this value - location := "EastUS2" - template := testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data, location) + template := testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data) return fmt.Sprintf(` %s @@ -105,8 +102,7 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name - platform_fault_domain_count = 5 - single_placement_group = true + platform_fault_domain_count = 1 zones = ["1"] @@ -146,7 +142,7 @@ resource "azurerm_linux_virtual_machine" "test" { } func testAccAzureRMLinuxVirtualMachine_orchestratedNonZonal(data acceptance.TestData) string { - template := testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data, data.Locations.Primary) + template := testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data) return fmt.Sprintf(` %s @@ -168,7 +164,6 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { resource_group_name = azurerm_resource_group.test.name platform_fault_domain_count = 2 - single_placement_group = true tags = { ENV = "Test" @@ -205,10 +200,7 @@ resource "azurerm_linux_virtual_machine" "test" { } func testAccAzureRMLinuxVirtualMachine_orchestratedMultipleZonal(data acceptance.TestData) string { - // in VMSS VMO mode, the `platform_fault_domain_count` has different acceptable values for different locations, - // therefore this location is fixed to EastUS2 to make sure the acceptance test has no issues about this value - location := "EastUS2" - template := testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data, location) + template := testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data) return fmt.Sprintf(` %s @@ -217,8 +209,7 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name - platform_fault_domain_count = 5 - single_placement_group = true + platform_fault_domain_count = 1 zones = ["1"] @@ -310,7 +301,7 @@ resource "azurerm_linux_virtual_machine" "another" { } func testAccAzureRMLinuxVirtualMachine_orchestratedMultipleNonZonal(data acceptance.TestData) string { - template := testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data, data.Locations.Primary) + template := testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data) return fmt.Sprintf(` %s @@ -319,10 +310,7 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name - platform_fault_domain_count = 5 - single_placement_group = true - - zones = ["1"] + platform_fault_domain_count = 2 tags = { ENV = "Test" @@ -409,7 +397,7 @@ resource "azurerm_linux_virtual_machine" "another" { `, template, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger) } -func testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data acceptance.TestData, location string) string { +func testLinuxVirtualMachine_templateBaseForOchestratedVMSS(data acceptance.TestData) string { return fmt.Sprintf(` locals { vm_name = "acctestvm%s" @@ -433,5 +421,5 @@ resource "azurerm_subnet" "test" { virtual_network_name = azurerm_virtual_network.test.name address_prefix = "10.0.2.0/24" } -`, data.RandomString, data.RandomInteger, location, data.RandomInteger) +`, data.RandomString, data.RandomInteger, data.Locations.Primary, data.RandomInteger) } diff --git a/azurerm/internal/services/compute/tests/orchestrated_virtual_machine_scale_set_resource_test.go b/azurerm/internal/services/compute/tests/orchestrated_virtual_machine_scale_set_resource_test.go index d22cf1df0da0..b8ad8c13f4a3 100644 --- a/azurerm/internal/services/compute/tests/orchestrated_virtual_machine_scale_set_resource_test.go +++ b/azurerm/internal/services/compute/tests/orchestrated_virtual_machine_scale_set_resource_test.go @@ -12,7 +12,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" ) -func TestAccAzureRMOrchestratedVirtualMachineScaleSet_basic(t *testing.T) { +func TestAccAzureRMOrchestratedVirtualMachineScaleSet_basicZonal(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") resource.ParallelTest(t, resource.TestCase{ @@ -31,7 +31,7 @@ func TestAccAzureRMOrchestratedVirtualMachineScaleSet_basic(t *testing.T) { }) } -func TestAccAzureRMOrchestratedVirtualMachineScaleSet_requiresImport(t *testing.T) { +func TestAccAzureRMOrchestratedVirtualMachineScaleSet_updateZonal(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") resource.ParallelTest(t, resource.TestCase{ @@ -45,40 +45,59 @@ func TestAccAzureRMOrchestratedVirtualMachineScaleSet_requiresImport(t *testing. testCheckAzureRMOrchestratedVirtualMachineScaleSetExists(data.ResourceName), ), }, - data.RequiresImportErrorStep(testAccAzureRMOrchestratedVirtualMachineScaleSet_requiresImport), + data.ImportStep(), + { + Config: testAccAzureRMOrchestratedVirtualMachineScaleSet_update(data), + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMOrchestratedVirtualMachineScaleSetExists(data.ResourceName), + ), + }, + data.ImportStep(), + { + Config: testAccAzureRMOrchestratedVirtualMachineScaleSet_basic(data), + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMOrchestratedVirtualMachineScaleSetExists(data.ResourceName), + ), + }, + data.ImportStep(), }, }) } -func TestAccAzureRMOrchestratedVirtualMachineScaleSet_basicLinuxUpdate(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") +func TestAccAzureRMOrchestratedVirtualMachineScaleSet_basicNonZonal(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") - resource.ParallelTest(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acceptance.PreCheck(t) }, Providers: acceptance.SupportedProviders, CheckDestroy: testCheckAzureRMOrchestratedVirtualMachineScaleSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAzureRMOrchestratedVirtualMachineScaleSet_basic(data), - Check: resource.ComposeTestCheckFunc( - testCheckAzureRMOrchestratedVirtualMachineScaleSetExists(data.ResourceName), - ), - }, - data.ImportStep(), - { - Config: testAccAzureRMOrchestratedVirtualMachineScaleSet_update(data), + Config: testAccAzureRMOrchestratedVirtualMachineScaleSet_basicNonZonal(data), Check: resource.ComposeTestCheckFunc( testCheckAzureRMOrchestratedVirtualMachineScaleSetExists(data.ResourceName), ), }, data.ImportStep(), + }, + }) +} + +func TestAccAzureRMOrchestratedVirtualMachineScaleSet_requiresImport(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.SupportedProviders, + CheckDestroy: testCheckAzureRMOrchestratedVirtualMachineScaleSetDestroy, + Steps: []resource.TestStep{ { Config: testAccAzureRMOrchestratedVirtualMachineScaleSet_basic(data), Check: resource.ComposeTestCheckFunc( testCheckAzureRMOrchestratedVirtualMachineScaleSetExists(data.ResourceName), ), }, - data.ImportStep(), + data.RequiresImportErrorStep(testAccAzureRMOrchestratedVirtualMachineScaleSet_requiresImport), }, }) } @@ -149,8 +168,7 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name - platform_fault_domain_count = 5 - single_placement_group = true + platform_fault_domain_count = 1 zones = ["1"] @@ -171,8 +189,7 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name - platform_fault_domain_count = 5 - single_placement_group = true + platform_fault_domain_count = 1 zones = ["1"] @@ -200,10 +217,26 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "import" { `, template) } +func testAccAzureRMOrchestratedVirtualMachineScaleSet_basicNonZonal(data acceptance.TestData) string { + template := testAccAzureRMOrchestratedVirtualMachineScaleSet_template(data) + return fmt.Sprintf(` +%s + +resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { + name = "acctestVMO-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + + platform_fault_domain_count = 2 + + tags = { + ENV = "Test" + } +} +`, template, data.RandomInteger) +} + func testAccAzureRMOrchestratedVirtualMachineScaleSet_template(data acceptance.TestData) string { - // in VMSS VMO mode, the `platform_fault_domain_count` has different acceptable values for different locations, - // therefore this location is fixed to EastUS2 to make sure the acceptance test has no issues about this value - location := "EastUS2" return fmt.Sprintf(` provider "azurerm" { features {} @@ -213,5 +246,5 @@ resource "azurerm_resource_group" "test" { name = "acctestRG-VMSS-%d" location = "%s" } -`, data.RandomInteger, location) +`, data.RandomInteger, data.Locations.Primary) } diff --git a/azurerm/internal/services/compute/tests/windows_virtual_machine_resource_orchestrated_test.go b/azurerm/internal/services/compute/tests/windows_virtual_machine_resource_orchestrated_test.go index 2698e8b7cdc9..2b0f646e5d15 100644 --- a/azurerm/internal/services/compute/tests/windows_virtual_machine_resource_orchestrated_test.go +++ b/azurerm/internal/services/compute/tests/windows_virtual_machine_resource_orchestrated_test.go @@ -85,10 +85,7 @@ func TestAccAzureRMWindowsVirtualMachine_orchestratedMultipleNoneZonal(t *testin } func testAccAzureRMWindowsVirtualMachine_orchestratedZonal(data acceptance.TestData) string { - // in VMSS VMO mode, the `platform_fault_domain_count` has different acceptable values for different locations, - // therefore this location is fixed to EastUS2 to make sure the acceptance test has no issues about this value - location := "EastUS2" - template := testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data, location) + template := testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data) return fmt.Sprintf(` %s @@ -109,8 +106,7 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name - platform_fault_domain_count = 5 - single_placement_group = true + platform_fault_domain_count = 1 zones = ["1"] @@ -149,7 +145,7 @@ resource "azurerm_windows_virtual_machine" "test" { } func testAccAzureRMWindowsVirtualMachine_orchestratedNonZonal(data acceptance.TestData) string { - template := testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data, data.Locations.Primary) + template := testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data) return fmt.Sprintf(` %s @@ -171,7 +167,6 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { resource_group_name = azurerm_resource_group.test.name platform_fault_domain_count = 2 - single_placement_group = true tags = { ENV = "Test" @@ -207,10 +202,7 @@ resource "azurerm_windows_virtual_machine" "test" { } func testAccAzureRMWindowsVirtualMachine_orchestratedMultipleZonal(data acceptance.TestData) string { - // in VMSS VMO mode, the `platform_fault_domain_count` has different acceptable values for different locations, - // therefore this location is fixed to EastUS2 to make sure the acceptance test has no issues about this value - location := "EastUS2" - template := testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data, location) + template := testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data) return fmt.Sprintf(` %s @@ -219,8 +211,7 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name - platform_fault_domain_count = 5 - single_placement_group = true + platform_fault_domain_count = 1 zones = ["1"] @@ -310,7 +301,7 @@ resource "azurerm_windows_virtual_machine" "another" { } func testAccAzureRMWindowsVirtualMachine_orchestratedMultipleNonZonal(data acceptance.TestData) string { - template := testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data, data.Locations.Primary) + template := testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data) return fmt.Sprintf(` %s @@ -320,7 +311,6 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" { resource_group_name = azurerm_resource_group.test.name platform_fault_domain_count = 2 - single_placement_group = true tags = { ENV = "Test" @@ -405,7 +395,7 @@ resource "azurerm_windows_virtual_machine" "another" { `, template, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomIntOfLength(9), data.RandomIntOfLength(9)) } -func testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data acceptance.TestData, location string) string { +func testWindowsVirtualMachine_templateBaseForOchestratedVMSS(data acceptance.TestData) string { return fmt.Sprintf(` locals { vm_name = "acctestvm%s" @@ -429,5 +419,5 @@ resource "azurerm_subnet" "test" { virtual_network_name = azurerm_virtual_network.test.name address_prefix = "10.0.2.0/24" } -`, data.RandomString, data.RandomInteger, location, data.RandomInteger) +`, data.RandomString, data.RandomInteger, data.Locations.Primary, data.RandomInteger) } diff --git a/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown b/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown index aab15eae06a0..0ca42d4a4d37 100644 --- a/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown +++ b/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown @@ -25,8 +25,7 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "example" { location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name - platform_fault_domain_count = 5 - single_placement_group = true + platform_fault_domain_count = 1 zones = ["1"] } @@ -46,11 +45,9 @@ The following arguments are supported: ~> **NOTE:** The number of Fault Domains varies depending on which Azure Region you're using - a list can be found [here](https://github.com/MicrosoftDocs/azure-docs/blob/master/includes/managed-disks-common-fault-domain-region-list.md). -* `single_placement_group` - (Required) Should the Orchestrated Virtual Machine Scale Set use single placement group? Changing this forces a new resource to be created. +* `single_placement_group` - (Optional) Should the Orchestrated Virtual Machine Scale Set use single placement group? -~> **NOTE:** Due to a limitation of the Azure API at this time, you can only assign `single_placement_group` to `true`. - -You cannot assign `single_placement_group` to `false` unless you have opted-in the private preview program of the orchestration mode of virtual machine scale sets. +~> **NOTE:** Due to a limitation of the Azure API at this time, you can only assign `single_placement_group` to `false`. * `zones` - (Optional) A list of Availability Zones in which the Virtual Machines in this Scale Set should be created in. Changing this forces a new resource to be created. From a510f470ef957ec6d0d1e1e33bf2b30c91d20ce0 Mon Sep 17 00:00:00 2001 From: arcturusZhang Date: Thu, 4 Jun 2020 13:15:08 +0800 Subject: [PATCH 3/9] gofmt --- .../orchestrated_virtual_machine_scale_set_resource.go | 10 +++++----- ...estrated_virtual_machine_scale_set_resource_test.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go index 9b2a4a9219e6..3126e30ed087 100644 --- a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go @@ -59,10 +59,10 @@ func resourceArmOrchestratedVirtualMachineScaleSet() *schema.Resource { }, "single_placement_group": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ValidateFunc:validateBoolIsFalse, + Type: schema.TypeBool, + Optional: true, + Default: false, + ValidateFunc: validateBoolIsFalse, }, // the VMO mode can only be deployed into one zone for now, and its zone will also be assigned to all its VM instances @@ -104,7 +104,7 @@ func resourceArmOrchestratedVirtualMachineScaleSetCreateUpdate(d *schema.Resourc Tags: tags.Expand(d.Get("tags").(map[string]interface{})), VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{ PlatformFaultDomainCount: utils.Int32(int32(d.Get("platform_fault_domain_count").(int))), - SinglePlacementGroup: utils.Bool(d.Get("single_placement_group").(bool)), + SinglePlacementGroup: utils.Bool(d.Get("single_placement_group").(bool)), }, Zones: azure.ExpandZones(d.Get("zones").([]interface{})), } diff --git a/azurerm/internal/services/compute/tests/orchestrated_virtual_machine_scale_set_resource_test.go b/azurerm/internal/services/compute/tests/orchestrated_virtual_machine_scale_set_resource_test.go index b8ad8c13f4a3..968170a81850 100644 --- a/azurerm/internal/services/compute/tests/orchestrated_virtual_machine_scale_set_resource_test.go +++ b/azurerm/internal/services/compute/tests/orchestrated_virtual_machine_scale_set_resource_test.go @@ -65,9 +65,9 @@ func TestAccAzureRMOrchestratedVirtualMachineScaleSet_updateZonal(t *testing.T) } func TestAccAzureRMOrchestratedVirtualMachineScaleSet_basicNonZonal(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") + data := acceptance.BuildTestData(t, "azurerm_orchestrated_virtual_machine_scale_set", "test") - resource.ParallelTest(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { acceptance.PreCheck(t) }, Providers: acceptance.SupportedProviders, CheckDestroy: testCheckAzureRMOrchestratedVirtualMachineScaleSetDestroy, From 43806340b4cd3279dbe1d301071b466d568eda8f Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2020 13:26:55 +0800 Subject: [PATCH 4/9] Add deprecation message --- .../compute/orchestrated_virtual_machine_scale_set_resource.go | 1 + 1 file changed, 1 insertion(+) diff --git a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go index 3126e30ed087..9e17aa54f759 100644 --- a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go @@ -62,6 +62,7 @@ func resourceArmOrchestratedVirtualMachineScaleSet() *schema.Resource { Type: schema.TypeBool, Optional: true, Default: false, + Deprecated: "this property has been deprecated starting from api-version 2019-12-01 and will be removed in version 3.0 of the provider", ValidateFunc: validateBoolIsFalse, }, From c7fbbe660a0b71af788ba2fd514cfbd66f4ddfce Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2020 13:27:58 +0800 Subject: [PATCH 5/9] Modified doc --- .../docs/r/orchestrated_virtual_machine_scale_set.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown b/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown index 0ca42d4a4d37..254b30a4a44c 100644 --- a/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown +++ b/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown @@ -45,7 +45,7 @@ The following arguments are supported: ~> **NOTE:** The number of Fault Domains varies depending on which Azure Region you're using - a list can be found [here](https://github.com/MicrosoftDocs/azure-docs/blob/master/includes/managed-disks-common-fault-domain-region-list.md). -* `single_placement_group` - (Optional) Should the Orchestrated Virtual Machine Scale Set use single placement group? +* `single_placement_group` - (Optional / **Deprecated**) Should the Orchestrated Virtual Machine Scale Set use single placement group? ~> **NOTE:** Due to a limitation of the Azure API at this time, you can only assign `single_placement_group` to `false`. From 3f3515e251f7de72ad3098ff946c044e4f20f209 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2020 13:35:40 +0800 Subject: [PATCH 6/9] add ForceNew --- .../compute/orchestrated_virtual_machine_scale_set_resource.go | 1 + 1 file changed, 1 insertion(+) diff --git a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go index 9e17aa54f759..500779ac8b59 100644 --- a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go @@ -61,6 +61,7 @@ func resourceArmOrchestratedVirtualMachineScaleSet() *schema.Resource { "single_placement_group": { Type: schema.TypeBool, Optional: true, + ForceNew: true, Default: false, Deprecated: "this property has been deprecated starting from api-version 2019-12-01 and will be removed in version 3.0 of the provider", ValidateFunc: validateBoolIsFalse, From 125a4f799a794b76023b1e88d19ded87a66e85a9 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2020 13:41:46 +0800 Subject: [PATCH 7/9] Fix merge issues --- .../compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go index f8c4dd789af7..c95a97566950 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go @@ -89,7 +89,7 @@ func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupPrepare "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } From 146e6ca7f8866548721811d58a6d169b8622cb03 Mon Sep 17 00:00:00 2001 From: arcturusZhang Date: Wed, 17 Jun 2020 15:07:55 +0800 Subject: [PATCH 8/9] Update doc about the breaking change --- .../docs/r/orchestrated_virtual_machine_scale_set.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown b/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown index 254b30a4a44c..1e8c2d30de38 100644 --- a/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown +++ b/website/docs/r/orchestrated_virtual_machine_scale_set.html.markdown @@ -12,6 +12,8 @@ Manages an Orchestrated Virtual Machine Scale Set. -> **Note:** Orchestrated Virtual Machine Scale Sets are in Public Preview - [more details can be found in the Azure Documentation](https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/orchestration-modes). +-> **Note:** Azure has deprecated the `single_placement_group` attribute in the Orchestrated Virtual Machine Scale Set since api-version 2019-12-01 and there is a breaking change in the Orchestrated Virtual Machine Scale Set. If you have an Orchestrated Virtual Machine Scale Set created using `azurerm` provider version `<=2.13.0` you will have to remove the `single_placement_group` attribute in your config and recreate the resource to have it managed by terraform. + ## Example Usage ```hcl From 6059aa6e22686c03248787eeb29fb843e74b1f50 Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 18 Jun 2020 10:40:49 -0700 Subject: [PATCH 9/9] Update orchestrated_virtual_machine_scale_set_resource.go --- .../compute/orchestrated_virtual_machine_scale_set_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go index 500779ac8b59..5eaba49efe83 100644 --- a/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go +++ b/azurerm/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go @@ -63,7 +63,7 @@ func resourceArmOrchestratedVirtualMachineScaleSet() *schema.Resource { Optional: true, ForceNew: true, Default: false, - Deprecated: "this property has been deprecated starting from api-version 2019-12-01 and will be removed in version 3.0 of the provider", + Deprecated: "Due to an upgrade of the compute API this preview property has now been deprecated and required to be false in the 2019-12-01 api versions for orchestrated VMSS - as it will always be false for the current and future API versions this property now defaults to false and will removed in version 3.0 of the provider.", ValidateFunc: validateBoolIsFalse, },