From 14da14cc171aae842178ed9d2ae66f2f72761fb5 Mon Sep 17 00:00:00 2001 From: Rhys Ash Date: Sun, 24 Mar 2024 10:47:53 +0000 Subject: [PATCH 1/2] Upgrade Maintenance SDK from 2022-07-01-preview to 2023-04-01 --- .../services/maintenance/client/client.go | 6 +- ...ance_assignment_dedicated_host_resource.go | 4 +- ...assignment_dedicated_host_resource_test.go | 2 +- ...nce_assignment_virtual_machine_resource.go | 4 +- ...ssignment_virtual_machine_resource_test.go | 2 +- ...ment_virtual_machine_scale_set_resource.go | 4 +- ...virtual_machine_scale_set_resource_test.go | 2 +- .../maintenance_configuration_data_source.go | 2 +- .../maintenance_configuration_resource.go | 2 +- ...maintenance_configuration_resource_test.go | 2 +- .../assignment_dedicated_host_v0_to_v1.go | 2 +- ...ment_virtual_machine_scale_set_v0_to_v1.go | 2 +- .../assignment_virtual_machine_v0_to_v1.go | 2 +- .../migration/configuration_v0_to_v1.go | 2 +- ..._maintenance_configurations_data_source.go | 2 +- ...model_configurationassignmentproperties.go | 9 - .../model_inputpatchconfiguration.go | 11 -- .../model_softwareupdateconfigurationtasks.go | 9 - .../model_taskproperties.go | 10 -- .../configurationassignments/README.md | 154 +++++++++++++++++- .../configurationassignments/client.go | 0 .../configurationassignments/constants.go | 51 ++++++ .../id_configurationassignment.go | 116 +++++++++++++ .../id_providerconfigurationassignment.go | 125 ++++++++++++++ .../id_scopedconfigurationassignment.go | 0 .../method_createorupdate.go | 1 + .../method_createorupdateparent.go | 1 + .../configurationassignments/method_delete.go | 0 .../method_deleteparent.go | 0 .../method_forresourcegroupcreateorupdate.go | 59 +++++++ .../method_forresourcegroupdelete.go | 55 +++++++ .../method_forresourcegroupget.go | 54 ++++++ .../method_forresourcegroupupdate.go | 58 +++++++ .../method_forsubscriptionscreateorupdate.go | 59 +++++++ .../method_forsubscriptionsdelete.go | 55 +++++++ .../method_forsubscriptionsget.go | 54 ++++++ .../method_forsubscriptionsupdate.go | 58 +++++++ .../configurationassignments/method_get.go | 0 .../method_getparent.go | 0 .../configurationassignments/method_list.go | 0 .../method_listparent.go | 0 .../method_withinsubscriptionlist.go | 0 .../model_configurationassignment.go | 0 ...configurationassignmentfilterproperties.go | 12 ++ ...model_configurationassignmentproperties.go | 10 ++ ...odel_listconfigurationassignmentsresult.go | 0 .../model_tagsettingsproperties.go | 9 + .../configurationassignments/version.go | 2 +- .../maintenanceconfigurations/README.md | 6 +- .../maintenanceconfigurations/client.go | 0 .../maintenanceconfigurations/constants.go | 41 ----- .../id_maintenanceconfiguration.go | 0 .../method_createorupdate.go | 1 + .../method_delete.go | 0 .../method_forresourcegrouplist.go | 0 .../maintenanceconfigurations/method_get.go | 0 .../maintenanceconfigurations/method_list.go | 0 .../method_update.go | 0 .../model_inputlinuxparameters.go | 0 .../model_inputpatchconfiguration.go | 10 ++ .../model_inputwindowsparameters.go | 0 ...del_listmaintenanceconfigurationsresult.go | 0 .../model_maintenanceconfiguration.go | 0 ...odel_maintenanceconfigurationproperties.go | 0 .../model_maintenancewindow.go | 0 .../maintenanceconfigurations/version.go | 2 +- .../publicmaintenanceconfigurations/README.md | 53 ++++++ .../publicmaintenanceconfigurations/client.go | 26 +++ .../constants.go | 151 +++++++++++++++++ .../id_publicmaintenanceconfiguration.go | 116 +++++++++++++ .../method_get.go | 54 ++++++ .../method_list.go | 56 +++++++ .../model_inputlinuxparameters.go | 10 ++ .../model_inputpatchconfiguration.go | 10 ++ .../model_inputwindowsparameters.go | 11 ++ ...del_listmaintenanceconfigurationsresult.go | 8 + .../model_maintenanceconfiguration.go | 18 ++ ...odel_maintenanceconfigurationproperties.go | 13 ++ .../model_maintenancewindow.go | 12 ++ .../version.go | 12 ++ vendor/modules.txt | 5 +- 81 files changed, 1517 insertions(+), 110 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/model_configurationassignmentproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_inputpatchconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_softwareupdateconfigurationtasks.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_taskproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/README.md (54%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/client.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_configurationassignment.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_providerconfigurationassignment.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/id_scopedconfigurationassignment.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_createorupdate.go (98%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_createorupdateparent.go (98%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_deleteparent.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupcreateorupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupdelete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupget.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionscreateorupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsdelete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsget.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsupdate.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_getparent.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_listparent.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/method_withinsubscriptionlist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/model_configurationassignment.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignmentfilterproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignmentproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/model_listconfigurationassignmentsresult.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_tagsettingsproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/configurationassignments/version.go (87%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/constants.go (81%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/id_maintenanceconfiguration.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/method_createorupdate.go (98%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/method_forresourcegrouplist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/model_inputlinuxparameters.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_inputpatchconfiguration.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/model_inputwindowsparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/model_listmaintenanceconfigurationsresult.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/model_maintenanceconfiguration.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/model_maintenanceconfigurationproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/model_maintenancewindow.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/{2022-07-01-preview => 2023-04-01}/maintenanceconfigurations/version.go (87%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputlinuxparameters.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputpatchconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputwindowsparameters.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_listmaintenanceconfigurationsresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenanceconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenanceconfigurationproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenancewindow.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/version.go diff --git a/internal/services/maintenance/client/client.go b/internal/services/maintenance/client/client.go index 9b6412f1f8c2..8ffab2465e8b 100644 --- a/internal/services/maintenance/client/client.go +++ b/internal/services/maintenance/client/client.go @@ -6,9 +6,9 @@ package client import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/maintenance/maintenance_assignment_dedicated_host_resource.go b/internal/services/maintenance/maintenance_assignment_dedicated_host_resource.go index 721d053c0d3c..85e64b9ba612 100644 --- a/internal/services/maintenance/maintenance_assignment_dedicated_host_resource.go +++ b/internal/services/maintenance/maintenance_assignment_dedicated_host_resource.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/maintenance/migration" diff --git a/internal/services/maintenance/maintenance_assignment_dedicated_host_resource_test.go b/internal/services/maintenance/maintenance_assignment_dedicated_host_resource_test.go index 1cd664f39334..96fa6bad21bd 100644 --- a/internal/services/maintenance/maintenance_assignment_dedicated_host_resource_test.go +++ b/internal/services/maintenance/maintenance_assignment_dedicated_host_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/maintenance/maintenance_assignment_virtual_machine_resource.go b/internal/services/maintenance/maintenance_assignment_virtual_machine_resource.go index c307db65c62a..2d95b57bb0b3 100644 --- a/internal/services/maintenance/maintenance_assignment_virtual_machine_resource.go +++ b/internal/services/maintenance/maintenance_assignment_virtual_machine_resource.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/maintenance/migration" diff --git a/internal/services/maintenance/maintenance_assignment_virtual_machine_resource_test.go b/internal/services/maintenance/maintenance_assignment_virtual_machine_resource_test.go index 2b1e6b7a421b..fcba6447b137 100644 --- a/internal/services/maintenance/maintenance_assignment_virtual_machine_resource_test.go +++ b/internal/services/maintenance/maintenance_assignment_virtual_machine_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/maintenance/maintenance_assignment_virtual_machine_scale_set_resource.go b/internal/services/maintenance/maintenance_assignment_virtual_machine_scale_set_resource.go index 930e28c06d06..63f409fe9953 100644 --- a/internal/services/maintenance/maintenance_assignment_virtual_machine_scale_set_resource.go +++ b/internal/services/maintenance/maintenance_assignment_virtual_machine_scale_set_resource.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/maintenance/migration" diff --git a/internal/services/maintenance/maintenance_assignment_virtual_machine_scale_set_resource_test.go b/internal/services/maintenance/maintenance_assignment_virtual_machine_scale_set_resource_test.go index 6a67762a61b0..8d3ef1be175f 100644 --- a/internal/services/maintenance/maintenance_assignment_virtual_machine_scale_set_resource_test.go +++ b/internal/services/maintenance/maintenance_assignment_virtual_machine_scale_set_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/maintenance/maintenance_configuration_data_source.go b/internal/services/maintenance/maintenance_configuration_data_source.go index 709e2c4772ca..69ce87927667 100644 --- a/internal/services/maintenance/maintenance_configuration_data_source.go +++ b/internal/services/maintenance/maintenance_configuration_data_source.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/maintenance/maintenance_configuration_resource.go b/internal/services/maintenance/maintenance_configuration_resource.go index a7d2406c1479..e44d8e479d7a 100644 --- a/internal/services/maintenance/maintenance_configuration_resource.go +++ b/internal/services/maintenance/maintenance_configuration_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/maintenance/maintenance_configuration_resource_test.go b/internal/services/maintenance/maintenance_configuration_resource_test.go index 48fa5cabf9e1..ba2b6ca96777 100644 --- a/internal/services/maintenance/maintenance_configuration_resource_test.go +++ b/internal/services/maintenance/maintenance_configuration_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/maintenance/migration/assignment_dedicated_host_v0_to_v1.go b/internal/services/maintenance/migration/assignment_dedicated_host_v0_to_v1.go index 4e856848f035..36314fbe51ee 100644 --- a/internal/services/maintenance/migration/assignment_dedicated_host_v0_to_v1.go +++ b/internal/services/maintenance/migration/assignment_dedicated_host_v0_to_v1.go @@ -9,7 +9,7 @@ import ( "log" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/maintenance/migration/assignment_virtual_machine_scale_set_v0_to_v1.go b/internal/services/maintenance/migration/assignment_virtual_machine_scale_set_v0_to_v1.go index ab4d165ee428..d6bfa1cbdba4 100644 --- a/internal/services/maintenance/migration/assignment_virtual_machine_scale_set_v0_to_v1.go +++ b/internal/services/maintenance/migration/assignment_virtual_machine_scale_set_v0_to_v1.go @@ -9,7 +9,7 @@ import ( "log" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/maintenance/migration/assignment_virtual_machine_v0_to_v1.go b/internal/services/maintenance/migration/assignment_virtual_machine_v0_to_v1.go index c146d4c72a2b..a74951b2fae6 100644 --- a/internal/services/maintenance/migration/assignment_virtual_machine_v0_to_v1.go +++ b/internal/services/maintenance/migration/assignment_virtual_machine_v0_to_v1.go @@ -9,7 +9,7 @@ import ( "log" "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/maintenance/migration/configuration_v0_to_v1.go b/internal/services/maintenance/migration/configuration_v0_to_v1.go index 989ae64731fc..166184c7d5f5 100644 --- a/internal/services/maintenance/migration/configuration_v0_to_v1.go +++ b/internal/services/maintenance/migration/configuration_v0_to_v1.go @@ -7,7 +7,7 @@ import ( "context" "log" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/maintenance/public_maintenance_configurations_data_source.go b/internal/services/maintenance/public_maintenance_configurations_data_source.go index 55cf1458ba3a..b980ec12ffb9 100644 --- a/internal/services/maintenance/public_maintenance_configurations_data_source.go +++ b/internal/services/maintenance/public_maintenance_configurations_data_source.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/model_configurationassignmentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/model_configurationassignmentproperties.go deleted file mode 100644 index 6f3b76b88e96..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/model_configurationassignmentproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package configurationassignments - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationAssignmentProperties struct { - MaintenanceConfigurationId *string `json:"maintenanceConfigurationId,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_inputpatchconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_inputpatchconfiguration.go deleted file mode 100644 index 9ba001e642d5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_inputpatchconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package maintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InputPatchConfiguration struct { - LinuxParameters *InputLinuxParameters `json:"linuxParameters,omitempty"` - RebootSetting *RebootOptions `json:"rebootSetting,omitempty"` - Tasks *SoftwareUpdateConfigurationTasks `json:"tasks,omitempty"` - WindowsParameters *InputWindowsParameters `json:"windowsParameters,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_softwareupdateconfigurationtasks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_softwareupdateconfigurationtasks.go deleted file mode 100644 index 5585e4a21135..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_softwareupdateconfigurationtasks.go +++ /dev/null @@ -1,9 +0,0 @@ -package maintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SoftwareUpdateConfigurationTasks struct { - PostTasks *[]TaskProperties `json:"postTasks,omitempty"` - PreTasks *[]TaskProperties `json:"preTasks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_taskproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_taskproperties.go deleted file mode 100644 index 709f6502c395..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_taskproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package maintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TaskProperties struct { - Parameters *map[string]string `json:"parameters,omitempty"` - Source *string `json:"source,omitempty"` - TaskScope *TaskScope `json:"taskScope,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/README.md similarity index 54% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/README.md index e92b4772872e..a9af7caa3c73 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments` Documentation -The `configurationassignments` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2022-07-01-preview`). +The `configurationassignments` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments" +import "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments" ``` @@ -95,6 +95,154 @@ if model := read.Model; model != nil { ``` +### Example Usage: `ConfigurationAssignmentsClient.ForResourceGroupCreateOrUpdate` + +```go +ctx := context.TODO() +id := configurationassignments.NewProviderConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationAssignmentValue") + +payload := configurationassignments.ConfigurationAssignment{ + // ... +} + + +read, err := client.ForResourceGroupCreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationAssignmentsClient.ForResourceGroupDelete` + +```go +ctx := context.TODO() +id := configurationassignments.NewProviderConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationAssignmentValue") + +read, err := client.ForResourceGroupDelete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationAssignmentsClient.ForResourceGroupGet` + +```go +ctx := context.TODO() +id := configurationassignments.NewProviderConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationAssignmentValue") + +read, err := client.ForResourceGroupGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationAssignmentsClient.ForResourceGroupUpdate` + +```go +ctx := context.TODO() +id := configurationassignments.NewProviderConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationAssignmentValue") + +payload := configurationassignments.ConfigurationAssignment{ + // ... +} + + +read, err := client.ForResourceGroupUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationAssignmentsClient.ForSubscriptionsCreateOrUpdate` + +```go +ctx := context.TODO() +id := configurationassignments.NewConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "configurationAssignmentValue") + +payload := configurationassignments.ConfigurationAssignment{ + // ... +} + + +read, err := client.ForSubscriptionsCreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationAssignmentsClient.ForSubscriptionsDelete` + +```go +ctx := context.TODO() +id := configurationassignments.NewConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "configurationAssignmentValue") + +read, err := client.ForSubscriptionsDelete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationAssignmentsClient.ForSubscriptionsGet` + +```go +ctx := context.TODO() +id := configurationassignments.NewConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "configurationAssignmentValue") + +read, err := client.ForSubscriptionsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ConfigurationAssignmentsClient.ForSubscriptionsUpdate` + +```go +ctx := context.TODO() +id := configurationassignments.NewConfigurationAssignmentID("12345678-1234-9876-4563-123456789012", "configurationAssignmentValue") + +payload := configurationassignments.ConfigurationAssignment{ + // ... +} + + +read, err := client.ForSubscriptionsUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + ### Example Usage: `ConfigurationAssignmentsClient.Get` ```go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/constants.go new file mode 100644 index 000000000000..7d1d19ac2ac8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/constants.go @@ -0,0 +1,51 @@ +package configurationassignments + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TagOperators string + +const ( + TagOperatorsAll TagOperators = "All" + TagOperatorsAny TagOperators = "Any" +) + +func PossibleValuesForTagOperators() []string { + return []string{ + string(TagOperatorsAll), + string(TagOperatorsAny), + } +} + +func (s *TagOperators) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTagOperators(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTagOperators(input string) (*TagOperators, error) { + vals := map[string]TagOperators{ + "all": TagOperatorsAll, + "any": TagOperatorsAny, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TagOperators(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_configurationassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_configurationassignment.go new file mode 100644 index 000000000000..4a86fb825c7e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_configurationassignment.go @@ -0,0 +1,116 @@ +package configurationassignments + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ConfigurationAssignmentId{} + +// ConfigurationAssignmentId is a struct representing the Resource ID for a Configuration Assignment +type ConfigurationAssignmentId struct { + SubscriptionId string + ConfigurationAssignmentName string +} + +// NewConfigurationAssignmentID returns a new ConfigurationAssignmentId struct +func NewConfigurationAssignmentID(subscriptionId string, configurationAssignmentName string) ConfigurationAssignmentId { + return ConfigurationAssignmentId{ + SubscriptionId: subscriptionId, + ConfigurationAssignmentName: configurationAssignmentName, + } +} + +// ParseConfigurationAssignmentID parses 'input' into a ConfigurationAssignmentId +func ParseConfigurationAssignmentID(input string) (*ConfigurationAssignmentId, error) { + parser := resourceids.NewParserFromResourceIdType(&ConfigurationAssignmentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ConfigurationAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseConfigurationAssignmentIDInsensitively parses 'input' case-insensitively into a ConfigurationAssignmentId +// note: this method should only be used for API response data and not user input +func ParseConfigurationAssignmentIDInsensitively(input string) (*ConfigurationAssignmentId, error) { + parser := resourceids.NewParserFromResourceIdType(&ConfigurationAssignmentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ConfigurationAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ConfigurationAssignmentName, ok = input.Parsed["configurationAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationAssignmentName", input) + } + + return nil +} + +// ValidateConfigurationAssignmentID checks that 'input' can be parsed as a Configuration Assignment ID +func ValidateConfigurationAssignmentID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseConfigurationAssignmentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Configuration Assignment ID +func (id ConfigurationAssignmentId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.Maintenance/configurationAssignments/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ConfigurationAssignmentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Configuration Assignment ID +func (id ConfigurationAssignmentId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftMaintenance", "Microsoft.Maintenance", "Microsoft.Maintenance"), + resourceids.StaticSegment("staticConfigurationAssignments", "configurationAssignments", "configurationAssignments"), + resourceids.UserSpecifiedSegment("configurationAssignmentName", "configurationAssignmentValue"), + } +} + +// String returns a human-readable description of this Configuration Assignment ID +func (id ConfigurationAssignmentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Configuration Assignment Name: %q", id.ConfigurationAssignmentName), + } + return fmt.Sprintf("Configuration Assignment (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_providerconfigurationassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_providerconfigurationassignment.go new file mode 100644 index 000000000000..2dc3ed7f5bbf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_providerconfigurationassignment.go @@ -0,0 +1,125 @@ +package configurationassignments + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProviderConfigurationAssignmentId{} + +// ProviderConfigurationAssignmentId is a struct representing the Resource ID for a Provider Configuration Assignment +type ProviderConfigurationAssignmentId struct { + SubscriptionId string + ResourceGroupName string + ConfigurationAssignmentName string +} + +// NewProviderConfigurationAssignmentID returns a new ProviderConfigurationAssignmentId struct +func NewProviderConfigurationAssignmentID(subscriptionId string, resourceGroupName string, configurationAssignmentName string) ProviderConfigurationAssignmentId { + return ProviderConfigurationAssignmentId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ConfigurationAssignmentName: configurationAssignmentName, + } +} + +// ParseProviderConfigurationAssignmentID parses 'input' into a ProviderConfigurationAssignmentId +func ParseProviderConfigurationAssignmentID(input string) (*ProviderConfigurationAssignmentId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderConfigurationAssignmentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderConfigurationAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviderConfigurationAssignmentIDInsensitively parses 'input' case-insensitively into a ProviderConfigurationAssignmentId +// note: this method should only be used for API response data and not user input +func ParseProviderConfigurationAssignmentIDInsensitively(input string) (*ProviderConfigurationAssignmentId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProviderConfigurationAssignmentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderConfigurationAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderConfigurationAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ConfigurationAssignmentName, ok = input.Parsed["configurationAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationAssignmentName", input) + } + + return nil +} + +// ValidateProviderConfigurationAssignmentID checks that 'input' can be parsed as a Provider Configuration Assignment ID +func ValidateProviderConfigurationAssignmentID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProviderConfigurationAssignmentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Provider Configuration Assignment ID +func (id ProviderConfigurationAssignmentId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Maintenance/configurationAssignments/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ConfigurationAssignmentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Provider Configuration Assignment ID +func (id ProviderConfigurationAssignmentId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftMaintenance", "Microsoft.Maintenance", "Microsoft.Maintenance"), + resourceids.StaticSegment("staticConfigurationAssignments", "configurationAssignments", "configurationAssignments"), + resourceids.UserSpecifiedSegment("configurationAssignmentName", "configurationAssignmentValue"), + } +} + +// String returns a human-readable description of this Provider Configuration Assignment ID +func (id ProviderConfigurationAssignmentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Configuration Assignment Name: %q", id.ConfigurationAssignmentName), + } + return fmt.Sprintf("Provider Configuration Assignment (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/id_scopedconfigurationassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_scopedconfigurationassignment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/id_scopedconfigurationassignment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/id_scopedconfigurationassignment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdate.go similarity index 98% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdate.go index 03c1cbce57ee..d9d54d0b881d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_createorupdate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdate.go @@ -22,6 +22,7 @@ func (c ConfigurationAssignmentsClient) CreateOrUpdate(ctx context.Context, id S opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ + http.StatusCreated, http.StatusOK, }, HttpMethod: http.MethodPut, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_createorupdateparent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdateparent.go similarity index 98% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_createorupdateparent.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdateparent.go index a33dc94f21dc..af6255d0ab41 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_createorupdateparent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdateparent.go @@ -22,6 +22,7 @@ func (c ConfigurationAssignmentsClient) CreateOrUpdateParent(ctx context.Context opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ + http.StatusCreated, http.StatusOK, }, HttpMethod: http.MethodPut, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_deleteparent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_deleteparent.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_deleteparent.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_deleteparent.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupcreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupcreateorupdate.go new file mode 100644 index 000000000000..f08bf0525dcf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupcreateorupdate.go @@ -0,0 +1,59 @@ +package configurationassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForResourceGroupCreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationAssignment +} + +// ForResourceGroupCreateOrUpdate ... +func (c ConfigurationAssignmentsClient) ForResourceGroupCreateOrUpdate(ctx context.Context, id ProviderConfigurationAssignmentId, input ConfigurationAssignment) (result ForResourceGroupCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupdelete.go new file mode 100644 index 000000000000..dfc16be64b06 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupdelete.go @@ -0,0 +1,55 @@ +package configurationassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForResourceGroupDeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationAssignment +} + +// ForResourceGroupDelete ... +func (c ConfigurationAssignmentsClient) ForResourceGroupDelete(ctx context.Context, id ProviderConfigurationAssignmentId) (result ForResourceGroupDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupget.go new file mode 100644 index 000000000000..0a50dce451e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupget.go @@ -0,0 +1,54 @@ +package configurationassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForResourceGroupGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationAssignment +} + +// ForResourceGroupGet ... +func (c ConfigurationAssignmentsClient) ForResourceGroupGet(ctx context.Context, id ProviderConfigurationAssignmentId) (result ForResourceGroupGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupupdate.go new file mode 100644 index 000000000000..a652b5940e9f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupupdate.go @@ -0,0 +1,58 @@ +package configurationassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForResourceGroupUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationAssignment +} + +// ForResourceGroupUpdate ... +func (c ConfigurationAssignmentsClient) ForResourceGroupUpdate(ctx context.Context, id ProviderConfigurationAssignmentId, input ConfigurationAssignment) (result ForResourceGroupUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionscreateorupdate.go new file mode 100644 index 000000000000..e07190c21dea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionscreateorupdate.go @@ -0,0 +1,59 @@ +package configurationassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForSubscriptionsCreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationAssignment +} + +// ForSubscriptionsCreateOrUpdate ... +func (c ConfigurationAssignmentsClient) ForSubscriptionsCreateOrUpdate(ctx context.Context, id ConfigurationAssignmentId, input ConfigurationAssignment) (result ForSubscriptionsCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsdelete.go new file mode 100644 index 000000000000..5b48859596f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsdelete.go @@ -0,0 +1,55 @@ +package configurationassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForSubscriptionsDeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationAssignment +} + +// ForSubscriptionsDelete ... +func (c ConfigurationAssignmentsClient) ForSubscriptionsDelete(ctx context.Context, id ConfigurationAssignmentId) (result ForSubscriptionsDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsget.go new file mode 100644 index 000000000000..5f0e88e7f11c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsget.go @@ -0,0 +1,54 @@ +package configurationassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForSubscriptionsGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationAssignment +} + +// ForSubscriptionsGet ... +func (c ConfigurationAssignmentsClient) ForSubscriptionsGet(ctx context.Context, id ConfigurationAssignmentId) (result ForSubscriptionsGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsupdate.go new file mode 100644 index 000000000000..e1bf98b854a8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsupdate.go @@ -0,0 +1,58 @@ +package configurationassignments + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForSubscriptionsUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ConfigurationAssignment +} + +// ForSubscriptionsUpdate ... +func (c ConfigurationAssignmentsClient) ForSubscriptionsUpdate(ctx context.Context, id ConfigurationAssignmentId, input ConfigurationAssignment) (result ForSubscriptionsUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ConfigurationAssignment + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_getparent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_getparent.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_getparent.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_getparent.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_listparent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_listparent.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_listparent.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_listparent.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_withinsubscriptionlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_withinsubscriptionlist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/method_withinsubscriptionlist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/method_withinsubscriptionlist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/model_configurationassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/model_configurationassignment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignmentfilterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignmentfilterproperties.go new file mode 100644 index 000000000000..165b229c04f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignmentfilterproperties.go @@ -0,0 +1,12 @@ +package configurationassignments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationAssignmentFilterProperties struct { + Locations *[]string `json:"locations,omitempty"` + OsTypes *[]string `json:"osTypes,omitempty"` + ResourceGroups *[]string `json:"resourceGroups,omitempty"` + ResourceTypes *[]string `json:"resourceTypes,omitempty"` + TagSettings *TagSettingsProperties `json:"tagSettings,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignmentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignmentproperties.go new file mode 100644 index 000000000000..83e083013ee6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_configurationassignmentproperties.go @@ -0,0 +1,10 @@ +package configurationassignments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationAssignmentProperties struct { + Filter *ConfigurationAssignmentFilterProperties `json:"filter,omitempty"` + MaintenanceConfigurationId *string `json:"maintenanceConfigurationId,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/model_listconfigurationassignmentsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_listconfigurationassignmentsresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/model_listconfigurationassignmentsresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_listconfigurationassignmentsresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_tagsettingsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_tagsettingsproperties.go new file mode 100644 index 000000000000..a983eed58c14 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/model_tagsettingsproperties.go @@ -0,0 +1,9 @@ +package configurationassignments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TagSettingsProperties struct { + FilterOperator *TagOperators `json:"filterOperator,omitempty"` + Tags *map[string][]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/version.go similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/version.go index b152d509fa22..ba98b64438e4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments/version.go @@ -5,7 +5,7 @@ import "fmt" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-07-01-preview" +const defaultApiVersion = "2023-04-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/configurationassignments/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/README.md index 3647244df13d..0ffe55c33617 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2022-07-01-preview`). +The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations" +import "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/constants.go similarity index 81% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/constants.go index fa773a76e0d5..711ea7416438 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/constants.go @@ -109,47 +109,6 @@ func parseRebootOptions(input string) (*RebootOptions, error) { return &out, nil } -type TaskScope string - -const ( - TaskScopeGlobal TaskScope = "Global" - TaskScopeResource TaskScope = "Resource" -) - -func PossibleValuesForTaskScope() []string { - return []string{ - string(TaskScopeGlobal), - string(TaskScopeResource), - } -} - -func (s *TaskScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTaskScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTaskScope(input string) (*TaskScope, error) { - vals := map[string]TaskScope{ - "global": TaskScopeGlobal, - "resource": TaskScopeResource, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TaskScope(input) - return &out, nil -} - type Visibility string const ( diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/id_maintenanceconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/id_maintenanceconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/id_maintenanceconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_createorupdate.go similarity index 98% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_createorupdate.go index 726183cac89b..6f8389d858df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_createorupdate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_createorupdate.go @@ -22,6 +22,7 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ + http.StatusCreated, http.StatusOK, }, HttpMethod: http.MethodPut, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_forresourcegrouplist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_forresourcegrouplist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_forresourcegrouplist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_forresourcegrouplist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_inputlinuxparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_inputlinuxparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_inputlinuxparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_inputlinuxparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_inputpatchconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_inputpatchconfiguration.go new file mode 100644 index 000000000000..e234aaf55540 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_inputpatchconfiguration.go @@ -0,0 +1,10 @@ +package maintenanceconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InputPatchConfiguration struct { + LinuxParameters *InputLinuxParameters `json:"linuxParameters,omitempty"` + RebootSetting *RebootOptions `json:"rebootSetting,omitempty"` + WindowsParameters *InputWindowsParameters `json:"windowsParameters,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_inputwindowsparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_inputwindowsparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_inputwindowsparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_inputwindowsparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_listmaintenanceconfigurationsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_listmaintenanceconfigurationsresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_listmaintenanceconfigurationsresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_listmaintenanceconfigurationsresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_maintenanceconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_maintenanceconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_maintenanceconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_maintenanceconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_maintenanceconfigurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_maintenanceconfigurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_maintenanceconfigurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_maintenancewindow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_maintenancewindow.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/model_maintenancewindow.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/model_maintenancewindow.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/version.go similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/version.go index 5039de6e0e29..d4881713dac5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/version.go @@ -5,7 +5,7 @@ import "fmt" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-07-01-preview" +const defaultApiVersion = "2023-04-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/README.md new file mode 100644 index 000000000000..1ec7be78d42f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/README.md @@ -0,0 +1,53 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations` Documentation + +The `publicmaintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2023-04-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" +``` + + +### Client Initialization + +```go +client := publicmaintenanceconfigurations.NewPublicMaintenanceConfigurationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PublicMaintenanceConfigurationsClient.Get` + +```go +ctx := context.TODO() +id := publicmaintenanceconfigurations.NewPublicMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "publicMaintenanceConfigurationValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PublicMaintenanceConfigurationsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +read, err := client.List(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/client.go new file mode 100644 index 000000000000..79ca5fc9e3ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/client.go @@ -0,0 +1,26 @@ +package publicmaintenanceconfigurations + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PublicMaintenanceConfigurationsClient struct { + Client *resourcemanager.Client +} + +func NewPublicMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicMaintenanceConfigurationsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicmaintenanceconfigurations", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PublicMaintenanceConfigurationsClient: %+v", err) + } + + return &PublicMaintenanceConfigurationsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/constants.go new file mode 100644 index 000000000000..0dd5f338e80a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/constants.go @@ -0,0 +1,151 @@ +package publicmaintenanceconfigurations + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenanceScope string + +const ( + MaintenanceScopeExtension MaintenanceScope = "Extension" + MaintenanceScopeHost MaintenanceScope = "Host" + MaintenanceScopeInGuestPatch MaintenanceScope = "InGuestPatch" + MaintenanceScopeOSImage MaintenanceScope = "OSImage" + MaintenanceScopeResource MaintenanceScope = "Resource" + MaintenanceScopeSQLDB MaintenanceScope = "SQLDB" + MaintenanceScopeSQLManagedInstance MaintenanceScope = "SQLManagedInstance" +) + +func PossibleValuesForMaintenanceScope() []string { + return []string{ + string(MaintenanceScopeExtension), + string(MaintenanceScopeHost), + string(MaintenanceScopeInGuestPatch), + string(MaintenanceScopeOSImage), + string(MaintenanceScopeResource), + string(MaintenanceScopeSQLDB), + string(MaintenanceScopeSQLManagedInstance), + } +} + +func (s *MaintenanceScope) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMaintenanceScope(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMaintenanceScope(input string) (*MaintenanceScope, error) { + vals := map[string]MaintenanceScope{ + "extension": MaintenanceScopeExtension, + "host": MaintenanceScopeHost, + "inguestpatch": MaintenanceScopeInGuestPatch, + "osimage": MaintenanceScopeOSImage, + "resource": MaintenanceScopeResource, + "sqldb": MaintenanceScopeSQLDB, + "sqlmanagedinstance": MaintenanceScopeSQLManagedInstance, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MaintenanceScope(input) + return &out, nil +} + +type RebootOptions string + +const ( + RebootOptionsAlways RebootOptions = "Always" + RebootOptionsIfRequired RebootOptions = "IfRequired" + RebootOptionsNever RebootOptions = "Never" +) + +func PossibleValuesForRebootOptions() []string { + return []string{ + string(RebootOptionsAlways), + string(RebootOptionsIfRequired), + string(RebootOptionsNever), + } +} + +func (s *RebootOptions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRebootOptions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRebootOptions(input string) (*RebootOptions, error) { + vals := map[string]RebootOptions{ + "always": RebootOptionsAlways, + "ifrequired": RebootOptionsIfRequired, + "never": RebootOptionsNever, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RebootOptions(input) + return &out, nil +} + +type Visibility string + +const ( + VisibilityCustom Visibility = "Custom" + VisibilityPublic Visibility = "Public" +) + +func PossibleValuesForVisibility() []string { + return []string{ + string(VisibilityCustom), + string(VisibilityPublic), + } +} + +func (s *Visibility) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVisibility(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVisibility(input string) (*Visibility, error) { + vals := map[string]Visibility{ + "custom": VisibilityCustom, + "public": VisibilityPublic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Visibility(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go new file mode 100644 index 000000000000..aeec621dcb95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go @@ -0,0 +1,116 @@ +package publicmaintenanceconfigurations + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &PublicMaintenanceConfigurationId{} + +// PublicMaintenanceConfigurationId is a struct representing the Resource ID for a Public Maintenance Configuration +type PublicMaintenanceConfigurationId struct { + SubscriptionId string + PublicMaintenanceConfigurationName string +} + +// NewPublicMaintenanceConfigurationID returns a new PublicMaintenanceConfigurationId struct +func NewPublicMaintenanceConfigurationID(subscriptionId string, publicMaintenanceConfigurationName string) PublicMaintenanceConfigurationId { + return PublicMaintenanceConfigurationId{ + SubscriptionId: subscriptionId, + PublicMaintenanceConfigurationName: publicMaintenanceConfigurationName, + } +} + +// ParsePublicMaintenanceConfigurationID parses 'input' into a PublicMaintenanceConfigurationId +func ParsePublicMaintenanceConfigurationID(input string) (*PublicMaintenanceConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(&PublicMaintenanceConfigurationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PublicMaintenanceConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePublicMaintenanceConfigurationIDInsensitively parses 'input' case-insensitively into a PublicMaintenanceConfigurationId +// note: this method should only be used for API response data and not user input +func ParsePublicMaintenanceConfigurationIDInsensitively(input string) (*PublicMaintenanceConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(&PublicMaintenanceConfigurationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PublicMaintenanceConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PublicMaintenanceConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.PublicMaintenanceConfigurationName, ok = input.Parsed["publicMaintenanceConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publicMaintenanceConfigurationName", input) + } + + return nil +} + +// ValidatePublicMaintenanceConfigurationID checks that 'input' can be parsed as a Public Maintenance Configuration ID +func ValidatePublicMaintenanceConfigurationID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePublicMaintenanceConfigurationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Public Maintenance Configuration ID +func (id PublicMaintenanceConfigurationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.PublicMaintenanceConfigurationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Public Maintenance Configuration ID +func (id PublicMaintenanceConfigurationId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftMaintenance", "Microsoft.Maintenance", "Microsoft.Maintenance"), + resourceids.StaticSegment("staticPublicMaintenanceConfigurations", "publicMaintenanceConfigurations", "publicMaintenanceConfigurations"), + resourceids.UserSpecifiedSegment("publicMaintenanceConfigurationName", "publicMaintenanceConfigurationValue"), + } +} + +// String returns a human-readable description of this Public Maintenance Configuration ID +func (id PublicMaintenanceConfigurationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Public Maintenance Configuration Name: %q", id.PublicMaintenanceConfigurationName), + } + return fmt.Sprintf("Public Maintenance Configuration (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_get.go new file mode 100644 index 000000000000..b7c2d7cd15b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_get.go @@ -0,0 +1,54 @@ +package publicmaintenanceconfigurations + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *MaintenanceConfiguration +} + +// Get ... +func (c PublicMaintenanceConfigurationsClient) Get(ctx context.Context, id PublicMaintenanceConfigurationId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model MaintenanceConfiguration + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_list.go new file mode 100644 index 000000000000..31af41f7b100 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_list.go @@ -0,0 +1,56 @@ +package publicmaintenanceconfigurations + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ListMaintenanceConfigurationsResult +} + +// List ... +func (c PublicMaintenanceConfigurationsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.Maintenance/publicMaintenanceConfigurations", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ListMaintenanceConfigurationsResult + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputlinuxparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputlinuxparameters.go new file mode 100644 index 000000000000..c03821dcd713 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputlinuxparameters.go @@ -0,0 +1,10 @@ +package publicmaintenanceconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InputLinuxParameters struct { + ClassificationsToInclude *[]string `json:"classificationsToInclude,omitempty"` + PackageNameMasksToExclude *[]string `json:"packageNameMasksToExclude,omitempty"` + PackageNameMasksToInclude *[]string `json:"packageNameMasksToInclude,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputpatchconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputpatchconfiguration.go new file mode 100644 index 000000000000..9dd8f004f64e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputpatchconfiguration.go @@ -0,0 +1,10 @@ +package publicmaintenanceconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InputPatchConfiguration struct { + LinuxParameters *InputLinuxParameters `json:"linuxParameters,omitempty"` + RebootSetting *RebootOptions `json:"rebootSetting,omitempty"` + WindowsParameters *InputWindowsParameters `json:"windowsParameters,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputwindowsparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputwindowsparameters.go new file mode 100644 index 000000000000..94c6285a9d46 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_inputwindowsparameters.go @@ -0,0 +1,11 @@ +package publicmaintenanceconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InputWindowsParameters struct { + ClassificationsToInclude *[]string `json:"classificationsToInclude,omitempty"` + ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"` + KbNumbersToExclude *[]string `json:"kbNumbersToExclude,omitempty"` + KbNumbersToInclude *[]string `json:"kbNumbersToInclude,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_listmaintenanceconfigurationsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_listmaintenanceconfigurationsresult.go new file mode 100644 index 000000000000..3b46e41b8eac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_listmaintenanceconfigurationsresult.go @@ -0,0 +1,8 @@ +package publicmaintenanceconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListMaintenanceConfigurationsResult struct { + Value *[]MaintenanceConfiguration `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenanceconfiguration.go new file mode 100644 index 000000000000..2d039cc921f4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenanceconfiguration.go @@ -0,0 +1,18 @@ +package publicmaintenanceconfigurations + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenanceConfiguration struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *MaintenanceConfigurationProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenanceconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenanceconfigurationproperties.go new file mode 100644 index 000000000000..4cb7f757f4e3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenanceconfigurationproperties.go @@ -0,0 +1,13 @@ +package publicmaintenanceconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenanceConfigurationProperties struct { + ExtensionProperties *map[string]string `json:"extensionProperties,omitempty"` + InstallPatches *InputPatchConfiguration `json:"installPatches,omitempty"` + MaintenanceScope *MaintenanceScope `json:"maintenanceScope,omitempty"` + MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Visibility *Visibility `json:"visibility,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenancewindow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenancewindow.go new file mode 100644 index 000000000000..720a9f379989 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/model_maintenancewindow.go @@ -0,0 +1,12 @@ +package publicmaintenanceconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenanceWindow struct { + Duration *string `json:"duration,omitempty"` + ExpirationDateTime *string `json:"expirationDateTime,omitempty"` + RecurEvery *string `json:"recurEvery,omitempty"` + StartDateTime *string `json:"startDateTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/version.go new file mode 100644 index 000000000000..d1378fcb0116 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/version.go @@ -0,0 +1,12 @@ +package publicmaintenanceconfigurations + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/publicmaintenanceconfigurations/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index ca82580787a8..1417fe097d7b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -596,9 +596,10 @@ github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/datastore github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/workspaces -github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments -github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations +github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments +github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations +github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applicationdefinitions github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31 From f0860153880b8b11c630a6f6534904c2ec186eb1 Mon Sep 17 00:00:00 2001 From: Rhys Ash Date: Tue, 26 Mar 2024 11:41:05 +0000 Subject: [PATCH 2/2] alert sdk version for maintenance on mssql services --- .../services/mssql/mssql_database_resource.go | 2 +- .../mssql/mssql_elasticpool_resource.go | 2 +- .../mssql_managed_instance_resource.go | 2 +- .../publicmaintenanceconfigurations/README.md | 53 ----- .../publicmaintenanceconfigurations/client.go | 26 --- .../constants.go | 192 ------------------ .../id_publicmaintenanceconfiguration.go | 116 ----------- .../method_get.go | 54 ----- .../method_list.go | 56 ----- .../model_inputlinuxparameters.go | 10 - .../model_inputpatchconfiguration.go | 11 - .../model_inputwindowsparameters.go | 11 - ...del_listmaintenanceconfigurationsresult.go | 8 - .../model_maintenanceconfiguration.go | 18 -- ...odel_maintenanceconfigurationproperties.go | 13 -- .../model_maintenancewindow.go | 12 -- .../model_softwareupdateconfigurationtasks.go | 9 - .../model_taskproperties.go | 10 - .../version.go | 12 -- vendor/modules.txt | 1 - 20 files changed, 3 insertions(+), 615 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/README.md delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/client.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/constants.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/method_get.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/method_list.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputlinuxparameters.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputpatchconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputwindowsparameters.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_listmaintenanceconfigurationsresult.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenanceconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenanceconfigurationproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenancewindow.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_softwareupdateconfigurationtasks.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_taskproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/version.go diff --git a/internal/services/mssql/mssql_database_resource.go b/internal/services/mssql/mssql_database_resource.go index 6e880faf7988..cb61ba892647 100644 --- a/internal/services/mssql/mssql_database_resource.go +++ b/internal/services/mssql/mssql_database_resource.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies" "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies" diff --git a/internal/services/mssql/mssql_elasticpool_resource.go b/internal/services/mssql/mssql_elasticpool_resource.go index bd774c2e8822..bd25127e48d7 100644 --- a/internal/services/mssql/mssql_elasticpool_resource.go +++ b/internal/services/mssql/mssql_elasticpool_resource.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases" "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" diff --git a/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource.go b/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource.go index 269666d3dca8..7240def38e7b 100644 --- a/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource.go +++ b/internal/services/mssqlmanagedinstance/mssql_managed_instance_resource.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/validate" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/README.md deleted file mode 100644 index 323169c8d429..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations` Documentation - -The `publicmaintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2022-07-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations" -``` - - -### Client Initialization - -```go -client := publicmaintenanceconfigurations.NewPublicMaintenanceConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PublicMaintenanceConfigurationsClient.Get` - -```go -ctx := context.TODO() -id := publicmaintenanceconfigurations.NewPublicMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "publicMaintenanceConfigurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PublicMaintenanceConfigurationsClient.List` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/client.go deleted file mode 100644 index 79ca5fc9e3ce..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package publicmaintenanceconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicMaintenanceConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewPublicMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicMaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicmaintenanceconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PublicMaintenanceConfigurationsClient: %+v", err) - } - - return &PublicMaintenanceConfigurationsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/constants.go deleted file mode 100644 index fac0aaca237e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/constants.go +++ /dev/null @@ -1,192 +0,0 @@ -package publicmaintenanceconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MaintenanceScope string - -const ( - MaintenanceScopeExtension MaintenanceScope = "Extension" - MaintenanceScopeHost MaintenanceScope = "Host" - MaintenanceScopeInGuestPatch MaintenanceScope = "InGuestPatch" - MaintenanceScopeOSImage MaintenanceScope = "OSImage" - MaintenanceScopeResource MaintenanceScope = "Resource" - MaintenanceScopeSQLDB MaintenanceScope = "SQLDB" - MaintenanceScopeSQLManagedInstance MaintenanceScope = "SQLManagedInstance" -) - -func PossibleValuesForMaintenanceScope() []string { - return []string{ - string(MaintenanceScopeExtension), - string(MaintenanceScopeHost), - string(MaintenanceScopeInGuestPatch), - string(MaintenanceScopeOSImage), - string(MaintenanceScopeResource), - string(MaintenanceScopeSQLDB), - string(MaintenanceScopeSQLManagedInstance), - } -} - -func (s *MaintenanceScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMaintenanceScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMaintenanceScope(input string) (*MaintenanceScope, error) { - vals := map[string]MaintenanceScope{ - "extension": MaintenanceScopeExtension, - "host": MaintenanceScopeHost, - "inguestpatch": MaintenanceScopeInGuestPatch, - "osimage": MaintenanceScopeOSImage, - "resource": MaintenanceScopeResource, - "sqldb": MaintenanceScopeSQLDB, - "sqlmanagedinstance": MaintenanceScopeSQLManagedInstance, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MaintenanceScope(input) - return &out, nil -} - -type RebootOptions string - -const ( - RebootOptionsAlways RebootOptions = "Always" - RebootOptionsIfRequired RebootOptions = "IfRequired" - RebootOptionsNever RebootOptions = "Never" -) - -func PossibleValuesForRebootOptions() []string { - return []string{ - string(RebootOptionsAlways), - string(RebootOptionsIfRequired), - string(RebootOptionsNever), - } -} - -func (s *RebootOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRebootOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRebootOptions(input string) (*RebootOptions, error) { - vals := map[string]RebootOptions{ - "always": RebootOptionsAlways, - "ifrequired": RebootOptionsIfRequired, - "never": RebootOptionsNever, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RebootOptions(input) - return &out, nil -} - -type TaskScope string - -const ( - TaskScopeGlobal TaskScope = "Global" - TaskScopeResource TaskScope = "Resource" -) - -func PossibleValuesForTaskScope() []string { - return []string{ - string(TaskScopeGlobal), - string(TaskScopeResource), - } -} - -func (s *TaskScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTaskScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTaskScope(input string) (*TaskScope, error) { - vals := map[string]TaskScope{ - "global": TaskScopeGlobal, - "resource": TaskScopeResource, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TaskScope(input) - return &out, nil -} - -type Visibility string - -const ( - VisibilityCustom Visibility = "Custom" - VisibilityPublic Visibility = "Public" -) - -func PossibleValuesForVisibility() []string { - return []string{ - string(VisibilityCustom), - string(VisibilityPublic), - } -} - -func (s *Visibility) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVisibility(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVisibility(input string) (*Visibility, error) { - vals := map[string]Visibility{ - "custom": VisibilityCustom, - "public": VisibilityPublic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Visibility(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go deleted file mode 100644 index aeec621dcb95..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go +++ /dev/null @@ -1,116 +0,0 @@ -package publicmaintenanceconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &PublicMaintenanceConfigurationId{} - -// PublicMaintenanceConfigurationId is a struct representing the Resource ID for a Public Maintenance Configuration -type PublicMaintenanceConfigurationId struct { - SubscriptionId string - PublicMaintenanceConfigurationName string -} - -// NewPublicMaintenanceConfigurationID returns a new PublicMaintenanceConfigurationId struct -func NewPublicMaintenanceConfigurationID(subscriptionId string, publicMaintenanceConfigurationName string) PublicMaintenanceConfigurationId { - return PublicMaintenanceConfigurationId{ - SubscriptionId: subscriptionId, - PublicMaintenanceConfigurationName: publicMaintenanceConfigurationName, - } -} - -// ParsePublicMaintenanceConfigurationID parses 'input' into a PublicMaintenanceConfigurationId -func ParsePublicMaintenanceConfigurationID(input string) (*PublicMaintenanceConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(&PublicMaintenanceConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PublicMaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParsePublicMaintenanceConfigurationIDInsensitively parses 'input' case-insensitively into a PublicMaintenanceConfigurationId -// note: this method should only be used for API response data and not user input -func ParsePublicMaintenanceConfigurationIDInsensitively(input string) (*PublicMaintenanceConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(&PublicMaintenanceConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PublicMaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *PublicMaintenanceConfigurationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.PublicMaintenanceConfigurationName, ok = input.Parsed["publicMaintenanceConfigurationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "publicMaintenanceConfigurationName", input) - } - - return nil -} - -// ValidatePublicMaintenanceConfigurationID checks that 'input' can be parsed as a Public Maintenance Configuration ID -func ValidatePublicMaintenanceConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePublicMaintenanceConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Public Maintenance Configuration ID -func (id PublicMaintenanceConfigurationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.PublicMaintenanceConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Public Maintenance Configuration ID -func (id PublicMaintenanceConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMaintenance", "Microsoft.Maintenance", "Microsoft.Maintenance"), - resourceids.StaticSegment("staticPublicMaintenanceConfigurations", "publicMaintenanceConfigurations", "publicMaintenanceConfigurations"), - resourceids.UserSpecifiedSegment("publicMaintenanceConfigurationName", "publicMaintenanceConfigurationValue"), - } -} - -// String returns a human-readable description of this Public Maintenance Configuration ID -func (id PublicMaintenanceConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Public Maintenance Configuration Name: %q", id.PublicMaintenanceConfigurationName), - } - return fmt.Sprintf("Public Maintenance Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/method_get.go deleted file mode 100644 index b7c2d7cd15b0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/method_get.go +++ /dev/null @@ -1,54 +0,0 @@ -package publicmaintenanceconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *MaintenanceConfiguration -} - -// Get ... -func (c PublicMaintenanceConfigurationsClient) Get(ctx context.Context, id PublicMaintenanceConfigurationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model MaintenanceConfiguration - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/method_list.go deleted file mode 100644 index 31af41f7b100..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/method_list.go +++ /dev/null @@ -1,56 +0,0 @@ -package publicmaintenanceconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ListMaintenanceConfigurationsResult -} - -// List ... -func (c PublicMaintenanceConfigurationsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Maintenance/publicMaintenanceConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ListMaintenanceConfigurationsResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputlinuxparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputlinuxparameters.go deleted file mode 100644 index c03821dcd713..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputlinuxparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicmaintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InputLinuxParameters struct { - ClassificationsToInclude *[]string `json:"classificationsToInclude,omitempty"` - PackageNameMasksToExclude *[]string `json:"packageNameMasksToExclude,omitempty"` - PackageNameMasksToInclude *[]string `json:"packageNameMasksToInclude,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputpatchconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputpatchconfiguration.go deleted file mode 100644 index 72c7618be52e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputpatchconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicmaintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InputPatchConfiguration struct { - LinuxParameters *InputLinuxParameters `json:"linuxParameters,omitempty"` - RebootSetting *RebootOptions `json:"rebootSetting,omitempty"` - Tasks *SoftwareUpdateConfigurationTasks `json:"tasks,omitempty"` - WindowsParameters *InputWindowsParameters `json:"windowsParameters,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputwindowsparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputwindowsparameters.go deleted file mode 100644 index 94c6285a9d46..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_inputwindowsparameters.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicmaintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InputWindowsParameters struct { - ClassificationsToInclude *[]string `json:"classificationsToInclude,omitempty"` - ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"` - KbNumbersToExclude *[]string `json:"kbNumbersToExclude,omitempty"` - KbNumbersToInclude *[]string `json:"kbNumbersToInclude,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_listmaintenanceconfigurationsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_listmaintenanceconfigurationsresult.go deleted file mode 100644 index 3b46e41b8eac..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_listmaintenanceconfigurationsresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicmaintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListMaintenanceConfigurationsResult struct { - Value *[]MaintenanceConfiguration `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenanceconfiguration.go deleted file mode 100644 index 2d039cc921f4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenanceconfiguration.go +++ /dev/null @@ -1,18 +0,0 @@ -package publicmaintenanceconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MaintenanceConfiguration struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MaintenanceConfigurationProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenanceconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenanceconfigurationproperties.go deleted file mode 100644 index 4cb7f757f4e3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenanceconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicmaintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MaintenanceConfigurationProperties struct { - ExtensionProperties *map[string]string `json:"extensionProperties,omitempty"` - InstallPatches *InputPatchConfiguration `json:"installPatches,omitempty"` - MaintenanceScope *MaintenanceScope `json:"maintenanceScope,omitempty"` - MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` - Namespace *string `json:"namespace,omitempty"` - Visibility *Visibility `json:"visibility,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenancewindow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenancewindow.go deleted file mode 100644 index 720a9f379989..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_maintenancewindow.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicmaintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MaintenanceWindow struct { - Duration *string `json:"duration,omitempty"` - ExpirationDateTime *string `json:"expirationDateTime,omitempty"` - RecurEvery *string `json:"recurEvery,omitempty"` - StartDateTime *string `json:"startDateTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_softwareupdateconfigurationtasks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_softwareupdateconfigurationtasks.go deleted file mode 100644 index 35afb84a0441..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_softwareupdateconfigurationtasks.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicmaintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SoftwareUpdateConfigurationTasks struct { - PostTasks *[]TaskProperties `json:"postTasks,omitempty"` - PreTasks *[]TaskProperties `json:"preTasks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_taskproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_taskproperties.go deleted file mode 100644 index 297e42b866f3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/model_taskproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicmaintenanceconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TaskProperties struct { - Parameters *map[string]string `json:"parameters,omitempty"` - Source *string `json:"source,omitempty"` - TaskScope *TaskScope `json:"taskScope,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/version.go deleted file mode 100644 index 236cb0e42f9f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicmaintenanceconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-07-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicmaintenanceconfigurations/%s", defaultApiVersion) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 1417fe097d7b..bdd559477d05 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -596,7 +596,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/datastore github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/workspaces -github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations