From 2ce5d24435d23335b784a917d037a1854aec03f9 Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Thu, 4 Jan 2024 16:06:54 +0800 Subject: [PATCH 01/12] New Resource: azurerm_workloads_sap_three_tier_virtual_instance --- .github/labeler-issue-triage.yml | 3 + .github/labeler-pull-request-triage.yml | 5 + .teamcity/components/generated/services.kt | 3 +- .teamcity/components/settings.kt | 5 +- internal/acceptance/testcase.go | 4 + internal/clients/client.go | 7 + internal/provider/services.go | 2 + .../validate/network_interface_name.go | 16 + .../validate/network_interface_name_test.go | 56 + .../legacy_storage_share_resource_manager.go | 84 + ...acy_storage_share_resource_manager_test.go | 147 ++ internal/services/storage/resourceids.go | 1 + ...egacy_storage_share_resource_manager_id.go | 26 + ..._storage_share_resource_manager_id_test.go | 103 + internal/services/workloads/client/client.go | 17 + internal/services/workloads/registration.go | 37 + .../workloads/validate/admin_username.go | 21 + .../workloads/validate/admin_username_test.go | 44 + .../validate/availability_set_name.go | 16 + .../validate/availability_set_name_test.go | 44 + .../services/workloads/validate/disk_name.go | 21 + .../workloads/validate/disk_name_test.go | 44 + .../services/workloads/validate/host_name.go | 21 + .../workloads/validate/host_name_test.go | 44 + .../services/workloads/validate/sap_fqdn.go | 16 + .../workloads/validate/sap_fqdn_test.go | 44 + .../validate/sap_virtual_instance_name.go | 17 + .../sap_virtual_instance_name_test.go | 45 + ...ap_three_tier_virtual_instance_resource.go | 2029 +++++++++++++++++ ...ree_tier_virtual_instance_resource_test.go | 1188 ++++++++++ .../2023-04-01/privateendpoints/README.md | 133 ++ .../2023-04-01/privateendpoints/client.go | 26 + .../2023-04-01/privateendpoints/constants.go | 1151 ++++++++++ .../privateendpoints/id_location.go | 116 + .../privateendpoints/id_privateendpoint.go | 125 + .../privateendpoints/id_providerlocation.go | 125 + ...ethod_availableprivateendpointtypeslist.go | 89 + ...privateendpointtypeslistbyresourcegroup.go | 89 + .../privateendpoints/method_createorupdate.go | 74 + .../privateendpoints/method_delete.go | 71 + .../2023-04-01/privateendpoints/method_get.go | 80 + .../privateendpoints/method_list.go | 90 + .../method_listbysubscription.go | 90 + .../model_applicationgatewaybackendaddress.go | 9 + ...el_applicationgatewaybackendaddresspool.go | 12 + ...tewaybackendaddresspoolpropertiesformat.go | 10 + ...model_applicationgatewayipconfiguration.go | 12 + ...ngatewayipconfigurationpropertiesformat.go | 9 + .../model_applicationsecuritygroup.go | 14 + ...pplicationsecuritygrouppropertiesformat.go | 9 + .../model_availableprivateendpointtype.go | 12 + .../model_backendaddresspool.go | 12 + ...odel_backendaddresspoolpropertiesformat.go | 19 + .../model_customdnsconfigpropertiesformat.go | 9 + .../privateendpoints/model_ddossettings.go | 9 + .../privateendpoints/model_delegation.go | 12 + .../privateendpoints/model_flowlog.go | 14 + .../model_flowlogformatparameters.go | 9 + .../model_flowlogpropertiesformat.go | 15 + .../model_frontendipconfiguration.go | 17 + ...frontendipconfigurationpropertiesformat.go | 19 + ...odel_gatewayloadbalancertunnelinterface.go | 11 + .../privateendpoints/model_inboundnatrule.go | 12 + .../model_inboundnatrulepropertiesformat.go | 19 + .../privateendpoints/model_ipconfiguration.go | 11 + .../model_ipconfigurationprofile.go | 12 + ..._ipconfigurationprofilepropertiesformat.go | 9 + .../model_ipconfigurationpropertiesformat.go | 12 + .../privateendpoints/model_iptag.go | 9 + .../model_loadbalancerbackendaddress.go | 9 + ...dbalancerbackendaddresspropertiesformat.go | 14 + .../privateendpoints/model_natgateway.go | 20 + .../model_natgatewaypropertiesformat.go | 13 + .../privateendpoints/model_natgatewaysku.go | 8 + .../model_natruleportmapping.go | 10 + .../model_networkinterface.go | 19 + .../model_networkinterfacednssettings.go | 12 + .../model_networkinterfaceipconfiguration.go | 12 + ...gurationprivatelinkconnectionproperties.go | 10 + ...nterfaceipconfigurationpropertiesformat.go | 21 + .../model_networkinterfacepropertiesformat.go | 29 + .../model_networkinterfacetapconfiguration.go | 12 + ...terfacetapconfigurationpropertiesformat.go | 9 + .../model_networksecuritygroup.go | 14 + ...el_networksecuritygrouppropertiesformat.go | 15 + .../privateendpoints/model_privateendpoint.go | 19 + .../model_privateendpointconnection.go | 12 + ...del_privateendpointconnectionproperties.go | 12 + .../model_privateendpointipconfiguration.go | 11 + ...rivateendpointipconfigurationproperties.go | 10 + .../model_privateendpointproperties.go | 16 + .../model_privatelinkservice.go | 19 + .../model_privatelinkserviceconnection.go | 12 + ..._privatelinkserviceconnectionproperties.go | 12 + ...model_privatelinkserviceconnectionstate.go | 10 + ...model_privatelinkserviceipconfiguration.go | 12 + ...atelinkserviceipconfigurationproperties.go | 13 + .../model_privatelinkserviceproperties.go | 17 + .../privateendpoints/model_publicipaddress.go | 22 + .../model_publicipaddressdnssettings.go | 11 + .../model_publicipaddresspropertiesformat.go | 23 + .../model_publicipaddresssku.go | 9 + .../model_resourcenavigationlink.go | 12 + .../model_resourcenavigationlinkformat.go | 10 + .../privateendpoints/model_resourceset.go | 8 + .../model_retentionpolicyparameters.go | 9 + .../privateendpoints/model_route.go | 12 + .../model_routepropertiesformat.go | 12 + .../privateendpoints/model_routetable.go | 14 + .../model_routetablepropertiesformat.go | 12 + .../privateendpoints/model_securityrule.go | 12 + .../model_securityrulepropertiesformat.go | 23 + .../model_serviceassociationlink.go | 12 + ..._serviceassociationlinkpropertiesformat.go | 12 + ...model_servicedelegationpropertiesformat.go | 10 + .../model_serviceendpointpolicy.go | 15 + .../model_serviceendpointpolicydefinition.go | 12 + ...ndpointpolicydefinitionpropertiesformat.go | 11 + ...l_serviceendpointpolicypropertiesformat.go | 13 + .../model_serviceendpointpropertiesformat.go | 10 + .../privateendpoints/model_subnet.go | 12 + .../model_subnetpropertiesformat.go | 26 + .../privateendpoints/model_subresource.go | 8 + ...trafficanalyticsconfigurationproperties.go | 12 + .../model_trafficanalyticsproperties.go | 8 + .../model_virtualnetworktap.go | 14 + ...model_virtualnetworktappropertiesformat.go | 13 + .../2023-04-01/privateendpoints/predicates.go | 70 + .../2023-04-01/privateendpoints/version.go | 12 + .../workloads/2023-04-01/client.go | 118 + .../workloads/2023-04-01/monitors/README.md | 120 + .../workloads/2023-04-01/monitors/client.go | 26 + .../2023-04-01/monitors/constants.go | 107 + .../2023-04-01/monitors/id_monitor.go | 125 + .../2023-04-01/monitors/method_create.go | 74 + .../2023-04-01/monitors/method_delete.go | 71 + .../2023-04-01/monitors/method_get.go | 51 + .../2023-04-01/monitors/method_list.go | 90 + .../monitors/method_listbyresourcegroup.go | 90 + .../2023-04-01/monitors/method_update.go | 55 + .../2023-04-01/monitors/model_error.go | 12 + .../monitors/model_erroradditionalinfo.go | 9 + .../2023-04-01/monitors/model_errordetail.go | 12 + .../monitors/model_errorinnererror.go | 8 + .../monitors/model_managedrgconfiguration.go | 8 + .../2023-04-01/monitors/model_monitor.go | 20 + .../monitors/model_monitorproperties.go | 17 + .../monitors/model_operationstatusresult.go | 45 + .../monitors/model_updatemonitorrequest.go | 13 + .../2023-04-01/monitors/predicates.go | 32 + .../workloads/2023-04-01/monitors/version.go | 12 + .../2023-04-01/providerinstances/README.md | 82 + .../2023-04-01/providerinstances/client.go | 26 + .../2023-04-01/providerinstances/constants.go | 110 + .../providerinstances/id_monitor.go | 125 + .../providerinstances/id_providerinstance.go | 134 ++ .../providerinstances/method_create.go | 74 + .../providerinstances/method_delete.go | 71 + .../providerinstances/method_get.go | 51 + .../providerinstances/method_list.go | 89 + .../model_db2providerinstanceproperties.go | 49 + .../providerinstances/model_error.go | 12 + .../model_erroradditionalinfo.go | 9 + .../providerinstances/model_errordetail.go | 12 + .../model_errorinnererror.go | 8 + .../model_hanadbproviderinstanceproperties.go | 51 + ...l_mssqlserverproviderinstanceproperties.go | 48 + .../model_operationstatusresult.go | 45 + ...heushaclusterproviderinstanceproperties.go | 46 + ..._prometheusosproviderinstanceproperties.go | 44 + .../model_providerinstance.go | 18 + .../model_providerinstanceproperties.go | 42 + .../model_providerspecificproperties.go | 93 + ..._sapnetweaverproviderinstanceproperties.go | 51 + .../providerinstances/predicates.go | 27 + .../2023-04-01/providerinstances/version.go | 12 + .../sapapplicationserverinstances/README.md | 128 ++ .../sapapplicationserverinstances/client.go | 26 + .../constants.go | 207 ++ .../id_applicationinstance.go | 134 ++ .../id_sapvirtualinstance.go | 125 + .../method_create.go | 74 + .../method_delete.go | 71 + .../method_get.go | 51 + .../method_list.go | 89 + .../method_startinstance.go | 70 + .../method_stopinstance.go | 74 + .../method_update.go | 74 + .../model_applicationservervmdetails.go | 10 + .../model_erroradditionalinfo.go | 9 + .../model_errordefinition.go | 10 + .../model_errordetail.go | 12 + .../model_loadbalancerdetails.go | 8 + .../model_operationstatusresult.go | 45 + .../model_sapapplicationserverinstance.go | 18 + .../model_sapapplicationserverproperties.go | 22 + .../model_sapvirtualinstanceerror.go | 8 + .../model_stoprequest.go | 8 + .../model_storageinformation.go | 8 + ...del_updatesapapplicationinstancerequest.go | 8 + .../predicates.go | 32 + .../sapapplicationserverinstances/version.go | 12 + .../sapavailabilityzonedetails/README.md | 41 + .../sapavailabilityzonedetails/client.go | 26 + .../sapavailabilityzonedetails/constants.go | 95 + .../sapavailabilityzonedetails/id_location.go | 116 + .../method_sapavailabilityzonedetails.go | 56 + ...model_sapavailabilityzonedetailsrequest.go | 10 + .../model_sapavailabilityzonedetailsresult.go | 8 + .../model_sapavailabilityzonepair.go | 9 + .../sapavailabilityzonedetails/version.go | 12 + .../2023-04-01/sapcentralinstances/README.md | 128 ++ .../2023-04-01/sapcentralinstances/client.go | 26 + .../sapcentralinstances/constants.go | 260 +++ .../sapcentralinstances/id_centralinstance.go | 134 ++ .../id_sapvirtualinstance.go | 125 + .../sapcentralinstances/method_create.go | 74 + .../sapcentralinstances/method_delete.go | 71 + .../sapcentralinstances/method_get.go | 51 + .../sapcentralinstances/method_list.go | 89 + .../method_startinstance.go | 70 + .../method_stopinstance.go | 74 + .../sapcentralinstances/method_update.go | 74 + .../model_centralservervmdetails.go | 10 + ...odel_enqueuereplicationserverproperties.go | 14 + .../model_enqueueserverproperties.go | 11 + .../model_erroradditionalinfo.go | 9 + .../model_errordefinition.go | 10 + .../sapcentralinstances/model_errordetail.go | 12 + .../model_gatewayserverproperties.go | 9 + .../model_loadbalancerdetails.go | 8 + .../model_messageserverproperties.go | 14 + .../model_operationstatusresult.go | 45 + .../model_sapcentralserverinstance.go | 18 + .../model_sapcentralserverproperties.go | 21 + .../model_sapvirtualinstanceerror.go | 8 + .../sapcentralinstances/model_stoprequest.go | 8 + .../model_storageinformation.go | 8 + .../model_updatesapcentralinstancerequest.go | 8 + .../sapcentralinstances/predicates.go | 32 + .../2023-04-01/sapcentralinstances/version.go | 12 + .../2023-04-01/sapdatabaseinstances/README.md | 128 ++ .../2023-04-01/sapdatabaseinstances/client.go | 26 + .../sapdatabaseinstances/constants.go | 116 + .../id_databaseinstance.go | 134 ++ .../id_sapvirtualinstance.go | 125 + .../sapdatabaseinstances/method_create.go | 74 + .../sapdatabaseinstances/method_delete.go | 71 + .../sapdatabaseinstances/method_get.go | 51 + .../sapdatabaseinstances/method_list.go | 89 + .../method_startinstance.go | 70 + .../method_stopinstance.go | 74 + .../sapdatabaseinstances/method_update.go | 74 + .../model_databasevmdetails.go | 10 + .../model_erroradditionalinfo.go | 9 + .../model_errordefinition.go | 10 + .../sapdatabaseinstances/model_errordetail.go | 12 + .../model_loadbalancerdetails.go | 8 + .../model_operationstatusresult.go | 45 + .../model_sapdatabaseinstance.go | 18 + .../model_sapdatabaseproperties.go | 16 + .../model_sapvirtualinstanceerror.go | 8 + .../sapdatabaseinstances/model_stoprequest.go | 8 + .../model_storageinformation.go | 8 + .../model_updatesapdatabaseinstancerequest.go | 8 + .../sapdatabaseinstances/predicates.go | 32 + .../sapdatabaseinstances/version.go | 12 + .../sapdiskconfigurations/README.md | 41 + .../sapdiskconfigurations/client.go | 26 + .../sapdiskconfigurations/constants.go | 233 ++ .../sapdiskconfigurations/id_location.go | 116 + .../method_sapdiskconfigurations.go | 56 + .../model_diskdetails.go | 14 + .../sapdiskconfigurations/model_disksku.go | 8 + .../model_diskvolumeconfiguration.go | 10 + .../model_sapdiskconfiguration.go | 9 + .../model_sapdiskconfigurationsrequest.go | 13 + .../model_sapdiskconfigurationsresult.go | 8 + .../sapdiskconfigurations/version.go | 12 + .../2023-04-01/saplandscapemonitor/README.md | 110 + .../2023-04-01/saplandscapemonitor/client.go | 26 + .../saplandscapemonitor/constants.go | 60 + .../saplandscapemonitor/id_monitor.go | 125 + .../saplandscapemonitor/method_create.go | 57 + .../saplandscapemonitor/method_delete.go | 48 + .../saplandscapemonitor/method_get.go | 52 + .../saplandscapemonitor/method_list.go | 52 + .../saplandscapemonitor/method_update.go | 56 + .../model_saplandscapemonitor.go | 16 + .../model_saplandscapemonitorlistresult.go | 9 + ...del_saplandscapemonitormetricthresholds.go | 11 + .../model_saplandscapemonitorproperties.go | 10 + ...l_saplandscapemonitorpropertiesgrouping.go | 9 + .../model_saplandscapemonitorsidmapping.go | 9 + .../2023-04-01/saplandscapemonitor/version.go | 12 + .../2023-04-01/saprecommendations/README.md | 41 + .../2023-04-01/saprecommendations/client.go | 26 + .../saprecommendations/constants.go | 256 +++ .../saprecommendations/id_location.go | 116 + .../method_sapsizingrecommendations.go | 63 + .../model_sapsizingrecommendationrequest.go | 16 + .../model_sapsizingrecommendationresult.go | 61 + .../model_singleserverrecommendationresult.go | 41 + .../model_threetierrecommendationresult.go | 46 + .../2023-04-01/saprecommendations/version.go | 12 + .../2023-04-01/sapsupportedsku/README.md | 41 + .../2023-04-01/sapsupportedsku/client.go | 26 + .../2023-04-01/sapsupportedsku/constants.go | 218 ++ .../2023-04-01/sapsupportedsku/id_location.go | 116 + .../sapsupportedsku/method_sapsupportedsku.go | 56 + .../model_sapsupportedresourceskusresult.go | 8 + .../sapsupportedsku/model_sapsupportedsku.go | 10 + .../model_sapsupportedskusrequest.go | 13 + .../2023-04-01/sapsupportedsku/version.go | 12 + .../2023-04-01/sapvirtualinstances/README.md | 149 ++ .../2023-04-01/sapvirtualinstances/client.go | 26 + .../sapvirtualinstances/constants.go | 709 ++++++ .../id_sapvirtualinstance.go | 125 + .../sapvirtualinstances/method_create.go | 74 + .../sapvirtualinstances/method_delete.go | 71 + .../sapvirtualinstances/method_get.go | 51 + .../method_listbyresourcegroup.go | 90 + .../method_listbysubscription.go | 90 + .../sapvirtualinstances/method_start.go | 70 + .../sapvirtualinstances/method_stop.go | 74 + .../sapvirtualinstances/method_update.go | 55 + .../model_applicationserverconfiguration.go | 10 + ...odel_applicationserverfullresourcenames.go | 9 + .../model_centralserverconfiguration.go | 10 + .../model_centralserverfullresourcenames.go | 10 + ...el_createandmountfileshareconfiguration.go | 42 + .../model_databaseconfiguration.go | 12 + .../model_databaseserverfullresourcenames.go | 10 + .../model_deployervmpackages.go | 9 + .../model_deploymentconfiguration.go | 77 + .../model_deploymentwithosconfiguration.go | 79 + .../model_discoveryconfiguration.go | 43 + .../model_diskconfiguration.go | 8 + .../sapvirtualinstances/model_disksku.go | 8 + .../model_diskvolumeconfiguration.go | 10 + .../model_erroradditionalinfo.go | 9 + .../model_errordefinition.go | 10 + .../sapvirtualinstances/model_errordetail.go | 12 + ...ternalinstallationsoftwareconfiguration.go | 41 + .../model_fileshareconfiguration.go | 69 + .../model_highavailabilityconfiguration.go | 8 + ...l_highavailabilitysoftwareconfiguration.go | 9 + .../model_imagereference.go | 11 + .../model_infrastructureconfiguration.go | 61 + .../model_linuxconfiguration.go | 43 + .../model_loadbalancerresourcenames.go | 11 + .../model_managedrgconfiguration.go | 8 + .../model_mountfileshareconfiguration.go | 42 + .../model_networkconfiguration.go | 8 + .../model_networkinterfaceresourcenames.go | 8 + .../model_operationstatusresult.go | 45 + .../model_osconfiguration.go | 61 + .../sapvirtualinstances/model_osprofile.go | 42 + .../model_ossapconfiguration.go | 9 + .../model_sapconfiguration.go | 69 + ...allwithoutosconfigsoftwareconfiguration.go | 44 + .../model_sapvirtualinstance.go | 20 + .../model_sapvirtualinstanceerror.go | 8 + .../model_sapvirtualinstanceproperties.go | 54 + ...l_serviceinitiatedsoftwareconfiguration.go | 46 + .../model_sharedstorageresourcenames.go | 9 + .../model_singleserverconfiguration.go | 78 + .../model_singleservercustomresourcenames.go | 53 + .../model_singleserverfullresourcenames.go | 41 + .../model_skipfileshareconfiguration.go | 40 + .../model_softwareconfiguration.go | 69 + .../model_sshconfiguration.go | 8 + .../sapvirtualinstances/model_sshkeypair.go | 9 + .../sapvirtualinstances/model_sshpublickey.go | 8 + .../sapvirtualinstances/model_stoprequest.go | 8 + .../model_storageconfiguration.go | 32 + .../model_threetierconfiguration.go | 80 + .../model_threetiercustomresourcenames.go | 53 + .../model_threetierfullresourcenames.go | 44 + .../model_updatesapvirtualinstancerequest.go | 13 + .../model_virtualmachineconfiguration.go | 10 + .../model_virtualmachineresourcenames.go | 12 + .../model_windowsconfiguration.go | 40 + .../sapvirtualinstances/predicates.go | 32 + .../2023-04-01/sapvirtualinstances/version.go | 12 + vendor/modules.txt | 13 + website/allowed-subcategories | 3 +- ..._three_tier_virtual_instance.html.markdown | 565 +++++ 388 files changed, 20650 insertions(+), 3 deletions(-) create mode 100644 internal/services/network/validate/network_interface_name.go create mode 100644 internal/services/network/validate/network_interface_name_test.go create mode 100644 internal/services/storage/parse/legacy_storage_share_resource_manager.go create mode 100644 internal/services/storage/parse/legacy_storage_share_resource_manager_test.go create mode 100644 internal/services/storage/validate/legacy_storage_share_resource_manager_id.go create mode 100644 internal/services/storage/validate/legacy_storage_share_resource_manager_id_test.go create mode 100644 internal/services/workloads/client/client.go create mode 100644 internal/services/workloads/registration.go create mode 100644 internal/services/workloads/validate/admin_username.go create mode 100644 internal/services/workloads/validate/admin_username_test.go create mode 100644 internal/services/workloads/validate/availability_set_name.go create mode 100644 internal/services/workloads/validate/availability_set_name_test.go create mode 100644 internal/services/workloads/validate/disk_name.go create mode 100644 internal/services/workloads/validate/disk_name_test.go create mode 100644 internal/services/workloads/validate/host_name.go create mode 100644 internal/services/workloads/validate/host_name_test.go create mode 100644 internal/services/workloads/validate/sap_fqdn.go create mode 100644 internal/services/workloads/validate/sap_fqdn_test.go create mode 100644 internal/services/workloads/validate/sap_virtual_instance_name.go create mode 100644 internal/services/workloads/validate/sap_virtual_instance_name_test.go create mode 100644 internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go create mode 100644 internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddress.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspool.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygroup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_availableprivateendpointtype.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspool.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspoolpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_customdnsconfigpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ddossettings.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_delegation.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlog.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogformatparameters.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrule.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrulepropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofile.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_iptag.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddress.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgateway.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaypropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaysku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natruleportmapping.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterface.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacednssettings.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacepropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygroup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygrouppropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpoint.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfigurationproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkservice.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionstate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddress.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddressdnssettings.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresspropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresssku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlink.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlinkformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourceset.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_retentionpolicyparameters.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_route.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routepropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetable.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetablepropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrule.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrulepropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlink.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_servicedelegationpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicy.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinition.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnet.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnetpropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subresource.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktap.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktappropertiesformat.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/id_monitor.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_listbyresourcegroup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_error.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_erroradditionalinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_errordetail.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_errorinnererror.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_managedrgconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_monitor.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_monitorproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_operationstatusresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_updatemonitorrequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_db2providerinstanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_error.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_erroradditionalinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_errordetail.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_errorinnererror.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_hanadbproviderinstanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_mssqlserverproviderinstanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_operationstatusresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_prometheushaclusterproviderinstanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_prometheusosproviderinstanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerspecificproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_sapnetweaverproviderinstanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_startinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_stopinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_applicationservervmdetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_erroradditionalinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_errordefinition.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_errordetail.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_loadbalancerdetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_operationstatusresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapapplicationserverinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapapplicationserverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapvirtualinstanceerror.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_stoprequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_storageinformation.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_updatesapapplicationinstancerequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/method_sapavailabilityzonedetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonedetailsrequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonedetailsresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonepair.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_startinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_stopinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_centralservervmdetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_enqueuereplicationserverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_enqueueserverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_erroradditionalinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_errordefinition.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_errordetail.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_gatewayserverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_loadbalancerdetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_messageserverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_operationstatusresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapcentralserverinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapcentralserverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapvirtualinstanceerror.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_stoprequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_storageinformation.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_updatesapcentralinstancerequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_startinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_stopinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_databasevmdetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_erroradditionalinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_errordefinition.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_errordetail.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_loadbalancerdetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_operationstatusresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapdatabaseinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapdatabaseproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapvirtualinstanceerror.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_stoprequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_storageinformation.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_updatesapdatabaseinstancerequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/method_sapdiskconfigurations.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_diskdetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_disksku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_diskvolumeconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfigurationsrequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfigurationsresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitor.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorlistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitormetricthresholds.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorpropertiesgrouping.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorsidmapping.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/method_sapsizingrecommendations.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationrequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_singleserverrecommendationresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_threetierrecommendationresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/method_sapsupportedsku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedresourceskusresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedsku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedskusrequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_delete.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbyresourcegroup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbysubscription.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_start.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_stop.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_applicationserverconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_applicationserverfullresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_centralserverconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_centralserverfullresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_createandmountfileshareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_databaseconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_databaseserverfullresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deployervmpackages.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentwithosconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_discoveryconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_diskconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_disksku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_diskvolumeconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_erroradditionalinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_errordefinition.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_errordetail.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_externalinstallationsoftwareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_fileshareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_highavailabilityconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_highavailabilitysoftwareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_imagereference.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_infrastructureconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_linuxconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_loadbalancerresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_managedrgconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_mountfileshareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_networkconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_networkinterfaceresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_operationstatusresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osprofile.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_ossapconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapinstallwithoutosconfigsoftwareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceerror.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_serviceinitiatedsoftwareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sharedstorageresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleservercustomresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverfullresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_skipfileshareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_softwareconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshkeypair.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshpublickey.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_stoprequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_storageconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetiercustomresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierfullresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_updatesapvirtualinstancerequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_virtualmachineconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_virtualmachineresourcenames.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_windowsconfiguration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/version.go create mode 100644 website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index a038c804be02..1d7baf940812 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -347,3 +347,6 @@ service/virtual-desktops: service/vmware: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_vmware_((.|\n)*)###' + +service/workloads: + - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_workloads_sap_three_tier_virtual_instance((.|\n)*)###' diff --git a/.github/labeler-pull-request-triage.yml b/.github/labeler-pull-request-triage.yml index 41be0f5af977..517358b3dd3d 100644 --- a/.github/labeler-pull-request-triage.yml +++ b/.github/labeler-pull-request-triage.yml @@ -584,3 +584,8 @@ service/vmware: - changed-files: - any-glob-to-any-file: - internal/services/vmware/**/* + +service/workloads: +- changed-files: + - any-glob-to-any-file: + - internal/services/workloads/**/* diff --git a/.teamcity/components/generated/services.kt b/.teamcity/components/generated/services.kt index 25cce5b39f70..5e1c5000daff 100644 --- a/.teamcity/components/generated/services.kt +++ b/.teamcity/components/generated/services.kt @@ -128,5 +128,6 @@ var services = mapOf( "vmware" to "VMware", "videoanalyzer" to "Video Analyzer", "voiceservices" to "Voice Services", - "web" to "Web" + "web" to "Web", + "workloads" to "Workloads" ) \ No newline at end of file diff --git a/.teamcity/components/settings.kt b/.teamcity/components/settings.kt index fb3e7cc008ec..a1a38423d8f4 100644 --- a/.teamcity/components/settings.kt +++ b/.teamcity/components/settings.kt @@ -189,5 +189,8 @@ var serviceTestConfigurationOverrides = mapOf( "voiceservices" to testConfiguration(parallelism = 3, locationOverride = LocationConfiguration("westcentralus", "westcentralus", "westcentralus", false)), // Offset start hour to avoid collision with new App Service, reduce frequency of testing days - "web" to testConfiguration(startHour = 3, daysOfWeek = "1,3,5", locationOverride = LocationConfiguration("westeurope", "francecentral", "eastus2", true)) + "web" to testConfiguration(startHour = 3, daysOfWeek = "1,3,5", locationOverride = LocationConfiguration("westeurope", "francecentral", "eastus2", true)), + + // Workloads has quota available in certain locations + "workloads" to testConfiguration(parallelism = 1, locationOverride = LocationConfiguration("eastus", "westeurope", "francecentral", false)) ) diff --git a/internal/acceptance/testcase.go b/internal/acceptance/testcase.go index 2425d7ea3cc1..95bd330acde0 100644 --- a/internal/acceptance/testcase.go +++ b/internal/acceptance/testcase.go @@ -143,5 +143,9 @@ func (td TestData) externalProviders() map[string]resource.ExternalProvider { VersionConstraint: "=0.9.1", Source: "registry.terraform.io/hashicorp/time", }, + "tls": { + VersionConstraint: "=4.0.4", + Source: "registry.terraform.io/hashicorp/tls", + }, } } diff --git a/internal/clients/client.go b/internal/clients/client.go index f1a776d27bfb..23d1401efe65 100644 --- a/internal/clients/client.go +++ b/internal/clients/client.go @@ -21,6 +21,7 @@ import ( servicenetworking_v2023_05_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview" storagecache_2023_05_01 "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01" timeseriesinsights_v2020_05_15 "github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15" + workloads_v2023_04_01 "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01" "github.com/hashicorp/terraform-provider-azurerm/internal/common" "github.com/hashicorp/terraform-provider-azurerm/internal/features" aadb2c "github.com/hashicorp/terraform-provider-azurerm/internal/services/aadb2c/client" @@ -144,6 +145,7 @@ import ( vmware "github.com/hashicorp/terraform-provider-azurerm/internal/services/vmware/client" voiceServices "github.com/hashicorp/terraform-provider-azurerm/internal/services/voiceservices/client" web "github.com/hashicorp/terraform-provider-azurerm/internal/services/web/client" + workloads "github.com/hashicorp/terraform-provider-azurerm/internal/services/workloads/client" ) type Client struct { @@ -276,6 +278,7 @@ type Client struct { Vmware *vmware.Client VoiceServices *voiceServices.Client Web *web.Client + Workloads *workloads_v2023_04_01.Client } // NOTE: it should be possible for this method to become Private once the top level Client's removed @@ -614,5 +617,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error } client.Web = web.NewClient(o) + if client.Workloads, err = workloads.NewClient(o); err != nil { + return fmt.Errorf("building clients for Workloads: %+v", err) + } + return nil } diff --git a/internal/provider/services.go b/internal/provider/services.go index 6c092f7c39be..b69c1a343f47 100644 --- a/internal/provider/services.go +++ b/internal/provider/services.go @@ -129,6 +129,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/vmware" "github.com/hashicorp/terraform-provider-azurerm/internal/services/voiceservices" "github.com/hashicorp/terraform-provider-azurerm/internal/services/web" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/workloads" ) //go:generate go run ../tools/generator-services/main.go -path=../../ @@ -208,6 +209,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration { vmware.Registration{}, voiceservices.Registration{}, web.Registration{}, + workloads.Registration{}, } services = append(services, autoRegisteredTypedServices()...) return services diff --git a/internal/services/network/validate/network_interface_name.go b/internal/services/network/validate/network_interface_name.go new file mode 100644 index 000000000000..819e6367ee81 --- /dev/null +++ b/internal/services/network/validate/network_interface_name.go @@ -0,0 +1,16 @@ +package validate + +import ( + "fmt" + "regexp" +) + +func NetworkInterfaceName(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + if matched := regexp.MustCompile(`^[0-9a-zA-Z][0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_]$`).Match([]byte(value)); !matched { + errors = append(errors, fmt.Errorf("%q must be between 2 and 64 characters in length. It must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods or hyphens.", k)) + } + + return warnings, errors +} diff --git a/internal/services/network/validate/network_interface_name_test.go b/internal/services/network/validate/network_interface_name_test.go new file mode 100644 index 000000000000..0672e8fa322f --- /dev/null +++ b/internal/services/network/validate/network_interface_name_test.go @@ -0,0 +1,56 @@ +package validate + +import ( + "strings" + "testing" +) + +func TestNetworkInterfaceName(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + { + Input: "", + Valid: false, + }, + { + Input: "-a", + Valid: false, + }, + { + Input: "1_n.i-c", + Valid: true, + }, + { + Input: "01nic", + Valid: true, + }, + { + Input: "01nic01", + Valid: true, + }, + { + Input: strings.Repeat("s", 63), + Valid: true, + }, + { + Input: strings.Repeat("s", 64), + Valid: true, + }, + { + Input: strings.Repeat("s", 65), + Valid: false, + }, + } + + for _, tc := range cases { + t.Logf("[DEBUG] Testing Value %s", tc.Input) + _, errors := NetworkInterfaceName(tc.Input, "name") + valid := len(errors) == 0 + + if tc.Valid != valid { + t.Fatalf("Expected %t but got %t", tc.Valid, valid) + } + } +} diff --git a/internal/services/storage/parse/legacy_storage_share_resource_manager.go b/internal/services/storage/parse/legacy_storage_share_resource_manager.go new file mode 100644 index 000000000000..83210949246a --- /dev/null +++ b/internal/services/storage/parse/legacy_storage_share_resource_manager.go @@ -0,0 +1,84 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package parse + +// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +type LegacyStorageShareResourceManagerId struct { + SubscriptionId string + ResourceGroup string + StorageAccountName string + FileServiceName string + ShareName string +} + +func NewLegacyStorageShareResourceManagerID(subscriptionId, resourceGroup, storageAccountName, fileServiceName, shareName string) LegacyStorageShareResourceManagerId { + return LegacyStorageShareResourceManagerId{ + SubscriptionId: subscriptionId, + ResourceGroup: resourceGroup, + StorageAccountName: storageAccountName, + FileServiceName: fileServiceName, + ShareName: shareName, + } +} + +func (id LegacyStorageShareResourceManagerId) String() string { + segments := []string{ + fmt.Sprintf("Share Name %q", id.ShareName), + fmt.Sprintf("File Service Name %q", id.FileServiceName), + fmt.Sprintf("Storage Account Name %q", id.StorageAccountName), + fmt.Sprintf("Resource Group %q", id.ResourceGroup), + } + segmentsStr := strings.Join(segments, " / ") + return fmt.Sprintf("%s: (%s)", "Legacy Storage Share Resource Manager", segmentsStr) +} + +func (id LegacyStorageShareResourceManagerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Storage/storageAccounts/%s/fileServices/%s/shares/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.StorageAccountName, id.FileServiceName, id.ShareName) +} + +// LegacyStorageShareResourceManagerID parses a LegacyStorageShareResourceManager ID into an LegacyStorageShareResourceManagerId struct +func LegacyStorageShareResourceManagerID(input string) (*LegacyStorageShareResourceManagerId, error) { + id, err := resourceids.ParseAzureResourceID(input) + if err != nil { + return nil, fmt.Errorf("parsing %q as an LegacyStorageShareResourceManager ID: %+v", input, err) + } + + resourceId := LegacyStorageShareResourceManagerId{ + SubscriptionId: id.SubscriptionID, + ResourceGroup: id.ResourceGroup, + } + + if resourceId.SubscriptionId == "" { + return nil, fmt.Errorf("ID was missing the 'subscriptions' element") + } + + if resourceId.ResourceGroup == "" { + return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") + } + + if resourceId.StorageAccountName, err = id.PopSegment("storageAccounts"); err != nil { + return nil, err + } + if resourceId.FileServiceName, err = id.PopSegment("fileServices"); err != nil { + return nil, err + } + if resourceId.ShareName, err = id.PopSegment("shares"); err != nil { + return nil, err + } + + if err := id.ValidateNoEmptySegments(input); err != nil { + return nil, err + } + + return &resourceId, nil +} diff --git a/internal/services/storage/parse/legacy_storage_share_resource_manager_test.go b/internal/services/storage/parse/legacy_storage_share_resource_manager_test.go new file mode 100644 index 000000000000..f3fd0a2ce93d --- /dev/null +++ b/internal/services/storage/parse/legacy_storage_share_resource_manager_test.go @@ -0,0 +1,147 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package parse + +// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.Id = LegacyStorageShareResourceManagerId{} + +func TestLegacyStorageShareResourceManagerIDFormatter(t *testing.T) { + actual := NewLegacyStorageShareResourceManagerID("12345678-1234-9876-4563-123456789012", "resGroup1", "storageAccount1", "fileService1", "share1").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/share1" + if actual != expected { + t.Fatalf("Expected %q but got %q", expected, actual) + } +} + +func TestLegacyStorageShareResourceManagerID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LegacyStorageShareResourceManagerId + }{ + + { + // empty + Input: "", + Error: true, + }, + + { + // missing SubscriptionId + Input: "/", + Error: true, + }, + + { + // missing value for SubscriptionId + Input: "/subscriptions/", + Error: true, + }, + + { + // missing ResourceGroup + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", + Error: true, + }, + + { + // missing value for ResourceGroup + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", + Error: true, + }, + + { + // missing StorageAccountName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/", + Error: true, + }, + + { + // missing value for StorageAccountName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/", + Error: true, + }, + + { + // missing FileServiceName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/", + Error: true, + }, + + { + // missing value for FileServiceName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/", + Error: true, + }, + + { + // missing ShareName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/", + Error: true, + }, + + { + // missing value for ShareName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/", + Error: true, + }, + + { + // valid + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/share1", + Expected: &LegacyStorageShareResourceManagerId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroup: "resGroup1", + StorageAccountName: "storageAccount1", + FileServiceName: "fileService1", + ShareName: "share1", + }, + }, + + { + // upper-cased + Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.STORAGE/STORAGEACCOUNTS/STORAGEACCOUNT1/FILESERVICES/FILESERVICE1/SHARES/SHARE1", + Error: true, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := LegacyStorageShareResourceManagerID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %s", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + if actual.ResourceGroup != v.Expected.ResourceGroup { + t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) + } + if actual.StorageAccountName != v.Expected.StorageAccountName { + t.Fatalf("Expected %q but got %q for StorageAccountName", v.Expected.StorageAccountName, actual.StorageAccountName) + } + if actual.FileServiceName != v.Expected.FileServiceName { + t.Fatalf("Expected %q but got %q for FileServiceName", v.Expected.FileServiceName, actual.FileServiceName) + } + if actual.ShareName != v.Expected.ShareName { + t.Fatalf("Expected %q but got %q for ShareName", v.Expected.ShareName, actual.ShareName) + } + } +} diff --git a/internal/services/storage/resourceids.go b/internal/services/storage/resourceids.go index 003c70183894..fa7a920cc520 100644 --- a/internal/services/storage/resourceids.go +++ b/internal/services/storage/resourceids.go @@ -7,4 +7,5 @@ package storage //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=StorageAccountDefaultBlob -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/blobServices/default //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=StorageQueueResourceManager -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/queueServices/default/queues/queue1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=StorageShareResourceManager -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/fileshares/share1 +//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=LegacyStorageShareResourceManager -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/share1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=StorageAccountManagementPolicy -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/managementPolicies/policy1 diff --git a/internal/services/storage/validate/legacy_storage_share_resource_manager_id.go b/internal/services/storage/validate/legacy_storage_share_resource_manager_id.go new file mode 100644 index 000000000000..f3a0e94d7aae --- /dev/null +++ b/internal/services/storage/validate/legacy_storage_share_resource_manager_id.go @@ -0,0 +1,26 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten + +import ( + "fmt" + + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" +) + +func LegacyStorageShareResourceManagerID(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 := parse.LegacyStorageShareResourceManagerID(v); err != nil { + errors = append(errors, err) + } + + return +} diff --git a/internal/services/storage/validate/legacy_storage_share_resource_manager_id_test.go b/internal/services/storage/validate/legacy_storage_share_resource_manager_id_test.go new file mode 100644 index 000000000000..a6bf8ca7fbde --- /dev/null +++ b/internal/services/storage/validate/legacy_storage_share_resource_manager_id_test.go @@ -0,0 +1,103 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package validate + +// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten + +import "testing" + +func TestLegacyStorageShareResourceManagerID(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + + { + // empty + Input: "", + Valid: false, + }, + + { + // missing SubscriptionId + Input: "/", + Valid: false, + }, + + { + // missing value for SubscriptionId + Input: "/subscriptions/", + Valid: false, + }, + + { + // missing ResourceGroup + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", + Valid: false, + }, + + { + // missing value for ResourceGroup + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", + Valid: false, + }, + + { + // missing StorageAccountName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/", + Valid: false, + }, + + { + // missing value for StorageAccountName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/", + Valid: false, + }, + + { + // missing FileServiceName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/", + Valid: false, + }, + + { + // missing value for FileServiceName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/", + Valid: false, + }, + + { + // missing ShareName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/", + Valid: false, + }, + + { + // missing value for ShareName + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/", + Valid: false, + }, + + { + // valid + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/share1", + Valid: true, + }, + + { + // upper-cased + Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.STORAGE/STORAGEACCOUNTS/STORAGEACCOUNT1/FILESERVICES/FILESERVICE1/SHARES/SHARE1", + Valid: false, + }, + } + for _, tc := range cases { + t.Logf("[DEBUG] Testing Value %s", tc.Input) + _, errors := LegacyStorageShareResourceManagerID(tc.Input, "test") + valid := len(errors) == 0 + + if tc.Valid != valid { + t.Fatalf("Expected %t but got %t", tc.Valid, valid) + } + } +} diff --git a/internal/services/workloads/client/client.go b/internal/services/workloads/client/client.go new file mode 100644 index 000000000000..dbaf2e0118ee --- /dev/null +++ b/internal/services/workloads/client/client.go @@ -0,0 +1,17 @@ +package client + +import ( + sapvirtualinstances_v2023_04_01 "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/terraform-provider-azurerm/internal/common" +) + +func NewClient(o *common.ClientOptions) (*sapvirtualinstances_v2023_04_01.Client, error) { + client, err := sapvirtualinstances_v2023_04_01.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { + o.Configure(c, o.Authorizers.ResourceManager) + }) + if err != nil { + return nil, err + } + return client, nil +} diff --git a/internal/services/workloads/registration.go b/internal/services/workloads/registration.go new file mode 100644 index 000000000000..5dc53a767192 --- /dev/null +++ b/internal/services/workloads/registration.go @@ -0,0 +1,37 @@ +package workloads + +import ( + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" +) + +type Registration struct{} + +var _ sdk.TypedServiceRegistration = Registration{} + +func (r Registration) AssociatedGitHubLabel() string { + return "service/workloads" +} + +// Name is the name of this Service +func (r Registration) Name() string { + return "Workloads" +} + +// WebsiteCategories returns a list of categories which can be used for the sidebar +func (r Registration) WebsiteCategories() []string { + return []string{ + "Workloads", + } +} + +// DataSources returns a list of Data Sources supported by this Service +func (r Registration) DataSources() []sdk.DataSource { + return []sdk.DataSource{} +} + +// Resources returns a list of Resources supported by this Service +func (r Registration) Resources() []sdk.Resource { + return []sdk.Resource{ + WorkloadsSAPThreeTierVirtualInstanceResource{}, + } +} diff --git a/internal/services/workloads/validate/admin_username.go b/internal/services/workloads/validate/admin_username.go new file mode 100644 index 000000000000..d179f082118e --- /dev/null +++ b/internal/services/workloads/validate/admin_username.go @@ -0,0 +1,21 @@ +package validate + +import ( + "fmt" +) + +func AdminUsername(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + if value == "" { + errors = append(errors, fmt.Errorf("%q must not be empty", k)) + return warnings, errors + } + + if len(value) > 64 { + errors = append(errors, fmt.Errorf("%q may contain at most 64 characters", k)) + return warnings, errors + } + + return warnings, errors +} diff --git a/internal/services/workloads/validate/admin_username_test.go b/internal/services/workloads/validate/admin_username_test.go new file mode 100644 index 000000000000..1841f8c79ab8 --- /dev/null +++ b/internal/services/workloads/validate/admin_username_test.go @@ -0,0 +1,44 @@ +package validate + +import ( + "strings" + "testing" +) + +func TestAdminUsername(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + { + Input: "", + Valid: false, + }, + { + Input: "testAdmin", + Valid: true, + }, + { + Input: strings.Repeat("s", 63), + Valid: true, + }, + { + Input: strings.Repeat("s", 64), + Valid: true, + }, + { + Input: strings.Repeat("s", 65), + Valid: false, + }, + } + + for _, tc := range cases { + t.Logf("[DEBUG] Testing Value %s", tc.Input) + _, errors := AdminUsername(tc.Input, "admin_username") + valid := len(errors) == 0 + + if tc.Valid != valid { + t.Fatalf("Expected %t but got %t", tc.Valid, valid) + } + } +} diff --git a/internal/services/workloads/validate/availability_set_name.go b/internal/services/workloads/validate/availability_set_name.go new file mode 100644 index 000000000000..2de1ebddc259 --- /dev/null +++ b/internal/services/workloads/validate/availability_set_name.go @@ -0,0 +1,16 @@ +package validate + +import ( + "fmt" +) + +func AvailabilitySetName(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + if len(value) < 1 || len(value) > 80 { + errors = append(errors, fmt.Errorf("%q must be between 1 and 80 characters in length", k)) + return warnings, errors + } + + return warnings, errors +} diff --git a/internal/services/workloads/validate/availability_set_name_test.go b/internal/services/workloads/validate/availability_set_name_test.go new file mode 100644 index 000000000000..4b5c11882210 --- /dev/null +++ b/internal/services/workloads/validate/availability_set_name_test.go @@ -0,0 +1,44 @@ +package validate + +import ( + "strings" + "testing" +) + +func TestAvailabilitySetName(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + { + Input: "", + Valid: false, + }, + { + Input: "testname", + Valid: true, + }, + { + Input: strings.Repeat("s", 79), + Valid: true, + }, + { + Input: strings.Repeat("s", 80), + Valid: true, + }, + { + Input: strings.Repeat("s", 81), + Valid: false, + }, + } + + for _, tc := range cases { + t.Logf("[DEBUG] Testing Value %s", tc.Input) + _, errors := AvailabilitySetName(tc.Input, "availability_set_name") + valid := len(errors) == 0 + + if tc.Valid != valid { + t.Fatalf("Expected %t but got %t", tc.Valid, valid) + } + } +} diff --git a/internal/services/workloads/validate/disk_name.go b/internal/services/workloads/validate/disk_name.go new file mode 100644 index 000000000000..0ad4611a8906 --- /dev/null +++ b/internal/services/workloads/validate/disk_name.go @@ -0,0 +1,21 @@ +package validate + +import ( + "fmt" +) + +func DiskName(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + if value == "" { + errors = append(errors, fmt.Errorf("%q must not be empty", k)) + return warnings, errors + } + + if len(value) < 1 || len(value) > 80 { + errors = append(errors, fmt.Errorf("%q must be between 1 and 80 characters in length", k)) + return warnings, errors + } + + return warnings, errors +} diff --git a/internal/services/workloads/validate/disk_name_test.go b/internal/services/workloads/validate/disk_name_test.go new file mode 100644 index 000000000000..06ec65db5b8f --- /dev/null +++ b/internal/services/workloads/validate/disk_name_test.go @@ -0,0 +1,44 @@ +package validate + +import ( + "strings" + "testing" +) + +func TestDiskName(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + { + Input: "", + Valid: false, + }, + { + Input: "testosdisk", + Valid: true, + }, + { + Input: strings.Repeat("s", 79), + Valid: true, + }, + { + Input: strings.Repeat("s", 80), + Valid: true, + }, + { + Input: strings.Repeat("s", 81), + Valid: false, + }, + } + + for _, tc := range cases { + t.Logf("[DEBUG] Testing Value %s", tc.Input) + _, errors := DiskName(tc.Input, "name") + valid := len(errors) == 0 + + if tc.Valid != valid { + t.Fatalf("Expected %t but got %t", tc.Valid, valid) + } + } +} diff --git a/internal/services/workloads/validate/host_name.go b/internal/services/workloads/validate/host_name.go new file mode 100644 index 000000000000..3eff69fafd86 --- /dev/null +++ b/internal/services/workloads/validate/host_name.go @@ -0,0 +1,21 @@ +package validate + +import ( + "fmt" +) + +func HostName(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + if value == "" { + errors = append(errors, fmt.Errorf("%q must not be empty", k)) + return warnings, errors + } + + if len(value) > 13 { + errors = append(errors, fmt.Errorf("%q may contain at most 13 characters", k)) + return warnings, errors + } + + return warnings, errors +} diff --git a/internal/services/workloads/validate/host_name_test.go b/internal/services/workloads/validate/host_name_test.go new file mode 100644 index 000000000000..d35bead3fa8a --- /dev/null +++ b/internal/services/workloads/validate/host_name_test.go @@ -0,0 +1,44 @@ +package validate + +import ( + "strings" + "testing" +) + +func TestHostName(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + { + Input: "", + Valid: false, + }, + { + Input: "testhost", + Valid: true, + }, + { + Input: strings.Repeat("s", 12), + Valid: true, + }, + { + Input: strings.Repeat("s", 13), + Valid: true, + }, + { + Input: strings.Repeat("s", 14), + Valid: false, + }, + } + + for _, tc := range cases { + t.Logf("[DEBUG] Testing Value %s", tc.Input) + _, errors := HostName(tc.Input, "host_name") + valid := len(errors) == 0 + + if tc.Valid != valid { + t.Fatalf("Expected %t but got %t", tc.Valid, valid) + } + } +} diff --git a/internal/services/workloads/validate/sap_fqdn.go b/internal/services/workloads/validate/sap_fqdn.go new file mode 100644 index 000000000000..72d86f1e325b --- /dev/null +++ b/internal/services/workloads/validate/sap_fqdn.go @@ -0,0 +1,16 @@ +package validate + +import ( + "fmt" +) + +func SAPFQDN(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + if len(value) < 2 || len(value) > 34 { + errors = append(errors, fmt.Errorf("%q must be between 2 and 34 characters in length", k)) + return warnings, errors + } + + return warnings, errors +} diff --git a/internal/services/workloads/validate/sap_fqdn_test.go b/internal/services/workloads/validate/sap_fqdn_test.go new file mode 100644 index 000000000000..d4edf6d1e0de --- /dev/null +++ b/internal/services/workloads/validate/sap_fqdn_test.go @@ -0,0 +1,44 @@ +package validate + +import ( + "strings" + "testing" +) + +func TestSAPFQDN(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + { + Input: "", + Valid: false, + }, + { + Input: "sap.contoso.com", + Valid: true, + }, + { + Input: strings.Repeat("s", 33), + Valid: true, + }, + { + Input: strings.Repeat("s", 34), + Valid: true, + }, + { + Input: strings.Repeat("s", 35), + Valid: false, + }, + } + + for _, tc := range cases { + t.Logf("[DEBUG] Testing Value %s", tc.Input) + _, errors := SAPFQDN(tc.Input, "sap_fqdn") + valid := len(errors) == 0 + + if tc.Valid != valid { + t.Fatalf("Expected %t but got %t", tc.Valid, valid) + } + } +} diff --git a/internal/services/workloads/validate/sap_virtual_instance_name.go b/internal/services/workloads/validate/sap_virtual_instance_name.go new file mode 100644 index 000000000000..b43ba3fedfd7 --- /dev/null +++ b/internal/services/workloads/validate/sap_virtual_instance_name.go @@ -0,0 +1,17 @@ +package validate + +import ( + "fmt" + "regexp" +) + +func SAPVirtualInstanceName(v interface{}, k string) (warnings []string, errors []error) { + value := v.(string) + + if matched := regexp.MustCompile(`^[A-Z][A-Z0-9][A-Z0-9]$`).Match([]byte(value)); !matched { + errors = append(errors, fmt.Errorf("%q must be an alphabet for the first letter. The second and third letters must be alphanumeric and all alphabets must be uppercase", k)) + return warnings, errors + } + + return warnings, errors +} diff --git a/internal/services/workloads/validate/sap_virtual_instance_name_test.go b/internal/services/workloads/validate/sap_virtual_instance_name_test.go new file mode 100644 index 000000000000..62cf39077562 --- /dev/null +++ b/internal/services/workloads/validate/sap_virtual_instance_name_test.go @@ -0,0 +1,45 @@ +package validate + +import "testing" + +func TestSAPVirtualInstanceName(t *testing.T) { + cases := []struct { + Input string + Valid bool + }{ + { + Input: "", + Valid: false, + }, + { + Input: "x01", + Valid: false, + }, + { + Input: "xx", + Valid: false, + }, + { + Input: "x0222", + Valid: false, + }, + { + Input: "X01", + Valid: true, + }, + { + Input: "XAA", + Valid: true, + }, + } + + for _, tc := range cases { + t.Logf("[DEBUG] Testing Value %s", tc.Input) + _, errors := SAPVirtualInstanceName(tc.Input, "name") + valid := len(errors) == 0 + + if tc.Valid != valid { + t.Fatalf("Expected %t but got %t", tc.Valid, valid) + } + } +} diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go new file mode 100644 index 000000000000..3aa6d9bddab3 --- /dev/null +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go @@ -0,0 +1,2029 @@ +package workloads + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "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-helpers/resourcemanager/resourcegroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + computeValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" + networkValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" + storageParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" + storageValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/workloads/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type WorkloadsSAPThreeTierVirtualInstanceModel struct { + Name string `tfschema:"name"` + ResourceGroupName string `tfschema:"resource_group_name"` + Location string `tfschema:"location"` + AppLocation string `tfschema:"app_location"` + OsSapConfiguration []OsSapConfiguration `tfschema:"os_sap_configuration"` + ThreeTierConfiguration []ThreeTierConfiguration `tfschema:"three_tier_configuration"` + Environment string `tfschema:"environment"` + Identity []identity.ModelUserAssigned `tfschema:"identity"` + ManagedResourceGroupName string `tfschema:"managed_resource_group_name"` + SapProduct string `tfschema:"sap_product"` + Tags map[string]string `tfschema:"tags"` +} + +type OsSapConfiguration struct { + DeployerVmPackages []DeployerVmPackages `tfschema:"deployer_virtual_machine_packages"` + SapFqdn string `tfschema:"sap_fqdn"` +} + +type DeployerVmPackages struct { + StorageAccountId string `tfschema:"storage_account_id"` + Url string `tfschema:"url"` +} + +type DiskVolumeConfiguration struct { + VolumeName string `tfschema:"volume_name"` + NumberOfDisks int `tfschema:"number_of_disks"` + SizeGb int `tfschema:"size_in_gb"` + SkuName string `tfschema:"sku_name"` +} + +type VirtualMachineConfiguration struct { + ImageReference []ImageReference `tfschema:"image"` + OSProfile []OSProfile `tfschema:"os_profile"` + VmSize string `tfschema:"virtual_machine_size"` +} + +type ImageReference struct { + Offer string `tfschema:"offer"` + Publisher string `tfschema:"publisher"` + Sku string `tfschema:"sku"` + Version string `tfschema:"version"` +} + +type OSProfile struct { + AdminUsername string `tfschema:"admin_username"` + SshPrivateKey string `tfschema:"ssh_private_key"` + SshPublicKey string `tfschema:"ssh_public_key"` +} + +type VirtualMachineFullResourceNames struct { + DataDiskNames map[string]interface{} `tfschema:"data_disk_names"` + HostName string `tfschema:"host_name"` + NetworkInterfaceNames []string `tfschema:"network_interface_names"` + OSDiskName string `tfschema:"os_disk_name"` + VMName string `tfschema:"virtual_machine_name"` +} + +type ThreeTierConfiguration struct { + ApplicationServerConfiguration []ApplicationServerConfiguration `tfschema:"application_server_configuration"` + AppResourceGroupName string `tfschema:"app_resource_group_name"` + CentralServerConfiguration []CentralServerConfiguration `tfschema:"central_server_configuration"` + DatabaseServerConfiguration []DatabaseServerConfiguration `tfschema:"database_server_configuration"` + FullResourceNames []FullResourceNames `tfschema:"full_resource_names"` + HighAvailabilityType string `tfschema:"high_availability_type"` + IsSecondaryIpEnabled bool `tfschema:"secondary_ip_enabled"` + TransportCreateAndMount []TransportCreateAndMount `tfschema:"transport_create_and_mount"` + TransportMount []TransportMount `tfschema:"transport_mount"` +} + +type TransportCreateAndMount struct { + ResourceGroupId string `tfschema:"resource_group_id"` + StorageAccountName string `tfschema:"storage_account_name"` +} + +type TransportMount struct { + FileShareId string `tfschema:"file_share_id"` + PrivateEndpointId string `tfschema:"private_endpoint_id"` +} + +type ApplicationServerConfiguration struct { + InstanceCount int `tfschema:"instance_count"` + SubnetId string `tfschema:"subnet_id"` + VirtualMachineConfiguration []VirtualMachineConfiguration `tfschema:"virtual_machine_configuration"` +} + +type CentralServerConfiguration struct { + InstanceCount int `tfschema:"instance_count"` + SubnetId string `tfschema:"subnet_id"` + VirtualMachineConfiguration []VirtualMachineConfiguration `tfschema:"virtual_machine_configuration"` +} + +type DatabaseServerConfiguration struct { + DatabaseType string `tfschema:"database_type"` + DiskVolumeConfigurations []DiskVolumeConfiguration `tfschema:"disk_volume_configuration"` + InstanceCount int `tfschema:"instance_count"` + SubnetId string `tfschema:"subnet_id"` + VirtualMachineConfiguration []VirtualMachineConfiguration `tfschema:"virtual_machine_configuration"` +} + +type FullResourceNames struct { + ApplicationServer []ApplicationServerFullResourceNames `tfschema:"application_server"` + CentralServer []CentralServerFullResourceNames `tfschema:"central_server"` + DatabaseServer []DatabaseServerFullResourceNames `tfschema:"database_server"` + SharedStorage []SharedStorage `tfschema:"shared_storage"` +} + +type ApplicationServerFullResourceNames struct { + AvailabilitySetName string `tfschema:"availability_set_name"` + VirtualMachines []VirtualMachineFullResourceNames `tfschema:"virtual_machine"` +} + +type CentralServerFullResourceNames struct { + AvailabilitySetName string `tfschema:"availability_set_name"` + LoadBalancer []LoadBalancer `tfschema:"load_balancer"` + VirtualMachines []VirtualMachineFullResourceNames `tfschema:"virtual_machine"` +} + +type DatabaseServerFullResourceNames struct { + AvailabilitySetName string `tfschema:"availability_set_name"` + LoadBalancer []LoadBalancer `tfschema:"load_balancer"` + VirtualMachines []VirtualMachineFullResourceNames `tfschema:"virtual_machine"` +} + +type LoadBalancer struct { + BackendPoolNames []string `tfschema:"backend_pool_names"` + FrontendIpConfigurationNames []string `tfschema:"frontend_ip_configuration_names"` + HealthProbeNames []string `tfschema:"health_probe_names"` + Name string `tfschema:"name"` +} + +type SharedStorage struct { + AccountName string `tfschema:"account_name"` + PrivateEndpointName string `tfschema:"private_endpoint_name"` +} + +type WorkloadsSAPThreeTierVirtualInstanceResource struct{} + +var _ sdk.ResourceWithUpdate = WorkloadsSAPThreeTierVirtualInstanceResource{} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) ResourceType() string { + return "azurerm_workloads_sap_three_tier_virtual_instance" +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) ModelObject() interface{} { + return &WorkloadsSAPThreeTierVirtualInstanceModel{} +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return sapvirtualinstances.ValidateSapVirtualInstanceID +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.SAPVirtualInstanceName, + }, + + "resource_group_name": commonschema.ResourceGroupName(), + + "location": commonschema.Location(), + + "app_location": commonschema.Location(), + + "os_sap_configuration": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "sap_fqdn": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.SAPFQDN, + }, + + "deployer_virtual_machine_packages": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "storage_account_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: commonids.ValidateStorageAccountID, + }, + + "url": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.IsURLWithHTTPorHTTPS, + }, + }, + }, + }, + }, + }, + }, + + "three_tier_configuration": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "app_resource_group_name": commonschema.ResourceGroupName(), + + "application_server_configuration": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "instance_count": { + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + }, + + "subnet_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: networkValidate.SubnetID, + }, + + "virtual_machine_configuration": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "image": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "offer": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "publisher": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "RedHat", + "SUSE", + }, false), + }, + + "sku": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "version": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "os_profile": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "admin_username": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.AdminUsername, + }, + + "ssh_private_key": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + Sensitive: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "ssh_public_key": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "virtual_machine_size": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + }, + }, + }, + + "central_server_configuration": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "instance_count": { + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + }, + + "subnet_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: networkValidate.SubnetID, + }, + + "virtual_machine_configuration": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "image": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "offer": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "publisher": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "RedHat", + "SUSE", + }, false), + }, + + "sku": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "version": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "os_profile": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "admin_username": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.AdminUsername, + }, + + "ssh_private_key": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + Sensitive: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "ssh_public_key": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "virtual_machine_size": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + }, + }, + }, + + "database_server_configuration": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "instance_count": { + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + }, + + "subnet_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: networkValidate.SubnetID, + }, + + "virtual_machine_configuration": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "image": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "offer": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "publisher": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "RedHat", + "SUSE", + }, false), + }, + + "sku": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "version": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "os_profile": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "admin_username": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.AdminUsername, + }, + + "ssh_private_key": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + Sensitive: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "ssh_public_key": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "virtual_machine_size": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + + "database_type": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice(sapvirtualinstances.PossibleValuesForSAPDatabaseType(), false), + }, + + "disk_volume_configuration": { + Type: pluginsdk.TypeSet, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "volume_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "backup", + "hana/data", + "hana/log", + "hana/shared", + "os", + "usr/sap", + }, false), + }, + + "number_of_disks": { + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + }, + + "size_in_gb": { + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + }, + + "sku_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice(sapvirtualinstances.PossibleValuesForDiskSkuName(), false), + }, + }, + }, + }, + }, + }, + }, + + "full_resource_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "application_server": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "availability_set_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.AvailabilitySetName, + }, + + "virtual_machine": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "data_disk_names": { + Type: pluginsdk.TypeMap, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validate.DiskName, + }, + }, + + "host_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.HostName, + }, + + "network_interface_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: networkValidate.NetworkInterfaceName, + }, + }, + + "os_disk_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.DiskName, + }, + + "virtual_machine_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: computeValidate.VirtualMachineName, + }, + }, + }, + }, + }, + }, + }, + + "central_server": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "availability_set_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.AvailabilitySetName, + }, + + "load_balancer": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "backend_pool_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + + "frontend_ip_configuration_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + + "health_probe_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + }, + + "virtual_machine": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "data_disk_names": { + Type: pluginsdk.TypeMap, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validate.DiskName, + }, + }, + + "host_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.HostName, + }, + + "network_interface_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: networkValidate.NetworkInterfaceName, + }, + }, + + "os_disk_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.DiskName, + }, + + "virtual_machine_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: computeValidate.VirtualMachineName, + }, + }, + }, + }, + }, + }, + }, + + "database_server": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "availability_set_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.AvailabilitySetName, + }, + + "load_balancer": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "backend_pool_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + + "frontend_ip_configuration_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + + "health_probe_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, + }, + }, + + "virtual_machine": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "data_disk_names": { + Type: pluginsdk.TypeMap, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validate.DiskName, + }, + }, + + "host_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.HostName, + }, + + "network_interface_names": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: networkValidate.NetworkInterfaceName, + }, + }, + + "os_disk_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validate.DiskName, + }, + + "virtual_machine_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: computeValidate.VirtualMachineName, + }, + }, + }, + }, + }, + }, + }, + + "shared_storage": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "account_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: storageValidate.StorageAccountName, + }, + + "private_endpoint_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: networkValidate.PrivateLinkName, + }, + }, + }, + }, + }, + }, + }, + + "high_availability_type": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice(sapvirtualinstances.PossibleValuesForSAPHighAvailabilityType(), false), + }, + + "secondary_ip_enabled": { + Type: pluginsdk.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + + "transport_create_and_mount": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "resource_group_id": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: commonids.ValidateResourceGroupID, + }, + + "storage_account_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: storageValidate.StorageAccountName, + }, + }, + }, + }, + + "transport_mount": { + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "file_share_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: storageValidate.StorageShareResourceManagerID, + }, + + "private_endpoint_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: privateendpoints.ValidatePrivateEndpointID, + }, + }, + }, + }, + }, + }, + }, + + "environment": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + string(sapvirtualinstances.SAPEnvironmentTypeNonProd), + string(sapvirtualinstances.SAPEnvironmentTypeProd), + }, false), + }, + + "identity": commonschema.UserAssignedIdentityOptional(), + + "sap_product": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + string(sapvirtualinstances.SAPProductTypeECC), + string(sapvirtualinstances.SAPProductTypeOther), + string(sapvirtualinstances.SAPProductTypeSFourHANA), + }, false), + }, + + "managed_resource_group_name": { + Type: pluginsdk.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: resourcegroups.ValidateName, + }, + + "tags": commonschema.Tags(), + } +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 60 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + var model WorkloadsSAPThreeTierVirtualInstanceModel + if err := metadata.Decode(&model); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + client := metadata.Client.Workloads.SAPVirtualInstances + subscriptionId := metadata.Client.Account.SubscriptionId + id := sapvirtualinstances.NewSapVirtualInstanceID(subscriptionId, model.ResourceGroupName, model.Name) + + existing, err := client.Get(ctx, id) + if err != nil && !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for existing %s: %+v", id, err) + } + + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + identity, err := identity.ExpandUserAssignedMapFromModel(model.Identity) + if err != nil { + return fmt.Errorf("expanding `identity`: %+v", err) + } + + parameters := &sapvirtualinstances.SAPVirtualInstance{ + Identity: identity, + Location: location.Normalize(model.Location), + Properties: sapvirtualinstances.SAPVirtualInstanceProperties{ + Environment: sapvirtualinstances.SAPEnvironmentType(model.Environment), + SapProduct: sapvirtualinstances.SAPProductType(model.SapProduct), + }, + Tags: &model.Tags, + } + + deploymentWithOSConfiguration := &sapvirtualinstances.DeploymentWithOSConfiguration{ + AppLocation: utils.String(model.AppLocation), + OsSapConfiguration: expandOsSapConfiguration(model.OsSapConfiguration), + } + + threeTierConfiguration, err := expandThreeTierConfiguration(model.ThreeTierConfiguration) + if err != nil { + return err + } + deploymentWithOSConfiguration.InfrastructureConfiguration = threeTierConfiguration + + parameters.Properties.Configuration = deploymentWithOSConfiguration + + if v := model.ManagedResourceGroupName; v != "" { + parameters.Properties.ManagedResourceGroupConfiguration = &sapvirtualinstances.ManagedRGConfiguration{ + Name: utils.String(v), + } + } + + if err := client.CreateThenPoll(ctx, id, *parameters); err != nil { + return fmt.Errorf("creating %s: %+v", id, err) + } + + metadata.SetID(id) + return nil + }, + } +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) Update() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 60 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Workloads.SAPVirtualInstances + + id, err := sapvirtualinstances.ParseSapVirtualInstanceID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + var model WorkloadsSAPThreeTierVirtualInstanceModel + if err := metadata.Decode(&model); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + parameters := &sapvirtualinstances.UpdateSAPVirtualInstanceRequest{} + + if metadata.ResourceData.HasChange("identity") { + identityValue, err := identity.ExpandUserAssignedMap(metadata.ResourceData.Get("identity").([]interface{})) + if err != nil { + return fmt.Errorf("expanding `identity`: %+v", err) + } + parameters.Identity = identityValue + } + + if metadata.ResourceData.HasChange("tags") { + parameters.Tags = &model.Tags + } + + if _, err := client.Update(ctx, *id, *parameters); err != nil { + return fmt.Errorf("updating %s: %+v", *id, err) + } + + return nil + }, + } +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Workloads.SAPVirtualInstances + subscriptionId := metadata.Client.Account.SubscriptionId + + id, err := sapvirtualinstances.ParseSapVirtualInstanceID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(id) + } + + return fmt.Errorf("retrieving %s: %+v", *id, err) + } + + state := WorkloadsSAPThreeTierVirtualInstanceModel{} + if model := resp.Model; model != nil { + state.Name = id.SapVirtualInstanceName + state.ResourceGroupName = id.ResourceGroupName + state.Location = location.Normalize(model.Location) + + identity, err := identity.FlattenUserAssignedMapToModel(model.Identity) + if err != nil { + return fmt.Errorf("flattening `identity`: %+v", err) + } + state.Identity = pointer.From(identity) + + props := &model.Properties + state.Environment = string(props.Environment) + state.SapProduct = string(props.SapProduct) + state.Tags = pointer.From(model.Tags) + + if config := props.Configuration; config != nil { + if v, ok := config.(sapvirtualinstances.DeploymentWithOSConfiguration); ok { + state.AppLocation = pointer.From(v.AppLocation) + state.OsSapConfiguration = flattenOsSapConfiguration(v.OsSapConfiguration) + + if configuration := v.InfrastructureConfiguration; configuration != nil { + if threeTierConfiguration, threeTierConfigurationExists := configuration.(sapvirtualinstances.ThreeTierConfiguration); threeTierConfigurationExists { + threeTierConfig, err := flattenThreeTierConfiguration(threeTierConfiguration, metadata.ResourceData, subscriptionId) + if err != nil { + return err + } + state.ThreeTierConfiguration = threeTierConfig + } + } + } + } + + if v := props.ManagedResourceGroupConfiguration; v != nil { + state.ManagedResourceGroupName = pointer.From(v.Name) + } + } + + return metadata.Encode(&state) + }, + } +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 60 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.Workloads.SAPVirtualInstances + + id, err := sapvirtualinstances.ParseSapVirtualInstanceID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + if err := client.DeleteThenPoll(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) + } + + return nil + }, + } +} + +func expandVirtualMachineConfiguration(input []VirtualMachineConfiguration) *sapvirtualinstances.VirtualMachineConfiguration { + if len(input) == 0 { + return nil + } + + virtualMachineConfiguration := input[0] + + result := &sapvirtualinstances.VirtualMachineConfiguration{ + ImageReference: pointer.From(expandImageReference(virtualMachineConfiguration.ImageReference)), + OsProfile: pointer.From(expandOsProfile(virtualMachineConfiguration.OSProfile)), + VMSize: virtualMachineConfiguration.VmSize, + } + + return result +} + +func expandImageReference(input []ImageReference) *sapvirtualinstances.ImageReference { + if len(input) == 0 { + return nil + } + + imageReference := input[0] + + result := &sapvirtualinstances.ImageReference{ + Offer: utils.String(imageReference.Offer), + Publisher: utils.String(imageReference.Publisher), + Sku: utils.String(imageReference.Sku), + Version: utils.String(imageReference.Version), + } + + return result +} + +func expandOsProfile(input []OSProfile) *sapvirtualinstances.OSProfile { + if len(input) == 0 { + return nil + } + + osProfile := input[0] + + result := &sapvirtualinstances.OSProfile{ + AdminUsername: utils.String(osProfile.AdminUsername), + OsConfiguration: &sapvirtualinstances.LinuxConfiguration{ + DisablePasswordAuthentication: utils.Bool(true), + SshKeyPair: &sapvirtualinstances.SshKeyPair{ + PrivateKey: utils.String(osProfile.SshPrivateKey), + PublicKey: utils.String(osProfile.SshPublicKey), + }, + }, + } + + return result +} + +func expandNetworkInterfaceNames(input []string) *[]sapvirtualinstances.NetworkInterfaceResourceNames { + result := make([]sapvirtualinstances.NetworkInterfaceResourceNames, 0) + if len(input) == 0 { + return &result + } + + for _, v := range input { + networkInterfaceName := sapvirtualinstances.NetworkInterfaceResourceNames{ + NetworkInterfaceName: utils.String(v), + } + + result = append(result, networkInterfaceName) + } + + return &result +} + +func expandDataDiskNames(input map[string]interface{}) *map[string][]string { + result := make(map[string][]string) + if len(input) == 0 { + return &result + } + + for k, v := range input { + result[k] = strings.Split(v.(string), ",") + } + + return &result +} + +func expandDiskVolumeConfigurations(input []DiskVolumeConfiguration) *sapvirtualinstances.DiskConfiguration { + if len(input) == 0 { + return nil + } + + result := make(map[string]sapvirtualinstances.DiskVolumeConfiguration, 0) + + for _, v := range input { + skuName := sapvirtualinstances.DiskSkuName(v.SkuName) + + result[v.VolumeName] = sapvirtualinstances.DiskVolumeConfiguration{ + Count: utils.Int64(int64(v.NumberOfDisks)), + SizeGB: utils.Int64(int64(v.SizeGb)), + Sku: &sapvirtualinstances.DiskSku{ + Name: &skuName, + }, + } + } + + return &sapvirtualinstances.DiskConfiguration{ + DiskVolumeConfigurations: &result, + } +} + +func expandApplicationServer(input []ApplicationServerConfiguration) *sapvirtualinstances.ApplicationServerConfiguration { + if len(input) == 0 { + return nil + } + + applicationServer := input[0] + + result := &sapvirtualinstances.ApplicationServerConfiguration{ + InstanceCount: int64(applicationServer.InstanceCount), + SubnetId: applicationServer.SubnetId, + VirtualMachineConfiguration: pointer.From(expandVirtualMachineConfiguration(applicationServer.VirtualMachineConfiguration)), + } + + return result +} + +func expandCentralServer(input []CentralServerConfiguration) *sapvirtualinstances.CentralServerConfiguration { + if len(input) == 0 { + return nil + } + + centralServer := input[0] + + result := &sapvirtualinstances.CentralServerConfiguration{ + InstanceCount: int64(centralServer.InstanceCount), + SubnetId: centralServer.SubnetId, + VirtualMachineConfiguration: pointer.From(expandVirtualMachineConfiguration(centralServer.VirtualMachineConfiguration)), + } + + return result +} + +func expandDatabaseServer(input []DatabaseServerConfiguration) *sapvirtualinstances.DatabaseConfiguration { + if len(input) == 0 { + return nil + } + + databaseServer := input[0] + + result := &sapvirtualinstances.DatabaseConfiguration{ + DiskConfiguration: expandDiskVolumeConfigurations(databaseServer.DiskVolumeConfigurations), + InstanceCount: int64(databaseServer.InstanceCount), + SubnetId: databaseServer.SubnetId, + VirtualMachineConfiguration: pointer.From(expandVirtualMachineConfiguration(databaseServer.VirtualMachineConfiguration)), + } + + if v := databaseServer.DatabaseType; v != "" { + dbType := sapvirtualinstances.SAPDatabaseType(v) + result.DatabaseType = &dbType + } + + return result +} + +func expandStorageConfiguration(input ThreeTierConfiguration) (*sapvirtualinstances.StorageConfiguration, error) { + if len(input.TransportCreateAndMount) == 0 && len(input.TransportMount) == 0 { + return &sapvirtualinstances.StorageConfiguration{ + TransportFileShareConfiguration: sapvirtualinstances.SkipFileShareConfiguration{}, + }, nil + } + + result := &sapvirtualinstances.StorageConfiguration{} + + if len(input.TransportMount) != 0 { + transportMount, err := expandTransportMount(input.TransportMount) + if err != nil { + return nil, err + } + result.TransportFileShareConfiguration = transportMount + } + + if len(input.TransportCreateAndMount) != 0 { + transportCreateAndMount, err := expandTransportCreateAndMount(input.TransportCreateAndMount) + if err != nil { + return nil, err + } + result.TransportFileShareConfiguration = transportCreateAndMount + } + + return result, nil +} + +func expandTransportCreateAndMount(input []TransportCreateAndMount) (*sapvirtualinstances.CreateAndMountFileShareConfiguration, error) { + if len(input) == 0 { + return nil, nil + } + + transportCreateAndMount := input[0] + + result := &sapvirtualinstances.CreateAndMountFileShareConfiguration{} + + if v := transportCreateAndMount.ResourceGroupId; v != "" { + resourceGroupId, err := commonids.ParseResourceGroupID(v) + if err != nil { + return nil, err + } + result.ResourceGroup = utils.String(resourceGroupId.ResourceGroupName) + } + + if v := transportCreateAndMount.StorageAccountName; v != "" { + result.StorageAccountName = utils.String(v) + } + + return result, nil +} + +func expandTransportMount(input []TransportMount) (*sapvirtualinstances.MountFileShareConfiguration, error) { + if len(input) == 0 { + return nil, nil + } + + transportMount := input[0] + + // Currently, the last segment of the Storage File Share resource manager ID in Swagger is defined as `/shares/` but it's unexpected. + // The last segment of the Storage File Share resource manager ID should be `/fileshares/` not `/shares/` in Swagger since the backend service is using `/fileshares/`. + // See more details from https://github.com/Azure/azure-rest-api-specs/issues/25209 + storageShareResourceManagerId, err := storageParse.StorageShareResourceManagerID(transportMount.FileShareId) + if err != nil { + return nil, err + } + result := &sapvirtualinstances.MountFileShareConfiguration{ + Id: storageParse.NewLegacyStorageShareResourceManagerID(storageShareResourceManagerId.SubscriptionId, storageShareResourceManagerId.ResourceGroup, storageShareResourceManagerId.StorageAccountName, storageShareResourceManagerId.FileServiceName, storageShareResourceManagerId.FileshareName).ID(), + PrivateEndpointId: transportMount.PrivateEndpointId, + } + + return result, nil +} + +func expandFullResourceNames(input []FullResourceNames) *sapvirtualinstances.ThreeTierFullResourceNames { + if len(input) == 0 { + return nil + } + + fullResourceNames := input[0] + + result := &sapvirtualinstances.ThreeTierFullResourceNames{ + ApplicationServer: expandApplicationServerFullResourceNames(fullResourceNames.ApplicationServer), + CentralServer: expandCentralServerFullResourceNames(fullResourceNames.CentralServer), + DatabaseServer: expandDatabaseServerFullResourceNames(fullResourceNames.DatabaseServer), + SharedStorage: expandSharedStorage(fullResourceNames.SharedStorage), + } + + return result +} + +func expandApplicationServerFullResourceNames(input []ApplicationServerFullResourceNames) *sapvirtualinstances.ApplicationServerFullResourceNames { + if len(input) == 0 { + return nil + } + + applicationServerFullResourceNames := input[0] + + result := &sapvirtualinstances.ApplicationServerFullResourceNames{ + VirtualMachines: expandVirtualMachinesFullResourceNames(applicationServerFullResourceNames.VirtualMachines), + } + + if v := applicationServerFullResourceNames.AvailabilitySetName; v != "" { + result.AvailabilitySetName = utils.String(v) + } + + return result +} + +func expandVirtualMachinesFullResourceNames(input []VirtualMachineFullResourceNames) *[]sapvirtualinstances.VirtualMachineResourceNames { + result := make([]sapvirtualinstances.VirtualMachineResourceNames, 0) + if len(input) == 0 { + return &result + } + + for _, item := range input { + vmResourceNames := sapvirtualinstances.VirtualMachineResourceNames{ + DataDiskNames: expandDataDiskNames(item.DataDiskNames), + NetworkInterfaces: expandNetworkInterfaceNames(item.NetworkInterfaceNames), + } + + if v := item.HostName; v != "" { + vmResourceNames.HostName = utils.String(v) + } + + if v := item.OSDiskName; v != "" { + vmResourceNames.OsDiskName = utils.String(v) + } + + if v := item.VMName; v != "" { + vmResourceNames.VirtualMachineName = utils.String(v) + } + + result = append(result, vmResourceNames) + } + + return &result +} + +func expandCentralServerFullResourceNames(input []CentralServerFullResourceNames) *sapvirtualinstances.CentralServerFullResourceNames { + if len(input) == 0 { + return nil + } + + centralServerFullResourceNames := input[0] + + result := &sapvirtualinstances.CentralServerFullResourceNames{ + LoadBalancer: expandLoadBalancerFullResourceNames(centralServerFullResourceNames.LoadBalancer), + VirtualMachines: expandVirtualMachinesFullResourceNames(centralServerFullResourceNames.VirtualMachines), + } + + if v := centralServerFullResourceNames.AvailabilitySetName; v != "" { + result.AvailabilitySetName = utils.String(v) + } + + return result +} + +func expandLoadBalancerFullResourceNames(input []LoadBalancer) *sapvirtualinstances.LoadBalancerResourceNames { + result := &sapvirtualinstances.LoadBalancerResourceNames{} + if len(input) == 0 { + return result + } + + loadBalancerFullResourceNames := input[0] + + if v := loadBalancerFullResourceNames.Name; v != "" { + result.LoadBalancerName = utils.String(v) + } + + if v := loadBalancerFullResourceNames.BackendPoolNames; v != nil { + result.BackendPoolNames = &v + } + + if v := loadBalancerFullResourceNames.FrontendIpConfigurationNames; v != nil { + result.FrontendIPConfigurationNames = &v + } + + if v := loadBalancerFullResourceNames.HealthProbeNames; v != nil { + result.HealthProbeNames = &v + } + + return result +} + +func expandDatabaseServerFullResourceNames(input []DatabaseServerFullResourceNames) *sapvirtualinstances.DatabaseServerFullResourceNames { + if len(input) == 0 { + return nil + } + + databaseServerFullResourceNames := input[0] + + result := &sapvirtualinstances.DatabaseServerFullResourceNames{ + LoadBalancer: expandLoadBalancerFullResourceNames(databaseServerFullResourceNames.LoadBalancer), + VirtualMachines: expandVirtualMachinesFullResourceNames(databaseServerFullResourceNames.VirtualMachines), + } + + if v := databaseServerFullResourceNames.AvailabilitySetName; v != "" { + result.AvailabilitySetName = utils.String(v) + } + + return result +} + +func expandSharedStorage(input []SharedStorage) *sapvirtualinstances.SharedStorageResourceNames { + result := &sapvirtualinstances.SharedStorageResourceNames{} + if len(input) == 0 { + return result + } + + sharedStorage := input[0] + + if v := sharedStorage.AccountName; v != "" { + result.SharedStorageAccountName = utils.String(v) + } + + if v := sharedStorage.PrivateEndpointName; v != "" { + result.SharedStorageAccountPrivateEndPointName = utils.String(v) + } + + return result +} + +func expandThreeTierConfiguration(input []ThreeTierConfiguration) (*sapvirtualinstances.ThreeTierConfiguration, error) { + threeTierConfiguration := input[0] + + result := &sapvirtualinstances.ThreeTierConfiguration{ + ApplicationServer: pointer.From(expandApplicationServer(threeTierConfiguration.ApplicationServerConfiguration)), + AppResourceGroup: threeTierConfiguration.AppResourceGroupName, + CentralServer: pointer.From(expandCentralServer(threeTierConfiguration.CentralServerConfiguration)), + CustomResourceNames: expandFullResourceNames(threeTierConfiguration.FullResourceNames), + DatabaseServer: pointer.From(expandDatabaseServer(threeTierConfiguration.DatabaseServerConfiguration)), + NetworkConfiguration: &sapvirtualinstances.NetworkConfiguration{ + IsSecondaryIPEnabled: utils.Bool(threeTierConfiguration.IsSecondaryIpEnabled), + }, + } + + storageConfiguration, err := expandStorageConfiguration(threeTierConfiguration) + if err != nil { + return nil, err + } + result.StorageConfiguration = storageConfiguration + + if v := threeTierConfiguration.HighAvailabilityType; v != "" { + result.HighAvailabilityConfig = &sapvirtualinstances.HighAvailabilityConfiguration{ + HighAvailabilityType: sapvirtualinstances.SAPHighAvailabilityType(v), + } + } + + return result, nil +} + +func expandOsSapConfiguration(input []OsSapConfiguration) *sapvirtualinstances.OsSapConfiguration { + if len(input) == 0 { + return nil + } + + osSapConfiguration := input[0] + + result := &sapvirtualinstances.OsSapConfiguration{ + DeployerVMPackages: expandDeployerVmPackages(osSapConfiguration.DeployerVmPackages), + SapFqdn: utils.String(osSapConfiguration.SapFqdn), + } + + return result +} + +func expandDeployerVmPackages(input []DeployerVmPackages) *sapvirtualinstances.DeployerVMPackages { + if len(input) == 0 { + return nil + } + + deployerVmPackages := input[0] + + result := &sapvirtualinstances.DeployerVMPackages{ + StorageAccountId: utils.String(deployerVmPackages.StorageAccountId), + Url: utils.String(deployerVmPackages.Url), + } + + return result +} + +func flattenApplicationServer(input sapvirtualinstances.ApplicationServerConfiguration, d *pluginsdk.ResourceData, basePath string) []ApplicationServerConfiguration { + result := make([]ApplicationServerConfiguration, 0) + + applicationServerConfig := ApplicationServerConfiguration{ + InstanceCount: int(input.InstanceCount), + SubnetId: input.SubnetId, + VirtualMachineConfiguration: flattenVirtualMachineConfiguration(input.VirtualMachineConfiguration, d, fmt.Sprintf("%s.0.application_server_configuration", basePath)), + } + + return append(result, applicationServerConfig) +} + +func flattenCentralServer(input sapvirtualinstances.CentralServerConfiguration, d *pluginsdk.ResourceData, basePath string) []CentralServerConfiguration { + result := make([]CentralServerConfiguration, 0) + + centralServerConfig := CentralServerConfiguration{ + InstanceCount: int(input.InstanceCount), + SubnetId: input.SubnetId, + VirtualMachineConfiguration: flattenVirtualMachineConfiguration(input.VirtualMachineConfiguration, d, fmt.Sprintf("%s.0.central_server_configuration", basePath)), + } + + return append(result, centralServerConfig) +} + +func flattenDatabaseServer(input sapvirtualinstances.DatabaseConfiguration, d *pluginsdk.ResourceData, basePath string) []DatabaseServerConfiguration { + result := make([]DatabaseServerConfiguration, 0) + + databaseServerConfig := DatabaseServerConfiguration{ + DiskVolumeConfigurations: flattenDiskVolumeConfigurations(input.DiskConfiguration), + InstanceCount: int(input.InstanceCount), + SubnetId: input.SubnetId, + VirtualMachineConfiguration: flattenVirtualMachineConfiguration(input.VirtualMachineConfiguration, d, fmt.Sprintf("%s.0.database_server_configuration", basePath)), + } + + if v := input.DatabaseType; v != nil { + databaseServerConfig.DatabaseType = string(*v) + } + + return append(result, databaseServerConfig) +} + +func flattenFullResourceNames(input sapvirtualinstances.ThreeTierFullResourceNames) []FullResourceNames { + result := make([]FullResourceNames, 0) + + fullResourceNames := FullResourceNames{ + ApplicationServer: flattenApplicationServerFullResourceNames(input.ApplicationServer), + CentralServer: flattenCentralServerFullResourceNames(input.CentralServer), + DatabaseServer: flattenDatabaseServerFullResourceNames(input.DatabaseServer), + SharedStorage: flattenSharedStorage(input.SharedStorage), + } + + return append(result, fullResourceNames) +} + +func flattenApplicationServerFullResourceNames(input *sapvirtualinstances.ApplicationServerFullResourceNames) []ApplicationServerFullResourceNames { + result := make([]ApplicationServerFullResourceNames, 0) + if input == nil { + return result + } + + return append(result, ApplicationServerFullResourceNames{ + AvailabilitySetName: pointer.From(input.AvailabilitySetName), + VirtualMachines: flattenVirtualMachinesFullResourceNames(input.VirtualMachines), + }) +} + +func flattenVirtualMachinesFullResourceNames(input *[]sapvirtualinstances.VirtualMachineResourceNames) []VirtualMachineFullResourceNames { + result := make([]VirtualMachineFullResourceNames, 0) + if input == nil { + return result + } + + for _, item := range *input { + result = append(result, VirtualMachineFullResourceNames{ + HostName: pointer.From(item.HostName), + OSDiskName: pointer.From(item.OsDiskName), + VMName: pointer.From(item.VirtualMachineName), + DataDiskNames: flattenDataDiskNames(item.DataDiskNames), + NetworkInterfaceNames: flattenNetworkInterfaceResourceNames(item.NetworkInterfaces), + }) + } + + return result +} + +func flattenCentralServerFullResourceNames(input *sapvirtualinstances.CentralServerFullResourceNames) []CentralServerFullResourceNames { + result := make([]CentralServerFullResourceNames, 0) + if input == nil { + return result + } + + centralServerFullResourceNames := CentralServerFullResourceNames{ + AvailabilitySetName: pointer.From(input.AvailabilitySetName), + LoadBalancer: flattenLoadBalancerFullResourceNames(input.LoadBalancer), + VirtualMachines: flattenVirtualMachinesFullResourceNames(input.VirtualMachines), + } + + return append(result, centralServerFullResourceNames) +} + +func flattenLoadBalancerFullResourceNames(input *sapvirtualinstances.LoadBalancerResourceNames) []LoadBalancer { + result := make([]LoadBalancer, 0) + if input == nil { + return result + } + + return append(result, LoadBalancer{ + Name: pointer.From(input.LoadBalancerName), + BackendPoolNames: pointer.From(input.BackendPoolNames), + FrontendIpConfigurationNames: pointer.From(input.FrontendIPConfigurationNames), + HealthProbeNames: pointer.From(input.HealthProbeNames), + }) +} + +func flattenDatabaseServerFullResourceNames(input *sapvirtualinstances.DatabaseServerFullResourceNames) []DatabaseServerFullResourceNames { + result := make([]DatabaseServerFullResourceNames, 0) + if input == nil { + return result + } + + return append(result, DatabaseServerFullResourceNames{ + AvailabilitySetName: pointer.From(input.AvailabilitySetName), + LoadBalancer: flattenLoadBalancerFullResourceNames(input.LoadBalancer), + VirtualMachines: flattenVirtualMachinesFullResourceNames(input.VirtualMachines), + }) +} + +func flattenSharedStorage(input *sapvirtualinstances.SharedStorageResourceNames) []SharedStorage { + result := make([]SharedStorage, 0) + if input == nil { + return result + } + + return append(result, SharedStorage{ + AccountName: pointer.From(input.SharedStorageAccountName), + PrivateEndpointName: pointer.From(input.SharedStorageAccountPrivateEndPointName), + }) +} + +func flattenDiskVolumeConfigurations(input *sapvirtualinstances.DiskConfiguration) []DiskVolumeConfiguration { + result := make([]DiskVolumeConfiguration, 0) + if input == nil || input.DiskVolumeConfigurations == nil { + return result + } + + for k, v := range *input.DiskVolumeConfigurations { + diskVolumeConfiguration := DiskVolumeConfiguration{ + VolumeName: k, + } + + if count := v.Count; count != nil { + diskVolumeConfiguration.NumberOfDisks = int(*count) + } + + if sizeGb := v.SizeGB; sizeGb != nil { + diskVolumeConfiguration.SizeGb = int(*sizeGb) + } + + if sku := v.Sku; sku != nil && sku.Name != nil { + diskVolumeConfiguration.SkuName = string(*sku.Name) + } + + result = append(result, diskVolumeConfiguration) + } + + return result +} + +func flattenNetworkInterfaceResourceNames(input *[]sapvirtualinstances.NetworkInterfaceResourceNames) []string { + result := make([]string, 0) + if input == nil { + return result + } + + for _, v := range *input { + result = append(result, pointer.From(v.NetworkInterfaceName)) + } + + return result +} + +func flattenDataDiskNames(input *map[string][]string) map[string]interface{} { + results := make(map[string]interface{}) + if input == nil { + return results + } + + for k, v := range *input { + results[k] = strings.Join(v, ",") + } + + return results +} + +func flattenVirtualMachineConfiguration(input sapvirtualinstances.VirtualMachineConfiguration, d *pluginsdk.ResourceData, basePath string) []VirtualMachineConfiguration { + result := make([]VirtualMachineConfiguration, 0) + + return append(result, VirtualMachineConfiguration{ + ImageReference: flattenImageReference(input.ImageReference), + OSProfile: flattenOSProfile(input.OsProfile, d, fmt.Sprintf("%s.0.virtual_machine_configuration", basePath)), + VmSize: input.VMSize, + }) +} + +func flattenImageReference(input sapvirtualinstances.ImageReference) []ImageReference { + result := make([]ImageReference, 0) + + imageReference := ImageReference{ + Offer: pointer.From(input.Offer), + Publisher: pointer.From(input.Publisher), + Sku: pointer.From(input.Sku), + Version: pointer.From(input.Version), + } + + return append(result, imageReference) +} + +func flattenOSProfile(input sapvirtualinstances.OSProfile, d *pluginsdk.ResourceData, basePath string) []OSProfile { + result := make([]OSProfile, 0) + + osProfile := OSProfile{ + AdminUsername: pointer.From(input.AdminUsername), + } + + if osConfiguration := input.OsConfiguration; osConfiguration != nil { + if v, ok := osConfiguration.(sapvirtualinstances.LinuxConfiguration); ok { + if sshKeyPair := v.SshKeyPair; sshKeyPair != nil { + osProfile.SshPrivateKey = d.Get(fmt.Sprintf("%s.0.os_profile.0.ssh_private_key", basePath)).(string) + osProfile.SshPublicKey = pointer.From(sshKeyPair.PublicKey) + } + } + } + + return append(result, osProfile) +} + +func flattenThreeTierConfiguration(input sapvirtualinstances.ThreeTierConfiguration, d *pluginsdk.ResourceData, subscriptionId string) ([]ThreeTierConfiguration, error) { + result := make([]ThreeTierConfiguration, 0) + + threeTierConfig := ThreeTierConfiguration{ + AppResourceGroupName: input.AppResourceGroup, + ApplicationServerConfiguration: flattenApplicationServer(input.ApplicationServer, d, "three_tier_configuration"), + CentralServerConfiguration: flattenCentralServer(input.CentralServer, d, "three_tier_configuration"), + DatabaseServerConfiguration: flattenDatabaseServer(input.DatabaseServer, d, "three_tier_configuration"), + } + + if customResourceNames := input.CustomResourceNames; customResourceNames != nil { + if v, ok := customResourceNames.(sapvirtualinstances.ThreeTierFullResourceNames); ok { + threeTierConfig.FullResourceNames = flattenFullResourceNames(v) + } + } + + if v := input.HighAvailabilityConfig; v != nil && v.HighAvailabilityType != "" { + threeTierConfig.HighAvailabilityType = string(v.HighAvailabilityType) + } + + if v := input.NetworkConfiguration; v != nil && v.IsSecondaryIPEnabled != nil { + threeTierConfig.IsSecondaryIpEnabled = *v.IsSecondaryIPEnabled + } + + if storageConfiguration := input.StorageConfiguration; storageConfiguration != nil { + if transportFileShareConfiguration := storageConfiguration.TransportFileShareConfiguration; transportFileShareConfiguration != nil { + if createAndMountFileShareConfiguration, ok := transportFileShareConfiguration.(sapvirtualinstances.CreateAndMountFileShareConfiguration); ok { + transportCreateAndMount := TransportCreateAndMount{ + StorageAccountName: pointer.From(createAndMountFileShareConfiguration.StorageAccountName), + } + + var resourceGroupId string + if v := createAndMountFileShareConfiguration.ResourceGroup; v != nil { + resourceGroupId = commonids.NewResourceGroupID(subscriptionId, *createAndMountFileShareConfiguration.ResourceGroup).ID() + } + transportCreateAndMount.ResourceGroupId = resourceGroupId + + threeTierConfig.TransportCreateAndMount = []TransportCreateAndMount{ + transportCreateAndMount, + } + } + + if v, ok := transportFileShareConfiguration.(sapvirtualinstances.MountFileShareConfiguration); ok { + transportMount, err := flattenTransportMount(v) + if err != nil { + return nil, err + } + threeTierConfig.TransportMount = transportMount + } + } + } + + return append(result, threeTierConfig), nil +} + +func flattenTransportMount(input sapvirtualinstances.MountFileShareConfiguration) ([]TransportMount, error) { + result := make([]TransportMount, 0) + + // Currently, the last segment of the Storage File Share resource manager ID in Swagger is defined as `/shares/` but it's unexpected. + // The last segment of the Storage File Share resource manager ID should be `/fileshares/` not `/shares/` in Swagger since the backend service is using `/fileshares/`. + // See more details from https://github.com/Azure/azure-rest-api-specs/issues/25209 + legacyStorageShareResourceManagerId, err := storageParse.LegacyStorageShareResourceManagerID(input.Id) + if err != nil { + return nil, err + } + return append(result, TransportMount{ + FileShareId: storageParse.NewStorageShareResourceManagerID(legacyStorageShareResourceManagerId.SubscriptionId, legacyStorageShareResourceManagerId.ResourceGroup, legacyStorageShareResourceManagerId.StorageAccountName, legacyStorageShareResourceManagerId.FileServiceName, legacyStorageShareResourceManagerId.ShareName).ID(), + PrivateEndpointId: input.PrivateEndpointId, + }), nil +} + +func flattenOsSapConfiguration(input *sapvirtualinstances.OsSapConfiguration) []OsSapConfiguration { + result := make([]OsSapConfiguration, 0) + if input == nil { + return result + } + + return append(result, OsSapConfiguration{ + DeployerVmPackages: flattenDeployerVMPackages(input.DeployerVMPackages), + SapFqdn: pointer.From(input.SapFqdn), + }) +} + +func flattenDeployerVMPackages(input *sapvirtualinstances.DeployerVMPackages) []DeployerVmPackages { + result := make([]DeployerVmPackages, 0) + if input == nil { + return result + } + + return append(result, DeployerVmPackages{ + StorageAccountId: pointer.From(input.StorageAccountId), + Url: pointer.From(input.Url), + }) +} diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go new file mode 100644 index 000000000000..561f4bd1a275 --- /dev/null +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go @@ -0,0 +1,1188 @@ +package workloads_test + +import ( + "context" + "fmt" + "math/rand" + "testing" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances" + "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" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type WorkloadsSAPThreeTierVirtualInstanceResource struct{} + +func TestAccWorkloadsSAPThreeTierVirtualInstance_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_workloads_sap_three_tier_virtual_instance", "test") + r := WorkloadsSAPThreeTierVirtualInstanceResource{} + sapVISNameSuffix := RandomInt() + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data, sapVISNameSuffix), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep( + "three_tier_configuration.0.application_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.central_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.database_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + ), + }) +} + +func TestAccWorkloadsSAPThreeTierVirtualInstance_requiresImport(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_workloads_sap_three_tier_virtual_instance", "test") + r := WorkloadsSAPThreeTierVirtualInstanceResource{} + sapVISNameSuffix := RandomInt() + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data, sapVISNameSuffix), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + { + Config: r.requiresImport(data, sapVISNameSuffix), + ExpectError: acceptance.RequiresImportError(data.ResourceType), + }, + }) +} + +func TestAccWorkloadsSAPThreeTierVirtualInstance_complete(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_workloads_sap_three_tier_virtual_instance", "test") + r := WorkloadsSAPThreeTierVirtualInstanceResource{} + sapVISNameSuffix := RandomInt() + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data, sapVISNameSuffix), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep( + "three_tier_configuration.0.application_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.central_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.database_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + ), + }) +} + +func TestAccWorkloadsSAPThreeTierVirtualInstance_update(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_workloads_sap_three_tier_virtual_instance", "test") + r := WorkloadsSAPThreeTierVirtualInstanceResource{} + sapVISNameSuffix := RandomInt() + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data, sapVISNameSuffix), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep( + "three_tier_configuration.0.application_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.central_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.database_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + ), + { + Config: r.update(data, sapVISNameSuffix), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep( + "three_tier_configuration.0.application_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.central_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.database_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + ), + { + Config: r.complete(data, sapVISNameSuffix), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep( + "three_tier_configuration.0.application_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.central_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.database_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + ), + }) +} + +func TestAccWorkloadsSAPThreeTierVirtualInstance_transportMount(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_workloads_sap_three_tier_virtual_instance", "test") + r := WorkloadsSAPThreeTierVirtualInstanceResource{} + sapVISNameSuffix := RandomInt() + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.transportMount(data, sapVISNameSuffix), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep( + "three_tier_configuration.0.application_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.central_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + "three_tier_configuration.0.database_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", + ), + }) +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + id, err := sapvirtualinstances.ParseSapVirtualInstanceID(state.ID) + if err != nil { + return nil, err + } + + client := clients.Workloads.SAPVirtualInstances + resp, err := client.Get(ctx, *id) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return utils.Bool(false), nil + } + return nil, fmt.Errorf("retrieving %s: %+v", id, err) + } + return utils.Bool(resp.Model != nil), nil +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) template(data acceptance.TestData) string { + return fmt.Sprintf(` +resource "tls_private_key" "test" { + algorithm = "RSA" + rsa_bits = 4096 +} + +data "tls_public_key" "test" { + private_key_pem = tls_private_key.test.private_key_pem +} + +data "azurerm_subscription" "current" {} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-sapvis-%d" + location = "%s" +} + +resource "azurerm_user_assigned_identity" "test" { + name = "acctest-uai-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name +} + +resource "azurerm_role_assignment" "test" { + scope = data.azurerm_subscription.current.id + role_definition_name = "Azure Center for SAP solutions service role" + principal_id = azurerm_user_assigned_identity.test.principal_id +} + +resource "azurerm_virtual_network" "test" { + name = "acctest-vnet-%d" + address_space = ["10.0.0.0/16"] + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name +} + +resource "azurerm_subnet" "test" { + name = "acctest-subnet-%d" + resource_group_name = azurerm_resource_group.test.name + virtual_network_name = azurerm_virtual_network.test.name + address_prefixes = ["10.0.2.0/24"] +} + +resource "azurerm_resource_group" "app" { + name = "acctestRG-sapapp-%d" + location = "%s" + + depends_on = [ + azurerm_subnet.test + ] +} +`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.Locations.Primary) +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) basic(data acceptance.TestData, sapVISNameSuffix int) string { + return fmt.Sprintf(` +%s + +provider "azurerm" { + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { + name = "X%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + environment = "NonProd" + sap_product = "S4HANA" + managed_resource_group_name = "managedTestRG%d" + app_location = azurerm_resource_group.app.location + + os_sap_configuration { + sap_fqdn = "sap.bpaas.com" + } + + three_tier_configuration { + app_resource_group_name = azurerm_resource_group.app.name + + application_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + central_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + database_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_E16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + } + + identity { + type = "UserAssigned" + + identity_ids = [ + azurerm_user_assigned_identity.test.id, + ] + } + + depends_on = [ + azurerm_role_assignment.test + ] +} +`, r.template(data), sapVISNameSuffix, data.RandomInteger) +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) requiresImport(data acceptance.TestData, sapVISNameSuffix int) string { + return fmt.Sprintf(` +%s + +resource "azurerm_workloads_sap_three_tier_virtual_instance" "import" { + name = azurerm_workloads_sap_three_tier_virtual_instance.test.name + resource_group_name = azurerm_workloads_sap_three_tier_virtual_instance.test.resource_group_name + location = azurerm_workloads_sap_three_tier_virtual_instance.test.location + environment = azurerm_workloads_sap_three_tier_virtual_instance.test.environment + sap_product = azurerm_workloads_sap_three_tier_virtual_instance.test.sap_product + managed_resource_group_name = azurerm_workloads_sap_three_tier_virtual_instance.test.managed_resource_group_name + app_location = azurerm_workloads_sap_three_tier_virtual_instance.test.app_location + + os_sap_configuration { + sap_fqdn = "sap.bpaas.com" + } + + three_tier_configuration { + app_resource_group_name = azurerm_resource_group.app.name + + application_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + central_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + database_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_E16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + } + + identity { + type = "UserAssigned" + + identity_ids = [ + azurerm_user_assigned_identity.test.id, + ] + } + + depends_on = [ + azurerm_role_assignment.test + ] +} +`, r.basic(data, sapVISNameSuffix)) +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) complete(data acceptance.TestData, sapVISNameSuffix int) string { + return fmt.Sprintf(` +%s + +provider "azurerm" { + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_storage_account" "test" { + name = "acctestsa%s" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_tier = "Standard" + account_replication_type = "LRS" +} + +resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { + name = "X%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + environment = "NonProd" + sap_product = "S4HANA" + managed_resource_group_name = "managedTestRG%d" + app_location = azurerm_resource_group.app.location + + os_sap_configuration { + sap_fqdn = "sap.bpaas.com" + + deployer_virtual_machine_packages { + storage_account_id = azurerm_storage_account.test.id + url = "https://www.bing.com" + } + } + + three_tier_configuration { + app_resource_group_name = azurerm_resource_group.app.name + secondary_ip_enabled = true + + application_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + central_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + database_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + database_type = "HANA" + + virtual_machine_configuration { + virtual_machine_size = "Standard_E16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + + disk_volume_configuration { + volume_name = "hana/data" + number_of_disks = 3 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "hana/log" + number_of_disks = 3 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "hana/shared" + number_of_disks = 1 + size_in_gb = 256 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "usr/sap" + number_of_disks = 1 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "backup" + number_of_disks = 2 + size_in_gb = 256 + sku_name = "StandardSSD_LRS" + } + + disk_volume_configuration { + volume_name = "os" + number_of_disks = 1 + size_in_gb = 64 + sku_name = "StandardSSD_LRS" + } + } + + full_resource_names { + application_server { + availability_set_name = "appAvSet" + + virtual_machine { + host_name = "apphostName0" + os_disk_name = "app0osdisk" + virtual_machine_name = "appvm0" + network_interface_names = ["appnic0"] + + data_disk_names = { + default = "app0disk0" + } + } + } + + central_server { + availability_set_name = "csAvSet" + + load_balancer { + name = "ascslb" + backend_pool_names = ["ascsBackendPool"] + frontend_ip_configuration_names = ["ascsip0"] + health_probe_names = ["ascsHealthProbe"] + } + + virtual_machine { + host_name = "ascshostName" + os_disk_name = "ascsosdisk" + virtual_machine_name = "ascsvm" + network_interface_names = ["ascsnic"] + + data_disk_names = { + default = "ascsdisk" + } + } + } + + database_server { + availability_set_name = "dbAvSet" + + load_balancer { + name = "dblb" + backend_pool_names = ["dbBackendPool"] + frontend_ip_configuration_names = ["dbip"] + health_probe_names = ["dbHealthProbe"] + } + + virtual_machine { + host_name = "dbprhost" + os_disk_name = "dbprosdisk" + virtual_machine_name = "dbvmpr" + network_interface_names = ["dbprnic"] + + data_disk_names = { + hanaData = "hanadatapr0,hanadatapr1" + hanaLog = "hanalogpr0,hanalogpr1,hanalogpr2" + usrSap = "usrsappr0" + hanaShared = "hanasharedpr0,hanasharedpr1" + } + } + } + + shared_storage { + account_name = "sharedtestsa%s" + private_endpoint_name = "testPE%s" + } + } + + transport_create_and_mount { + resource_group_id = azurerm_resource_group.app.id + storage_account_name = "transsa%s" + } + } + + identity { + type = "UserAssigned" + + identity_ids = [ + azurerm_user_assigned_identity.test.id, + ] + } + + tags = { + Env = "Test" + } + + depends_on = [ + azurerm_role_assignment.test + ] +} +`, r.template(data), data.RandomString, sapVISNameSuffix, data.RandomInteger, data.RandomString, data.RandomString, data.RandomString) +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) update(data acceptance.TestData, sapVISNameSuffix int) string { + return fmt.Sprintf(` +%s + +provider "azurerm" { + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_storage_account" "test" { + name = "acctestsa%s" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_tier = "Standard" + account_replication_type = "LRS" +} + +resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { + name = "X%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + environment = "NonProd" + sap_product = "S4HANA" + managed_resource_group_name = "managedTestRG%d" + app_location = azurerm_resource_group.app.location + + os_sap_configuration { + sap_fqdn = "sap.bpaas.com" + + deployer_virtual_machine_packages { + storage_account_id = azurerm_storage_account.test.id + url = "https://www.bing.com" + } + } + + three_tier_configuration { + app_resource_group_name = azurerm_resource_group.app.name + secondary_ip_enabled = true + + application_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + central_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + database_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + database_type = "HANA" + + virtual_machine_configuration { + virtual_machine_size = "Standard_E16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + + disk_volume_configuration { + volume_name = "hana/data" + number_of_disks = 3 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "hana/log" + number_of_disks = 3 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "hana/shared" + number_of_disks = 1 + size_in_gb = 256 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "usr/sap" + number_of_disks = 1 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "backup" + number_of_disks = 2 + size_in_gb = 256 + sku_name = "StandardSSD_LRS" + } + + disk_volume_configuration { + volume_name = "os" + number_of_disks = 1 + size_in_gb = 64 + sku_name = "StandardSSD_LRS" + } + } + + full_resource_names { + application_server { + availability_set_name = "appAvSet" + + virtual_machine { + host_name = "apphostName0" + os_disk_name = "app0osdisk" + virtual_machine_name = "appvm0" + network_interface_names = ["appnic0"] + + data_disk_names = { + default = "app0disk0" + } + } + } + + central_server { + availability_set_name = "csAvSet" + + load_balancer { + name = "ascslb" + backend_pool_names = ["ascsBackendPool"] + frontend_ip_configuration_names = ["ascsip0"] + health_probe_names = ["ascsHealthProbe"] + } + + virtual_machine { + host_name = "ascshostName" + os_disk_name = "ascsosdisk" + virtual_machine_name = "ascsvm" + network_interface_names = ["ascsnic"] + + data_disk_names = { + default = "ascsdisk" + } + } + } + + database_server { + availability_set_name = "dbAvSet" + + load_balancer { + name = "dblb" + backend_pool_names = ["dbBackendPool"] + frontend_ip_configuration_names = ["dbip"] + health_probe_names = ["dbHealthProbe"] + } + + virtual_machine { + host_name = "dbprhost" + os_disk_name = "dbprosdisk" + virtual_machine_name = "dbvmpr" + network_interface_names = ["dbprnic"] + + data_disk_names = { + hanaData = "hanadatapr0,hanadatapr1" + hanaLog = "hanalogpr0,hanalogpr1,hanalogpr2" + usrSap = "usrsappr0" + hanaShared = "hanasharedpr0,hanasharedpr1" + } + } + } + + shared_storage { + account_name = "sharedtestsa%s" + private_endpoint_name = "testPE%s" + } + } + + transport_create_and_mount { + resource_group_id = azurerm_resource_group.app.id + storage_account_name = "transsa%s" + } + } + + depends_on = [ + azurerm_role_assignment.test + ] +} +`, r.template(data), data.RandomString, sapVISNameSuffix, data.RandomInteger, data.RandomString, data.RandomString, data.RandomString) +} + +func (r WorkloadsSAPThreeTierVirtualInstanceResource) transportMount(data acceptance.TestData, sapVISNameSuffix int) string { + return fmt.Sprintf(` +%s + +provider "azurerm" { + features { + resource_group { + prevent_deletion_if_contains_resources = false + } + } +} + +resource "azurerm_storage_account" "test" { + name = "acctestsa%s" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + account_kind = "FileStorage" + account_tier = "Premium" + account_replication_type = "LRS" + enable_https_traffic_only = false +} + +resource "azurerm_storage_share" "test" { + name = "acctestshare%d" + storage_account_name = azurerm_storage_account.test.name + enabled_protocol = "NFS" + quota = 100 +} + +resource "azurerm_private_dns_zone" "test" { + name = "acctest%d.privatelink.file.core.windows.net" + resource_group_name = azurerm_resource_group.test.name +} + +resource "azurerm_private_endpoint" "test" { + name = "acctest-pe-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + subnet_id = azurerm_subnet.test.id + + private_dns_zone_group { + name = "acctest-dzg-%d" + private_dns_zone_ids = [azurerm_private_dns_zone.test.id] + } + + private_service_connection { + name = "acctest-privatelink-%d" + is_manual_connection = false + private_connection_resource_id = azurerm_storage_account.test.id + subresource_names = ["file"] + } +} + +resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { + name = "X%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + environment = "NonProd" + sap_product = "S4HANA" + managed_resource_group_name = "managedTestRG%d" + + app_location = azurerm_resource_group.app.location + + os_sap_configuration { + sap_fqdn = "sap.bpaas.com" + + deployer_virtual_machine_packages { + storage_account_id = azurerm_storage_account.test.id + url = "https://www.bing.com" + } + } + + three_tier_configuration { + app_resource_group_name = azurerm_resource_group.app.name + secondary_ip_enabled = true + + application_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + central_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + } + + database_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.test.id + database_type = "HANA" + + virtual_machine_configuration { + virtual_machine_size = "Standard_E16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.test.private_key_pem + ssh_public_key = data.tls_public_key.test.public_key_openssh + } + } + + disk_volume_configuration { + volume_name = "hana/data" + number_of_disks = 3 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "hana/log" + number_of_disks = 3 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "hana/shared" + number_of_disks = 1 + size_in_gb = 256 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "usr/sap" + number_of_disks = 1 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "backup" + number_of_disks = 2 + size_in_gb = 256 + sku_name = "StandardSSD_LRS" + } + + disk_volume_configuration { + volume_name = "os" + number_of_disks = 1 + size_in_gb = 64 + sku_name = "StandardSSD_LRS" + } + } + + full_resource_names { + application_server { + availability_set_name = "appAvSet" + + virtual_machine { + host_name = "apphostName0" + os_disk_name = "app0osdisk" + virtual_machine_name = "appvm0" + network_interface_names = ["appnic0"] + + data_disk_names = { + default = "app0disk0" + } + } + } + + central_server { + availability_set_name = "csAvSet" + + load_balancer { + name = "ascslb" + backend_pool_names = ["ascsBackendPool"] + frontend_ip_configuration_names = ["ascsip0"] + health_probe_names = ["ascsHealthProbe"] + } + + virtual_machine { + host_name = "ascshostName" + os_disk_name = "ascsosdisk" + virtual_machine_name = "ascsvm" + network_interface_names = ["ascsnic"] + + data_disk_names = { + default = "ascsdisk" + } + } + } + + database_server { + availability_set_name = "dbAvSet" + + load_balancer { + name = "dblb" + backend_pool_names = ["dbBackendPool"] + frontend_ip_configuration_names = ["dbip"] + health_probe_names = ["dbHealthProbe"] + } + + virtual_machine { + host_name = "dbprhost" + os_disk_name = "dbprosdisk" + virtual_machine_name = "dbvmpr" + network_interface_names = ["dbprnic"] + + data_disk_names = { + hanaData = "hanadatapr0,hanadatapr1" + hanaLog = "hanalogpr0,hanalogpr1,hanalogpr2" + usrSap = "usrsappr0" + hanaShared = "hanasharedpr0,hanasharedpr1" + } + } + } + + shared_storage { + account_name = "sharedtestsa%s" + private_endpoint_name = "testPE%s" + } + } + + transport_mount { + file_share_id = azurerm_storage_share.test.resource_manager_id + private_endpoint_id = azurerm_private_endpoint.test.id + } + } + + identity { + type = "UserAssigned" + + identity_ids = [ + azurerm_user_assigned_identity.test.id, + ] + } + + tags = { + Env = "Test" + } + + depends_on = [ + azurerm_role_assignment.test + ] +} +`, r.template(data), data.RandomString, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, sapVISNameSuffix, data.RandomInteger, data.RandomString, data.RandomString) +} + +func RandomInt() int { + rand.NewSource(time.Now().UnixNano()) + num := rand.Intn(90) + 10 + + return num +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/README.md new file mode 100644 index 000000000000..b39479c8b9ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/README.md @@ -0,0 +1,133 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints` Documentation + +The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `network` (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-sdk/resource-manager/network/2023-04-01/privateendpoints" +``` + + +### Client Initialization + +```go +client := privateendpoints.NewPrivateEndpointsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateEndpointsClient.AvailablePrivateEndpointTypesList` + +```go +ctx := context.TODO() +id := privateendpoints.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +// alternatively `client.AvailablePrivateEndpointTypesList(ctx, id)` can be used to do batched pagination +items, err := client.AvailablePrivateEndpointTypesListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PrivateEndpointsClient.AvailablePrivateEndpointTypesListByResourceGroup` + +```go +ctx := context.TODO() +id := privateendpoints.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") + +// alternatively `client.AvailablePrivateEndpointTypesListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.AvailablePrivateEndpointTypesListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PrivateEndpointsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") + +payload := privateendpoints.PrivateEndpoint{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointsClient.Delete` + +```go +ctx := context.TODO() +id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointsClient.Get` + +```go +ctx := context.TODO() +id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") + +read, err := client.Get(ctx, id, privateendpoints.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateEndpointsClient.List` + +```go +ctx := context.TODO() +id := privateendpoints.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PrivateEndpointsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := privateendpoints.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/client.go new file mode 100644 index 000000000000..149437b13342 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/client.go @@ -0,0 +1,26 @@ +package privateendpoints + +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 PrivateEndpointsClient struct { + Client *resourcemanager.Client +} + +func NewPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpoints", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) + } + + return &PrivateEndpointsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/constants.go new file mode 100644 index 000000000000..fe61de76a0e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/constants.go @@ -0,0 +1,1151 @@ +package privateendpoints + +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 DdosSettingsProtectionMode string + +const ( + DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" + DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" + DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" +) + +func PossibleValuesForDdosSettingsProtectionMode() []string { + return []string{ + string(DdosSettingsProtectionModeDisabled), + string(DdosSettingsProtectionModeEnabled), + string(DdosSettingsProtectionModeVirtualNetworkInherited), + } +} + +func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDdosSettingsProtectionMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { + vals := map[string]DdosSettingsProtectionMode{ + "disabled": DdosSettingsProtectionModeDisabled, + "enabled": DdosSettingsProtectionModeEnabled, + "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DdosSettingsProtectionMode(input) + return &out, nil +} + +type DeleteOptions string + +const ( + DeleteOptionsDelete DeleteOptions = "Delete" + DeleteOptionsDetach DeleteOptions = "Detach" +) + +func PossibleValuesForDeleteOptions() []string { + return []string{ + string(DeleteOptionsDelete), + string(DeleteOptionsDetach), + } +} + +func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeleteOptions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeleteOptions(input string) (*DeleteOptions, error) { + vals := map[string]DeleteOptions{ + "delete": DeleteOptionsDelete, + "detach": DeleteOptionsDetach, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeleteOptions(input) + return &out, nil +} + +type FlowLogFormatType string + +const ( + FlowLogFormatTypeJSON FlowLogFormatType = "JSON" +) + +func PossibleValuesForFlowLogFormatType() []string { + return []string{ + string(FlowLogFormatTypeJSON), + } +} + +func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFlowLogFormatType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { + vals := map[string]FlowLogFormatType{ + "json": FlowLogFormatTypeJSON, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FlowLogFormatType(input) + return &out, nil +} + +type GatewayLoadBalancerTunnelInterfaceType string + +const ( + GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" + GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" + GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" +) + +func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { + return []string{ + string(GatewayLoadBalancerTunnelInterfaceTypeExternal), + string(GatewayLoadBalancerTunnelInterfaceTypeInternal), + string(GatewayLoadBalancerTunnelInterfaceTypeNone), + } +} + +func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { + vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ + "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, + "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, + "none": GatewayLoadBalancerTunnelInterfaceTypeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GatewayLoadBalancerTunnelInterfaceType(input) + return &out, nil +} + +type GatewayLoadBalancerTunnelProtocol string + +const ( + GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" + GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" + GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" +) + +func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { + return []string{ + string(GatewayLoadBalancerTunnelProtocolNative), + string(GatewayLoadBalancerTunnelProtocolNone), + string(GatewayLoadBalancerTunnelProtocolVXLAN), + } +} + +func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { + vals := map[string]GatewayLoadBalancerTunnelProtocol{ + "native": GatewayLoadBalancerTunnelProtocolNative, + "none": GatewayLoadBalancerTunnelProtocolNone, + "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GatewayLoadBalancerTunnelProtocol(input) + return &out, nil +} + +type IPAllocationMethod string + +const ( + IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" + IPAllocationMethodStatic IPAllocationMethod = "Static" +) + +func PossibleValuesForIPAllocationMethod() []string { + return []string{ + string(IPAllocationMethodDynamic), + string(IPAllocationMethodStatic), + } +} + +func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPAllocationMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { + vals := map[string]IPAllocationMethod{ + "dynamic": IPAllocationMethodDynamic, + "static": IPAllocationMethodStatic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPAllocationMethod(input) + return &out, nil +} + +type IPVersion string + +const ( + IPVersionIPvFour IPVersion = "IPv4" + IPVersionIPvSix IPVersion = "IPv6" +) + +func PossibleValuesForIPVersion() []string { + return []string{ + string(IPVersionIPvFour), + string(IPVersionIPvSix), + } +} + +func (s *IPVersion) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPVersion(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPVersion(input string) (*IPVersion, error) { + vals := map[string]IPVersion{ + "ipv4": IPVersionIPvFour, + "ipv6": IPVersionIPvSix, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPVersion(input) + return &out, nil +} + +type LoadBalancerBackendAddressAdminState string + +const ( + LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" + LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" + LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" +) + +func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { + return []string{ + string(LoadBalancerBackendAddressAdminStateDown), + string(LoadBalancerBackendAddressAdminStateNone), + string(LoadBalancerBackendAddressAdminStateUp), + } +} + +func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLoadBalancerBackendAddressAdminState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { + vals := map[string]LoadBalancerBackendAddressAdminState{ + "down": LoadBalancerBackendAddressAdminStateDown, + "none": LoadBalancerBackendAddressAdminStateNone, + "up": LoadBalancerBackendAddressAdminStateUp, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LoadBalancerBackendAddressAdminState(input) + return &out, nil +} + +type NatGatewaySkuName string + +const ( + NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" +) + +func PossibleValuesForNatGatewaySkuName() []string { + return []string{ + string(NatGatewaySkuNameStandard), + } +} + +func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNatGatewaySkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { + vals := map[string]NatGatewaySkuName{ + "standard": NatGatewaySkuNameStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NatGatewaySkuName(input) + return &out, nil +} + +type NetworkInterfaceAuxiliaryMode string + +const ( + NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" + NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" + NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" + NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" +) + +func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { + return []string{ + string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), + string(NetworkInterfaceAuxiliaryModeFloating), + string(NetworkInterfaceAuxiliaryModeMaxConnections), + string(NetworkInterfaceAuxiliaryModeNone), + } +} + +func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkInterfaceAuxiliaryMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { + vals := map[string]NetworkInterfaceAuxiliaryMode{ + "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, + "floating": NetworkInterfaceAuxiliaryModeFloating, + "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, + "none": NetworkInterfaceAuxiliaryModeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkInterfaceAuxiliaryMode(input) + return &out, nil +} + +type NetworkInterfaceAuxiliarySku string + +const ( + NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" + NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" + NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" + NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" + NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" +) + +func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { + return []string{ + string(NetworkInterfaceAuxiliarySkuAEight), + string(NetworkInterfaceAuxiliarySkuAFour), + string(NetworkInterfaceAuxiliarySkuAOne), + string(NetworkInterfaceAuxiliarySkuATwo), + string(NetworkInterfaceAuxiliarySkuNone), + } +} + +func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkInterfaceAuxiliarySku(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { + vals := map[string]NetworkInterfaceAuxiliarySku{ + "a8": NetworkInterfaceAuxiliarySkuAEight, + "a4": NetworkInterfaceAuxiliarySkuAFour, + "a1": NetworkInterfaceAuxiliarySkuAOne, + "a2": NetworkInterfaceAuxiliarySkuATwo, + "none": NetworkInterfaceAuxiliarySkuNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkInterfaceAuxiliarySku(input) + return &out, nil +} + +type NetworkInterfaceMigrationPhase string + +const ( + NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" + NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" + NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" + NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" + NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" +) + +func PossibleValuesForNetworkInterfaceMigrationPhase() []string { + return []string{ + string(NetworkInterfaceMigrationPhaseAbort), + string(NetworkInterfaceMigrationPhaseCommit), + string(NetworkInterfaceMigrationPhaseCommitted), + string(NetworkInterfaceMigrationPhaseNone), + string(NetworkInterfaceMigrationPhasePrepare), + } +} + +func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkInterfaceMigrationPhase(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { + vals := map[string]NetworkInterfaceMigrationPhase{ + "abort": NetworkInterfaceMigrationPhaseAbort, + "commit": NetworkInterfaceMigrationPhaseCommit, + "committed": NetworkInterfaceMigrationPhaseCommitted, + "none": NetworkInterfaceMigrationPhaseNone, + "prepare": NetworkInterfaceMigrationPhasePrepare, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkInterfaceMigrationPhase(input) + return &out, nil +} + +type NetworkInterfaceNicType string + +const ( + NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" + NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" +) + +func PossibleValuesForNetworkInterfaceNicType() []string { + return []string{ + string(NetworkInterfaceNicTypeElastic), + string(NetworkInterfaceNicTypeStandard), + } +} + +func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNetworkInterfaceNicType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { + vals := map[string]NetworkInterfaceNicType{ + "elastic": NetworkInterfaceNicTypeElastic, + "standard": NetworkInterfaceNicTypeStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NetworkInterfaceNicType(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type PublicIPAddressDnsSettingsDomainNameLabelScope string + +const ( + PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" + PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" + PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" + PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" +) + +func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { + return []string{ + string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), + string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), + string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), + string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), + } +} + +func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { + vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ + "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, + "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, + "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, + "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) + return &out, nil +} + +type PublicIPAddressMigrationPhase string + +const ( + PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" + PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" + PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" + PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" + PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" +) + +func PossibleValuesForPublicIPAddressMigrationPhase() []string { + return []string{ + string(PublicIPAddressMigrationPhaseAbort), + string(PublicIPAddressMigrationPhaseCommit), + string(PublicIPAddressMigrationPhaseCommitted), + string(PublicIPAddressMigrationPhaseNone), + string(PublicIPAddressMigrationPhasePrepare), + } +} + +func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicIPAddressMigrationPhase(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { + vals := map[string]PublicIPAddressMigrationPhase{ + "abort": PublicIPAddressMigrationPhaseAbort, + "commit": PublicIPAddressMigrationPhaseCommit, + "committed": PublicIPAddressMigrationPhaseCommitted, + "none": PublicIPAddressMigrationPhaseNone, + "prepare": PublicIPAddressMigrationPhasePrepare, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicIPAddressMigrationPhase(input) + return &out, nil +} + +type PublicIPAddressSkuName string + +const ( + PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" + PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" +) + +func PossibleValuesForPublicIPAddressSkuName() []string { + return []string{ + string(PublicIPAddressSkuNameBasic), + string(PublicIPAddressSkuNameStandard), + } +} + +func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicIPAddressSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { + vals := map[string]PublicIPAddressSkuName{ + "basic": PublicIPAddressSkuNameBasic, + "standard": PublicIPAddressSkuNameStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicIPAddressSkuName(input) + return &out, nil +} + +type PublicIPAddressSkuTier string + +const ( + PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" + PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" +) + +func PossibleValuesForPublicIPAddressSkuTier() []string { + return []string{ + string(PublicIPAddressSkuTierGlobal), + string(PublicIPAddressSkuTierRegional), + } +} + +func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicIPAddressSkuTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { + vals := map[string]PublicIPAddressSkuTier{ + "global": PublicIPAddressSkuTierGlobal, + "regional": PublicIPAddressSkuTierRegional, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicIPAddressSkuTier(input) + return &out, nil +} + +type RouteNextHopType string + +const ( + RouteNextHopTypeInternet RouteNextHopType = "Internet" + RouteNextHopTypeNone RouteNextHopType = "None" + RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" + RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" + RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" +) + +func PossibleValuesForRouteNextHopType() []string { + return []string{ + string(RouteNextHopTypeInternet), + string(RouteNextHopTypeNone), + string(RouteNextHopTypeVirtualAppliance), + string(RouteNextHopTypeVirtualNetworkGateway), + string(RouteNextHopTypeVnetLocal), + } +} + +func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRouteNextHopType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRouteNextHopType(input string) (*RouteNextHopType, error) { + vals := map[string]RouteNextHopType{ + "internet": RouteNextHopTypeInternet, + "none": RouteNextHopTypeNone, + "virtualappliance": RouteNextHopTypeVirtualAppliance, + "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, + "vnetlocal": RouteNextHopTypeVnetLocal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RouteNextHopType(input) + return &out, nil +} + +type SecurityRuleAccess string + +const ( + SecurityRuleAccessAllow SecurityRuleAccess = "Allow" + SecurityRuleAccessDeny SecurityRuleAccess = "Deny" +) + +func PossibleValuesForSecurityRuleAccess() []string { + return []string{ + string(SecurityRuleAccessAllow), + string(SecurityRuleAccessDeny), + } +} + +func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityRuleAccess(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { + vals := map[string]SecurityRuleAccess{ + "allow": SecurityRuleAccessAllow, + "deny": SecurityRuleAccessDeny, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityRuleAccess(input) + return &out, nil +} + +type SecurityRuleDirection string + +const ( + SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" + SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" +) + +func PossibleValuesForSecurityRuleDirection() []string { + return []string{ + string(SecurityRuleDirectionInbound), + string(SecurityRuleDirectionOutbound), + } +} + +func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityRuleDirection(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { + vals := map[string]SecurityRuleDirection{ + "inbound": SecurityRuleDirectionInbound, + "outbound": SecurityRuleDirectionOutbound, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityRuleDirection(input) + return &out, nil +} + +type SecurityRuleProtocol string + +const ( + SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" + SecurityRuleProtocolAny SecurityRuleProtocol = "*" + SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" + SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" + SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" + SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" +) + +func PossibleValuesForSecurityRuleProtocol() []string { + return []string{ + string(SecurityRuleProtocolAh), + string(SecurityRuleProtocolAny), + string(SecurityRuleProtocolEsp), + string(SecurityRuleProtocolIcmp), + string(SecurityRuleProtocolTcp), + string(SecurityRuleProtocolUdp), + } +} + +func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityRuleProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { + vals := map[string]SecurityRuleProtocol{ + "ah": SecurityRuleProtocolAh, + "*": SecurityRuleProtocolAny, + "esp": SecurityRuleProtocolEsp, + "icmp": SecurityRuleProtocolIcmp, + "tcp": SecurityRuleProtocolTcp, + "udp": SecurityRuleProtocolUdp, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityRuleProtocol(input) + return &out, nil +} + +type SyncMode string + +const ( + SyncModeAutomatic SyncMode = "Automatic" + SyncModeManual SyncMode = "Manual" +) + +func PossibleValuesForSyncMode() []string { + return []string{ + string(SyncModeAutomatic), + string(SyncModeManual), + } +} + +func (s *SyncMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSyncMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSyncMode(input string) (*SyncMode, error) { + vals := map[string]SyncMode{ + "automatic": SyncModeAutomatic, + "manual": SyncModeManual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SyncMode(input) + return &out, nil +} + +type TransportProtocol string + +const ( + TransportProtocolAll TransportProtocol = "All" + TransportProtocolTcp TransportProtocol = "Tcp" + TransportProtocolUdp TransportProtocol = "Udp" +) + +func PossibleValuesForTransportProtocol() []string { + return []string{ + string(TransportProtocolAll), + string(TransportProtocolTcp), + string(TransportProtocolUdp), + } +} + +func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTransportProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTransportProtocol(input string) (*TransportProtocol, error) { + vals := map[string]TransportProtocol{ + "all": TransportProtocolAll, + "tcp": TransportProtocolTcp, + "udp": TransportProtocolUdp, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TransportProtocol(input) + return &out, nil +} + +type VirtualNetworkPrivateEndpointNetworkPolicies string + +const ( + VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" + VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" +) + +func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { + return []string{ + string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), + string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), + } +} + +func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { + vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ + "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, + "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualNetworkPrivateEndpointNetworkPolicies(input) + return &out, nil +} + +type VirtualNetworkPrivateLinkServiceNetworkPolicies string + +const ( + VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" + VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" +) + +func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { + return []string{ + string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), + string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), + } +} + +func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { + vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ + "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, + "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go new file mode 100644 index 000000000000..f2d861344268 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go @@ -0,0 +1,116 @@ +package privateendpoints + +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 = LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(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 := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) 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("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go new file mode 100644 index 000000000000..2122ecbbc30b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go @@ -0,0 +1,125 @@ +package privateendpoints + +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 = PrivateEndpointId{} + +// PrivateEndpointId is a struct representing the Resource ID for a Private Endpoint +type PrivateEndpointId struct { + SubscriptionId string + ResourceGroupName string + PrivateEndpointName string +} + +// NewPrivateEndpointID returns a new PrivateEndpointId struct +func NewPrivateEndpointID(subscriptionId string, resourceGroupName string, privateEndpointName string) PrivateEndpointId { + return PrivateEndpointId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PrivateEndpointName: privateEndpointName, + } +} + +// ParsePrivateEndpointID parses 'input' into a PrivateEndpointId +func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePrivateEndpointIDInsensitively parses 'input' case-insensitively into a PrivateEndpointId +// note: this method should only be used for API response data and not user input +func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointId) 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.PrivateEndpointName, ok = input.Parsed["privateEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", input) + } + + return nil +} + +// ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID +func ValidatePrivateEndpointID(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 := ParsePrivateEndpointID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Private Endpoint ID +func (id PrivateEndpointId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateEndpoints/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateEndpointName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint ID +func (id PrivateEndpointId) 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("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), + resourceids.StaticSegment("staticPrivateEndpoints", "privateEndpoints", "privateEndpoints"), + resourceids.UserSpecifiedSegment("privateEndpointName", "privateEndpointValue"), + } +} + +// String returns a human-readable description of this Private Endpoint ID +func (id PrivateEndpointId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Private Endpoint Name: %q", id.PrivateEndpointName), + } + return fmt.Sprintf("Private Endpoint (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go new file mode 100644 index 000000000000..e412f544122d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go @@ -0,0 +1,125 @@ +package privateendpoints + +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 = ProviderLocationId{} + +// ProviderLocationId is a struct representing the Resource ID for a Provider Location +type ProviderLocationId struct { + SubscriptionId string + ResourceGroupName string + LocationName string +} + +// NewProviderLocationID returns a new ProviderLocationId struct +func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { + return ProviderLocationId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + LocationName: locationName, + } +} + +// ParseProviderLocationID parses 'input' into a ProviderLocationId +func ParseProviderLocationID(input string) (*ProviderLocationId, error) { + parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId +// note: this method should only be used for API response data and not user input +func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { + parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderLocationId) 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.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID +func ValidateProviderLocationID(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 := ParseProviderLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Provider Location ID +func (id ProviderLocationId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID +func (id ProviderLocationId) 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("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Provider Location ID +func (id ProviderLocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go new file mode 100644 index 000000000000..2cb59080a74a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go @@ -0,0 +1,89 @@ +package privateendpoints + +import ( + "context" + "fmt" + "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 AvailablePrivateEndpointTypesListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AvailablePrivateEndpointType +} + +type AvailablePrivateEndpointTypesListCompleteResult struct { + Items []AvailablePrivateEndpointType +} + +// AvailablePrivateEndpointTypesList ... +func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesList(ctx context.Context, id LocationId) (result AvailablePrivateEndpointTypesListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/availablePrivateEndpointTypes", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AvailablePrivateEndpointType `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// AvailablePrivateEndpointTypesListComplete retrieves all the results into a single object +func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListComplete(ctx context.Context, id LocationId) (AvailablePrivateEndpointTypesListCompleteResult, error) { + return c.AvailablePrivateEndpointTypesListCompleteMatchingPredicate(ctx, id, AvailablePrivateEndpointTypeOperationPredicate{}) +} + +// AvailablePrivateEndpointTypesListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AvailablePrivateEndpointTypeOperationPredicate) (result AvailablePrivateEndpointTypesListCompleteResult, err error) { + items := make([]AvailablePrivateEndpointType, 0) + + resp, err := c.AvailablePrivateEndpointTypesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = AvailablePrivateEndpointTypesListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go new file mode 100644 index 000000000000..d819f6c432cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go @@ -0,0 +1,89 @@ +package privateendpoints + +import ( + "context" + "fmt" + "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 AvailablePrivateEndpointTypesListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AvailablePrivateEndpointType +} + +type AvailablePrivateEndpointTypesListByResourceGroupCompleteResult struct { + Items []AvailablePrivateEndpointType +} + +// AvailablePrivateEndpointTypesListByResourceGroup ... +func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroup(ctx context.Context, id ProviderLocationId) (result AvailablePrivateEndpointTypesListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/availablePrivateEndpointTypes", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AvailablePrivateEndpointType `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// AvailablePrivateEndpointTypesListByResourceGroupComplete retrieves all the results into a single object +func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroupComplete(ctx context.Context, id ProviderLocationId) (AvailablePrivateEndpointTypesListByResourceGroupCompleteResult, error) { + return c.AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate(ctx, id, AvailablePrivateEndpointTypeOperationPredicate{}) +} + +// AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AvailablePrivateEndpointTypeOperationPredicate) (result AvailablePrivateEndpointTypesListByResourceGroupCompleteResult, err error) { + items := make([]AvailablePrivateEndpointType, 0) + + resp, err := c.AvailablePrivateEndpointTypesListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = AvailablePrivateEndpointTypesListByResourceGroupCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go new file mode 100644 index 000000000000..04fee084ffc1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go @@ -0,0 +1,74 @@ +package privateendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// CreateOrUpdate ... +func (c PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, id PrivateEndpointId, input PrivateEndpoint) (result CreateOrUpdateOperationResponse, 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c PrivateEndpointsClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateEndpointId, input PrivateEndpoint) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_delete.go new file mode 100644 index 000000000000..70f382bf8e3b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_delete.go @@ -0,0 +1,71 @@ +package privateendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c PrivateEndpointsClient) Delete(ctx context.Context, id PrivateEndpointId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c PrivateEndpointsClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_get.go new file mode 100644 index 000000000000..3530642f24ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_get.go @@ -0,0 +1,80 @@ +package privateendpoints + +import ( + "context" + "fmt" + "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 *PrivateEndpoint +} + +type GetOperationOptions struct { + Expand *string +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o GetOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o GetOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Expand != nil { + out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) + } + return &out +} + +// Get ... +func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId, options GetOperationOptions) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + OptionsObject: options, + } + + 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go new file mode 100644 index 000000000000..8191e9553b06 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go @@ -0,0 +1,90 @@ +package privateendpoints + +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 *[]PrivateEndpoint +} + +type ListCompleteResult struct { + Items []PrivateEndpoint +} + +// List ... +func (c PrivateEndpointsClient) List(ctx context.Context, id commonids.ResourceGroupId) (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.Network/privateEndpoints", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]PrivateEndpoint `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c PrivateEndpointsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, PrivateEndpointOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateEndpointsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PrivateEndpointOperationPredicate) (result ListCompleteResult, err error) { + items := make([]PrivateEndpoint, 0) + + resp, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go new file mode 100644 index 000000000000..52761988c2d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go @@ -0,0 +1,90 @@ +package privateendpoints + +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 ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]PrivateEndpoint +} + +type ListBySubscriptionCompleteResult struct { + Items []PrivateEndpoint +} + +// ListBySubscription ... +func (c PrivateEndpointsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateEndpoints", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]PrivateEndpoint `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c PrivateEndpointsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, PrivateEndpointOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateEndpointsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PrivateEndpointOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]PrivateEndpoint, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddress.go new file mode 100644 index 000000000000..b8767a924d33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddress.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationGatewayBackendAddress struct { + Fqdn *string `json:"fqdn,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspool.go new file mode 100644 index 000000000000..faea7af96350 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspool.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationGatewayBackendAddressPool struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go new file mode 100644 index 000000000000..bc45532ef998 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go @@ -0,0 +1,10 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { + BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` + BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfiguration.go new file mode 100644 index 000000000000..d7b619385a01 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfiguration.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationGatewayIPConfiguration struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go new file mode 100644 index 000000000000..0975b3a3c18e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationGatewayIPConfigurationPropertiesFormat struct { + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Subnet *SubResource `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygroup.go new file mode 100644 index 000000000000..b514ce65a104 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygroup.go @@ -0,0 +1,14 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationSecurityGroup struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go new file mode 100644 index 000000000000..c505be8adad1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationSecurityGroupPropertiesFormat struct { + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceGuid *string `json:"resourceGuid,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_availableprivateendpointtype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_availableprivateendpointtype.go new file mode 100644 index 000000000000..c6aa8839dc14 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_availableprivateendpointtype.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AvailablePrivateEndpointType struct { + DisplayName *string `json:"displayName,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + ResourceName *string `json:"resourceName,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspool.go new file mode 100644 index 000000000000..afaee89cd0ab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspool.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackendAddressPool struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspoolpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspoolpropertiesformat.go new file mode 100644 index 000000000000..7079b8612911 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspoolpropertiesformat.go @@ -0,0 +1,19 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackendAddressPoolPropertiesFormat struct { + BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` + DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` + InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` + LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + Location *string `json:"location,omitempty"` + OutboundRule *SubResource `json:"outboundRule,omitempty"` + OutboundRules *[]SubResource `json:"outboundRules,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + SyncMode *SyncMode `json:"syncMode,omitempty"` + TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` + VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_customdnsconfigpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_customdnsconfigpropertiesformat.go new file mode 100644 index 000000000000..a078479b1cf9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_customdnsconfigpropertiesformat.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDnsConfigPropertiesFormat struct { + Fqdn *string `json:"fqdn,omitempty"` + IPAddresses *[]string `json:"ipAddresses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ddossettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ddossettings.go new file mode 100644 index 000000000000..6253ff1e5a4f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ddossettings.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DdosSettings struct { + DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` + ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_delegation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_delegation.go new file mode 100644 index 000000000000..fd6104e1e68c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_delegation.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Delegation struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlog.go new file mode 100644 index 000000000000..bce1bcfe8ad0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlog.go @@ -0,0 +1,14 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowLog struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *FlowLogPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_flowlogformatparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogformatparameters.go new file mode 100644 index 000000000000..a15c48049c6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogformatparameters.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowLogFormatParameters struct { + Type *FlowLogFormatType `json:"type,omitempty"` + Version *int64 `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogpropertiesformat.go new file mode 100644 index 000000000000..6f45378b9d17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogpropertiesformat.go @@ -0,0 +1,15 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowLogPropertiesFormat struct { + Enabled *bool `json:"enabled,omitempty"` + FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` + Format *FlowLogFormatParameters `json:"format,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` + StorageId string `json:"storageId"` + TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` + TargetResourceId string `json:"targetResourceId"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfiguration.go new file mode 100644 index 000000000000..3dcb8560fec0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfiguration.go @@ -0,0 +1,17 @@ +package privateendpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FrontendIPConfiguration struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go new file mode 100644 index 000000000000..8980fc3756f2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go @@ -0,0 +1,19 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FrontendIPConfigurationPropertiesFormat struct { + GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` + InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` + InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + OutboundRules *[]SubResource `json:"outboundRules,omitempty"` + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` + PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` + Subnet *Subnet `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go new file mode 100644 index 000000000000..dde47c23fb21 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go @@ -0,0 +1,11 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GatewayLoadBalancerTunnelInterface struct { + Identifier *int64 `json:"identifier,omitempty"` + Port *int64 `json:"port,omitempty"` + Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` + Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrule.go new file mode 100644 index 000000000000..38c0ffd67281 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrule.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InboundNatRule struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrulepropertiesformat.go new file mode 100644 index 000000000000..b952302ddebd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrulepropertiesformat.go @@ -0,0 +1,19 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InboundNatRulePropertiesFormat struct { + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` + BackendPort *int64 `json:"backendPort,omitempty"` + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + EnableTcpReset *bool `json:"enableTcpReset,omitempty"` + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + FrontendPort *int64 `json:"frontendPort,omitempty"` + FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` + FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` + IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` + Protocol *TransportProtocol `json:"protocol,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfiguration.go new file mode 100644 index 000000000000..cf18ee9415ba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfiguration.go @@ -0,0 +1,11 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPConfiguration struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofile.go new file mode 100644 index 000000000000..d493529c992a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofile.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPConfigurationProfile struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go new file mode 100644 index 000000000000..dabdbd7c8411 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPConfigurationProfilePropertiesFormat struct { + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Subnet *Subnet `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationpropertiesformat.go new file mode 100644 index 000000000000..fdfdcd1d175e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationpropertiesformat.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPConfigurationPropertiesFormat struct { + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + Subnet *Subnet `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_iptag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_iptag.go new file mode 100644 index 000000000000..83206500edce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_iptag.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPTag struct { + IPTagType *string `json:"ipTagType,omitempty"` + Tag *string `json:"tag,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddress.go new file mode 100644 index 000000000000..ee77fec93c3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddress.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadBalancerBackendAddress struct { + Name *string `json:"name,omitempty"` + Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go new file mode 100644 index 000000000000..9be73b64841e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go @@ -0,0 +1,14 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadBalancerBackendAddressPropertiesFormat struct { + AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` + LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` + NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` + Subnet *SubResource `json:"subnet,omitempty"` + VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgateway.go new file mode 100644 index 000000000000..e197bcd7adab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgateway.go @@ -0,0 +1,20 @@ +package privateendpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NatGateway struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` + Sku *NatGatewaySku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaypropertiesformat.go new file mode 100644 index 000000000000..fc0ee1ef6da7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaypropertiesformat.go @@ -0,0 +1,13 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NatGatewayPropertiesFormat struct { + IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` + PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` + ResourceGuid *string `json:"resourceGuid,omitempty"` + Subnets *[]SubResource `json:"subnets,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaysku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaysku.go new file mode 100644 index 000000000000..c0b2d583e49e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaysku.go @@ -0,0 +1,8 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NatGatewaySku struct { + Name *NatGatewaySkuName `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natruleportmapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natruleportmapping.go new file mode 100644 index 000000000000..07eeaf979f4e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natruleportmapping.go @@ -0,0 +1,10 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NatRulePortMapping struct { + BackendPort *int64 `json:"backendPort,omitempty"` + FrontendPort *int64 `json:"frontendPort,omitempty"` + InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterface.go new file mode 100644 index 000000000000..9e9c7fcfa82f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterface.go @@ -0,0 +1,19 @@ +package privateendpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterface struct { + Etag *string `json:"etag,omitempty"` + ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NetworkInterfacePropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_networkinterfacednssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacednssettings.go new file mode 100644 index 000000000000..5182d846bf12 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacednssettings.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceDnsSettings struct { + AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` + DnsServers *[]string `json:"dnsServers,omitempty"` + InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` + InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` + InternalFqdn *string `json:"internalFqdn,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfiguration.go new file mode 100644 index 000000000000..e41eb348a7b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfiguration.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceIPConfiguration struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go new file mode 100644 index 000000000000..ac6a234dd34b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go @@ -0,0 +1,10 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { + Fqdns *[]string `json:"fqdns,omitempty"` + GroupId *string `json:"groupId,omitempty"` + RequiredMemberName *string `json:"requiredMemberName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go new file mode 100644 index 000000000000..cacb1e17719f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go @@ -0,0 +1,21 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceIPConfigurationPropertiesFormat struct { + ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` + ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` + GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` + LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` + LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` + Primary *bool `json:"primary,omitempty"` + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` + PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + Subnet *Subnet `json:"subnet,omitempty"` + VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacepropertiesformat.go new file mode 100644 index 000000000000..a5fd36f92666 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacepropertiesformat.go @@ -0,0 +1,29 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfacePropertiesFormat struct { + AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` + AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` + DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` + DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` + DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` + HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` + IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` + MacAddress *string `json:"macAddress,omitempty"` + MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` + NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` + NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` + Primary *bool `json:"primary,omitempty"` + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceGuid *string `json:"resourceGuid,omitempty"` + TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` + VirtualMachine *SubResource `json:"virtualMachine,omitempty"` + VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` + WorkloadType *string `json:"workloadType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfiguration.go new file mode 100644 index 000000000000..ebe35c0a1782 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfiguration.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceTapConfiguration struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go new file mode 100644 index 000000000000..54e437f339f3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceTapConfigurationPropertiesFormat struct { + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygroup.go new file mode 100644 index 000000000000..cb420b609909 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygroup.go @@ -0,0 +1,14 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityGroup struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_networksecuritygrouppropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygrouppropertiesformat.go new file mode 100644 index 000000000000..b03a951faff7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygrouppropertiesformat.go @@ -0,0 +1,15 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkSecurityGroupPropertiesFormat struct { + DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` + FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` + FlushConnection *bool `json:"flushConnection,omitempty"` + NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceGuid *string `json:"resourceGuid,omitempty"` + SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` + Subnets *[]Subnet `json:"subnets,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpoint.go new file mode 100644 index 000000000000..5e9da21fedbc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpoint.go @@ -0,0 +1,19 @@ +package privateendpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpoint struct { + Etag *string `json:"etag,omitempty"` + ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointProperties `json:"properties,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/network/2023-04-01/privateendpoints/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnection.go new file mode 100644 index 000000000000..5bd8301f4f34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnection.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnection struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnectionproperties.go new file mode 100644 index 000000000000..8c0662fe4e26 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnectionproperties.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + LinkIdentifier *string `json:"linkIdentifier,omitempty"` + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfiguration.go new file mode 100644 index 000000000000..1fbe08553f6e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfiguration.go @@ -0,0 +1,11 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointIPConfiguration struct { + Etag *string `json:"etag,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfigurationproperties.go new file mode 100644 index 000000000000..3772b023f53f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfigurationproperties.go @@ -0,0 +1,10 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointIPConfigurationProperties struct { + GroupId *string `json:"groupId,omitempty"` + MemberName *string `json:"memberName,omitempty"` + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointproperties.go new file mode 100644 index 000000000000..ac88e7637f3a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointproperties.go @@ -0,0 +1,16 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointProperties struct { + ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` + CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` + CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` + IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` + ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` + NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` + PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Subnet *Subnet `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkservice.go new file mode 100644 index 000000000000..e4c8723fc8bd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkservice.go @@ -0,0 +1,19 @@ +package privateendpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkService struct { + Etag *string `json:"etag,omitempty"` + ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateLinkServiceProperties `json:"properties,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/network/2023-04-01/privateendpoints/model_privatelinkserviceconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnection.go new file mode 100644 index 000000000000..be10aca683dc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnection.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnection struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionproperties.go new file mode 100644 index 000000000000..da2a7ed38710 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionproperties.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionProperties struct { + GroupIds *[]string `json:"groupIds,omitempty"` + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + RequestMessage *string `json:"requestMessage,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionstate.go new file mode 100644 index 000000000000..1d19bec0830a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *string `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfiguration.go new file mode 100644 index 000000000000..358ee0e74506 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfiguration.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceIPConfiguration struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go new file mode 100644 index 000000000000..81634dd44b1d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go @@ -0,0 +1,13 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceIPConfigurationProperties struct { + Primary *bool `json:"primary,omitempty"` + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` + PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Subnet *Subnet `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceproperties.go new file mode 100644 index 000000000000..d246ec00f40a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceproperties.go @@ -0,0 +1,17 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceProperties struct { + Alias *string `json:"alias,omitempty"` + AutoApproval *ResourceSet `json:"autoApproval,omitempty"` + EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` + Fqdns *[]string `json:"fqdns,omitempty"` + IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` + LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` + NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Visibility *ResourceSet `json:"visibility,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddress.go new file mode 100644 index 000000000000..eeca2133c315 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddress.go @@ -0,0 +1,22 @@ +package privateendpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PublicIPAddress struct { + Etag *string `json:"etag,omitempty"` + ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` + Sku *PublicIPAddressSku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddressdnssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddressdnssettings.go new file mode 100644 index 000000000000..bc8acd1515a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddressdnssettings.go @@ -0,0 +1,11 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PublicIPAddressDnsSettings struct { + DomainNameLabel *string `json:"domainNameLabel,omitempty"` + DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` + Fqdn *string `json:"fqdn,omitempty"` + ReverseFqdn *string `json:"reverseFqdn,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresspropertiesformat.go new file mode 100644 index 000000000000..bed9d0ba8d76 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresspropertiesformat.go @@ -0,0 +1,23 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PublicIPAddressPropertiesFormat struct { + DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` + DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` + DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` + IPTags *[]IPTag `json:"ipTags,omitempty"` + IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` + LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` + MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` + NatGateway *NatGateway `json:"natGateway,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` + PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` + PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` + ResourceGuid *string `json:"resourceGuid,omitempty"` + ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresssku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresssku.go new file mode 100644 index 000000000000..2bbd107f243e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresssku.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PublicIPAddressSku struct { + Name *PublicIPAddressSkuName `json:"name,omitempty"` + Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlink.go new file mode 100644 index 000000000000..d88904429239 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlink.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceNavigationLink struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlinkformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlinkformat.go new file mode 100644 index 000000000000..281da0ffc970 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlinkformat.go @@ -0,0 +1,10 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceNavigationLinkFormat struct { + Link *string `json:"link,omitempty"` + LinkedResourceType *string `json:"linkedResourceType,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourceset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourceset.go new file mode 100644 index 000000000000..999b1817a305 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourceset.go @@ -0,0 +1,8 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSet struct { + Subscriptions *[]string `json:"subscriptions,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_retentionpolicyparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_retentionpolicyparameters.go new file mode 100644 index 000000000000..b3df6ba5fd1f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_retentionpolicyparameters.go @@ -0,0 +1,9 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RetentionPolicyParameters struct { + Days *int64 `json:"days,omitempty"` + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_route.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_route.go new file mode 100644 index 000000000000..98c7a5ae4760 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_route.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Route struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RoutePropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routepropertiesformat.go new file mode 100644 index 000000000000..ca3956916f35 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routepropertiesformat.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RoutePropertiesFormat struct { + AddressPrefix *string `json:"addressPrefix,omitempty"` + HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` + NextHopType RouteNextHopType `json:"nextHopType"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetable.go new file mode 100644 index 000000000000..e1f695300d86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetable.go @@ -0,0 +1,14 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RouteTable struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RouteTablePropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_routetablepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetablepropertiesformat.go new file mode 100644 index 000000000000..4976a28f0ea0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetablepropertiesformat.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RouteTablePropertiesFormat struct { + DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceGuid *string `json:"resourceGuid,omitempty"` + Routes *[]Route `json:"routes,omitempty"` + Subnets *[]Subnet `json:"subnets,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrule.go new file mode 100644 index 000000000000..ccfc50b4a7e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrule.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityRule struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrulepropertiesformat.go new file mode 100644 index 000000000000..2b19d6a628d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrulepropertiesformat.go @@ -0,0 +1,23 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityRulePropertiesFormat struct { + Access SecurityRuleAccess `json:"access"` + Description *string `json:"description,omitempty"` + DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` + DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` + DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` + DestinationPortRange *string `json:"destinationPortRange,omitempty"` + DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` + Direction SecurityRuleDirection `json:"direction"` + Priority int64 `json:"priority"` + Protocol SecurityRuleProtocol `json:"protocol"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` + SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` + SourcePortRange *string `json:"sourcePortRange,omitempty"` + SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlink.go new file mode 100644 index 000000000000..a88015b02e11 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlink.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceAssociationLink struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go new file mode 100644 index 000000000000..7a779312074e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceAssociationLinkPropertiesFormat struct { + AllowDelete *bool `json:"allowDelete,omitempty"` + Link *string `json:"link,omitempty"` + LinkedResourceType *string `json:"linkedResourceType,omitempty"` + Locations *[]string `json:"locations,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_servicedelegationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_servicedelegationpropertiesformat.go new file mode 100644 index 000000000000..84e538e83503 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_servicedelegationpropertiesformat.go @@ -0,0 +1,10 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceDelegationPropertiesFormat struct { + Actions *[]string `json:"actions,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ServiceName *string `json:"serviceName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicy.go new file mode 100644 index 000000000000..ea8ff121174c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicy.go @@ -0,0 +1,15 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceEndpointPolicy struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinition.go new file mode 100644 index 000000000000..cc2054776fa3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinition.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceEndpointPolicyDefinition struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go new file mode 100644 index 000000000000..8355dfbaae00 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go @@ -0,0 +1,11 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceEndpointPolicyDefinitionPropertiesFormat struct { + Description *string `json:"description,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Service *string `json:"service,omitempty"` + ServiceResources *[]string `json:"serviceResources,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go new file mode 100644 index 000000000000..dbdcdea14422 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go @@ -0,0 +1,13 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceEndpointPolicyPropertiesFormat struct { + ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceGuid *string `json:"resourceGuid,omitempty"` + ServiceAlias *string `json:"serviceAlias,omitempty"` + ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` + Subnets *[]Subnet `json:"subnets,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpropertiesformat.go new file mode 100644 index 000000000000..5b54f3ef673c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpropertiesformat.go @@ -0,0 +1,10 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceEndpointPropertiesFormat struct { + Locations *[]string `json:"locations,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Service *string `json:"service,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnet.go new file mode 100644 index 000000000000..1eee73db2bda --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnet.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Subnet struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SubnetPropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnetpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnetpropertiesformat.go new file mode 100644 index 000000000000..01c2d0455cec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnetpropertiesformat.go @@ -0,0 +1,26 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubnetPropertiesFormat struct { + AddressPrefix *string `json:"addressPrefix,omitempty"` + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` + ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` + Delegations *[]Delegation `json:"delegations,omitempty"` + IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` + IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` + IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` + NatGateway *SubResource `json:"natGateway,omitempty"` + NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` + PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` + PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` + PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Purpose *string `json:"purpose,omitempty"` + ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` + RouteTable *RouteTable `json:"routeTable,omitempty"` + ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` + ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` + ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subresource.go new file mode 100644 index 000000000000..134c4f661024 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subresource.go @@ -0,0 +1,8 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubResource struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go new file mode 100644 index 000000000000..fc7cf55257e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go @@ -0,0 +1,12 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TrafficAnalyticsConfigurationProperties struct { + Enabled *bool `json:"enabled,omitempty"` + TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` + WorkspaceId *string `json:"workspaceId,omitempty"` + WorkspaceRegion *string `json:"workspaceRegion,omitempty"` + WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsproperties.go new file mode 100644 index 000000000000..8a4f6042fa41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsproperties.go @@ -0,0 +1,8 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TrafficAnalyticsProperties struct { + NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktap.go new file mode 100644 index 000000000000..99fe7d7fe1d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktap.go @@ -0,0 +1,14 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualNetworkTap struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *VirtualNetworkTapPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_virtualnetworktappropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktappropertiesformat.go new file mode 100644 index 000000000000..c7fa6565e0f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktappropertiesformat.go @@ -0,0 +1,13 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualNetworkTapPropertiesFormat struct { + DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` + DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` + DestinationPort *int64 `json:"destinationPort,omitempty"` + NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceGuid *string `json:"resourceGuid,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/predicates.go new file mode 100644 index 000000000000..c99098d01631 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/predicates.go @@ -0,0 +1,70 @@ +package privateendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AvailablePrivateEndpointTypeOperationPredicate struct { + DisplayName *string + Id *string + Name *string + ResourceName *string + Type *string +} + +func (p AvailablePrivateEndpointTypeOperationPredicate) Matches(input AvailablePrivateEndpointType) bool { + + if p.DisplayName != nil && (input.DisplayName == nil || *p.DisplayName != *input.DisplayName) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.ResourceName != nil && (input.ResourceName == nil || *p.ResourceName != *input.ResourceName) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type PrivateEndpointOperationPredicate struct { + Etag *string + Id *string + Location *string + Name *string + Type *string +} + +func (p PrivateEndpointOperationPredicate) Matches(input PrivateEndpoint) bool { + + if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/version.go new file mode 100644 index 000000000000..b6036c6529bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/version.go @@ -0,0 +1,12 @@ +package privateendpoints + +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/privateendpoints/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/client.go new file mode 100644 index 000000000000..b92f8f3cf562 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/client.go @@ -0,0 +1,118 @@ +package v2023_04_01 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku" + "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + Monitors *monitors.MonitorsClient + ProviderInstances *providerinstances.ProviderInstancesClient + SAPApplicationServerInstances *sapapplicationserverinstances.SAPApplicationServerInstancesClient + SAPAvailabilityZoneDetails *sapavailabilityzonedetails.SAPAvailabilityZoneDetailsClient + SAPCentralInstances *sapcentralinstances.SAPCentralInstancesClient + SAPDatabaseInstances *sapdatabaseinstances.SAPDatabaseInstancesClient + SAPDiskConfigurations *sapdiskconfigurations.SAPDiskConfigurationsClient + SAPRecommendations *saprecommendations.SAPRecommendationsClient + SAPSupportedSku *sapsupportedsku.SAPSupportedSkuClient + SAPVirtualInstances *sapvirtualinstances.SAPVirtualInstancesClient + SapLandscapeMonitor *saplandscapemonitor.SapLandscapeMonitorClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + monitorsClient, err := monitors.NewMonitorsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Monitors client: %+v", err) + } + configureFunc(monitorsClient.Client) + + providerInstancesClient, err := providerinstances.NewProviderInstancesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ProviderInstances client: %+v", err) + } + configureFunc(providerInstancesClient.Client) + + sAPApplicationServerInstancesClient, err := sapapplicationserverinstances.NewSAPApplicationServerInstancesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SAPApplicationServerInstances client: %+v", err) + } + configureFunc(sAPApplicationServerInstancesClient.Client) + + sAPAvailabilityZoneDetailsClient, err := sapavailabilityzonedetails.NewSAPAvailabilityZoneDetailsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SAPAvailabilityZoneDetails client: %+v", err) + } + configureFunc(sAPAvailabilityZoneDetailsClient.Client) + + sAPCentralInstancesClient, err := sapcentralinstances.NewSAPCentralInstancesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SAPCentralInstances client: %+v", err) + } + configureFunc(sAPCentralInstancesClient.Client) + + sAPDatabaseInstancesClient, err := sapdatabaseinstances.NewSAPDatabaseInstancesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SAPDatabaseInstances client: %+v", err) + } + configureFunc(sAPDatabaseInstancesClient.Client) + + sAPDiskConfigurationsClient, err := sapdiskconfigurations.NewSAPDiskConfigurationsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SAPDiskConfigurations client: %+v", err) + } + configureFunc(sAPDiskConfigurationsClient.Client) + + sAPRecommendationsClient, err := saprecommendations.NewSAPRecommendationsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SAPRecommendations client: %+v", err) + } + configureFunc(sAPRecommendationsClient.Client) + + sAPSupportedSkuClient, err := sapsupportedsku.NewSAPSupportedSkuClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SAPSupportedSku client: %+v", err) + } + configureFunc(sAPSupportedSkuClient.Client) + + sAPVirtualInstancesClient, err := sapvirtualinstances.NewSAPVirtualInstancesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SAPVirtualInstances client: %+v", err) + } + configureFunc(sAPVirtualInstancesClient.Client) + + sapLandscapeMonitorClient, err := saplandscapemonitor.NewSapLandscapeMonitorClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SapLandscapeMonitor client: %+v", err) + } + configureFunc(sapLandscapeMonitorClient.Client) + + return &Client{ + Monitors: monitorsClient, + ProviderInstances: providerInstancesClient, + SAPApplicationServerInstances: sAPApplicationServerInstancesClient, + SAPAvailabilityZoneDetails: sAPAvailabilityZoneDetailsClient, + SAPCentralInstances: sAPCentralInstancesClient, + SAPDatabaseInstances: sAPDatabaseInstancesClient, + SAPDiskConfigurations: sAPDiskConfigurationsClient, + SAPRecommendations: sAPRecommendationsClient, + SAPSupportedSku: sAPSupportedSkuClient, + SAPVirtualInstances: sAPVirtualInstancesClient, + SapLandscapeMonitor: sapLandscapeMonitorClient, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/README.md new file mode 100644 index 000000000000..28101b756726 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/README.md @@ -0,0 +1,120 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors` Documentation + +The `monitors` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/monitors" +``` + + +### Client Initialization + +```go +client := monitors.NewMonitorsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MonitorsClient.Create` + +```go +ctx := context.TODO() +id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +payload := monitors.Monitor{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `MonitorsClient.Delete` + +```go +ctx := context.TODO() +id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `MonitorsClient.Get` + +```go +ctx := context.TODO() +id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +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: `MonitorsClient.List` + +```go +ctx := context.TODO() +id := monitors.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MonitorsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := monitors.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MonitorsClient.Update` + +```go +ctx := context.TODO() +id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +payload := monitors.UpdateMonitorRequest{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +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/workloads/2023-04-01/monitors/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/client.go new file mode 100644 index 000000000000..6a08c03de8b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/client.go @@ -0,0 +1,26 @@ +package monitors + +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 MonitorsClient struct { + Client *resourcemanager.Client +} + +func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitors", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating MonitorsClient: %+v", err) + } + + return &MonitorsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/constants.go new file mode 100644 index 000000000000..a18e1177463a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/constants.go @@ -0,0 +1,107 @@ +package monitors + +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 RoutingPreference string + +const ( + RoutingPreferenceDefault RoutingPreference = "Default" + RoutingPreferenceRouteAll RoutingPreference = "RouteAll" +) + +func PossibleValuesForRoutingPreference() []string { + return []string{ + string(RoutingPreferenceDefault), + string(RoutingPreferenceRouteAll), + } +} + +func (s *RoutingPreference) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRoutingPreference(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRoutingPreference(input string) (*RoutingPreference, error) { + vals := map[string]RoutingPreference{ + "default": RoutingPreferenceDefault, + "routeall": RoutingPreferenceRouteAll, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RoutingPreference(input) + return &out, nil +} + +type WorkloadMonitorProvisioningState string + +const ( + WorkloadMonitorProvisioningStateAccepted WorkloadMonitorProvisioningState = "Accepted" + WorkloadMonitorProvisioningStateCreating WorkloadMonitorProvisioningState = "Creating" + WorkloadMonitorProvisioningStateDeleting WorkloadMonitorProvisioningState = "Deleting" + WorkloadMonitorProvisioningStateFailed WorkloadMonitorProvisioningState = "Failed" + WorkloadMonitorProvisioningStateMigrating WorkloadMonitorProvisioningState = "Migrating" + WorkloadMonitorProvisioningStateSucceeded WorkloadMonitorProvisioningState = "Succeeded" + WorkloadMonitorProvisioningStateUpdating WorkloadMonitorProvisioningState = "Updating" +) + +func PossibleValuesForWorkloadMonitorProvisioningState() []string { + return []string{ + string(WorkloadMonitorProvisioningStateAccepted), + string(WorkloadMonitorProvisioningStateCreating), + string(WorkloadMonitorProvisioningStateDeleting), + string(WorkloadMonitorProvisioningStateFailed), + string(WorkloadMonitorProvisioningStateMigrating), + string(WorkloadMonitorProvisioningStateSucceeded), + string(WorkloadMonitorProvisioningStateUpdating), + } +} + +func (s *WorkloadMonitorProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWorkloadMonitorProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWorkloadMonitorProvisioningState(input string) (*WorkloadMonitorProvisioningState, error) { + vals := map[string]WorkloadMonitorProvisioningState{ + "accepted": WorkloadMonitorProvisioningStateAccepted, + "creating": WorkloadMonitorProvisioningStateCreating, + "deleting": WorkloadMonitorProvisioningStateDeleting, + "failed": WorkloadMonitorProvisioningStateFailed, + "migrating": WorkloadMonitorProvisioningStateMigrating, + "succeeded": WorkloadMonitorProvisioningStateSucceeded, + "updating": WorkloadMonitorProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkloadMonitorProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/id_monitor.go new file mode 100644 index 000000000000..d9ded30d5d7a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/id_monitor.go @@ -0,0 +1,125 @@ +package monitors + +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 = MonitorId{} + +// MonitorId is a struct representing the Resource ID for a Monitor +type MonitorId struct { + SubscriptionId string + ResourceGroupName string + MonitorName string +} + +// NewMonitorID returns a new MonitorId struct +func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId { + return MonitorId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MonitorName: monitorName, + } +} + +// ParseMonitorID parses 'input' into a MonitorId +func ParseMonitorID(input string) (*MonitorId, error) { + parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId +// note: this method should only be used for API response data and not user input +func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { + parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MonitorId) 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.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) + } + + return nil +} + +// ValidateMonitorID checks that 'input' can be parsed as a Monitor ID +func ValidateMonitorID(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 := ParseMonitorID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Monitor ID +func (id MonitorId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/monitors/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Monitor ID +func (id MonitorId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), + resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), + } +} + +// String returns a human-readable description of this Monitor ID +func (id MonitorId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Monitor Name: %q", id.MonitorName), + } + return fmt.Sprintf("Monitor (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_create.go new file mode 100644 index 000000000000..08757e93a50c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_create.go @@ -0,0 +1,74 @@ +package monitors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Create ... +func (c MonitorsClient) Create(ctx context.Context, id MonitorId, input Monitor) (result CreateOperationResponse, 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c MonitorsClient) CreateThenPoll(ctx context.Context, id MonitorId, input Monitor) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_delete.go new file mode 100644 index 000000000000..ed121cfa76fb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_delete.go @@ -0,0 +1,71 @@ +package monitors + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c MonitorsClient) Delete(ctx context.Context, id MonitorId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c MonitorsClient) DeleteThenPoll(ctx context.Context, id MonitorId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_get.go new file mode 100644 index 000000000000..18e05946f713 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_get.go @@ -0,0 +1,51 @@ +package monitors + +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 *Monitor +} + +// Get ... +func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_list.go new file mode 100644 index 000000000000..c229098d311b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_list.go @@ -0,0 +1,90 @@ +package monitors + +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 *[]Monitor +} + +type ListCompleteResult struct { + Items []Monitor +} + +// List ... +func (c MonitorsClient) 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.Workloads/monitors", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Monitor `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c MonitorsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, MonitorOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MonitorsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MonitorOperationPredicate) (result ListCompleteResult, err error) { + items := make([]Monitor, 0) + + resp, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_listbyresourcegroup.go new file mode 100644 index 000000000000..0ddbb346ba2d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_listbyresourcegroup.go @@ -0,0 +1,90 @@ +package monitors + +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 ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Monitor +} + +type ListByResourceGroupCompleteResult struct { + Items []Monitor +} + +// ListByResourceGroup ... +func (c MonitorsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.Workloads/monitors", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Monitor `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c MonitorsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, MonitorOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MonitorsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MonitorOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]Monitor, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_update.go new file mode 100644 index 000000000000..bc294351c737 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_update.go @@ -0,0 +1,55 @@ +package monitors + +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 UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Monitor +} + +// Update ... +func (c MonitorsClient) Update(ctx context.Context, id MonitorId, input UpdateMonitorRequest) (result UpdateOperationResponse, 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_error.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_error.go new file mode 100644 index 000000000000..0cb36b669f86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_error.go @@ -0,0 +1,12 @@ +package monitors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Error struct { + Code *string `json:"code,omitempty"` + Details *[]Error `json:"details,omitempty"` + InnerError *ErrorInnerError `json:"innerError,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_erroradditionalinfo.go new file mode 100644 index 000000000000..f8bd860c06e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package monitors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_errordetail.go new file mode 100644 index 000000000000..47cceaf570a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_errordetail.go @@ -0,0 +1,12 @@ +package monitors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_errorinnererror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_errorinnererror.go new file mode 100644 index 000000000000..181cb41b9ad7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_errorinnererror.go @@ -0,0 +1,8 @@ +package monitors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorInnerError struct { + InnerError *Error `json:"innerError,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_managedrgconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_managedrgconfiguration.go new file mode 100644 index 000000000000..21d74c2a4c1b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_managedrgconfiguration.go @@ -0,0 +1,8 @@ +package monitors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRGConfiguration struct { + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_monitor.go new file mode 100644 index 000000000000..04f17682e68a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_monitor.go @@ -0,0 +1,20 @@ +package monitors + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "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 Monitor struct { + Id *string `json:"id,omitempty"` + Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *MonitorProperties `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/workloads/2023-04-01/monitors/model_monitorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_monitorproperties.go new file mode 100644 index 000000000000..6d8e38b2092c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_monitorproperties.go @@ -0,0 +1,17 @@ +package monitors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MonitorProperties struct { + AppLocation *string `json:"appLocation,omitempty"` + Errors *Error `json:"errors,omitempty"` + LogAnalyticsWorkspaceArmId *string `json:"logAnalyticsWorkspaceArmId,omitempty"` + ManagedResourceGroupConfiguration *ManagedRGConfiguration `json:"managedResourceGroupConfiguration,omitempty"` + MonitorSubnet *string `json:"monitorSubnet,omitempty"` + MsiArmId *string `json:"msiArmId,omitempty"` + ProvisioningState *WorkloadMonitorProvisioningState `json:"provisioningState,omitempty"` + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` + StorageAccountArmId *string `json:"storageAccountArmId,omitempty"` + ZoneRedundancyPreference *string `json:"zoneRedundancyPreference,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_operationstatusresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_operationstatusresult.go new file mode 100644 index 000000000000..2cda24eeac3a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_operationstatusresult.go @@ -0,0 +1,45 @@ +package monitors + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OperationStatusResult struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` +} + +func (o *OperationStatusResult) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *OperationStatusResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_updatemonitorrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_updatemonitorrequest.go new file mode 100644 index 000000000000..7c1c5544aeb0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/model_updatemonitorrequest.go @@ -0,0 +1,13 @@ +package monitors + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateMonitorRequest struct { + Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/predicates.go new file mode 100644 index 000000000000..c4b22dac8c46 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/predicates.go @@ -0,0 +1,32 @@ +package monitors + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MonitorOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p MonitorOperationPredicate) Matches(input Monitor) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/version.go new file mode 100644 index 000000000000..56ae1ca607fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/version.go @@ -0,0 +1,12 @@ +package monitors + +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/monitors/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/README.md new file mode 100644 index 000000000000..727699db3238 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances` Documentation + +The `providerinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/providerinstances" +``` + + +### Client Initialization + +```go +client := providerinstances.NewProviderInstancesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ProviderInstancesClient.Create` + +```go +ctx := context.TODO() +id := providerinstances.NewProviderInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "providerInstanceValue") + +payload := providerinstances.ProviderInstance{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ProviderInstancesClient.Delete` + +```go +ctx := context.TODO() +id := providerinstances.NewProviderInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "providerInstanceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ProviderInstancesClient.Get` + +```go +ctx := context.TODO() +id := providerinstances.NewProviderInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "providerInstanceValue") + +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: `ProviderInstancesClient.List` + +```go +ctx := context.TODO() +id := providerinstances.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/client.go new file mode 100644 index 000000000000..32b9237eacec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/client.go @@ -0,0 +1,26 @@ +package providerinstances + +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 ProviderInstancesClient struct { + Client *resourcemanager.Client +} + +func NewProviderInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderInstancesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "providerinstances", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ProviderInstancesClient: %+v", err) + } + + return &ProviderInstancesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/constants.go new file mode 100644 index 000000000000..2746d491ce8e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/constants.go @@ -0,0 +1,110 @@ +package providerinstances + +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 SslPreference string + +const ( + SslPreferenceDisabled SslPreference = "Disabled" + SslPreferenceRootCertificate SslPreference = "RootCertificate" + SslPreferenceServerCertificate SslPreference = "ServerCertificate" +) + +func PossibleValuesForSslPreference() []string { + return []string{ + string(SslPreferenceDisabled), + string(SslPreferenceRootCertificate), + string(SslPreferenceServerCertificate), + } +} + +func (s *SslPreference) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSslPreference(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSslPreference(input string) (*SslPreference, error) { + vals := map[string]SslPreference{ + "disabled": SslPreferenceDisabled, + "rootcertificate": SslPreferenceRootCertificate, + "servercertificate": SslPreferenceServerCertificate, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SslPreference(input) + return &out, nil +} + +type WorkloadMonitorProvisioningState string + +const ( + WorkloadMonitorProvisioningStateAccepted WorkloadMonitorProvisioningState = "Accepted" + WorkloadMonitorProvisioningStateCreating WorkloadMonitorProvisioningState = "Creating" + WorkloadMonitorProvisioningStateDeleting WorkloadMonitorProvisioningState = "Deleting" + WorkloadMonitorProvisioningStateFailed WorkloadMonitorProvisioningState = "Failed" + WorkloadMonitorProvisioningStateMigrating WorkloadMonitorProvisioningState = "Migrating" + WorkloadMonitorProvisioningStateSucceeded WorkloadMonitorProvisioningState = "Succeeded" + WorkloadMonitorProvisioningStateUpdating WorkloadMonitorProvisioningState = "Updating" +) + +func PossibleValuesForWorkloadMonitorProvisioningState() []string { + return []string{ + string(WorkloadMonitorProvisioningStateAccepted), + string(WorkloadMonitorProvisioningStateCreating), + string(WorkloadMonitorProvisioningStateDeleting), + string(WorkloadMonitorProvisioningStateFailed), + string(WorkloadMonitorProvisioningStateMigrating), + string(WorkloadMonitorProvisioningStateSucceeded), + string(WorkloadMonitorProvisioningStateUpdating), + } +} + +func (s *WorkloadMonitorProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWorkloadMonitorProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWorkloadMonitorProvisioningState(input string) (*WorkloadMonitorProvisioningState, error) { + vals := map[string]WorkloadMonitorProvisioningState{ + "accepted": WorkloadMonitorProvisioningStateAccepted, + "creating": WorkloadMonitorProvisioningStateCreating, + "deleting": WorkloadMonitorProvisioningStateDeleting, + "failed": WorkloadMonitorProvisioningStateFailed, + "migrating": WorkloadMonitorProvisioningStateMigrating, + "succeeded": WorkloadMonitorProvisioningStateSucceeded, + "updating": WorkloadMonitorProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkloadMonitorProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go new file mode 100644 index 000000000000..10c3ca3d1e86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go @@ -0,0 +1,125 @@ +package providerinstances + +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 = MonitorId{} + +// MonitorId is a struct representing the Resource ID for a Monitor +type MonitorId struct { + SubscriptionId string + ResourceGroupName string + MonitorName string +} + +// NewMonitorID returns a new MonitorId struct +func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId { + return MonitorId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MonitorName: monitorName, + } +} + +// ParseMonitorID parses 'input' into a MonitorId +func ParseMonitorID(input string) (*MonitorId, error) { + parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId +// note: this method should only be used for API response data and not user input +func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { + parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MonitorId) 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.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) + } + + return nil +} + +// ValidateMonitorID checks that 'input' can be parsed as a Monitor ID +func ValidateMonitorID(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 := ParseMonitorID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Monitor ID +func (id MonitorId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/monitors/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Monitor ID +func (id MonitorId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), + resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), + } +} + +// String returns a human-readable description of this Monitor ID +func (id MonitorId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Monitor Name: %q", id.MonitorName), + } + return fmt.Sprintf("Monitor (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go new file mode 100644 index 000000000000..7a39b14c89de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go @@ -0,0 +1,134 @@ +package providerinstances + +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 = ProviderInstanceId{} + +// ProviderInstanceId is a struct representing the Resource ID for a Provider Instance +type ProviderInstanceId struct { + SubscriptionId string + ResourceGroupName string + MonitorName string + ProviderInstanceName string +} + +// NewProviderInstanceID returns a new ProviderInstanceId struct +func NewProviderInstanceID(subscriptionId string, resourceGroupName string, monitorName string, providerInstanceName string) ProviderInstanceId { + return ProviderInstanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MonitorName: monitorName, + ProviderInstanceName: providerInstanceName, + } +} + +// ParseProviderInstanceID parses 'input' into a ProviderInstanceId +func ParseProviderInstanceID(input string) (*ProviderInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(ProviderInstanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProviderInstanceIDInsensitively parses 'input' case-insensitively into a ProviderInstanceId +// note: this method should only be used for API response data and not user input +func ParseProviderInstanceIDInsensitively(input string) (*ProviderInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(ProviderInstanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProviderInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderInstanceId) 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.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) + } + + if id.ProviderInstanceName, ok = input.Parsed["providerInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "providerInstanceName", input) + } + + return nil +} + +// ValidateProviderInstanceID checks that 'input' can be parsed as a Provider Instance ID +func ValidateProviderInstanceID(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 := ParseProviderInstanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Provider Instance ID +func (id ProviderInstanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/monitors/%s/providerInstances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName, id.ProviderInstanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Provider Instance ID +func (id ProviderInstanceId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), + resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), + resourceids.StaticSegment("staticProviderInstances", "providerInstances", "providerInstances"), + resourceids.UserSpecifiedSegment("providerInstanceName", "providerInstanceValue"), + } +} + +// String returns a human-readable description of this Provider Instance ID +func (id ProviderInstanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Monitor Name: %q", id.MonitorName), + fmt.Sprintf("Provider Instance Name: %q", id.ProviderInstanceName), + } + return fmt.Sprintf("Provider Instance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_create.go new file mode 100644 index 000000000000..0377f1dbc80f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_create.go @@ -0,0 +1,74 @@ +package providerinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Create ... +func (c ProviderInstancesClient) Create(ctx context.Context, id ProviderInstanceId, input ProviderInstance) (result CreateOperationResponse, 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c ProviderInstancesClient) CreateThenPoll(ctx context.Context, id ProviderInstanceId, input ProviderInstance) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_delete.go new file mode 100644 index 000000000000..ef336a813e30 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_delete.go @@ -0,0 +1,71 @@ +package providerinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ProviderInstancesClient) Delete(ctx context.Context, id ProviderInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ProviderInstancesClient) DeleteThenPoll(ctx context.Context, id ProviderInstanceId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_get.go new file mode 100644 index 000000000000..7a48558f044e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_get.go @@ -0,0 +1,51 @@ +package providerinstances + +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 *ProviderInstance +} + +// Get ... +func (c ProviderInstancesClient) Get(ctx context.Context, id ProviderInstanceId) (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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_list.go new file mode 100644 index 000000000000..c29a5c84f2f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_list.go @@ -0,0 +1,89 @@ +package providerinstances + +import ( + "context" + "fmt" + "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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ProviderInstance +} + +type ListCompleteResult struct { + Items []ProviderInstance +} + +// List ... +func (c ProviderInstancesClient) List(ctx context.Context, id MonitorId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providerInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ProviderInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c ProviderInstancesClient) ListComplete(ctx context.Context, id MonitorId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ProviderInstanceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ProviderInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate ProviderInstanceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]ProviderInstance, 0) + + resp, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_db2providerinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_db2providerinstanceproperties.go new file mode 100644 index 000000000000..0c65ab5d2d45 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_db2providerinstanceproperties.go @@ -0,0 +1,49 @@ +package providerinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ProviderSpecificProperties = DB2ProviderInstanceProperties{} + +type DB2ProviderInstanceProperties struct { + DbName *string `json:"dbName,omitempty"` + DbPassword *string `json:"dbPassword,omitempty"` + DbPasswordUri *string `json:"dbPasswordUri,omitempty"` + DbPort *string `json:"dbPort,omitempty"` + DbUsername *string `json:"dbUsername,omitempty"` + Hostname *string `json:"hostname,omitempty"` + SapSid *string `json:"sapSid,omitempty"` + SslCertificateUri *string `json:"sslCertificateUri,omitempty"` + SslPreference *SslPreference `json:"sslPreference,omitempty"` + + // Fields inherited from ProviderSpecificProperties +} + +var _ json.Marshaler = DB2ProviderInstanceProperties{} + +func (s DB2ProviderInstanceProperties) MarshalJSON() ([]byte, error) { + type wrapper DB2ProviderInstanceProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DB2ProviderInstanceProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DB2ProviderInstanceProperties: %+v", err) + } + decoded["providerType"] = "Db2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DB2ProviderInstanceProperties: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_error.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_error.go new file mode 100644 index 000000000000..b8bad25fb082 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_error.go @@ -0,0 +1,12 @@ +package providerinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Error struct { + Code *string `json:"code,omitempty"` + Details *[]Error `json:"details,omitempty"` + InnerError *ErrorInnerError `json:"innerError,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_erroradditionalinfo.go new file mode 100644 index 000000000000..e5ddfeee54a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package providerinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_errordetail.go new file mode 100644 index 000000000000..c08a0467c170 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_errordetail.go @@ -0,0 +1,12 @@ +package providerinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_errorinnererror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_errorinnererror.go new file mode 100644 index 000000000000..c6482b27cd30 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_errorinnererror.go @@ -0,0 +1,8 @@ +package providerinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorInnerError struct { + InnerError *Error `json:"innerError,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_hanadbproviderinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_hanadbproviderinstanceproperties.go new file mode 100644 index 000000000000..0478e8e2904d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_hanadbproviderinstanceproperties.go @@ -0,0 +1,51 @@ +package providerinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ProviderSpecificProperties = HanaDbProviderInstanceProperties{} + +type HanaDbProviderInstanceProperties struct { + DbName *string `json:"dbName,omitempty"` + DbPassword *string `json:"dbPassword,omitempty"` + DbPasswordUri *string `json:"dbPasswordUri,omitempty"` + DbUsername *string `json:"dbUsername,omitempty"` + Hostname *string `json:"hostname,omitempty"` + InstanceNumber *string `json:"instanceNumber,omitempty"` + SapSid *string `json:"sapSid,omitempty"` + SqlPort *string `json:"sqlPort,omitempty"` + SslCertificateUri *string `json:"sslCertificateUri,omitempty"` + SslHostNameInCertificate *string `json:"sslHostNameInCertificate,omitempty"` + SslPreference *SslPreference `json:"sslPreference,omitempty"` + + // Fields inherited from ProviderSpecificProperties +} + +var _ json.Marshaler = HanaDbProviderInstanceProperties{} + +func (s HanaDbProviderInstanceProperties) MarshalJSON() ([]byte, error) { + type wrapper HanaDbProviderInstanceProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HanaDbProviderInstanceProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HanaDbProviderInstanceProperties: %+v", err) + } + decoded["providerType"] = "SapHana" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HanaDbProviderInstanceProperties: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_mssqlserverproviderinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_mssqlserverproviderinstanceproperties.go new file mode 100644 index 000000000000..3ef49af37ada --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_mssqlserverproviderinstanceproperties.go @@ -0,0 +1,48 @@ +package providerinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ProviderSpecificProperties = MsSqlServerProviderInstanceProperties{} + +type MsSqlServerProviderInstanceProperties struct { + DbPassword *string `json:"dbPassword,omitempty"` + DbPasswordUri *string `json:"dbPasswordUri,omitempty"` + DbPort *string `json:"dbPort,omitempty"` + DbUsername *string `json:"dbUsername,omitempty"` + Hostname *string `json:"hostname,omitempty"` + SapSid *string `json:"sapSid,omitempty"` + SslCertificateUri *string `json:"sslCertificateUri,omitempty"` + SslPreference *SslPreference `json:"sslPreference,omitempty"` + + // Fields inherited from ProviderSpecificProperties +} + +var _ json.Marshaler = MsSqlServerProviderInstanceProperties{} + +func (s MsSqlServerProviderInstanceProperties) MarshalJSON() ([]byte, error) { + type wrapper MsSqlServerProviderInstanceProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MsSqlServerProviderInstanceProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MsSqlServerProviderInstanceProperties: %+v", err) + } + decoded["providerType"] = "MsSqlServer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MsSqlServerProviderInstanceProperties: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_operationstatusresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_operationstatusresult.go new file mode 100644 index 000000000000..238a07866633 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_operationstatusresult.go @@ -0,0 +1,45 @@ +package providerinstances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OperationStatusResult struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` +} + +func (o *OperationStatusResult) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *OperationStatusResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_prometheushaclusterproviderinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_prometheushaclusterproviderinstanceproperties.go new file mode 100644 index 000000000000..1facc5f662a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_prometheushaclusterproviderinstanceproperties.go @@ -0,0 +1,46 @@ +package providerinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ProviderSpecificProperties = PrometheusHaClusterProviderInstanceProperties{} + +type PrometheusHaClusterProviderInstanceProperties struct { + ClusterName *string `json:"clusterName,omitempty"` + Hostname *string `json:"hostname,omitempty"` + PrometheusUrl *string `json:"prometheusUrl,omitempty"` + Sid *string `json:"sid,omitempty"` + SslCertificateUri *string `json:"sslCertificateUri,omitempty"` + SslPreference *SslPreference `json:"sslPreference,omitempty"` + + // Fields inherited from ProviderSpecificProperties +} + +var _ json.Marshaler = PrometheusHaClusterProviderInstanceProperties{} + +func (s PrometheusHaClusterProviderInstanceProperties) MarshalJSON() ([]byte, error) { + type wrapper PrometheusHaClusterProviderInstanceProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PrometheusHaClusterProviderInstanceProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PrometheusHaClusterProviderInstanceProperties: %+v", err) + } + decoded["providerType"] = "PrometheusHaCluster" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PrometheusHaClusterProviderInstanceProperties: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_prometheusosproviderinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_prometheusosproviderinstanceproperties.go new file mode 100644 index 000000000000..8ee8c0b7ebf9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_prometheusosproviderinstanceproperties.go @@ -0,0 +1,44 @@ +package providerinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ProviderSpecificProperties = PrometheusOSProviderInstanceProperties{} + +type PrometheusOSProviderInstanceProperties struct { + PrometheusUrl *string `json:"prometheusUrl,omitempty"` + SapSid *string `json:"sapSid,omitempty"` + SslCertificateUri *string `json:"sslCertificateUri,omitempty"` + SslPreference *SslPreference `json:"sslPreference,omitempty"` + + // Fields inherited from ProviderSpecificProperties +} + +var _ json.Marshaler = PrometheusOSProviderInstanceProperties{} + +func (s PrometheusOSProviderInstanceProperties) MarshalJSON() ([]byte, error) { + type wrapper PrometheusOSProviderInstanceProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PrometheusOSProviderInstanceProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PrometheusOSProviderInstanceProperties: %+v", err) + } + decoded["providerType"] = "PrometheusOS" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PrometheusOSProviderInstanceProperties: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstance.go new file mode 100644 index 000000000000..e11ac02adf98 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstance.go @@ -0,0 +1,18 @@ +package providerinstances + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "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 ProviderInstance struct { + Id *string `json:"id,omitempty"` + Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ProviderInstanceProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstanceproperties.go new file mode 100644 index 000000000000..6c0320dcd9d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstanceproperties.go @@ -0,0 +1,42 @@ +package providerinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProviderInstanceProperties struct { + Errors *Error `json:"errors,omitempty"` + ProviderSettings ProviderSpecificProperties `json:"providerSettings"` + ProvisioningState *WorkloadMonitorProvisioningState `json:"provisioningState,omitempty"` +} + +var _ json.Unmarshaler = &ProviderInstanceProperties{} + +func (s *ProviderInstanceProperties) UnmarshalJSON(bytes []byte) error { + type alias ProviderInstanceProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ProviderInstanceProperties: %+v", err) + } + + s.Errors = decoded.Errors + s.ProvisioningState = decoded.ProvisioningState + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ProviderInstanceProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["providerSettings"]; ok { + impl, err := unmarshalProviderSpecificPropertiesImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ProviderSettings' for 'ProviderInstanceProperties': %+v", err) + } + s.ProviderSettings = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerspecificproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerspecificproperties.go new file mode 100644 index 000000000000..c436db81dadb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_providerspecificproperties.go @@ -0,0 +1,93 @@ +package providerinstances + +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 ProviderSpecificProperties interface { +} + +// RawProviderSpecificPropertiesImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawProviderSpecificPropertiesImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalProviderSpecificPropertiesImplementation(input []byte) (ProviderSpecificProperties, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling ProviderSpecificProperties into map[string]interface: %+v", err) + } + + value, ok := temp["providerType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Db2") { + var out DB2ProviderInstanceProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DB2ProviderInstanceProperties: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapHana") { + var out HanaDbProviderInstanceProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HanaDbProviderInstanceProperties: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MsSqlServer") { + var out MsSqlServerProviderInstanceProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MsSqlServerProviderInstanceProperties: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PrometheusHaCluster") { + var out PrometheusHaClusterProviderInstanceProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PrometheusHaClusterProviderInstanceProperties: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PrometheusOS") { + var out PrometheusOSProviderInstanceProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PrometheusOSProviderInstanceProperties: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapNetWeaver") { + var out SapNetWeaverProviderInstanceProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapNetWeaverProviderInstanceProperties: %+v", err) + } + return out, nil + } + + out := RawProviderSpecificPropertiesImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_sapnetweaverproviderinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_sapnetweaverproviderinstanceproperties.go new file mode 100644 index 000000000000..bb26cfe13c71 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/model_sapnetweaverproviderinstanceproperties.go @@ -0,0 +1,51 @@ +package providerinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ProviderSpecificProperties = SapNetWeaverProviderInstanceProperties{} + +type SapNetWeaverProviderInstanceProperties struct { + SapClientId *string `json:"sapClientId,omitempty"` + SapHostFileEntries *[]string `json:"sapHostFileEntries,omitempty"` + SapHostname *string `json:"sapHostname,omitempty"` + SapInstanceNr *string `json:"sapInstanceNr,omitempty"` + SapPassword *string `json:"sapPassword,omitempty"` + SapPasswordUri *string `json:"sapPasswordUri,omitempty"` + SapPortNumber *string `json:"sapPortNumber,omitempty"` + SapSid *string `json:"sapSid,omitempty"` + SapUsername *string `json:"sapUsername,omitempty"` + SslCertificateUri *string `json:"sslCertificateUri,omitempty"` + SslPreference *SslPreference `json:"sslPreference,omitempty"` + + // Fields inherited from ProviderSpecificProperties +} + +var _ json.Marshaler = SapNetWeaverProviderInstanceProperties{} + +func (s SapNetWeaverProviderInstanceProperties) MarshalJSON() ([]byte, error) { + type wrapper SapNetWeaverProviderInstanceProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapNetWeaverProviderInstanceProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapNetWeaverProviderInstanceProperties: %+v", err) + } + decoded["providerType"] = "SapNetWeaver" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapNetWeaverProviderInstanceProperties: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/predicates.go new file mode 100644 index 000000000000..b05f3ea03134 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/predicates.go @@ -0,0 +1,27 @@ +package providerinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProviderInstanceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ProviderInstanceOperationPredicate) Matches(input ProviderInstance) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/version.go new file mode 100644 index 000000000000..cdfb18cc5894 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/version.go @@ -0,0 +1,12 @@ +package providerinstances + +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/providerinstances/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/README.md new file mode 100644 index 000000000000..617b4c14d943 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/README.md @@ -0,0 +1,128 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances` Documentation + +The `sapapplicationserverinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances" +``` + + +### Client Initialization + +```go +client := sapapplicationserverinstances.NewSAPApplicationServerInstancesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SAPApplicationServerInstancesClient.Create` + +```go +ctx := context.TODO() +id := sapapplicationserverinstances.NewApplicationInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "applicationInstanceValue") + +payload := sapapplicationserverinstances.SAPApplicationServerInstance{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPApplicationServerInstancesClient.Delete` + +```go +ctx := context.TODO() +id := sapapplicationserverinstances.NewApplicationInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "applicationInstanceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPApplicationServerInstancesClient.Get` + +```go +ctx := context.TODO() +id := sapapplicationserverinstances.NewApplicationInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "applicationInstanceValue") + +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: `SAPApplicationServerInstancesClient.List` + +```go +ctx := context.TODO() +id := sapapplicationserverinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `SAPApplicationServerInstancesClient.StartInstance` + +```go +ctx := context.TODO() +id := sapapplicationserverinstances.NewApplicationInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "applicationInstanceValue") + +if err := client.StartInstanceThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPApplicationServerInstancesClient.StopInstance` + +```go +ctx := context.TODO() +id := sapapplicationserverinstances.NewApplicationInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "applicationInstanceValue") + +payload := sapapplicationserverinstances.StopRequest{ + // ... +} + + +if err := client.StopInstanceThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPApplicationServerInstancesClient.Update` + +```go +ctx := context.TODO() +id := sapapplicationserverinstances.NewApplicationInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "applicationInstanceValue") + +payload := sapapplicationserverinstances.UpdateSAPApplicationInstanceRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/client.go new file mode 100644 index 000000000000..e372453b8bae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/client.go @@ -0,0 +1,26 @@ +package sapapplicationserverinstances + +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 SAPApplicationServerInstancesClient struct { + Client *resourcemanager.Client +} + +func NewSAPApplicationServerInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPApplicationServerInstancesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapapplicationserverinstances", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SAPApplicationServerInstancesClient: %+v", err) + } + + return &SAPApplicationServerInstancesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/constants.go new file mode 100644 index 000000000000..80d2298a505b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/constants.go @@ -0,0 +1,207 @@ +package sapapplicationserverinstances + +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 ApplicationServerVirtualMachineType string + +const ( + ApplicationServerVirtualMachineTypeActive ApplicationServerVirtualMachineType = "Active" + ApplicationServerVirtualMachineTypeStandby ApplicationServerVirtualMachineType = "Standby" + ApplicationServerVirtualMachineTypeUnknown ApplicationServerVirtualMachineType = "Unknown" +) + +func PossibleValuesForApplicationServerVirtualMachineType() []string { + return []string{ + string(ApplicationServerVirtualMachineTypeActive), + string(ApplicationServerVirtualMachineTypeStandby), + string(ApplicationServerVirtualMachineTypeUnknown), + } +} + +func (s *ApplicationServerVirtualMachineType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseApplicationServerVirtualMachineType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseApplicationServerVirtualMachineType(input string) (*ApplicationServerVirtualMachineType, error) { + vals := map[string]ApplicationServerVirtualMachineType{ + "active": ApplicationServerVirtualMachineTypeActive, + "standby": ApplicationServerVirtualMachineTypeStandby, + "unknown": ApplicationServerVirtualMachineTypeUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ApplicationServerVirtualMachineType(input) + return &out, nil +} + +type SAPHealthState string + +const ( + SAPHealthStateDegraded SAPHealthState = "Degraded" + SAPHealthStateHealthy SAPHealthState = "Healthy" + SAPHealthStateUnhealthy SAPHealthState = "Unhealthy" + SAPHealthStateUnknown SAPHealthState = "Unknown" +) + +func PossibleValuesForSAPHealthState() []string { + return []string{ + string(SAPHealthStateDegraded), + string(SAPHealthStateHealthy), + string(SAPHealthStateUnhealthy), + string(SAPHealthStateUnknown), + } +} + +func (s *SAPHealthState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPHealthState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPHealthState(input string) (*SAPHealthState, error) { + vals := map[string]SAPHealthState{ + "degraded": SAPHealthStateDegraded, + "healthy": SAPHealthStateHealthy, + "unhealthy": SAPHealthStateUnhealthy, + "unknown": SAPHealthStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPHealthState(input) + return &out, nil +} + +type SAPVirtualInstanceStatus string + +const ( + SAPVirtualInstanceStatusOffline SAPVirtualInstanceStatus = "Offline" + SAPVirtualInstanceStatusPartiallyRunning SAPVirtualInstanceStatus = "PartiallyRunning" + SAPVirtualInstanceStatusRunning SAPVirtualInstanceStatus = "Running" + SAPVirtualInstanceStatusSoftShutdown SAPVirtualInstanceStatus = "SoftShutdown" + SAPVirtualInstanceStatusStarting SAPVirtualInstanceStatus = "Starting" + SAPVirtualInstanceStatusStopping SAPVirtualInstanceStatus = "Stopping" + SAPVirtualInstanceStatusUnavailable SAPVirtualInstanceStatus = "Unavailable" +) + +func PossibleValuesForSAPVirtualInstanceStatus() []string { + return []string{ + string(SAPVirtualInstanceStatusOffline), + string(SAPVirtualInstanceStatusPartiallyRunning), + string(SAPVirtualInstanceStatusRunning), + string(SAPVirtualInstanceStatusSoftShutdown), + string(SAPVirtualInstanceStatusStarting), + string(SAPVirtualInstanceStatusStopping), + string(SAPVirtualInstanceStatusUnavailable), + } +} + +func (s *SAPVirtualInstanceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPVirtualInstanceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPVirtualInstanceStatus(input string) (*SAPVirtualInstanceStatus, error) { + vals := map[string]SAPVirtualInstanceStatus{ + "offline": SAPVirtualInstanceStatusOffline, + "partiallyrunning": SAPVirtualInstanceStatusPartiallyRunning, + "running": SAPVirtualInstanceStatusRunning, + "softshutdown": SAPVirtualInstanceStatusSoftShutdown, + "starting": SAPVirtualInstanceStatusStarting, + "stopping": SAPVirtualInstanceStatusStopping, + "unavailable": SAPVirtualInstanceStatusUnavailable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPVirtualInstanceStatus(input) + return &out, nil +} + +type SapVirtualInstanceProvisioningState string + +const ( + SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating" + SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting" + SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed" + SapVirtualInstanceProvisioningStateSucceeded SapVirtualInstanceProvisioningState = "Succeeded" + SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating" +) + +func PossibleValuesForSapVirtualInstanceProvisioningState() []string { + return []string{ + string(SapVirtualInstanceProvisioningStateCreating), + string(SapVirtualInstanceProvisioningStateDeleting), + string(SapVirtualInstanceProvisioningStateFailed), + string(SapVirtualInstanceProvisioningStateSucceeded), + string(SapVirtualInstanceProvisioningStateUpdating), + } +} + +func (s *SapVirtualInstanceProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSapVirtualInstanceProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSapVirtualInstanceProvisioningState(input string) (*SapVirtualInstanceProvisioningState, error) { + vals := map[string]SapVirtualInstanceProvisioningState{ + "creating": SapVirtualInstanceProvisioningStateCreating, + "deleting": SapVirtualInstanceProvisioningStateDeleting, + "failed": SapVirtualInstanceProvisioningStateFailed, + "succeeded": SapVirtualInstanceProvisioningStateSucceeded, + "updating": SapVirtualInstanceProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SapVirtualInstanceProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go new file mode 100644 index 000000000000..32b5c81a6f82 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go @@ -0,0 +1,134 @@ +package sapapplicationserverinstances + +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 = ApplicationInstanceId{} + +// ApplicationInstanceId is a struct representing the Resource ID for a Application Instance +type ApplicationInstanceId struct { + SubscriptionId string + ResourceGroupName string + SapVirtualInstanceName string + ApplicationInstanceName string +} + +// NewApplicationInstanceID returns a new ApplicationInstanceId struct +func NewApplicationInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string) ApplicationInstanceId { + return ApplicationInstanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SapVirtualInstanceName: sapVirtualInstanceName, + ApplicationInstanceName: applicationInstanceName, + } +} + +// ParseApplicationInstanceID parses 'input' into a ApplicationInstanceId +func ParseApplicationInstanceID(input string) (*ApplicationInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(ApplicationInstanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ApplicationInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseApplicationInstanceIDInsensitively parses 'input' case-insensitively into a ApplicationInstanceId +// note: this method should only be used for API response data and not user input +func ParseApplicationInstanceIDInsensitively(input string) (*ApplicationInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(ApplicationInstanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ApplicationInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApplicationInstanceId) 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.SapVirtualInstanceName, ok = input.Parsed["sapVirtualInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sapVirtualInstanceName", input) + } + + if id.ApplicationInstanceName, ok = input.Parsed["applicationInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationInstanceName", input) + } + + return nil +} + +// ValidateApplicationInstanceID checks that 'input' can be parsed as a Application Instance ID +func ValidateApplicationInstanceID(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 := ParseApplicationInstanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Application Instance ID +func (id ApplicationInstanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/sapVirtualInstances/%s/applicationInstances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SapVirtualInstanceName, id.ApplicationInstanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Application Instance ID +func (id ApplicationInstanceId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticSapVirtualInstances", "sapVirtualInstances", "sapVirtualInstances"), + resourceids.UserSpecifiedSegment("sapVirtualInstanceName", "sapVirtualInstanceValue"), + resourceids.StaticSegment("staticApplicationInstances", "applicationInstances", "applicationInstances"), + resourceids.UserSpecifiedSegment("applicationInstanceName", "applicationInstanceValue"), + } +} + +// String returns a human-readable description of this Application Instance ID +func (id ApplicationInstanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Sap Virtual Instance Name: %q", id.SapVirtualInstanceName), + fmt.Sprintf("Application Instance Name: %q", id.ApplicationInstanceName), + } + return fmt.Sprintf("Application Instance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go new file mode 100644 index 000000000000..a3da8c074727 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go @@ -0,0 +1,125 @@ +package sapapplicationserverinstances + +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 = SapVirtualInstanceId{} + +// SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance +type SapVirtualInstanceId struct { + SubscriptionId string + ResourceGroupName string + SapVirtualInstanceName string +} + +// NewSapVirtualInstanceID returns a new SapVirtualInstanceId struct +func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string) SapVirtualInstanceId { + return SapVirtualInstanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SapVirtualInstanceName: sapVirtualInstanceName, + } +} + +// ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId +func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SapVirtualInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId +// note: this method should only be used for API response data and not user input +func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SapVirtualInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SapVirtualInstanceId) 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.SapVirtualInstanceName, ok = input.Parsed["sapVirtualInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sapVirtualInstanceName", input) + } + + return nil +} + +// ValidateSapVirtualInstanceID checks that 'input' can be parsed as a Sap Virtual Instance ID +func ValidateSapVirtualInstanceID(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 := ParseSapVirtualInstanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Sap Virtual Instance ID +func (id SapVirtualInstanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/sapVirtualInstances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SapVirtualInstanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Sap Virtual Instance ID +func (id SapVirtualInstanceId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticSapVirtualInstances", "sapVirtualInstances", "sapVirtualInstances"), + resourceids.UserSpecifiedSegment("sapVirtualInstanceName", "sapVirtualInstanceValue"), + } +} + +// String returns a human-readable description of this Sap Virtual Instance ID +func (id SapVirtualInstanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Sap Virtual Instance Name: %q", id.SapVirtualInstanceName), + } + return fmt.Sprintf("Sap Virtual Instance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_create.go new file mode 100644 index 000000000000..fcbeefc223f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_create.go @@ -0,0 +1,74 @@ +package sapapplicationserverinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Create ... +func (c SAPApplicationServerInstancesClient) Create(ctx context.Context, id ApplicationInstanceId, input SAPApplicationServerInstance) (result CreateOperationResponse, 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c SAPApplicationServerInstancesClient) CreateThenPoll(ctx context.Context, id ApplicationInstanceId, input SAPApplicationServerInstance) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_delete.go new file mode 100644 index 000000000000..a364eb11a2e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_delete.go @@ -0,0 +1,71 @@ +package sapapplicationserverinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c SAPApplicationServerInstancesClient) Delete(ctx context.Context, id ApplicationInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c SAPApplicationServerInstancesClient) DeleteThenPoll(ctx context.Context, id ApplicationInstanceId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_get.go new file mode 100644 index 000000000000..c78ce396c416 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_get.go @@ -0,0 +1,51 @@ +package sapapplicationserverinstances + +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 *SAPApplicationServerInstance +} + +// Get ... +func (c SAPApplicationServerInstancesClient) Get(ctx context.Context, id ApplicationInstanceId) (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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_list.go new file mode 100644 index 000000000000..5e88392d5af8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_list.go @@ -0,0 +1,89 @@ +package sapapplicationserverinstances + +import ( + "context" + "fmt" + "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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SAPApplicationServerInstance +} + +type ListCompleteResult struct { + Items []SAPApplicationServerInstance +} + +// List ... +func (c SAPApplicationServerInstancesClient) List(ctx context.Context, id SapVirtualInstanceId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/applicationInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SAPApplicationServerInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c SAPApplicationServerInstancesClient) ListComplete(ctx context.Context, id SapVirtualInstanceId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, SAPApplicationServerInstanceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SAPApplicationServerInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id SapVirtualInstanceId, predicate SAPApplicationServerInstanceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]SAPApplicationServerInstance, 0) + + resp, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_startinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_startinstance.go new file mode 100644 index 000000000000..6eb4fcdea29e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_startinstance.go @@ -0,0 +1,70 @@ +package sapapplicationserverinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 StartInstanceOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StartInstance ... +func (c SAPApplicationServerInstancesClient) StartInstance(ctx context.Context, id ApplicationInstanceId) (result StartInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/start", 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StartInstanceThenPoll performs StartInstance then polls until it's completed +func (c SAPApplicationServerInstancesClient) StartInstanceThenPoll(ctx context.Context, id ApplicationInstanceId) error { + result, err := c.StartInstance(ctx, id) + if err != nil { + return fmt.Errorf("performing StartInstance: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StartInstance: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_stopinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_stopinstance.go new file mode 100644 index 000000000000..6863f0bddd86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_stopinstance.go @@ -0,0 +1,74 @@ +package sapapplicationserverinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 StopInstanceOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StopInstance ... +func (c SAPApplicationServerInstancesClient) StopInstance(ctx context.Context, id ApplicationInstanceId, input StopRequest) (result StopInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/stop", 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StopInstanceThenPoll performs StopInstance then polls until it's completed +func (c SAPApplicationServerInstancesClient) StopInstanceThenPoll(ctx context.Context, id ApplicationInstanceId, input StopRequest) error { + result, err := c.StopInstance(ctx, id, input) + if err != nil { + return fmt.Errorf("performing StopInstance: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StopInstance: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_update.go new file mode 100644 index 000000000000..09fabe0ecea5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_update.go @@ -0,0 +1,74 @@ +package sapapplicationserverinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Update ... +func (c SAPApplicationServerInstancesClient) Update(ctx context.Context, id ApplicationInstanceId, input UpdateSAPApplicationInstanceRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c SAPApplicationServerInstancesClient) UpdateThenPoll(ctx context.Context, id ApplicationInstanceId, input UpdateSAPApplicationInstanceRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_applicationservervmdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_applicationservervmdetails.go new file mode 100644 index 000000000000..b726103087ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_applicationservervmdetails.go @@ -0,0 +1,10 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationServerVMDetails struct { + StorageDetails *[]StorageInformation `json:"storageDetails,omitempty"` + Type *ApplicationServerVirtualMachineType `json:"type,omitempty"` + VirtualMachineId *string `json:"virtualMachineId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_erroradditionalinfo.go new file mode 100644 index 000000000000..0e481e26494c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_errordefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_errordefinition.go new file mode 100644 index 000000000000..46aaa86d6cc5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_errordefinition.go @@ -0,0 +1,10 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDefinition struct { + Code *string `json:"code,omitempty"` + Details *[]ErrorDefinition `json:"details,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_errordetail.go new file mode 100644 index 000000000000..1c96d28f14e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_errordetail.go @@ -0,0 +1,12 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_loadbalancerdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_loadbalancerdetails.go new file mode 100644 index 000000000000..3ff21a98118c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_loadbalancerdetails.go @@ -0,0 +1,8 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadBalancerDetails struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_operationstatusresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_operationstatusresult.go new file mode 100644 index 000000000000..b72d45ffa76d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_operationstatusresult.go @@ -0,0 +1,45 @@ +package sapapplicationserverinstances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OperationStatusResult struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` +} + +func (o *OperationStatusResult) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *OperationStatusResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapapplicationserverinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapapplicationserverinstance.go new file mode 100644 index 000000000000..a3837fdd73de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapapplicationserverinstance.go @@ -0,0 +1,18 @@ +package sapapplicationserverinstances + +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 SAPApplicationServerInstance struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *SAPApplicationServerProperties `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/workloads/2023-04-01/sapapplicationserverinstances/model_sapapplicationserverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapapplicationserverproperties.go new file mode 100644 index 000000000000..c12a484cea1d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapapplicationserverproperties.go @@ -0,0 +1,22 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPApplicationServerProperties struct { + Errors *SAPVirtualInstanceError `json:"errors,omitempty"` + GatewayPort *int64 `json:"gatewayPort,omitempty"` + Health *SAPHealthState `json:"health,omitempty"` + Hostname *string `json:"hostname,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + IcmHTTPPort *int64 `json:"icmHttpPort,omitempty"` + IcmHTTPSPort *int64 `json:"icmHttpsPort,omitempty"` + InstanceNo *string `json:"instanceNo,omitempty"` + KernelPatch *string `json:"kernelPatch,omitempty"` + KernelVersion *string `json:"kernelVersion,omitempty"` + LoadBalancerDetails *LoadBalancerDetails `json:"loadBalancerDetails,omitempty"` + ProvisioningState *SapVirtualInstanceProvisioningState `json:"provisioningState,omitempty"` + Status *SAPVirtualInstanceStatus `json:"status,omitempty"` + Subnet *string `json:"subnet,omitempty"` + VMDetails *[]ApplicationServerVMDetails `json:"vmDetails,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapvirtualinstanceerror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapvirtualinstanceerror.go new file mode 100644 index 000000000000..079f2c6a94df --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_sapvirtualinstanceerror.go @@ -0,0 +1,8 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPVirtualInstanceError struct { + Properties *ErrorDefinition `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_stoprequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_stoprequest.go new file mode 100644 index 000000000000..8cca664f4d82 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_stoprequest.go @@ -0,0 +1,8 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopRequest struct { + SoftStopTimeoutSeconds *int64 `json:"softStopTimeoutSeconds,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_storageinformation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_storageinformation.go new file mode 100644 index 000000000000..c4b5853f8d75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_storageinformation.go @@ -0,0 +1,8 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageInformation struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_updatesapapplicationinstancerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_updatesapapplicationinstancerequest.go new file mode 100644 index 000000000000..47841304c980 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/model_updatesapapplicationinstancerequest.go @@ -0,0 +1,8 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateSAPApplicationInstanceRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/predicates.go new file mode 100644 index 000000000000..29caee9a23cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/predicates.go @@ -0,0 +1,32 @@ +package sapapplicationserverinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPApplicationServerInstanceOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p SAPApplicationServerInstanceOperationPredicate) Matches(input SAPApplicationServerInstance) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/version.go new file mode 100644 index 000000000000..09c849d2626d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/version.go @@ -0,0 +1,12 @@ +package sapapplicationserverinstances + +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/sapapplicationserverinstances/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/README.md new file mode 100644 index 000000000000..f5a2d5119dc8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/README.md @@ -0,0 +1,41 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails` Documentation + +The `sapavailabilityzonedetails` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails" +``` + + +### Client Initialization + +```go +client := sapavailabilityzonedetails.NewSAPAvailabilityZoneDetailsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SAPAvailabilityZoneDetailsClient.SAPAvailabilityZoneDetails` + +```go +ctx := context.TODO() +id := sapavailabilityzonedetails.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +payload := sapavailabilityzonedetails.SAPAvailabilityZoneDetailsRequest{ + // ... +} + + +read, err := client.SAPAvailabilityZoneDetails(ctx, id, payload) +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/workloads/2023-04-01/sapavailabilityzonedetails/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/client.go new file mode 100644 index 000000000000..f3e01b03d447 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/client.go @@ -0,0 +1,26 @@ +package sapavailabilityzonedetails + +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 SAPAvailabilityZoneDetailsClient struct { + Client *resourcemanager.Client +} + +func NewSAPAvailabilityZoneDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPAvailabilityZoneDetailsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapavailabilityzonedetails", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SAPAvailabilityZoneDetailsClient: %+v", err) + } + + return &SAPAvailabilityZoneDetailsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/constants.go new file mode 100644 index 000000000000..f2b98d50bbf5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/constants.go @@ -0,0 +1,95 @@ +package sapavailabilityzonedetails + +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 SAPDatabaseType string + +const ( + SAPDatabaseTypeDBTwo SAPDatabaseType = "DB2" + SAPDatabaseTypeHANA SAPDatabaseType = "HANA" +) + +func PossibleValuesForSAPDatabaseType() []string { + return []string{ + string(SAPDatabaseTypeDBTwo), + string(SAPDatabaseTypeHANA), + } +} + +func (s *SAPDatabaseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDatabaseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDatabaseType(input string) (*SAPDatabaseType, error) { + vals := map[string]SAPDatabaseType{ + "db2": SAPDatabaseTypeDBTwo, + "hana": SAPDatabaseTypeHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDatabaseType(input) + return &out, nil +} + +type SAPProductType string + +const ( + SAPProductTypeECC SAPProductType = "ECC" + SAPProductTypeOther SAPProductType = "Other" + SAPProductTypeSFourHANA SAPProductType = "S4HANA" +) + +func PossibleValuesForSAPProductType() []string { + return []string{ + string(SAPProductTypeECC), + string(SAPProductTypeOther), + string(SAPProductTypeSFourHANA), + } +} + +func (s *SAPProductType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPProductType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPProductType(input string) (*SAPProductType, error) { + vals := map[string]SAPProductType{ + "ecc": SAPProductTypeECC, + "other": SAPProductTypeOther, + "s4hana": SAPProductTypeSFourHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPProductType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go new file mode 100644 index 000000000000..1ac88fba322b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go @@ -0,0 +1,116 @@ +package sapavailabilityzonedetails + +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 = LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(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 := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.Workloads/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/method_sapavailabilityzonedetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/method_sapavailabilityzonedetails.go new file mode 100644 index 000000000000..a0d1ceb97972 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/method_sapavailabilityzonedetails.go @@ -0,0 +1,56 @@ +package sapavailabilityzonedetails + +import ( + "context" + "fmt" + "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 SAPAvailabilityZoneDetailsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SAPAvailabilityZoneDetailsResult +} + +// SAPAvailabilityZoneDetails ... +func (c SAPAvailabilityZoneDetailsClient) SAPAvailabilityZoneDetails(ctx context.Context, id LocationId, input SAPAvailabilityZoneDetailsRequest) (result SAPAvailabilityZoneDetailsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonedetailsrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonedetailsrequest.go new file mode 100644 index 000000000000..cca634f46ad2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonedetailsrequest.go @@ -0,0 +1,10 @@ +package sapavailabilityzonedetails + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPAvailabilityZoneDetailsRequest struct { + AppLocation string `json:"appLocation"` + DatabaseType SAPDatabaseType `json:"databaseType"` + SapProduct SAPProductType `json:"sapProduct"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonedetailsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonedetailsresult.go new file mode 100644 index 000000000000..c9a1f13e66a8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonedetailsresult.go @@ -0,0 +1,8 @@ +package sapavailabilityzonedetails + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPAvailabilityZoneDetailsResult struct { + AvailabilityZonePairs *[]SAPAvailabilityZonePair `json:"availabilityZonePairs,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonepair.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonepair.go new file mode 100644 index 000000000000..7850db487d42 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/model_sapavailabilityzonepair.go @@ -0,0 +1,9 @@ +package sapavailabilityzonedetails + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPAvailabilityZonePair struct { + ZoneA *int64 `json:"zoneA,omitempty"` + ZoneB *int64 `json:"zoneB,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/version.go new file mode 100644 index 000000000000..5250751b0147 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/version.go @@ -0,0 +1,12 @@ +package sapavailabilityzonedetails + +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/sapavailabilityzonedetails/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/README.md new file mode 100644 index 000000000000..e03f00632519 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/README.md @@ -0,0 +1,128 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances` Documentation + +The `sapcentralinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances" +``` + + +### Client Initialization + +```go +client := sapcentralinstances.NewSAPCentralInstancesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SAPCentralInstancesClient.Create` + +```go +ctx := context.TODO() +id := sapcentralinstances.NewCentralInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "centralInstanceValue") + +payload := sapcentralinstances.SAPCentralServerInstance{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPCentralInstancesClient.Delete` + +```go +ctx := context.TODO() +id := sapcentralinstances.NewCentralInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "centralInstanceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPCentralInstancesClient.Get` + +```go +ctx := context.TODO() +id := sapcentralinstances.NewCentralInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "centralInstanceValue") + +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: `SAPCentralInstancesClient.List` + +```go +ctx := context.TODO() +id := sapcentralinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `SAPCentralInstancesClient.StartInstance` + +```go +ctx := context.TODO() +id := sapcentralinstances.NewCentralInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "centralInstanceValue") + +if err := client.StartInstanceThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPCentralInstancesClient.StopInstance` + +```go +ctx := context.TODO() +id := sapcentralinstances.NewCentralInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "centralInstanceValue") + +payload := sapcentralinstances.StopRequest{ + // ... +} + + +if err := client.StopInstanceThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPCentralInstancesClient.Update` + +```go +ctx := context.TODO() +id := sapcentralinstances.NewCentralInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "centralInstanceValue") + +payload := sapcentralinstances.UpdateSAPCentralInstanceRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/client.go new file mode 100644 index 000000000000..82698cd1887d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/client.go @@ -0,0 +1,26 @@ +package sapcentralinstances + +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 SAPCentralInstancesClient struct { + Client *resourcemanager.Client +} + +func NewSAPCentralInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPCentralInstancesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapcentralinstances", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SAPCentralInstancesClient: %+v", err) + } + + return &SAPCentralInstancesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/constants.go new file mode 100644 index 000000000000..cebda41218a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/constants.go @@ -0,0 +1,260 @@ +package sapcentralinstances + +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 CentralServerVirtualMachineType string + +const ( + CentralServerVirtualMachineTypeASCS CentralServerVirtualMachineType = "ASCS" + CentralServerVirtualMachineTypeERS CentralServerVirtualMachineType = "ERS" + CentralServerVirtualMachineTypeERSInactive CentralServerVirtualMachineType = "ERSInactive" + CentralServerVirtualMachineTypePrimary CentralServerVirtualMachineType = "Primary" + CentralServerVirtualMachineTypeSecondary CentralServerVirtualMachineType = "Secondary" + CentralServerVirtualMachineTypeStandby CentralServerVirtualMachineType = "Standby" + CentralServerVirtualMachineTypeUnknown CentralServerVirtualMachineType = "Unknown" +) + +func PossibleValuesForCentralServerVirtualMachineType() []string { + return []string{ + string(CentralServerVirtualMachineTypeASCS), + string(CentralServerVirtualMachineTypeERS), + string(CentralServerVirtualMachineTypeERSInactive), + string(CentralServerVirtualMachineTypePrimary), + string(CentralServerVirtualMachineTypeSecondary), + string(CentralServerVirtualMachineTypeStandby), + string(CentralServerVirtualMachineTypeUnknown), + } +} + +func (s *CentralServerVirtualMachineType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCentralServerVirtualMachineType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCentralServerVirtualMachineType(input string) (*CentralServerVirtualMachineType, error) { + vals := map[string]CentralServerVirtualMachineType{ + "ascs": CentralServerVirtualMachineTypeASCS, + "ers": CentralServerVirtualMachineTypeERS, + "ersinactive": CentralServerVirtualMachineTypeERSInactive, + "primary": CentralServerVirtualMachineTypePrimary, + "secondary": CentralServerVirtualMachineTypeSecondary, + "standby": CentralServerVirtualMachineTypeStandby, + "unknown": CentralServerVirtualMachineTypeUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CentralServerVirtualMachineType(input) + return &out, nil +} + +type EnqueueReplicationServerType string + +const ( + EnqueueReplicationServerTypeEnqueueReplicatorOne EnqueueReplicationServerType = "EnqueueReplicator1" + EnqueueReplicationServerTypeEnqueueReplicatorTwo EnqueueReplicationServerType = "EnqueueReplicator2" +) + +func PossibleValuesForEnqueueReplicationServerType() []string { + return []string{ + string(EnqueueReplicationServerTypeEnqueueReplicatorOne), + string(EnqueueReplicationServerTypeEnqueueReplicatorTwo), + } +} + +func (s *EnqueueReplicationServerType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEnqueueReplicationServerType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEnqueueReplicationServerType(input string) (*EnqueueReplicationServerType, error) { + vals := map[string]EnqueueReplicationServerType{ + "enqueuereplicator1": EnqueueReplicationServerTypeEnqueueReplicatorOne, + "enqueuereplicator2": EnqueueReplicationServerTypeEnqueueReplicatorTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EnqueueReplicationServerType(input) + return &out, nil +} + +type SAPHealthState string + +const ( + SAPHealthStateDegraded SAPHealthState = "Degraded" + SAPHealthStateHealthy SAPHealthState = "Healthy" + SAPHealthStateUnhealthy SAPHealthState = "Unhealthy" + SAPHealthStateUnknown SAPHealthState = "Unknown" +) + +func PossibleValuesForSAPHealthState() []string { + return []string{ + string(SAPHealthStateDegraded), + string(SAPHealthStateHealthy), + string(SAPHealthStateUnhealthy), + string(SAPHealthStateUnknown), + } +} + +func (s *SAPHealthState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPHealthState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPHealthState(input string) (*SAPHealthState, error) { + vals := map[string]SAPHealthState{ + "degraded": SAPHealthStateDegraded, + "healthy": SAPHealthStateHealthy, + "unhealthy": SAPHealthStateUnhealthy, + "unknown": SAPHealthStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPHealthState(input) + return &out, nil +} + +type SAPVirtualInstanceStatus string + +const ( + SAPVirtualInstanceStatusOffline SAPVirtualInstanceStatus = "Offline" + SAPVirtualInstanceStatusPartiallyRunning SAPVirtualInstanceStatus = "PartiallyRunning" + SAPVirtualInstanceStatusRunning SAPVirtualInstanceStatus = "Running" + SAPVirtualInstanceStatusSoftShutdown SAPVirtualInstanceStatus = "SoftShutdown" + SAPVirtualInstanceStatusStarting SAPVirtualInstanceStatus = "Starting" + SAPVirtualInstanceStatusStopping SAPVirtualInstanceStatus = "Stopping" + SAPVirtualInstanceStatusUnavailable SAPVirtualInstanceStatus = "Unavailable" +) + +func PossibleValuesForSAPVirtualInstanceStatus() []string { + return []string{ + string(SAPVirtualInstanceStatusOffline), + string(SAPVirtualInstanceStatusPartiallyRunning), + string(SAPVirtualInstanceStatusRunning), + string(SAPVirtualInstanceStatusSoftShutdown), + string(SAPVirtualInstanceStatusStarting), + string(SAPVirtualInstanceStatusStopping), + string(SAPVirtualInstanceStatusUnavailable), + } +} + +func (s *SAPVirtualInstanceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPVirtualInstanceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPVirtualInstanceStatus(input string) (*SAPVirtualInstanceStatus, error) { + vals := map[string]SAPVirtualInstanceStatus{ + "offline": SAPVirtualInstanceStatusOffline, + "partiallyrunning": SAPVirtualInstanceStatusPartiallyRunning, + "running": SAPVirtualInstanceStatusRunning, + "softshutdown": SAPVirtualInstanceStatusSoftShutdown, + "starting": SAPVirtualInstanceStatusStarting, + "stopping": SAPVirtualInstanceStatusStopping, + "unavailable": SAPVirtualInstanceStatusUnavailable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPVirtualInstanceStatus(input) + return &out, nil +} + +type SapVirtualInstanceProvisioningState string + +const ( + SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating" + SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting" + SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed" + SapVirtualInstanceProvisioningStateSucceeded SapVirtualInstanceProvisioningState = "Succeeded" + SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating" +) + +func PossibleValuesForSapVirtualInstanceProvisioningState() []string { + return []string{ + string(SapVirtualInstanceProvisioningStateCreating), + string(SapVirtualInstanceProvisioningStateDeleting), + string(SapVirtualInstanceProvisioningStateFailed), + string(SapVirtualInstanceProvisioningStateSucceeded), + string(SapVirtualInstanceProvisioningStateUpdating), + } +} + +func (s *SapVirtualInstanceProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSapVirtualInstanceProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSapVirtualInstanceProvisioningState(input string) (*SapVirtualInstanceProvisioningState, error) { + vals := map[string]SapVirtualInstanceProvisioningState{ + "creating": SapVirtualInstanceProvisioningStateCreating, + "deleting": SapVirtualInstanceProvisioningStateDeleting, + "failed": SapVirtualInstanceProvisioningStateFailed, + "succeeded": SapVirtualInstanceProvisioningStateSucceeded, + "updating": SapVirtualInstanceProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SapVirtualInstanceProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go new file mode 100644 index 000000000000..31c92e65e5d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go @@ -0,0 +1,134 @@ +package sapcentralinstances + +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 = CentralInstanceId{} + +// CentralInstanceId is a struct representing the Resource ID for a Central Instance +type CentralInstanceId struct { + SubscriptionId string + ResourceGroupName string + SapVirtualInstanceName string + CentralInstanceName string +} + +// NewCentralInstanceID returns a new CentralInstanceId struct +func NewCentralInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string) CentralInstanceId { + return CentralInstanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SapVirtualInstanceName: sapVirtualInstanceName, + CentralInstanceName: centralInstanceName, + } +} + +// ParseCentralInstanceID parses 'input' into a CentralInstanceId +func ParseCentralInstanceID(input string) (*CentralInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(CentralInstanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CentralInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseCentralInstanceIDInsensitively parses 'input' case-insensitively into a CentralInstanceId +// note: this method should only be used for API response data and not user input +func ParseCentralInstanceIDInsensitively(input string) (*CentralInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(CentralInstanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CentralInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CentralInstanceId) 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.SapVirtualInstanceName, ok = input.Parsed["sapVirtualInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sapVirtualInstanceName", input) + } + + if id.CentralInstanceName, ok = input.Parsed["centralInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "centralInstanceName", input) + } + + return nil +} + +// ValidateCentralInstanceID checks that 'input' can be parsed as a Central Instance ID +func ValidateCentralInstanceID(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 := ParseCentralInstanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Central Instance ID +func (id CentralInstanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/sapVirtualInstances/%s/centralInstances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SapVirtualInstanceName, id.CentralInstanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Central Instance ID +func (id CentralInstanceId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticSapVirtualInstances", "sapVirtualInstances", "sapVirtualInstances"), + resourceids.UserSpecifiedSegment("sapVirtualInstanceName", "sapVirtualInstanceValue"), + resourceids.StaticSegment("staticCentralInstances", "centralInstances", "centralInstances"), + resourceids.UserSpecifiedSegment("centralInstanceName", "centralInstanceValue"), + } +} + +// String returns a human-readable description of this Central Instance ID +func (id CentralInstanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Sap Virtual Instance Name: %q", id.SapVirtualInstanceName), + fmt.Sprintf("Central Instance Name: %q", id.CentralInstanceName), + } + return fmt.Sprintf("Central Instance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go new file mode 100644 index 000000000000..883a1f1c0cbb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go @@ -0,0 +1,125 @@ +package sapcentralinstances + +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 = SapVirtualInstanceId{} + +// SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance +type SapVirtualInstanceId struct { + SubscriptionId string + ResourceGroupName string + SapVirtualInstanceName string +} + +// NewSapVirtualInstanceID returns a new SapVirtualInstanceId struct +func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string) SapVirtualInstanceId { + return SapVirtualInstanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SapVirtualInstanceName: sapVirtualInstanceName, + } +} + +// ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId +func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SapVirtualInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId +// note: this method should only be used for API response data and not user input +func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SapVirtualInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SapVirtualInstanceId) 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.SapVirtualInstanceName, ok = input.Parsed["sapVirtualInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sapVirtualInstanceName", input) + } + + return nil +} + +// ValidateSapVirtualInstanceID checks that 'input' can be parsed as a Sap Virtual Instance ID +func ValidateSapVirtualInstanceID(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 := ParseSapVirtualInstanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Sap Virtual Instance ID +func (id SapVirtualInstanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/sapVirtualInstances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SapVirtualInstanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Sap Virtual Instance ID +func (id SapVirtualInstanceId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticSapVirtualInstances", "sapVirtualInstances", "sapVirtualInstances"), + resourceids.UserSpecifiedSegment("sapVirtualInstanceName", "sapVirtualInstanceValue"), + } +} + +// String returns a human-readable description of this Sap Virtual Instance ID +func (id SapVirtualInstanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Sap Virtual Instance Name: %q", id.SapVirtualInstanceName), + } + return fmt.Sprintf("Sap Virtual Instance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_create.go new file mode 100644 index 000000000000..9de10497b0ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_create.go @@ -0,0 +1,74 @@ +package sapcentralinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Create ... +func (c SAPCentralInstancesClient) Create(ctx context.Context, id CentralInstanceId, input SAPCentralServerInstance) (result CreateOperationResponse, 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c SAPCentralInstancesClient) CreateThenPoll(ctx context.Context, id CentralInstanceId, input SAPCentralServerInstance) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_delete.go new file mode 100644 index 000000000000..0ba0c1b287d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_delete.go @@ -0,0 +1,71 @@ +package sapcentralinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c SAPCentralInstancesClient) Delete(ctx context.Context, id CentralInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c SAPCentralInstancesClient) DeleteThenPoll(ctx context.Context, id CentralInstanceId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_get.go new file mode 100644 index 000000000000..5e75c9066cb0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_get.go @@ -0,0 +1,51 @@ +package sapcentralinstances + +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 *SAPCentralServerInstance +} + +// Get ... +func (c SAPCentralInstancesClient) Get(ctx context.Context, id CentralInstanceId) (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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_list.go new file mode 100644 index 000000000000..6005ae2a28f4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_list.go @@ -0,0 +1,89 @@ +package sapcentralinstances + +import ( + "context" + "fmt" + "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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SAPCentralServerInstance +} + +type ListCompleteResult struct { + Items []SAPCentralServerInstance +} + +// List ... +func (c SAPCentralInstancesClient) List(ctx context.Context, id SapVirtualInstanceId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/centralInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SAPCentralServerInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c SAPCentralInstancesClient) ListComplete(ctx context.Context, id SapVirtualInstanceId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, SAPCentralServerInstanceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SAPCentralInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id SapVirtualInstanceId, predicate SAPCentralServerInstanceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]SAPCentralServerInstance, 0) + + resp, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_startinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_startinstance.go new file mode 100644 index 000000000000..c29d73a105a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_startinstance.go @@ -0,0 +1,70 @@ +package sapcentralinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 StartInstanceOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StartInstance ... +func (c SAPCentralInstancesClient) StartInstance(ctx context.Context, id CentralInstanceId) (result StartInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/start", 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StartInstanceThenPoll performs StartInstance then polls until it's completed +func (c SAPCentralInstancesClient) StartInstanceThenPoll(ctx context.Context, id CentralInstanceId) error { + result, err := c.StartInstance(ctx, id) + if err != nil { + return fmt.Errorf("performing StartInstance: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StartInstance: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_stopinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_stopinstance.go new file mode 100644 index 000000000000..c1560fa42b1a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_stopinstance.go @@ -0,0 +1,74 @@ +package sapcentralinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 StopInstanceOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StopInstance ... +func (c SAPCentralInstancesClient) StopInstance(ctx context.Context, id CentralInstanceId, input StopRequest) (result StopInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/stop", 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StopInstanceThenPoll performs StopInstance then polls until it's completed +func (c SAPCentralInstancesClient) StopInstanceThenPoll(ctx context.Context, id CentralInstanceId, input StopRequest) error { + result, err := c.StopInstance(ctx, id, input) + if err != nil { + return fmt.Errorf("performing StopInstance: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StopInstance: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_update.go new file mode 100644 index 000000000000..237e8c83e82a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_update.go @@ -0,0 +1,74 @@ +package sapcentralinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Update ... +func (c SAPCentralInstancesClient) Update(ctx context.Context, id CentralInstanceId, input UpdateSAPCentralInstanceRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c SAPCentralInstancesClient) UpdateThenPoll(ctx context.Context, id CentralInstanceId, input UpdateSAPCentralInstanceRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_centralservervmdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_centralservervmdetails.go new file mode 100644 index 000000000000..5c025fdfb178 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_centralservervmdetails.go @@ -0,0 +1,10 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CentralServerVMDetails struct { + StorageDetails *[]StorageInformation `json:"storageDetails,omitempty"` + Type *CentralServerVirtualMachineType `json:"type,omitempty"` + VirtualMachineId *string `json:"virtualMachineId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_enqueuereplicationserverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_enqueuereplicationserverproperties.go new file mode 100644 index 000000000000..70050aafb2a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_enqueuereplicationserverproperties.go @@ -0,0 +1,14 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnqueueReplicationServerProperties struct { + ErsVersion *EnqueueReplicationServerType `json:"ersVersion,omitempty"` + Health *SAPHealthState `json:"health,omitempty"` + Hostname *string `json:"hostname,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + InstanceNo *string `json:"instanceNo,omitempty"` + KernelPatch *string `json:"kernelPatch,omitempty"` + KernelVersion *string `json:"kernelVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_enqueueserverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_enqueueserverproperties.go new file mode 100644 index 000000000000..0a917b9f2b10 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_enqueueserverproperties.go @@ -0,0 +1,11 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnqueueServerProperties struct { + Health *SAPHealthState `json:"health,omitempty"` + Hostname *string `json:"hostname,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + Port *int64 `json:"port,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_erroradditionalinfo.go new file mode 100644 index 000000000000..f5763a445f3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_errordefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_errordefinition.go new file mode 100644 index 000000000000..5d0fc634dc86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_errordefinition.go @@ -0,0 +1,10 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDefinition struct { + Code *string `json:"code,omitempty"` + Details *[]ErrorDefinition `json:"details,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_errordetail.go new file mode 100644 index 000000000000..872e9feefda5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_errordetail.go @@ -0,0 +1,12 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_gatewayserverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_gatewayserverproperties.go new file mode 100644 index 000000000000..23b1fa7bf8d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_gatewayserverproperties.go @@ -0,0 +1,9 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GatewayServerProperties struct { + Health *SAPHealthState `json:"health,omitempty"` + Port *int64 `json:"port,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_loadbalancerdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_loadbalancerdetails.go new file mode 100644 index 000000000000..7e3db806cfad --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_loadbalancerdetails.go @@ -0,0 +1,8 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadBalancerDetails struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_messageserverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_messageserverproperties.go new file mode 100644 index 000000000000..61d1f603c17d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_messageserverproperties.go @@ -0,0 +1,14 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MessageServerProperties struct { + HTTPPort *int64 `json:"httpPort,omitempty"` + HTTPSPort *int64 `json:"httpsPort,omitempty"` + Health *SAPHealthState `json:"health,omitempty"` + Hostname *string `json:"hostname,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + InternalMsPort *int64 `json:"internalMsPort,omitempty"` + MsPort *int64 `json:"msPort,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_operationstatusresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_operationstatusresult.go new file mode 100644 index 000000000000..d2d4e72967ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_operationstatusresult.go @@ -0,0 +1,45 @@ +package sapcentralinstances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OperationStatusResult struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` +} + +func (o *OperationStatusResult) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *OperationStatusResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapcentralserverinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapcentralserverinstance.go new file mode 100644 index 000000000000..f6afd4bd5d7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapcentralserverinstance.go @@ -0,0 +1,18 @@ +package sapcentralinstances + +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 SAPCentralServerInstance struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *SAPCentralServerProperties `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/workloads/2023-04-01/sapcentralinstances/model_sapcentralserverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapcentralserverproperties.go new file mode 100644 index 000000000000..c8560f49b4fd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapcentralserverproperties.go @@ -0,0 +1,21 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPCentralServerProperties struct { + EnqueueReplicationServerProperties *EnqueueReplicationServerProperties `json:"enqueueReplicationServerProperties,omitempty"` + EnqueueServerProperties *EnqueueServerProperties `json:"enqueueServerProperties,omitempty"` + Errors *SAPVirtualInstanceError `json:"errors,omitempty"` + GatewayServerProperties *GatewayServerProperties `json:"gatewayServerProperties,omitempty"` + Health *SAPHealthState `json:"health,omitempty"` + InstanceNo *string `json:"instanceNo,omitempty"` + KernelPatch *string `json:"kernelPatch,omitempty"` + KernelVersion *string `json:"kernelVersion,omitempty"` + LoadBalancerDetails *LoadBalancerDetails `json:"loadBalancerDetails,omitempty"` + MessageServerProperties *MessageServerProperties `json:"messageServerProperties,omitempty"` + ProvisioningState *SapVirtualInstanceProvisioningState `json:"provisioningState,omitempty"` + Status *SAPVirtualInstanceStatus `json:"status,omitempty"` + Subnet *string `json:"subnet,omitempty"` + VMDetails *[]CentralServerVMDetails `json:"vmDetails,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapvirtualinstanceerror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapvirtualinstanceerror.go new file mode 100644 index 000000000000..d354c442c04f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_sapvirtualinstanceerror.go @@ -0,0 +1,8 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPVirtualInstanceError struct { + Properties *ErrorDefinition `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_stoprequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_stoprequest.go new file mode 100644 index 000000000000..51e4f6822de5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_stoprequest.go @@ -0,0 +1,8 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopRequest struct { + SoftStopTimeoutSeconds *int64 `json:"softStopTimeoutSeconds,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_storageinformation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_storageinformation.go new file mode 100644 index 000000000000..52ea8093b8f6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_storageinformation.go @@ -0,0 +1,8 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageInformation struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_updatesapcentralinstancerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_updatesapcentralinstancerequest.go new file mode 100644 index 000000000000..e8745421ba94 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/model_updatesapcentralinstancerequest.go @@ -0,0 +1,8 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateSAPCentralInstanceRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/predicates.go new file mode 100644 index 000000000000..aff085e2e4a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/predicates.go @@ -0,0 +1,32 @@ +package sapcentralinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPCentralServerInstanceOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p SAPCentralServerInstanceOperationPredicate) Matches(input SAPCentralServerInstance) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/version.go new file mode 100644 index 000000000000..83ee8f7f4d6d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/version.go @@ -0,0 +1,12 @@ +package sapcentralinstances + +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/sapcentralinstances/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/README.md new file mode 100644 index 000000000000..34301df01092 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/README.md @@ -0,0 +1,128 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances` Documentation + +The `sapdatabaseinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances" +``` + + +### Client Initialization + +```go +client := sapdatabaseinstances.NewSAPDatabaseInstancesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SAPDatabaseInstancesClient.Create` + +```go +ctx := context.TODO() +id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue") + +payload := sapdatabaseinstances.SAPDatabaseInstance{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPDatabaseInstancesClient.Delete` + +```go +ctx := context.TODO() +id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPDatabaseInstancesClient.Get` + +```go +ctx := context.TODO() +id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue") + +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: `SAPDatabaseInstancesClient.List` + +```go +ctx := context.TODO() +id := sapdatabaseinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `SAPDatabaseInstancesClient.StartInstance` + +```go +ctx := context.TODO() +id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue") + +if err := client.StartInstanceThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPDatabaseInstancesClient.StopInstance` + +```go +ctx := context.TODO() +id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue") + +payload := sapdatabaseinstances.StopRequest{ + // ... +} + + +if err := client.StopInstanceThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPDatabaseInstancesClient.Update` + +```go +ctx := context.TODO() +id := sapdatabaseinstances.NewDatabaseInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue", "databaseInstanceValue") + +payload := sapdatabaseinstances.UpdateSAPDatabaseInstanceRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/client.go new file mode 100644 index 000000000000..aa0ae88d4cc0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/client.go @@ -0,0 +1,26 @@ +package sapdatabaseinstances + +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 SAPDatabaseInstancesClient struct { + Client *resourcemanager.Client +} + +func NewSAPDatabaseInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPDatabaseInstancesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapdatabaseinstances", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SAPDatabaseInstancesClient: %+v", err) + } + + return &SAPDatabaseInstancesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/constants.go new file mode 100644 index 000000000000..d07a0528f9e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/constants.go @@ -0,0 +1,116 @@ +package sapdatabaseinstances + +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 SAPVirtualInstanceStatus string + +const ( + SAPVirtualInstanceStatusOffline SAPVirtualInstanceStatus = "Offline" + SAPVirtualInstanceStatusPartiallyRunning SAPVirtualInstanceStatus = "PartiallyRunning" + SAPVirtualInstanceStatusRunning SAPVirtualInstanceStatus = "Running" + SAPVirtualInstanceStatusSoftShutdown SAPVirtualInstanceStatus = "SoftShutdown" + SAPVirtualInstanceStatusStarting SAPVirtualInstanceStatus = "Starting" + SAPVirtualInstanceStatusStopping SAPVirtualInstanceStatus = "Stopping" + SAPVirtualInstanceStatusUnavailable SAPVirtualInstanceStatus = "Unavailable" +) + +func PossibleValuesForSAPVirtualInstanceStatus() []string { + return []string{ + string(SAPVirtualInstanceStatusOffline), + string(SAPVirtualInstanceStatusPartiallyRunning), + string(SAPVirtualInstanceStatusRunning), + string(SAPVirtualInstanceStatusSoftShutdown), + string(SAPVirtualInstanceStatusStarting), + string(SAPVirtualInstanceStatusStopping), + string(SAPVirtualInstanceStatusUnavailable), + } +} + +func (s *SAPVirtualInstanceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPVirtualInstanceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPVirtualInstanceStatus(input string) (*SAPVirtualInstanceStatus, error) { + vals := map[string]SAPVirtualInstanceStatus{ + "offline": SAPVirtualInstanceStatusOffline, + "partiallyrunning": SAPVirtualInstanceStatusPartiallyRunning, + "running": SAPVirtualInstanceStatusRunning, + "softshutdown": SAPVirtualInstanceStatusSoftShutdown, + "starting": SAPVirtualInstanceStatusStarting, + "stopping": SAPVirtualInstanceStatusStopping, + "unavailable": SAPVirtualInstanceStatusUnavailable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPVirtualInstanceStatus(input) + return &out, nil +} + +type SapVirtualInstanceProvisioningState string + +const ( + SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating" + SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting" + SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed" + SapVirtualInstanceProvisioningStateSucceeded SapVirtualInstanceProvisioningState = "Succeeded" + SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating" +) + +func PossibleValuesForSapVirtualInstanceProvisioningState() []string { + return []string{ + string(SapVirtualInstanceProvisioningStateCreating), + string(SapVirtualInstanceProvisioningStateDeleting), + string(SapVirtualInstanceProvisioningStateFailed), + string(SapVirtualInstanceProvisioningStateSucceeded), + string(SapVirtualInstanceProvisioningStateUpdating), + } +} + +func (s *SapVirtualInstanceProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSapVirtualInstanceProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSapVirtualInstanceProvisioningState(input string) (*SapVirtualInstanceProvisioningState, error) { + vals := map[string]SapVirtualInstanceProvisioningState{ + "creating": SapVirtualInstanceProvisioningStateCreating, + "deleting": SapVirtualInstanceProvisioningStateDeleting, + "failed": SapVirtualInstanceProvisioningStateFailed, + "succeeded": SapVirtualInstanceProvisioningStateSucceeded, + "updating": SapVirtualInstanceProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SapVirtualInstanceProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go new file mode 100644 index 000000000000..3501bed913b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go @@ -0,0 +1,134 @@ +package sapdatabaseinstances + +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 = DatabaseInstanceId{} + +// DatabaseInstanceId is a struct representing the Resource ID for a Database Instance +type DatabaseInstanceId struct { + SubscriptionId string + ResourceGroupName string + SapVirtualInstanceName string + DatabaseInstanceName string +} + +// NewDatabaseInstanceID returns a new DatabaseInstanceId struct +func NewDatabaseInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string) DatabaseInstanceId { + return DatabaseInstanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SapVirtualInstanceName: sapVirtualInstanceName, + DatabaseInstanceName: databaseInstanceName, + } +} + +// ParseDatabaseInstanceID parses 'input' into a DatabaseInstanceId +func ParseDatabaseInstanceID(input string) (*DatabaseInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(DatabaseInstanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DatabaseInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseDatabaseInstanceIDInsensitively parses 'input' case-insensitively into a DatabaseInstanceId +// note: this method should only be used for API response data and not user input +func ParseDatabaseInstanceIDInsensitively(input string) (*DatabaseInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(DatabaseInstanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DatabaseInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DatabaseInstanceId) 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.SapVirtualInstanceName, ok = input.Parsed["sapVirtualInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sapVirtualInstanceName", input) + } + + if id.DatabaseInstanceName, ok = input.Parsed["databaseInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseInstanceName", input) + } + + return nil +} + +// ValidateDatabaseInstanceID checks that 'input' can be parsed as a Database Instance ID +func ValidateDatabaseInstanceID(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 := ParseDatabaseInstanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Database Instance ID +func (id DatabaseInstanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/sapVirtualInstances/%s/databaseInstances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SapVirtualInstanceName, id.DatabaseInstanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Database Instance ID +func (id DatabaseInstanceId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticSapVirtualInstances", "sapVirtualInstances", "sapVirtualInstances"), + resourceids.UserSpecifiedSegment("sapVirtualInstanceName", "sapVirtualInstanceValue"), + resourceids.StaticSegment("staticDatabaseInstances", "databaseInstances", "databaseInstances"), + resourceids.UserSpecifiedSegment("databaseInstanceName", "databaseInstanceValue"), + } +} + +// String returns a human-readable description of this Database Instance ID +func (id DatabaseInstanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Sap Virtual Instance Name: %q", id.SapVirtualInstanceName), + fmt.Sprintf("Database Instance Name: %q", id.DatabaseInstanceName), + } + return fmt.Sprintf("Database Instance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go new file mode 100644 index 000000000000..2d37fb8e8ade --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go @@ -0,0 +1,125 @@ +package sapdatabaseinstances + +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 = SapVirtualInstanceId{} + +// SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance +type SapVirtualInstanceId struct { + SubscriptionId string + ResourceGroupName string + SapVirtualInstanceName string +} + +// NewSapVirtualInstanceID returns a new SapVirtualInstanceId struct +func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string) SapVirtualInstanceId { + return SapVirtualInstanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SapVirtualInstanceName: sapVirtualInstanceName, + } +} + +// ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId +func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SapVirtualInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId +// note: this method should only be used for API response data and not user input +func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SapVirtualInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SapVirtualInstanceId) 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.SapVirtualInstanceName, ok = input.Parsed["sapVirtualInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sapVirtualInstanceName", input) + } + + return nil +} + +// ValidateSapVirtualInstanceID checks that 'input' can be parsed as a Sap Virtual Instance ID +func ValidateSapVirtualInstanceID(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 := ParseSapVirtualInstanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Sap Virtual Instance ID +func (id SapVirtualInstanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/sapVirtualInstances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SapVirtualInstanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Sap Virtual Instance ID +func (id SapVirtualInstanceId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticSapVirtualInstances", "sapVirtualInstances", "sapVirtualInstances"), + resourceids.UserSpecifiedSegment("sapVirtualInstanceName", "sapVirtualInstanceValue"), + } +} + +// String returns a human-readable description of this Sap Virtual Instance ID +func (id SapVirtualInstanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Sap Virtual Instance Name: %q", id.SapVirtualInstanceName), + } + return fmt.Sprintf("Sap Virtual Instance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_create.go new file mode 100644 index 000000000000..b09c733f4212 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_create.go @@ -0,0 +1,74 @@ +package sapdatabaseinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Create ... +func (c SAPDatabaseInstancesClient) Create(ctx context.Context, id DatabaseInstanceId, input SAPDatabaseInstance) (result CreateOperationResponse, 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c SAPDatabaseInstancesClient) CreateThenPoll(ctx context.Context, id DatabaseInstanceId, input SAPDatabaseInstance) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_delete.go new file mode 100644 index 000000000000..858070a918e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_delete.go @@ -0,0 +1,71 @@ +package sapdatabaseinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c SAPDatabaseInstancesClient) Delete(ctx context.Context, id DatabaseInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c SAPDatabaseInstancesClient) DeleteThenPoll(ctx context.Context, id DatabaseInstanceId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_get.go new file mode 100644 index 000000000000..3916c6151dbd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_get.go @@ -0,0 +1,51 @@ +package sapdatabaseinstances + +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 *SAPDatabaseInstance +} + +// Get ... +func (c SAPDatabaseInstancesClient) Get(ctx context.Context, id DatabaseInstanceId) (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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_list.go new file mode 100644 index 000000000000..0304cc2fd65b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_list.go @@ -0,0 +1,89 @@ +package sapdatabaseinstances + +import ( + "context" + "fmt" + "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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SAPDatabaseInstance +} + +type ListCompleteResult struct { + Items []SAPDatabaseInstance +} + +// List ... +func (c SAPDatabaseInstancesClient) List(ctx context.Context, id SapVirtualInstanceId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/databaseInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SAPDatabaseInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c SAPDatabaseInstancesClient) ListComplete(ctx context.Context, id SapVirtualInstanceId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, SAPDatabaseInstanceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SAPDatabaseInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id SapVirtualInstanceId, predicate SAPDatabaseInstanceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]SAPDatabaseInstance, 0) + + resp, err := c.List(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_startinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_startinstance.go new file mode 100644 index 000000000000..5b33e3a0798b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_startinstance.go @@ -0,0 +1,70 @@ +package sapdatabaseinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 StartInstanceOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StartInstance ... +func (c SAPDatabaseInstancesClient) StartInstance(ctx context.Context, id DatabaseInstanceId) (result StartInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/start", 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StartInstanceThenPoll performs StartInstance then polls until it's completed +func (c SAPDatabaseInstancesClient) StartInstanceThenPoll(ctx context.Context, id DatabaseInstanceId) error { + result, err := c.StartInstance(ctx, id) + if err != nil { + return fmt.Errorf("performing StartInstance: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StartInstance: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_stopinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_stopinstance.go new file mode 100644 index 000000000000..f01ff4414c1c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_stopinstance.go @@ -0,0 +1,74 @@ +package sapdatabaseinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 StopInstanceOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StopInstance ... +func (c SAPDatabaseInstancesClient) StopInstance(ctx context.Context, id DatabaseInstanceId, input StopRequest) (result StopInstanceOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/stop", 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StopInstanceThenPoll performs StopInstance then polls until it's completed +func (c SAPDatabaseInstancesClient) StopInstanceThenPoll(ctx context.Context, id DatabaseInstanceId, input StopRequest) error { + result, err := c.StopInstance(ctx, id, input) + if err != nil { + return fmt.Errorf("performing StopInstance: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StopInstance: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_update.go new file mode 100644 index 000000000000..430362b83daf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_update.go @@ -0,0 +1,74 @@ +package sapdatabaseinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Update ... +func (c SAPDatabaseInstancesClient) Update(ctx context.Context, id DatabaseInstanceId, input UpdateSAPDatabaseInstanceRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c SAPDatabaseInstancesClient) UpdateThenPoll(ctx context.Context, id DatabaseInstanceId, input UpdateSAPDatabaseInstanceRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_databasevmdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_databasevmdetails.go new file mode 100644 index 000000000000..61f23878c824 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_databasevmdetails.go @@ -0,0 +1,10 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseVMDetails struct { + Status *SAPVirtualInstanceStatus `json:"status,omitempty"` + StorageDetails *[]StorageInformation `json:"storageDetails,omitempty"` + VirtualMachineId *string `json:"virtualMachineId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_erroradditionalinfo.go new file mode 100644 index 000000000000..3f0ca0f13adb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_errordefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_errordefinition.go new file mode 100644 index 000000000000..a00104408229 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_errordefinition.go @@ -0,0 +1,10 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDefinition struct { + Code *string `json:"code,omitempty"` + Details *[]ErrorDefinition `json:"details,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_errordetail.go new file mode 100644 index 000000000000..109ec8b6f467 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_errordetail.go @@ -0,0 +1,12 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_loadbalancerdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_loadbalancerdetails.go new file mode 100644 index 000000000000..c13208cd34a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_loadbalancerdetails.go @@ -0,0 +1,8 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadBalancerDetails struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_operationstatusresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_operationstatusresult.go new file mode 100644 index 000000000000..64fc194844d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_operationstatusresult.go @@ -0,0 +1,45 @@ +package sapdatabaseinstances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OperationStatusResult struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` +} + +func (o *OperationStatusResult) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *OperationStatusResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapdatabaseinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapdatabaseinstance.go new file mode 100644 index 000000000000..04f0b39f6d3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapdatabaseinstance.go @@ -0,0 +1,18 @@ +package sapdatabaseinstances + +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 SAPDatabaseInstance struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *SAPDatabaseProperties `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/workloads/2023-04-01/sapdatabaseinstances/model_sapdatabaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapdatabaseproperties.go new file mode 100644 index 000000000000..25dd497a8697 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapdatabaseproperties.go @@ -0,0 +1,16 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPDatabaseProperties struct { + DatabaseSid *string `json:"databaseSid,omitempty"` + DatabaseType *string `json:"databaseType,omitempty"` + Errors *SAPVirtualInstanceError `json:"errors,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + LoadBalancerDetails *LoadBalancerDetails `json:"loadBalancerDetails,omitempty"` + ProvisioningState *SapVirtualInstanceProvisioningState `json:"provisioningState,omitempty"` + Status *SAPVirtualInstanceStatus `json:"status,omitempty"` + Subnet *string `json:"subnet,omitempty"` + VMDetails *[]DatabaseVMDetails `json:"vmDetails,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapvirtualinstanceerror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapvirtualinstanceerror.go new file mode 100644 index 000000000000..016147f04937 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_sapvirtualinstanceerror.go @@ -0,0 +1,8 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPVirtualInstanceError struct { + Properties *ErrorDefinition `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_stoprequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_stoprequest.go new file mode 100644 index 000000000000..b4c1bf57d345 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_stoprequest.go @@ -0,0 +1,8 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopRequest struct { + SoftStopTimeoutSeconds *int64 `json:"softStopTimeoutSeconds,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_storageinformation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_storageinformation.go new file mode 100644 index 000000000000..4f5182e83c08 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_storageinformation.go @@ -0,0 +1,8 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageInformation struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_updatesapdatabaseinstancerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_updatesapdatabaseinstancerequest.go new file mode 100644 index 000000000000..31957d5bbca8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/model_updatesapdatabaseinstancerequest.go @@ -0,0 +1,8 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateSAPDatabaseInstanceRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/predicates.go new file mode 100644 index 000000000000..eba9c19b470d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/predicates.go @@ -0,0 +1,32 @@ +package sapdatabaseinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPDatabaseInstanceOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p SAPDatabaseInstanceOperationPredicate) Matches(input SAPDatabaseInstance) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/version.go new file mode 100644 index 000000000000..32c596059841 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/version.go @@ -0,0 +1,12 @@ +package sapdatabaseinstances + +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/sapdatabaseinstances/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/README.md new file mode 100644 index 000000000000..5e7ce81417b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/README.md @@ -0,0 +1,41 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations` Documentation + +The `sapdiskconfigurations` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations" +``` + + +### Client Initialization + +```go +client := sapdiskconfigurations.NewSAPDiskConfigurationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SAPDiskConfigurationsClient.SAPDiskConfigurations` + +```go +ctx := context.TODO() +id := sapdiskconfigurations.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +payload := sapdiskconfigurations.SAPDiskConfigurationsRequest{ + // ... +} + + +read, err := client.SAPDiskConfigurations(ctx, id, payload) +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/workloads/2023-04-01/sapdiskconfigurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/client.go new file mode 100644 index 000000000000..4f1d5dc82434 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/client.go @@ -0,0 +1,26 @@ +package sapdiskconfigurations + +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 SAPDiskConfigurationsClient struct { + Client *resourcemanager.Client +} + +func NewSAPDiskConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPDiskConfigurationsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapdiskconfigurations", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SAPDiskConfigurationsClient: %+v", err) + } + + return &SAPDiskConfigurationsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/constants.go new file mode 100644 index 000000000000..625d133ccc6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/constants.go @@ -0,0 +1,233 @@ +package sapdiskconfigurations + +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 DiskSkuName string + +const ( + DiskSkuNamePremiumLRS DiskSkuName = "Premium_LRS" + DiskSkuNamePremiumVTwoLRS DiskSkuName = "PremiumV2_LRS" + DiskSkuNamePremiumZRS DiskSkuName = "Premium_ZRS" + DiskSkuNameStandardLRS DiskSkuName = "Standard_LRS" + DiskSkuNameStandardSSDLRS DiskSkuName = "StandardSSD_LRS" + DiskSkuNameStandardSSDZRS DiskSkuName = "StandardSSD_ZRS" + DiskSkuNameUltraSSDLRS DiskSkuName = "UltraSSD_LRS" +) + +func PossibleValuesForDiskSkuName() []string { + return []string{ + string(DiskSkuNamePremiumLRS), + string(DiskSkuNamePremiumVTwoLRS), + string(DiskSkuNamePremiumZRS), + string(DiskSkuNameStandardLRS), + string(DiskSkuNameStandardSSDLRS), + string(DiskSkuNameStandardSSDZRS), + string(DiskSkuNameUltraSSDLRS), + } +} + +func (s *DiskSkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskSkuName(input string) (*DiskSkuName, error) { + vals := map[string]DiskSkuName{ + "premium_lrs": DiskSkuNamePremiumLRS, + "premiumv2_lrs": DiskSkuNamePremiumVTwoLRS, + "premium_zrs": DiskSkuNamePremiumZRS, + "standard_lrs": DiskSkuNameStandardLRS, + "standardssd_lrs": DiskSkuNameStandardSSDLRS, + "standardssd_zrs": DiskSkuNameStandardSSDZRS, + "ultrassd_lrs": DiskSkuNameUltraSSDLRS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskSkuName(input) + return &out, nil +} + +type SAPDatabaseType string + +const ( + SAPDatabaseTypeDBTwo SAPDatabaseType = "DB2" + SAPDatabaseTypeHANA SAPDatabaseType = "HANA" +) + +func PossibleValuesForSAPDatabaseType() []string { + return []string{ + string(SAPDatabaseTypeDBTwo), + string(SAPDatabaseTypeHANA), + } +} + +func (s *SAPDatabaseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDatabaseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDatabaseType(input string) (*SAPDatabaseType, error) { + vals := map[string]SAPDatabaseType{ + "db2": SAPDatabaseTypeDBTwo, + "hana": SAPDatabaseTypeHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDatabaseType(input) + return &out, nil +} + +type SAPDeploymentType string + +const ( + SAPDeploymentTypeSingleServer SAPDeploymentType = "SingleServer" + SAPDeploymentTypeThreeTier SAPDeploymentType = "ThreeTier" +) + +func PossibleValuesForSAPDeploymentType() []string { + return []string{ + string(SAPDeploymentTypeSingleServer), + string(SAPDeploymentTypeThreeTier), + } +} + +func (s *SAPDeploymentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDeploymentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDeploymentType(input string) (*SAPDeploymentType, error) { + vals := map[string]SAPDeploymentType{ + "singleserver": SAPDeploymentTypeSingleServer, + "threetier": SAPDeploymentTypeThreeTier, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDeploymentType(input) + return &out, nil +} + +type SAPEnvironmentType string + +const ( + SAPEnvironmentTypeNonProd SAPEnvironmentType = "NonProd" + SAPEnvironmentTypeProd SAPEnvironmentType = "Prod" +) + +func PossibleValuesForSAPEnvironmentType() []string { + return []string{ + string(SAPEnvironmentTypeNonProd), + string(SAPEnvironmentTypeProd), + } +} + +func (s *SAPEnvironmentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPEnvironmentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPEnvironmentType(input string) (*SAPEnvironmentType, error) { + vals := map[string]SAPEnvironmentType{ + "nonprod": SAPEnvironmentTypeNonProd, + "prod": SAPEnvironmentTypeProd, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPEnvironmentType(input) + return &out, nil +} + +type SAPProductType string + +const ( + SAPProductTypeECC SAPProductType = "ECC" + SAPProductTypeOther SAPProductType = "Other" + SAPProductTypeSFourHANA SAPProductType = "S4HANA" +) + +func PossibleValuesForSAPProductType() []string { + return []string{ + string(SAPProductTypeECC), + string(SAPProductTypeOther), + string(SAPProductTypeSFourHANA), + } +} + +func (s *SAPProductType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPProductType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPProductType(input string) (*SAPProductType, error) { + vals := map[string]SAPProductType{ + "ecc": SAPProductTypeECC, + "other": SAPProductTypeOther, + "s4hana": SAPProductTypeSFourHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPProductType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go new file mode 100644 index 000000000000..8c24504e326b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go @@ -0,0 +1,116 @@ +package sapdiskconfigurations + +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 = LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(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 := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.Workloads/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/method_sapdiskconfigurations.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/method_sapdiskconfigurations.go new file mode 100644 index 000000000000..8187c6f3bcb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/method_sapdiskconfigurations.go @@ -0,0 +1,56 @@ +package sapdiskconfigurations + +import ( + "context" + "fmt" + "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 SAPDiskConfigurationsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SAPDiskConfigurationsResult +} + +// SAPDiskConfigurations ... +func (c SAPDiskConfigurationsClient) SAPDiskConfigurations(ctx context.Context, id LocationId, input SAPDiskConfigurationsRequest) (result SAPDiskConfigurationsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/sapVirtualInstanceMetadata/default/getDiskConfigurations", 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_diskdetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_diskdetails.go new file mode 100644 index 000000000000..560a85c84f73 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_diskdetails.go @@ -0,0 +1,14 @@ +package sapdiskconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskDetails struct { + DiskTier *string `json:"diskTier,omitempty"` + IopsReadWrite *int64 `json:"iopsReadWrite,omitempty"` + MaximumSupportedDiskCount *int64 `json:"maximumSupportedDiskCount,omitempty"` + MbpsReadWrite *int64 `json:"mbpsReadWrite,omitempty"` + MinimumSupportedDiskCount *int64 `json:"minimumSupportedDiskCount,omitempty"` + SizeGB *int64 `json:"sizeGB,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_disksku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_disksku.go new file mode 100644 index 000000000000..980b36dd3285 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_disksku.go @@ -0,0 +1,8 @@ +package sapdiskconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskSku struct { + Name *DiskSkuName `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_diskvolumeconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_diskvolumeconfiguration.go new file mode 100644 index 000000000000..0416245e3f95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_diskvolumeconfiguration.go @@ -0,0 +1,10 @@ +package sapdiskconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskVolumeConfiguration struct { + Count *int64 `json:"count,omitempty"` + SizeGB *int64 `json:"sizeGB,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfiguration.go new file mode 100644 index 000000000000..9af96aabfd39 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfiguration.go @@ -0,0 +1,9 @@ +package sapdiskconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPDiskConfiguration struct { + RecommendedConfiguration *DiskVolumeConfiguration `json:"recommendedConfiguration,omitempty"` + SupportedConfigurations *[]DiskDetails `json:"supportedConfigurations,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfigurationsrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfigurationsrequest.go new file mode 100644 index 000000000000..5ef2ae1229ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfigurationsrequest.go @@ -0,0 +1,13 @@ +package sapdiskconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPDiskConfigurationsRequest struct { + AppLocation string `json:"appLocation"` + DatabaseType SAPDatabaseType `json:"databaseType"` + DbVMSku string `json:"dbVmSku"` + DeploymentType SAPDeploymentType `json:"deploymentType"` + Environment SAPEnvironmentType `json:"environment"` + SapProduct SAPProductType `json:"sapProduct"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfigurationsresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfigurationsresult.go new file mode 100644 index 000000000000..be6ff548ebe3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/model_sapdiskconfigurationsresult.go @@ -0,0 +1,8 @@ +package sapdiskconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPDiskConfigurationsResult struct { + VolumeConfigurations *map[string]SAPDiskConfiguration `json:"volumeConfigurations,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/version.go new file mode 100644 index 000000000000..93987390c170 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/version.go @@ -0,0 +1,12 @@ +package sapdiskconfigurations + +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/sapdiskconfigurations/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/README.md new file mode 100644 index 000000000000..2bf0a9a7175e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/README.md @@ -0,0 +1,110 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor` Documentation + +The `saplandscapemonitor` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor" +``` + + +### Client Initialization + +```go +client := saplandscapemonitor.NewSapLandscapeMonitorClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SapLandscapeMonitorClient.Create` + +```go +ctx := context.TODO() +id := saplandscapemonitor.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +payload := saplandscapemonitor.SapLandscapeMonitor{ + // ... +} + + +read, err := client.Create(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SapLandscapeMonitorClient.Delete` + +```go +ctx := context.TODO() +id := saplandscapemonitor.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SapLandscapeMonitorClient.Get` + +```go +ctx := context.TODO() +id := saplandscapemonitor.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +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: `SapLandscapeMonitorClient.List` + +```go +ctx := context.TODO() +id := saplandscapemonitor.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +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 +} +``` + + +### Example Usage: `SapLandscapeMonitorClient.Update` + +```go +ctx := context.TODO() +id := saplandscapemonitor.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue") + +payload := saplandscapemonitor.SapLandscapeMonitor{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +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/workloads/2023-04-01/saplandscapemonitor/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/client.go new file mode 100644 index 000000000000..36dc90431720 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/client.go @@ -0,0 +1,26 @@ +package saplandscapemonitor + +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 SapLandscapeMonitorClient struct { + Client *resourcemanager.Client +} + +func NewSapLandscapeMonitorClientWithBaseURI(sdkApi sdkEnv.Api) (*SapLandscapeMonitorClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "saplandscapemonitor", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SapLandscapeMonitorClient: %+v", err) + } + + return &SapLandscapeMonitorClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/constants.go new file mode 100644 index 000000000000..b9d74ff56d5f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/constants.go @@ -0,0 +1,60 @@ +package saplandscapemonitor + +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 SapLandscapeMonitorProvisioningState string + +const ( + SapLandscapeMonitorProvisioningStateAccepted SapLandscapeMonitorProvisioningState = "Accepted" + SapLandscapeMonitorProvisioningStateCanceled SapLandscapeMonitorProvisioningState = "Canceled" + SapLandscapeMonitorProvisioningStateCreated SapLandscapeMonitorProvisioningState = "Created" + SapLandscapeMonitorProvisioningStateFailed SapLandscapeMonitorProvisioningState = "Failed" + SapLandscapeMonitorProvisioningStateSucceeded SapLandscapeMonitorProvisioningState = "Succeeded" +) + +func PossibleValuesForSapLandscapeMonitorProvisioningState() []string { + return []string{ + string(SapLandscapeMonitorProvisioningStateAccepted), + string(SapLandscapeMonitorProvisioningStateCanceled), + string(SapLandscapeMonitorProvisioningStateCreated), + string(SapLandscapeMonitorProvisioningStateFailed), + string(SapLandscapeMonitorProvisioningStateSucceeded), + } +} + +func (s *SapLandscapeMonitorProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSapLandscapeMonitorProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSapLandscapeMonitorProvisioningState(input string) (*SapLandscapeMonitorProvisioningState, error) { + vals := map[string]SapLandscapeMonitorProvisioningState{ + "accepted": SapLandscapeMonitorProvisioningStateAccepted, + "canceled": SapLandscapeMonitorProvisioningStateCanceled, + "created": SapLandscapeMonitorProvisioningStateCreated, + "failed": SapLandscapeMonitorProvisioningStateFailed, + "succeeded": SapLandscapeMonitorProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SapLandscapeMonitorProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go new file mode 100644 index 000000000000..aa8b9997ae92 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go @@ -0,0 +1,125 @@ +package saplandscapemonitor + +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 = MonitorId{} + +// MonitorId is a struct representing the Resource ID for a Monitor +type MonitorId struct { + SubscriptionId string + ResourceGroupName string + MonitorName string +} + +// NewMonitorID returns a new MonitorId struct +func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId { + return MonitorId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MonitorName: monitorName, + } +} + +// ParseMonitorID parses 'input' into a MonitorId +func ParseMonitorID(input string) (*MonitorId, error) { + parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId +// note: this method should only be used for API response data and not user input +func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { + parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MonitorId) 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.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) + } + + return nil +} + +// ValidateMonitorID checks that 'input' can be parsed as a Monitor ID +func ValidateMonitorID(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 := ParseMonitorID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Monitor ID +func (id MonitorId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/monitors/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MonitorName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Monitor ID +func (id MonitorId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticMonitors", "monitors", "monitors"), + resourceids.UserSpecifiedSegment("monitorName", "monitorValue"), + } +} + +// String returns a human-readable description of this Monitor ID +func (id MonitorId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Monitor Name: %q", id.MonitorName), + } + return fmt.Sprintf("Monitor (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_create.go new file mode 100644 index 000000000000..eca3fae5692a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_create.go @@ -0,0 +1,57 @@ +package saplandscapemonitor + +import ( + "context" + "fmt" + "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 CreateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SapLandscapeMonitor +} + +// Create ... +func (c SapLandscapeMonitorClient) Create(ctx context.Context, id MonitorId, input SapLandscapeMonitor) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/sapLandscapeMonitor/default", 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_delete.go new file mode 100644 index 000000000000..c5e0dbd6ce7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_delete.go @@ -0,0 +1,48 @@ +package saplandscapemonitor + +import ( + "context" + "fmt" + "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 DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c SapLandscapeMonitorClient) Delete(ctx context.Context, id MonitorId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/sapLandscapeMonitor/default", 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 + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_get.go new file mode 100644 index 000000000000..627e0842bbe9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_get.go @@ -0,0 +1,52 @@ +package saplandscapemonitor + +import ( + "context" + "fmt" + "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 *SapLandscapeMonitor +} + +// Get ... +func (c SapLandscapeMonitorClient) Get(ctx context.Context, id MonitorId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/sapLandscapeMonitor/default", 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_list.go new file mode 100644 index 000000000000..35abf23b37da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_list.go @@ -0,0 +1,52 @@ +package saplandscapemonitor + +import ( + "context" + "fmt" + "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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SapLandscapeMonitorListResult +} + +// List ... +func (c SapLandscapeMonitorClient) List(ctx context.Context, id MonitorId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/sapLandscapeMonitor", 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_update.go new file mode 100644 index 000000000000..578a83b61471 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_update.go @@ -0,0 +1,56 @@ +package saplandscapemonitor + +import ( + "context" + "fmt" + "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 UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SapLandscapeMonitor +} + +// Update ... +func (c SapLandscapeMonitorClient) Update(ctx context.Context, id MonitorId, input SapLandscapeMonitor) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: fmt.Sprintf("%s/sapLandscapeMonitor/default", 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitor.go new file mode 100644 index 000000000000..4adbb5a0c748 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitor.go @@ -0,0 +1,16 @@ +package saplandscapemonitor + +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 SapLandscapeMonitor struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SapLandscapeMonitorProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorlistresult.go new file mode 100644 index 000000000000..1e5c8255541d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorlistresult.go @@ -0,0 +1,9 @@ +package saplandscapemonitor + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapLandscapeMonitorListResult struct { + NextLink *string `json:"nextLink,omitempty"` + Value *[]SapLandscapeMonitor `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitormetricthresholds.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitormetricthresholds.go new file mode 100644 index 000000000000..dfce3656c01f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitormetricthresholds.go @@ -0,0 +1,11 @@ +package saplandscapemonitor + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapLandscapeMonitorMetricThresholds struct { + Green *float64 `json:"green,omitempty"` + Name *string `json:"name,omitempty"` + Red *float64 `json:"red,omitempty"` + Yellow *float64 `json:"yellow,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorproperties.go new file mode 100644 index 000000000000..6ec3a2aafea0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorproperties.go @@ -0,0 +1,10 @@ +package saplandscapemonitor + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapLandscapeMonitorProperties struct { + Grouping *SapLandscapeMonitorPropertiesGrouping `json:"grouping,omitempty"` + ProvisioningState *SapLandscapeMonitorProvisioningState `json:"provisioningState,omitempty"` + TopMetricsThresholds *[]SapLandscapeMonitorMetricThresholds `json:"topMetricsThresholds,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorpropertiesgrouping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorpropertiesgrouping.go new file mode 100644 index 000000000000..ab26dedb6cb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorpropertiesgrouping.go @@ -0,0 +1,9 @@ +package saplandscapemonitor + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapLandscapeMonitorPropertiesGrouping struct { + Landscape *[]SapLandscapeMonitorSidMapping `json:"landscape,omitempty"` + SapApplication *[]SapLandscapeMonitorSidMapping `json:"sapApplication,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorsidmapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorsidmapping.go new file mode 100644 index 000000000000..b0cabfc5a280 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/model_saplandscapemonitorsidmapping.go @@ -0,0 +1,9 @@ +package saplandscapemonitor + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapLandscapeMonitorSidMapping struct { + Name *string `json:"name,omitempty"` + TopSid *[]string `json:"topSid,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/version.go new file mode 100644 index 000000000000..d89a5f15a1d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/version.go @@ -0,0 +1,12 @@ +package saplandscapemonitor + +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/saplandscapemonitor/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/README.md new file mode 100644 index 000000000000..74564d3cd54f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/README.md @@ -0,0 +1,41 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations` Documentation + +The `saprecommendations` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/saprecommendations" +``` + + +### Client Initialization + +```go +client := saprecommendations.NewSAPRecommendationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SAPRecommendationsClient.SAPSizingRecommendations` + +```go +ctx := context.TODO() +id := saprecommendations.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +payload := saprecommendations.SAPSizingRecommendationRequest{ + // ... +} + + +read, err := client.SAPSizingRecommendations(ctx, id, payload) +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/workloads/2023-04-01/saprecommendations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/client.go new file mode 100644 index 000000000000..8a1af72250fd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/client.go @@ -0,0 +1,26 @@ +package saprecommendations + +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 SAPRecommendationsClient struct { + Client *resourcemanager.Client +} + +func NewSAPRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPRecommendationsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "saprecommendations", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SAPRecommendationsClient: %+v", err) + } + + return &SAPRecommendationsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/constants.go new file mode 100644 index 000000000000..fd1aa9cde23a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/constants.go @@ -0,0 +1,256 @@ +package saprecommendations + +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 SAPDatabaseScaleMethod string + +const ( + SAPDatabaseScaleMethodScaleUp SAPDatabaseScaleMethod = "ScaleUp" +) + +func PossibleValuesForSAPDatabaseScaleMethod() []string { + return []string{ + string(SAPDatabaseScaleMethodScaleUp), + } +} + +func (s *SAPDatabaseScaleMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDatabaseScaleMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDatabaseScaleMethod(input string) (*SAPDatabaseScaleMethod, error) { + vals := map[string]SAPDatabaseScaleMethod{ + "scaleup": SAPDatabaseScaleMethodScaleUp, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDatabaseScaleMethod(input) + return &out, nil +} + +type SAPDatabaseType string + +const ( + SAPDatabaseTypeDBTwo SAPDatabaseType = "DB2" + SAPDatabaseTypeHANA SAPDatabaseType = "HANA" +) + +func PossibleValuesForSAPDatabaseType() []string { + return []string{ + string(SAPDatabaseTypeDBTwo), + string(SAPDatabaseTypeHANA), + } +} + +func (s *SAPDatabaseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDatabaseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDatabaseType(input string) (*SAPDatabaseType, error) { + vals := map[string]SAPDatabaseType{ + "db2": SAPDatabaseTypeDBTwo, + "hana": SAPDatabaseTypeHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDatabaseType(input) + return &out, nil +} + +type SAPDeploymentType string + +const ( + SAPDeploymentTypeSingleServer SAPDeploymentType = "SingleServer" + SAPDeploymentTypeThreeTier SAPDeploymentType = "ThreeTier" +) + +func PossibleValuesForSAPDeploymentType() []string { + return []string{ + string(SAPDeploymentTypeSingleServer), + string(SAPDeploymentTypeThreeTier), + } +} + +func (s *SAPDeploymentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDeploymentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDeploymentType(input string) (*SAPDeploymentType, error) { + vals := map[string]SAPDeploymentType{ + "singleserver": SAPDeploymentTypeSingleServer, + "threetier": SAPDeploymentTypeThreeTier, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDeploymentType(input) + return &out, nil +} + +type SAPEnvironmentType string + +const ( + SAPEnvironmentTypeNonProd SAPEnvironmentType = "NonProd" + SAPEnvironmentTypeProd SAPEnvironmentType = "Prod" +) + +func PossibleValuesForSAPEnvironmentType() []string { + return []string{ + string(SAPEnvironmentTypeNonProd), + string(SAPEnvironmentTypeProd), + } +} + +func (s *SAPEnvironmentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPEnvironmentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPEnvironmentType(input string) (*SAPEnvironmentType, error) { + vals := map[string]SAPEnvironmentType{ + "nonprod": SAPEnvironmentTypeNonProd, + "prod": SAPEnvironmentTypeProd, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPEnvironmentType(input) + return &out, nil +} + +type SAPHighAvailabilityType string + +const ( + SAPHighAvailabilityTypeAvailabilitySet SAPHighAvailabilityType = "AvailabilitySet" + SAPHighAvailabilityTypeAvailabilityZone SAPHighAvailabilityType = "AvailabilityZone" +) + +func PossibleValuesForSAPHighAvailabilityType() []string { + return []string{ + string(SAPHighAvailabilityTypeAvailabilitySet), + string(SAPHighAvailabilityTypeAvailabilityZone), + } +} + +func (s *SAPHighAvailabilityType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPHighAvailabilityType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPHighAvailabilityType(input string) (*SAPHighAvailabilityType, error) { + vals := map[string]SAPHighAvailabilityType{ + "availabilityset": SAPHighAvailabilityTypeAvailabilitySet, + "availabilityzone": SAPHighAvailabilityTypeAvailabilityZone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPHighAvailabilityType(input) + return &out, nil +} + +type SAPProductType string + +const ( + SAPProductTypeECC SAPProductType = "ECC" + SAPProductTypeOther SAPProductType = "Other" + SAPProductTypeSFourHANA SAPProductType = "S4HANA" +) + +func PossibleValuesForSAPProductType() []string { + return []string{ + string(SAPProductTypeECC), + string(SAPProductTypeOther), + string(SAPProductTypeSFourHANA), + } +} + +func (s *SAPProductType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPProductType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPProductType(input string) (*SAPProductType, error) { + vals := map[string]SAPProductType{ + "ecc": SAPProductTypeECC, + "other": SAPProductTypeOther, + "s4hana": SAPProductTypeSFourHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPProductType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go new file mode 100644 index 000000000000..76463fa1e0c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go @@ -0,0 +1,116 @@ +package saprecommendations + +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 = LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(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 := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.Workloads/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/method_sapsizingrecommendations.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/method_sapsizingrecommendations.go new file mode 100644 index 000000000000..e69cc36efa0a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/method_sapsizingrecommendations.go @@ -0,0 +1,63 @@ +package saprecommendations + +import ( + "context" + "encoding/json" + "fmt" + "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 SAPSizingRecommendationsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SAPSizingRecommendationResult +} + +// SAPSizingRecommendations ... +func (c SAPRecommendationsClient) SAPSizingRecommendations(ctx context.Context, id LocationId, input SAPSizingRecommendationRequest) (result SAPSizingRecommendationsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/sapVirtualInstanceMetadata/default/getSizingRecommendations", 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 respObj json.RawMessage + if err = resp.Unmarshal(&respObj); err != nil { + return + } + model, err := unmarshalSAPSizingRecommendationResultImplementation(respObj) + if err != nil { + return + } + result.Model = &model + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationrequest.go new file mode 100644 index 000000000000..57e77ff296d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationrequest.go @@ -0,0 +1,16 @@ +package saprecommendations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPSizingRecommendationRequest struct { + AppLocation string `json:"appLocation"` + DatabaseType SAPDatabaseType `json:"databaseType"` + DbMemory int64 `json:"dbMemory"` + DbScaleMethod *SAPDatabaseScaleMethod `json:"dbScaleMethod,omitempty"` + DeploymentType SAPDeploymentType `json:"deploymentType"` + Environment SAPEnvironmentType `json:"environment"` + HighAvailabilityType *SAPHighAvailabilityType `json:"highAvailabilityType,omitempty"` + SapProduct SAPProductType `json:"sapProduct"` + Saps int64 `json:"saps"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationresult.go new file mode 100644 index 000000000000..9aefdce8c29a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationresult.go @@ -0,0 +1,61 @@ +package saprecommendations + +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 SAPSizingRecommendationResult interface { +} + +// RawSAPSizingRecommendationResultImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSAPSizingRecommendationResultImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSAPSizingRecommendationResultImplementation(input []byte) (SAPSizingRecommendationResult, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SAPSizingRecommendationResult into map[string]interface: %+v", err) + } + + value, ok := temp["deploymentType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "SingleServer") { + var out SingleServerRecommendationResult + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SingleServerRecommendationResult: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ThreeTier") { + var out ThreeTierRecommendationResult + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ThreeTierRecommendationResult: %+v", err) + } + return out, nil + } + + out := RawSAPSizingRecommendationResultImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_singleserverrecommendationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_singleserverrecommendationresult.go new file mode 100644 index 000000000000..c0b6380ad7a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_singleserverrecommendationresult.go @@ -0,0 +1,41 @@ +package saprecommendations + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SAPSizingRecommendationResult = SingleServerRecommendationResult{} + +type SingleServerRecommendationResult struct { + VMSku *string `json:"vmSku,omitempty"` + + // Fields inherited from SAPSizingRecommendationResult +} + +var _ json.Marshaler = SingleServerRecommendationResult{} + +func (s SingleServerRecommendationResult) MarshalJSON() ([]byte, error) { + type wrapper SingleServerRecommendationResult + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SingleServerRecommendationResult: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SingleServerRecommendationResult: %+v", err) + } + decoded["deploymentType"] = "SingleServer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SingleServerRecommendationResult: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_threetierrecommendationresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_threetierrecommendationresult.go new file mode 100644 index 000000000000..27360b7cc67d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/model_threetierrecommendationresult.go @@ -0,0 +1,46 @@ +package saprecommendations + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SAPSizingRecommendationResult = ThreeTierRecommendationResult{} + +type ThreeTierRecommendationResult struct { + ApplicationServerInstanceCount *int64 `json:"applicationServerInstanceCount,omitempty"` + ApplicationServerVMSku *string `json:"applicationServerVmSku,omitempty"` + CentralServerInstanceCount *int64 `json:"centralServerInstanceCount,omitempty"` + CentralServerVMSku *string `json:"centralServerVmSku,omitempty"` + DatabaseInstanceCount *int64 `json:"databaseInstanceCount,omitempty"` + DbVMSku *string `json:"dbVmSku,omitempty"` + + // Fields inherited from SAPSizingRecommendationResult +} + +var _ json.Marshaler = ThreeTierRecommendationResult{} + +func (s ThreeTierRecommendationResult) MarshalJSON() ([]byte, error) { + type wrapper ThreeTierRecommendationResult + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ThreeTierRecommendationResult: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ThreeTierRecommendationResult: %+v", err) + } + decoded["deploymentType"] = "ThreeTier" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ThreeTierRecommendationResult: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/version.go new file mode 100644 index 000000000000..b91a7baeb518 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/version.go @@ -0,0 +1,12 @@ +package saprecommendations + +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/saprecommendations/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/README.md new file mode 100644 index 000000000000..ed1e39c26994 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/README.md @@ -0,0 +1,41 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku` Documentation + +The `sapsupportedsku` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku" +``` + + +### Client Initialization + +```go +client := sapsupportedsku.NewSAPSupportedSkuClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SAPSupportedSkuClient.SAPSupportedSku` + +```go +ctx := context.TODO() +id := sapsupportedsku.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +payload := sapsupportedsku.SAPSupportedSkusRequest{ + // ... +} + + +read, err := client.SAPSupportedSku(ctx, id, payload) +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/workloads/2023-04-01/sapsupportedsku/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/client.go new file mode 100644 index 000000000000..8011ac22b2ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/client.go @@ -0,0 +1,26 @@ +package sapsupportedsku + +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 SAPSupportedSkuClient struct { + Client *resourcemanager.Client +} + +func NewSAPSupportedSkuClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPSupportedSkuClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapsupportedsku", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SAPSupportedSkuClient: %+v", err) + } + + return &SAPSupportedSkuClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/constants.go new file mode 100644 index 000000000000..704d4ed5870e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/constants.go @@ -0,0 +1,218 @@ +package sapsupportedsku + +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 SAPDatabaseType string + +const ( + SAPDatabaseTypeDBTwo SAPDatabaseType = "DB2" + SAPDatabaseTypeHANA SAPDatabaseType = "HANA" +) + +func PossibleValuesForSAPDatabaseType() []string { + return []string{ + string(SAPDatabaseTypeDBTwo), + string(SAPDatabaseTypeHANA), + } +} + +func (s *SAPDatabaseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDatabaseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDatabaseType(input string) (*SAPDatabaseType, error) { + vals := map[string]SAPDatabaseType{ + "db2": SAPDatabaseTypeDBTwo, + "hana": SAPDatabaseTypeHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDatabaseType(input) + return &out, nil +} + +type SAPDeploymentType string + +const ( + SAPDeploymentTypeSingleServer SAPDeploymentType = "SingleServer" + SAPDeploymentTypeThreeTier SAPDeploymentType = "ThreeTier" +) + +func PossibleValuesForSAPDeploymentType() []string { + return []string{ + string(SAPDeploymentTypeSingleServer), + string(SAPDeploymentTypeThreeTier), + } +} + +func (s *SAPDeploymentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDeploymentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDeploymentType(input string) (*SAPDeploymentType, error) { + vals := map[string]SAPDeploymentType{ + "singleserver": SAPDeploymentTypeSingleServer, + "threetier": SAPDeploymentTypeThreeTier, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDeploymentType(input) + return &out, nil +} + +type SAPEnvironmentType string + +const ( + SAPEnvironmentTypeNonProd SAPEnvironmentType = "NonProd" + SAPEnvironmentTypeProd SAPEnvironmentType = "Prod" +) + +func PossibleValuesForSAPEnvironmentType() []string { + return []string{ + string(SAPEnvironmentTypeNonProd), + string(SAPEnvironmentTypeProd), + } +} + +func (s *SAPEnvironmentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPEnvironmentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPEnvironmentType(input string) (*SAPEnvironmentType, error) { + vals := map[string]SAPEnvironmentType{ + "nonprod": SAPEnvironmentTypeNonProd, + "prod": SAPEnvironmentTypeProd, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPEnvironmentType(input) + return &out, nil +} + +type SAPHighAvailabilityType string + +const ( + SAPHighAvailabilityTypeAvailabilitySet SAPHighAvailabilityType = "AvailabilitySet" + SAPHighAvailabilityTypeAvailabilityZone SAPHighAvailabilityType = "AvailabilityZone" +) + +func PossibleValuesForSAPHighAvailabilityType() []string { + return []string{ + string(SAPHighAvailabilityTypeAvailabilitySet), + string(SAPHighAvailabilityTypeAvailabilityZone), + } +} + +func (s *SAPHighAvailabilityType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPHighAvailabilityType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPHighAvailabilityType(input string) (*SAPHighAvailabilityType, error) { + vals := map[string]SAPHighAvailabilityType{ + "availabilityset": SAPHighAvailabilityTypeAvailabilitySet, + "availabilityzone": SAPHighAvailabilityTypeAvailabilityZone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPHighAvailabilityType(input) + return &out, nil +} + +type SAPProductType string + +const ( + SAPProductTypeECC SAPProductType = "ECC" + SAPProductTypeOther SAPProductType = "Other" + SAPProductTypeSFourHANA SAPProductType = "S4HANA" +) + +func PossibleValuesForSAPProductType() []string { + return []string{ + string(SAPProductTypeECC), + string(SAPProductTypeOther), + string(SAPProductTypeSFourHANA), + } +} + +func (s *SAPProductType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPProductType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPProductType(input string) (*SAPProductType, error) { + vals := map[string]SAPProductType{ + "ecc": SAPProductTypeECC, + "other": SAPProductTypeOther, + "s4hana": SAPProductTypeSFourHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPProductType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go new file mode 100644 index 000000000000..27a3f191002c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go @@ -0,0 +1,116 @@ +package sapsupportedsku + +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 = LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(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 := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.Workloads/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/method_sapsupportedsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/method_sapsupportedsku.go new file mode 100644 index 000000000000..e8ea340781ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/method_sapsupportedsku.go @@ -0,0 +1,56 @@ +package sapsupportedsku + +import ( + "context" + "fmt" + "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 SAPSupportedSkuOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SAPSupportedResourceSkusResult +} + +// SAPSupportedSku ... +func (c SAPSupportedSkuClient) SAPSupportedSku(ctx context.Context, id LocationId, input SAPSupportedSkusRequest) (result SAPSupportedSkuOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/sapVirtualInstanceMetadata/default/getSapSupportedSku", 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedresourceskusresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedresourceskusresult.go new file mode 100644 index 000000000000..ae8576b148d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedresourceskusresult.go @@ -0,0 +1,8 @@ +package sapsupportedsku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPSupportedResourceSkusResult struct { + SupportedSkus *[]SAPSupportedSku `json:"supportedSkus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedsku.go new file mode 100644 index 000000000000..6f5ff27b191d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedsku.go @@ -0,0 +1,10 @@ +package sapsupportedsku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPSupportedSku struct { + IsAppServerCertified *bool `json:"isAppServerCertified,omitempty"` + IsDatabaseCertified *bool `json:"isDatabaseCertified,omitempty"` + VMSku *string `json:"vmSku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedskusrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedskusrequest.go new file mode 100644 index 000000000000..56355f1f2e80 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/model_sapsupportedskusrequest.go @@ -0,0 +1,13 @@ +package sapsupportedsku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPSupportedSkusRequest struct { + AppLocation string `json:"appLocation"` + DatabaseType SAPDatabaseType `json:"databaseType"` + DeploymentType SAPDeploymentType `json:"deploymentType"` + Environment SAPEnvironmentType `json:"environment"` + HighAvailabilityType *SAPHighAvailabilityType `json:"highAvailabilityType,omitempty"` + SapProduct SAPProductType `json:"sapProduct"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/version.go new file mode 100644 index 000000000000..d1324c82032d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/version.go @@ -0,0 +1,12 @@ +package sapsupportedsku + +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/sapsupportedsku/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/README.md new file mode 100644 index 000000000000..964d6d299503 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/README.md @@ -0,0 +1,149 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances` Documentation + +The `sapvirtualinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (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-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances" +``` + + +### Client Initialization + +```go +client := sapvirtualinstances.NewSAPVirtualInstancesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SAPVirtualInstancesClient.Create` + +```go +ctx := context.TODO() +id := sapvirtualinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +payload := sapvirtualinstances.SAPVirtualInstance{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPVirtualInstancesClient.Delete` + +```go +ctx := context.TODO() +id := sapvirtualinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPVirtualInstancesClient.Get` + +```go +ctx := context.TODO() +id := sapvirtualinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +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: `SAPVirtualInstancesClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := sapvirtualinstances.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `SAPVirtualInstancesClient.ListBySubscription` + +```go +ctx := context.TODO() +id := sapvirtualinstances.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `SAPVirtualInstancesClient.Start` + +```go +ctx := context.TODO() +id := sapvirtualinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +if err := client.StartThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPVirtualInstancesClient.Stop` + +```go +ctx := context.TODO() +id := sapvirtualinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +payload := sapvirtualinstances.StopRequest{ + // ... +} + + +if err := client.StopThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SAPVirtualInstancesClient.Update` + +```go +ctx := context.TODO() +id := sapvirtualinstances.NewSapVirtualInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sapVirtualInstanceValue") + +payload := sapvirtualinstances.UpdateSAPVirtualInstanceRequest{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +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/workloads/2023-04-01/sapvirtualinstances/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/client.go new file mode 100644 index 000000000000..db3692232a20 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/client.go @@ -0,0 +1,26 @@ +package sapvirtualinstances + +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 SAPVirtualInstancesClient struct { + Client *resourcemanager.Client +} + +func NewSAPVirtualInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPVirtualInstancesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapvirtualinstances", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SAPVirtualInstancesClient: %+v", err) + } + + return &SAPVirtualInstancesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/constants.go new file mode 100644 index 000000000000..e3c23e82486b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/constants.go @@ -0,0 +1,709 @@ +package sapvirtualinstances + +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 ConfigurationType string + +const ( + ConfigurationTypeCreateAndMount ConfigurationType = "CreateAndMount" + ConfigurationTypeMount ConfigurationType = "Mount" + ConfigurationTypeSkip ConfigurationType = "Skip" +) + +func PossibleValuesForConfigurationType() []string { + return []string{ + string(ConfigurationTypeCreateAndMount), + string(ConfigurationTypeMount), + string(ConfigurationTypeSkip), + } +} + +func (s *ConfigurationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseConfigurationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseConfigurationType(input string) (*ConfigurationType, error) { + vals := map[string]ConfigurationType{ + "createandmount": ConfigurationTypeCreateAndMount, + "mount": ConfigurationTypeMount, + "skip": ConfigurationTypeSkip, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ConfigurationType(input) + return &out, nil +} + +type DiskSkuName string + +const ( + DiskSkuNamePremiumLRS DiskSkuName = "Premium_LRS" + DiskSkuNamePremiumVTwoLRS DiskSkuName = "PremiumV2_LRS" + DiskSkuNamePremiumZRS DiskSkuName = "Premium_ZRS" + DiskSkuNameStandardLRS DiskSkuName = "Standard_LRS" + DiskSkuNameStandardSSDLRS DiskSkuName = "StandardSSD_LRS" + DiskSkuNameStandardSSDZRS DiskSkuName = "StandardSSD_ZRS" + DiskSkuNameUltraSSDLRS DiskSkuName = "UltraSSD_LRS" +) + +func PossibleValuesForDiskSkuName() []string { + return []string{ + string(DiskSkuNamePremiumLRS), + string(DiskSkuNamePremiumVTwoLRS), + string(DiskSkuNamePremiumZRS), + string(DiskSkuNameStandardLRS), + string(DiskSkuNameStandardSSDLRS), + string(DiskSkuNameStandardSSDZRS), + string(DiskSkuNameUltraSSDLRS), + } +} + +func (s *DiskSkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskSkuName(input string) (*DiskSkuName, error) { + vals := map[string]DiskSkuName{ + "premium_lrs": DiskSkuNamePremiumLRS, + "premiumv2_lrs": DiskSkuNamePremiumVTwoLRS, + "premium_zrs": DiskSkuNamePremiumZRS, + "standard_lrs": DiskSkuNameStandardLRS, + "standardssd_lrs": DiskSkuNameStandardSSDLRS, + "standardssd_zrs": DiskSkuNameStandardSSDZRS, + "ultrassd_lrs": DiskSkuNameUltraSSDLRS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskSkuName(input) + return &out, nil +} + +type NamingPatternType string + +const ( + NamingPatternTypeFullResourceName NamingPatternType = "FullResourceName" +) + +func PossibleValuesForNamingPatternType() []string { + return []string{ + string(NamingPatternTypeFullResourceName), + } +} + +func (s *NamingPatternType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNamingPatternType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNamingPatternType(input string) (*NamingPatternType, error) { + vals := map[string]NamingPatternType{ + "fullresourcename": NamingPatternTypeFullResourceName, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NamingPatternType(input) + return &out, nil +} + +type OSType string + +const ( + OSTypeLinux OSType = "Linux" + OSTypeWindows OSType = "Windows" +) + +func PossibleValuesForOSType() []string { + return []string{ + string(OSTypeLinux), + string(OSTypeWindows), + } +} + +func (s *OSType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOSType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOSType(input string) (*OSType, error) { + vals := map[string]OSType{ + "linux": OSTypeLinux, + "windows": OSTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OSType(input) + return &out, nil +} + +type SAPConfigurationType string + +const ( + SAPConfigurationTypeDeployment SAPConfigurationType = "Deployment" + SAPConfigurationTypeDeploymentWithOSConfig SAPConfigurationType = "DeploymentWithOSConfig" + SAPConfigurationTypeDiscovery SAPConfigurationType = "Discovery" +) + +func PossibleValuesForSAPConfigurationType() []string { + return []string{ + string(SAPConfigurationTypeDeployment), + string(SAPConfigurationTypeDeploymentWithOSConfig), + string(SAPConfigurationTypeDiscovery), + } +} + +func (s *SAPConfigurationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPConfigurationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPConfigurationType(input string) (*SAPConfigurationType, error) { + vals := map[string]SAPConfigurationType{ + "deployment": SAPConfigurationTypeDeployment, + "deploymentwithosconfig": SAPConfigurationTypeDeploymentWithOSConfig, + "discovery": SAPConfigurationTypeDiscovery, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPConfigurationType(input) + return &out, nil +} + +type SAPDatabaseType string + +const ( + SAPDatabaseTypeDBTwo SAPDatabaseType = "DB2" + SAPDatabaseTypeHANA SAPDatabaseType = "HANA" +) + +func PossibleValuesForSAPDatabaseType() []string { + return []string{ + string(SAPDatabaseTypeDBTwo), + string(SAPDatabaseTypeHANA), + } +} + +func (s *SAPDatabaseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDatabaseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDatabaseType(input string) (*SAPDatabaseType, error) { + vals := map[string]SAPDatabaseType{ + "db2": SAPDatabaseTypeDBTwo, + "hana": SAPDatabaseTypeHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDatabaseType(input) + return &out, nil +} + +type SAPDeploymentType string + +const ( + SAPDeploymentTypeSingleServer SAPDeploymentType = "SingleServer" + SAPDeploymentTypeThreeTier SAPDeploymentType = "ThreeTier" +) + +func PossibleValuesForSAPDeploymentType() []string { + return []string{ + string(SAPDeploymentTypeSingleServer), + string(SAPDeploymentTypeThreeTier), + } +} + +func (s *SAPDeploymentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPDeploymentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPDeploymentType(input string) (*SAPDeploymentType, error) { + vals := map[string]SAPDeploymentType{ + "singleserver": SAPDeploymentTypeSingleServer, + "threetier": SAPDeploymentTypeThreeTier, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPDeploymentType(input) + return &out, nil +} + +type SAPEnvironmentType string + +const ( + SAPEnvironmentTypeNonProd SAPEnvironmentType = "NonProd" + SAPEnvironmentTypeProd SAPEnvironmentType = "Prod" +) + +func PossibleValuesForSAPEnvironmentType() []string { + return []string{ + string(SAPEnvironmentTypeNonProd), + string(SAPEnvironmentTypeProd), + } +} + +func (s *SAPEnvironmentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPEnvironmentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPEnvironmentType(input string) (*SAPEnvironmentType, error) { + vals := map[string]SAPEnvironmentType{ + "nonprod": SAPEnvironmentTypeNonProd, + "prod": SAPEnvironmentTypeProd, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPEnvironmentType(input) + return &out, nil +} + +type SAPHealthState string + +const ( + SAPHealthStateDegraded SAPHealthState = "Degraded" + SAPHealthStateHealthy SAPHealthState = "Healthy" + SAPHealthStateUnhealthy SAPHealthState = "Unhealthy" + SAPHealthStateUnknown SAPHealthState = "Unknown" +) + +func PossibleValuesForSAPHealthState() []string { + return []string{ + string(SAPHealthStateDegraded), + string(SAPHealthStateHealthy), + string(SAPHealthStateUnhealthy), + string(SAPHealthStateUnknown), + } +} + +func (s *SAPHealthState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPHealthState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPHealthState(input string) (*SAPHealthState, error) { + vals := map[string]SAPHealthState{ + "degraded": SAPHealthStateDegraded, + "healthy": SAPHealthStateHealthy, + "unhealthy": SAPHealthStateUnhealthy, + "unknown": SAPHealthStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPHealthState(input) + return &out, nil +} + +type SAPHighAvailabilityType string + +const ( + SAPHighAvailabilityTypeAvailabilitySet SAPHighAvailabilityType = "AvailabilitySet" + SAPHighAvailabilityTypeAvailabilityZone SAPHighAvailabilityType = "AvailabilityZone" +) + +func PossibleValuesForSAPHighAvailabilityType() []string { + return []string{ + string(SAPHighAvailabilityTypeAvailabilitySet), + string(SAPHighAvailabilityTypeAvailabilityZone), + } +} + +func (s *SAPHighAvailabilityType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPHighAvailabilityType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPHighAvailabilityType(input string) (*SAPHighAvailabilityType, error) { + vals := map[string]SAPHighAvailabilityType{ + "availabilityset": SAPHighAvailabilityTypeAvailabilitySet, + "availabilityzone": SAPHighAvailabilityTypeAvailabilityZone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPHighAvailabilityType(input) + return &out, nil +} + +type SAPProductType string + +const ( + SAPProductTypeECC SAPProductType = "ECC" + SAPProductTypeOther SAPProductType = "Other" + SAPProductTypeSFourHANA SAPProductType = "S4HANA" +) + +func PossibleValuesForSAPProductType() []string { + return []string{ + string(SAPProductTypeECC), + string(SAPProductTypeOther), + string(SAPProductTypeSFourHANA), + } +} + +func (s *SAPProductType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPProductType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPProductType(input string) (*SAPProductType, error) { + vals := map[string]SAPProductType{ + "ecc": SAPProductTypeECC, + "other": SAPProductTypeOther, + "s4hana": SAPProductTypeSFourHANA, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPProductType(input) + return &out, nil +} + +type SAPSoftwareInstallationType string + +const ( + SAPSoftwareInstallationTypeExternal SAPSoftwareInstallationType = "External" + SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig SAPSoftwareInstallationType = "SAPInstallWithoutOSConfig" + SAPSoftwareInstallationTypeServiceInitiated SAPSoftwareInstallationType = "ServiceInitiated" +) + +func PossibleValuesForSAPSoftwareInstallationType() []string { + return []string{ + string(SAPSoftwareInstallationTypeExternal), + string(SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig), + string(SAPSoftwareInstallationTypeServiceInitiated), + } +} + +func (s *SAPSoftwareInstallationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPSoftwareInstallationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPSoftwareInstallationType(input string) (*SAPSoftwareInstallationType, error) { + vals := map[string]SAPSoftwareInstallationType{ + "external": SAPSoftwareInstallationTypeExternal, + "sapinstallwithoutosconfig": SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig, + "serviceinitiated": SAPSoftwareInstallationTypeServiceInitiated, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPSoftwareInstallationType(input) + return &out, nil +} + +type SAPVirtualInstanceState string + +const ( + SAPVirtualInstanceStateDiscoveryFailed SAPVirtualInstanceState = "DiscoveryFailed" + SAPVirtualInstanceStateDiscoveryInProgress SAPVirtualInstanceState = "DiscoveryInProgress" + SAPVirtualInstanceStateDiscoveryPending SAPVirtualInstanceState = "DiscoveryPending" + SAPVirtualInstanceStateInfrastructureDeploymentFailed SAPVirtualInstanceState = "InfrastructureDeploymentFailed" + SAPVirtualInstanceStateInfrastructureDeploymentInProgress SAPVirtualInstanceState = "InfrastructureDeploymentInProgress" + SAPVirtualInstanceStateInfrastructureDeploymentPending SAPVirtualInstanceState = "InfrastructureDeploymentPending" + SAPVirtualInstanceStateRegistrationComplete SAPVirtualInstanceState = "RegistrationComplete" + SAPVirtualInstanceStateSoftwareDetectionFailed SAPVirtualInstanceState = "SoftwareDetectionFailed" + SAPVirtualInstanceStateSoftwareDetectionInProgress SAPVirtualInstanceState = "SoftwareDetectionInProgress" + SAPVirtualInstanceStateSoftwareInstallationFailed SAPVirtualInstanceState = "SoftwareInstallationFailed" + SAPVirtualInstanceStateSoftwareInstallationInProgress SAPVirtualInstanceState = "SoftwareInstallationInProgress" + SAPVirtualInstanceStateSoftwareInstallationPending SAPVirtualInstanceState = "SoftwareInstallationPending" +) + +func PossibleValuesForSAPVirtualInstanceState() []string { + return []string{ + string(SAPVirtualInstanceStateDiscoveryFailed), + string(SAPVirtualInstanceStateDiscoveryInProgress), + string(SAPVirtualInstanceStateDiscoveryPending), + string(SAPVirtualInstanceStateInfrastructureDeploymentFailed), + string(SAPVirtualInstanceStateInfrastructureDeploymentInProgress), + string(SAPVirtualInstanceStateInfrastructureDeploymentPending), + string(SAPVirtualInstanceStateRegistrationComplete), + string(SAPVirtualInstanceStateSoftwareDetectionFailed), + string(SAPVirtualInstanceStateSoftwareDetectionInProgress), + string(SAPVirtualInstanceStateSoftwareInstallationFailed), + string(SAPVirtualInstanceStateSoftwareInstallationInProgress), + string(SAPVirtualInstanceStateSoftwareInstallationPending), + } +} + +func (s *SAPVirtualInstanceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPVirtualInstanceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPVirtualInstanceState(input string) (*SAPVirtualInstanceState, error) { + vals := map[string]SAPVirtualInstanceState{ + "discoveryfailed": SAPVirtualInstanceStateDiscoveryFailed, + "discoveryinprogress": SAPVirtualInstanceStateDiscoveryInProgress, + "discoverypending": SAPVirtualInstanceStateDiscoveryPending, + "infrastructuredeploymentfailed": SAPVirtualInstanceStateInfrastructureDeploymentFailed, + "infrastructuredeploymentinprogress": SAPVirtualInstanceStateInfrastructureDeploymentInProgress, + "infrastructuredeploymentpending": SAPVirtualInstanceStateInfrastructureDeploymentPending, + "registrationcomplete": SAPVirtualInstanceStateRegistrationComplete, + "softwaredetectionfailed": SAPVirtualInstanceStateSoftwareDetectionFailed, + "softwaredetectioninprogress": SAPVirtualInstanceStateSoftwareDetectionInProgress, + "softwareinstallationfailed": SAPVirtualInstanceStateSoftwareInstallationFailed, + "softwareinstallationinprogress": SAPVirtualInstanceStateSoftwareInstallationInProgress, + "softwareinstallationpending": SAPVirtualInstanceStateSoftwareInstallationPending, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPVirtualInstanceState(input) + return &out, nil +} + +type SAPVirtualInstanceStatus string + +const ( + SAPVirtualInstanceStatusOffline SAPVirtualInstanceStatus = "Offline" + SAPVirtualInstanceStatusPartiallyRunning SAPVirtualInstanceStatus = "PartiallyRunning" + SAPVirtualInstanceStatusRunning SAPVirtualInstanceStatus = "Running" + SAPVirtualInstanceStatusSoftShutdown SAPVirtualInstanceStatus = "SoftShutdown" + SAPVirtualInstanceStatusStarting SAPVirtualInstanceStatus = "Starting" + SAPVirtualInstanceStatusStopping SAPVirtualInstanceStatus = "Stopping" + SAPVirtualInstanceStatusUnavailable SAPVirtualInstanceStatus = "Unavailable" +) + +func PossibleValuesForSAPVirtualInstanceStatus() []string { + return []string{ + string(SAPVirtualInstanceStatusOffline), + string(SAPVirtualInstanceStatusPartiallyRunning), + string(SAPVirtualInstanceStatusRunning), + string(SAPVirtualInstanceStatusSoftShutdown), + string(SAPVirtualInstanceStatusStarting), + string(SAPVirtualInstanceStatusStopping), + string(SAPVirtualInstanceStatusUnavailable), + } +} + +func (s *SAPVirtualInstanceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSAPVirtualInstanceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSAPVirtualInstanceStatus(input string) (*SAPVirtualInstanceStatus, error) { + vals := map[string]SAPVirtualInstanceStatus{ + "offline": SAPVirtualInstanceStatusOffline, + "partiallyrunning": SAPVirtualInstanceStatusPartiallyRunning, + "running": SAPVirtualInstanceStatusRunning, + "softshutdown": SAPVirtualInstanceStatusSoftShutdown, + "starting": SAPVirtualInstanceStatusStarting, + "stopping": SAPVirtualInstanceStatusStopping, + "unavailable": SAPVirtualInstanceStatusUnavailable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SAPVirtualInstanceStatus(input) + return &out, nil +} + +type SapVirtualInstanceProvisioningState string + +const ( + SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating" + SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting" + SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed" + SapVirtualInstanceProvisioningStateSucceeded SapVirtualInstanceProvisioningState = "Succeeded" + SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating" +) + +func PossibleValuesForSapVirtualInstanceProvisioningState() []string { + return []string{ + string(SapVirtualInstanceProvisioningStateCreating), + string(SapVirtualInstanceProvisioningStateDeleting), + string(SapVirtualInstanceProvisioningStateFailed), + string(SapVirtualInstanceProvisioningStateSucceeded), + string(SapVirtualInstanceProvisioningStateUpdating), + } +} + +func (s *SapVirtualInstanceProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSapVirtualInstanceProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSapVirtualInstanceProvisioningState(input string) (*SapVirtualInstanceProvisioningState, error) { + vals := map[string]SapVirtualInstanceProvisioningState{ + "creating": SapVirtualInstanceProvisioningStateCreating, + "deleting": SapVirtualInstanceProvisioningStateDeleting, + "failed": SapVirtualInstanceProvisioningStateFailed, + "succeeded": SapVirtualInstanceProvisioningStateSucceeded, + "updating": SapVirtualInstanceProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SapVirtualInstanceProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go new file mode 100644 index 000000000000..7bb7ed7a165d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go @@ -0,0 +1,125 @@ +package sapvirtualinstances + +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 = SapVirtualInstanceId{} + +// SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance +type SapVirtualInstanceId struct { + SubscriptionId string + ResourceGroupName string + SapVirtualInstanceName string +} + +// NewSapVirtualInstanceID returns a new SapVirtualInstanceId struct +func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sapVirtualInstanceName string) SapVirtualInstanceId { + return SapVirtualInstanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + SapVirtualInstanceName: sapVirtualInstanceName, + } +} + +// ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId +func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SapVirtualInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId +// note: this method should only be used for API response data and not user input +func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error) { + parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SapVirtualInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SapVirtualInstanceId) 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.SapVirtualInstanceName, ok = input.Parsed["sapVirtualInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sapVirtualInstanceName", input) + } + + return nil +} + +// ValidateSapVirtualInstanceID checks that 'input' can be parsed as a Sap Virtual Instance ID +func ValidateSapVirtualInstanceID(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 := ParseSapVirtualInstanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Sap Virtual Instance ID +func (id SapVirtualInstanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Workloads/sapVirtualInstances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SapVirtualInstanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Sap Virtual Instance ID +func (id SapVirtualInstanceId) 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("staticMicrosoftWorkloads", "Microsoft.Workloads", "Microsoft.Workloads"), + resourceids.StaticSegment("staticSapVirtualInstances", "sapVirtualInstances", "sapVirtualInstances"), + resourceids.UserSpecifiedSegment("sapVirtualInstanceName", "sapVirtualInstanceValue"), + } +} + +// String returns a human-readable description of this Sap Virtual Instance ID +func (id SapVirtualInstanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Sap Virtual Instance Name: %q", id.SapVirtualInstanceName), + } + return fmt.Sprintf("Sap Virtual Instance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_create.go new file mode 100644 index 000000000000..4039bcf59782 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_create.go @@ -0,0 +1,74 @@ +package sapvirtualinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Create ... +func (c SAPVirtualInstancesClient) Create(ctx context.Context, id SapVirtualInstanceId, input SAPVirtualInstance) (result CreateOperationResponse, 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c SAPVirtualInstancesClient) CreateThenPoll(ctx context.Context, id SapVirtualInstanceId, input SAPVirtualInstance) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_delete.go new file mode 100644 index 000000000000..ec782ce29c75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_delete.go @@ -0,0 +1,71 @@ +package sapvirtualinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c SAPVirtualInstancesClient) Delete(ctx context.Context, id SapVirtualInstanceId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c SAPVirtualInstancesClient) DeleteThenPoll(ctx context.Context, id SapVirtualInstanceId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_get.go new file mode 100644 index 000000000000..c90fe459f8b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_get.go @@ -0,0 +1,51 @@ +package sapvirtualinstances + +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 *SAPVirtualInstance +} + +// Get ... +func (c SAPVirtualInstancesClient) Get(ctx context.Context, id SapVirtualInstanceId) (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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbyresourcegroup.go new file mode 100644 index 000000000000..6a8e8782f252 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbyresourcegroup.go @@ -0,0 +1,90 @@ +package sapvirtualinstances + +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 ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SAPVirtualInstance +} + +type ListByResourceGroupCompleteResult struct { + Items []SAPVirtualInstance +} + +// ListByResourceGroup ... +func (c SAPVirtualInstancesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.Workloads/sapVirtualInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SAPVirtualInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c SAPVirtualInstancesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SAPVirtualInstanceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SAPVirtualInstancesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SAPVirtualInstanceOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]SAPVirtualInstance, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbysubscription.go new file mode 100644 index 000000000000..81f56b78a4e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbysubscription.go @@ -0,0 +1,90 @@ +package sapvirtualinstances + +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 ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SAPVirtualInstance +} + +type ListBySubscriptionCompleteResult struct { + Items []SAPVirtualInstance +} + +// ListBySubscription ... +func (c SAPVirtualInstancesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.Workloads/sapVirtualInstances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SAPVirtualInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c SAPVirtualInstancesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, SAPVirtualInstanceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SAPVirtualInstancesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SAPVirtualInstanceOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]SAPVirtualInstance, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_start.go new file mode 100644 index 000000000000..9733643e406e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_start.go @@ -0,0 +1,70 @@ +package sapvirtualinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 StartOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Start ... +func (c SAPVirtualInstancesClient) Start(ctx context.Context, id SapVirtualInstanceId) (result StartOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/start", 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StartThenPoll performs Start then polls until it's completed +func (c SAPVirtualInstancesClient) StartThenPoll(ctx context.Context, id SapVirtualInstanceId) error { + result, err := c.Start(ctx, id) + if err != nil { + return fmt.Errorf("performing Start: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Start: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_stop.go new file mode 100644 index 000000000000..d991b685dfca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_stop.go @@ -0,0 +1,74 @@ +package sapvirtualinstances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "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 StopOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Stop ... +func (c SAPVirtualInstancesClient) Stop(ctx context.Context, id SapVirtualInstanceId, input StopRequest) (result StopOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/stop", 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StopThenPoll performs Stop then polls until it's completed +func (c SAPVirtualInstancesClient) StopThenPoll(ctx context.Context, id SapVirtualInstanceId, input StopRequest) error { + result, err := c.Stop(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Stop: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Stop: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_update.go new file mode 100644 index 000000000000..0668e6975590 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_update.go @@ -0,0 +1,55 @@ +package sapvirtualinstances + +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 UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SAPVirtualInstance +} + +// Update ... +func (c SAPVirtualInstancesClient) Update(ctx context.Context, id SapVirtualInstanceId, input UpdateSAPVirtualInstanceRequest) (result UpdateOperationResponse, 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 + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_applicationserverconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_applicationserverconfiguration.go new file mode 100644 index 000000000000..16e4d301f4c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_applicationserverconfiguration.go @@ -0,0 +1,10 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationServerConfiguration struct { + InstanceCount int64 `json:"instanceCount"` + SubnetId string `json:"subnetId"` + VirtualMachineConfiguration VirtualMachineConfiguration `json:"virtualMachineConfiguration"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_applicationserverfullresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_applicationserverfullresourcenames.go new file mode 100644 index 000000000000..2b99b68a4231 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_applicationserverfullresourcenames.go @@ -0,0 +1,9 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ApplicationServerFullResourceNames struct { + AvailabilitySetName *string `json:"availabilitySetName,omitempty"` + VirtualMachines *[]VirtualMachineResourceNames `json:"virtualMachines,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_centralserverconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_centralserverconfiguration.go new file mode 100644 index 000000000000..691fffbf2c71 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_centralserverconfiguration.go @@ -0,0 +1,10 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CentralServerConfiguration struct { + InstanceCount int64 `json:"instanceCount"` + SubnetId string `json:"subnetId"` + VirtualMachineConfiguration VirtualMachineConfiguration `json:"virtualMachineConfiguration"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_centralserverfullresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_centralserverfullresourcenames.go new file mode 100644 index 000000000000..c3a013c0f525 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_centralserverfullresourcenames.go @@ -0,0 +1,10 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CentralServerFullResourceNames struct { + AvailabilitySetName *string `json:"availabilitySetName,omitempty"` + LoadBalancer *LoadBalancerResourceNames `json:"loadBalancer,omitempty"` + VirtualMachines *[]VirtualMachineResourceNames `json:"virtualMachines,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_createandmountfileshareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_createandmountfileshareconfiguration.go new file mode 100644 index 000000000000..ea44f0fd7e31 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_createandmountfileshareconfiguration.go @@ -0,0 +1,42 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FileShareConfiguration = CreateAndMountFileShareConfiguration{} + +type CreateAndMountFileShareConfiguration struct { + ResourceGroup *string `json:"resourceGroup,omitempty"` + StorageAccountName *string `json:"storageAccountName,omitempty"` + + // Fields inherited from FileShareConfiguration +} + +var _ json.Marshaler = CreateAndMountFileShareConfiguration{} + +func (s CreateAndMountFileShareConfiguration) MarshalJSON() ([]byte, error) { + type wrapper CreateAndMountFileShareConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CreateAndMountFileShareConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CreateAndMountFileShareConfiguration: %+v", err) + } + decoded["configurationType"] = "CreateAndMount" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CreateAndMountFileShareConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_databaseconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_databaseconfiguration.go new file mode 100644 index 000000000000..3777d01e9b8f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_databaseconfiguration.go @@ -0,0 +1,12 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseConfiguration struct { + DatabaseType *SAPDatabaseType `json:"databaseType,omitempty"` + DiskConfiguration *DiskConfiguration `json:"diskConfiguration,omitempty"` + InstanceCount int64 `json:"instanceCount"` + SubnetId string `json:"subnetId"` + VirtualMachineConfiguration VirtualMachineConfiguration `json:"virtualMachineConfiguration"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_databaseserverfullresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_databaseserverfullresourcenames.go new file mode 100644 index 000000000000..ee192d2c0468 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_databaseserverfullresourcenames.go @@ -0,0 +1,10 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseServerFullResourceNames struct { + AvailabilitySetName *string `json:"availabilitySetName,omitempty"` + LoadBalancer *LoadBalancerResourceNames `json:"loadBalancer,omitempty"` + VirtualMachines *[]VirtualMachineResourceNames `json:"virtualMachines,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deployervmpackages.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deployervmpackages.go new file mode 100644 index 000000000000..bfcd632981ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deployervmpackages.go @@ -0,0 +1,9 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeployerVMPackages struct { + StorageAccountId *string `json:"storageAccountId,omitempty"` + Url *string `json:"url,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentconfiguration.go new file mode 100644 index 000000000000..d85caa83fa17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentconfiguration.go @@ -0,0 +1,77 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SAPConfiguration = DeploymentConfiguration{} + +type DeploymentConfiguration struct { + AppLocation *string `json:"appLocation,omitempty"` + InfrastructureConfiguration InfrastructureConfiguration `json:"infrastructureConfiguration"` + SoftwareConfiguration SoftwareConfiguration `json:"softwareConfiguration"` + + // Fields inherited from SAPConfiguration +} + +var _ json.Marshaler = DeploymentConfiguration{} + +func (s DeploymentConfiguration) MarshalJSON() ([]byte, error) { + type wrapper DeploymentConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeploymentConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeploymentConfiguration: %+v", err) + } + decoded["configurationType"] = "Deployment" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeploymentConfiguration: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &DeploymentConfiguration{} + +func (s *DeploymentConfiguration) UnmarshalJSON(bytes []byte) error { + type alias DeploymentConfiguration + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DeploymentConfiguration: %+v", err) + } + + s.AppLocation = decoded.AppLocation + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DeploymentConfiguration into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["infrastructureConfiguration"]; ok { + impl, err := unmarshalInfrastructureConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'InfrastructureConfiguration' for 'DeploymentConfiguration': %+v", err) + } + s.InfrastructureConfiguration = impl + } + + if v, ok := temp["softwareConfiguration"]; ok { + impl, err := unmarshalSoftwareConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SoftwareConfiguration' for 'DeploymentConfiguration': %+v", err) + } + s.SoftwareConfiguration = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentwithosconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentwithosconfiguration.go new file mode 100644 index 000000000000..883594a67615 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentwithosconfiguration.go @@ -0,0 +1,79 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SAPConfiguration = DeploymentWithOSConfiguration{} + +type DeploymentWithOSConfiguration struct { + AppLocation *string `json:"appLocation,omitempty"` + InfrastructureConfiguration InfrastructureConfiguration `json:"infrastructureConfiguration"` + OsSapConfiguration *OsSapConfiguration `json:"osSapConfiguration,omitempty"` + SoftwareConfiguration SoftwareConfiguration `json:"softwareConfiguration"` + + // Fields inherited from SAPConfiguration +} + +var _ json.Marshaler = DeploymentWithOSConfiguration{} + +func (s DeploymentWithOSConfiguration) MarshalJSON() ([]byte, error) { + type wrapper DeploymentWithOSConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeploymentWithOSConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeploymentWithOSConfiguration: %+v", err) + } + decoded["configurationType"] = "DeploymentWithOSConfig" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeploymentWithOSConfiguration: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &DeploymentWithOSConfiguration{} + +func (s *DeploymentWithOSConfiguration) UnmarshalJSON(bytes []byte) error { + type alias DeploymentWithOSConfiguration + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DeploymentWithOSConfiguration: %+v", err) + } + + s.AppLocation = decoded.AppLocation + s.OsSapConfiguration = decoded.OsSapConfiguration + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DeploymentWithOSConfiguration into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["infrastructureConfiguration"]; ok { + impl, err := unmarshalInfrastructureConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'InfrastructureConfiguration' for 'DeploymentWithOSConfiguration': %+v", err) + } + s.InfrastructureConfiguration = impl + } + + if v, ok := temp["softwareConfiguration"]; ok { + impl, err := unmarshalSoftwareConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SoftwareConfiguration' for 'DeploymentWithOSConfiguration': %+v", err) + } + s.SoftwareConfiguration = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_discoveryconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_discoveryconfiguration.go new file mode 100644 index 000000000000..a6c63c24ee4d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_discoveryconfiguration.go @@ -0,0 +1,43 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SAPConfiguration = DiscoveryConfiguration{} + +type DiscoveryConfiguration struct { + AppLocation *string `json:"appLocation,omitempty"` + CentralServerVMId *string `json:"centralServerVmId,omitempty"` + ManagedRgStorageAccountName *string `json:"managedRgStorageAccountName,omitempty"` + + // Fields inherited from SAPConfiguration +} + +var _ json.Marshaler = DiscoveryConfiguration{} + +func (s DiscoveryConfiguration) MarshalJSON() ([]byte, error) { + type wrapper DiscoveryConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DiscoveryConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DiscoveryConfiguration: %+v", err) + } + decoded["configurationType"] = "Discovery" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DiscoveryConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_diskconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_diskconfiguration.go new file mode 100644 index 000000000000..b9fada01e2ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_diskconfiguration.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskConfiguration struct { + DiskVolumeConfigurations *map[string]DiskVolumeConfiguration `json:"diskVolumeConfigurations,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_disksku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_disksku.go new file mode 100644 index 000000000000..4ad14b3416e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_disksku.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskSku struct { + Name *DiskSkuName `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_diskvolumeconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_diskvolumeconfiguration.go new file mode 100644 index 000000000000..ddc92a369c70 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_diskvolumeconfiguration.go @@ -0,0 +1,10 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiskVolumeConfiguration struct { + Count *int64 `json:"count,omitempty"` + SizeGB *int64 `json:"sizeGB,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_erroradditionalinfo.go new file mode 100644 index 000000000000..18c075c9e04f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_errordefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_errordefinition.go new file mode 100644 index 000000000000..becaed0cda35 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_errordefinition.go @@ -0,0 +1,10 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDefinition struct { + Code *string `json:"code,omitempty"` + Details *[]ErrorDefinition `json:"details,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_errordetail.go new file mode 100644 index 000000000000..23a41b56090f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_errordetail.go @@ -0,0 +1,12 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_externalinstallationsoftwareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_externalinstallationsoftwareconfiguration.go new file mode 100644 index 000000000000..6805c0db671c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_externalinstallationsoftwareconfiguration.go @@ -0,0 +1,41 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SoftwareConfiguration = ExternalInstallationSoftwareConfiguration{} + +type ExternalInstallationSoftwareConfiguration struct { + CentralServerVMId *string `json:"centralServerVmId,omitempty"` + + // Fields inherited from SoftwareConfiguration +} + +var _ json.Marshaler = ExternalInstallationSoftwareConfiguration{} + +func (s ExternalInstallationSoftwareConfiguration) MarshalJSON() ([]byte, error) { + type wrapper ExternalInstallationSoftwareConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ExternalInstallationSoftwareConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ExternalInstallationSoftwareConfiguration: %+v", err) + } + decoded["softwareInstallationType"] = "External" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ExternalInstallationSoftwareConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_fileshareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_fileshareconfiguration.go new file mode 100644 index 000000000000..115d03e06dd8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_fileshareconfiguration.go @@ -0,0 +1,69 @@ +package sapvirtualinstances + +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 FileShareConfiguration interface { +} + +// RawFileShareConfigurationImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawFileShareConfigurationImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalFileShareConfigurationImplementation(input []byte) (FileShareConfiguration, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling FileShareConfiguration into map[string]interface: %+v", err) + } + + value, ok := temp["configurationType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "CreateAndMount") { + var out CreateAndMountFileShareConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CreateAndMountFileShareConfiguration: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Mount") { + var out MountFileShareConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MountFileShareConfiguration: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Skip") { + var out SkipFileShareConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SkipFileShareConfiguration: %+v", err) + } + return out, nil + } + + out := RawFileShareConfigurationImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_highavailabilityconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_highavailabilityconfiguration.go new file mode 100644 index 000000000000..d9ce01fc8b18 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_highavailabilityconfiguration.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HighAvailabilityConfiguration struct { + HighAvailabilityType SAPHighAvailabilityType `json:"highAvailabilityType"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_highavailabilitysoftwareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_highavailabilitysoftwareconfiguration.go new file mode 100644 index 000000000000..8d8583b37b30 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_highavailabilitysoftwareconfiguration.go @@ -0,0 +1,9 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HighAvailabilitySoftwareConfiguration struct { + FencingClientId string `json:"fencingClientId"` + FencingClientPassword string `json:"fencingClientPassword"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_imagereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_imagereference.go new file mode 100644 index 000000000000..3266369f6198 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_imagereference.go @@ -0,0 +1,11 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImageReference struct { + Offer *string `json:"offer,omitempty"` + Publisher *string `json:"publisher,omitempty"` + Sku *string `json:"sku,omitempty"` + Version *string `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_infrastructureconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_infrastructureconfiguration.go new file mode 100644 index 000000000000..a0f9a0fee748 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_infrastructureconfiguration.go @@ -0,0 +1,61 @@ +package sapvirtualinstances + +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 InfrastructureConfiguration interface { +} + +// RawInfrastructureConfigurationImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawInfrastructureConfigurationImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalInfrastructureConfigurationImplementation(input []byte) (InfrastructureConfiguration, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling InfrastructureConfiguration into map[string]interface: %+v", err) + } + + value, ok := temp["deploymentType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "SingleServer") { + var out SingleServerConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SingleServerConfiguration: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ThreeTier") { + var out ThreeTierConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ThreeTierConfiguration: %+v", err) + } + return out, nil + } + + out := RawInfrastructureConfigurationImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_linuxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_linuxconfiguration.go new file mode 100644 index 000000000000..c41104d4a160 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_linuxconfiguration.go @@ -0,0 +1,43 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OSConfiguration = LinuxConfiguration{} + +type LinuxConfiguration struct { + DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` + Ssh *SshConfiguration `json:"ssh,omitempty"` + SshKeyPair *SshKeyPair `json:"sshKeyPair,omitempty"` + + // Fields inherited from OSConfiguration +} + +var _ json.Marshaler = LinuxConfiguration{} + +func (s LinuxConfiguration) MarshalJSON() ([]byte, error) { + type wrapper LinuxConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LinuxConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LinuxConfiguration: %+v", err) + } + decoded["osType"] = "Linux" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LinuxConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_loadbalancerresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_loadbalancerresourcenames.go new file mode 100644 index 000000000000..7789f0e83515 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_loadbalancerresourcenames.go @@ -0,0 +1,11 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadBalancerResourceNames struct { + BackendPoolNames *[]string `json:"backendPoolNames,omitempty"` + FrontendIPConfigurationNames *[]string `json:"frontendIpConfigurationNames,omitempty"` + HealthProbeNames *[]string `json:"healthProbeNames,omitempty"` + LoadBalancerName *string `json:"loadBalancerName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_managedrgconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_managedrgconfiguration.go new file mode 100644 index 000000000000..8d7002377ffc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_managedrgconfiguration.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRGConfiguration struct { + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_mountfileshareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_mountfileshareconfiguration.go new file mode 100644 index 000000000000..c47dae32d2c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_mountfileshareconfiguration.go @@ -0,0 +1,42 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FileShareConfiguration = MountFileShareConfiguration{} + +type MountFileShareConfiguration struct { + Id string `json:"id"` + PrivateEndpointId string `json:"privateEndpointId"` + + // Fields inherited from FileShareConfiguration +} + +var _ json.Marshaler = MountFileShareConfiguration{} + +func (s MountFileShareConfiguration) MarshalJSON() ([]byte, error) { + type wrapper MountFileShareConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MountFileShareConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MountFileShareConfiguration: %+v", err) + } + decoded["configurationType"] = "Mount" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MountFileShareConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_networkconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_networkconfiguration.go new file mode 100644 index 000000000000..3805e428087a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_networkconfiguration.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkConfiguration struct { + IsSecondaryIPEnabled *bool `json:"isSecondaryIpEnabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_networkinterfaceresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_networkinterfaceresourcenames.go new file mode 100644 index 000000000000..0116cdb0dc28 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_networkinterfaceresourcenames.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceResourceNames struct { + NetworkInterfaceName *string `json:"networkInterfaceName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_operationstatusresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_operationstatusresult.go new file mode 100644 index 000000000000..7e330b6d9cdc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_operationstatusresult.go @@ -0,0 +1,45 @@ +package sapvirtualinstances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OperationStatusResult struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` +} + +func (o *OperationStatusResult) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *OperationStatusResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osconfiguration.go new file mode 100644 index 000000000000..ac3111e872f6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osconfiguration.go @@ -0,0 +1,61 @@ +package sapvirtualinstances + +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 OSConfiguration interface { +} + +// RawOSConfigurationImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawOSConfigurationImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalOSConfigurationImplementation(input []byte) (OSConfiguration, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling OSConfiguration into map[string]interface: %+v", err) + } + + value, ok := temp["osType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Linux") { + var out LinuxConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LinuxConfiguration: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Windows") { + var out WindowsConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WindowsConfiguration: %+v", err) + } + return out, nil + } + + out := RawOSConfigurationImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osprofile.go new file mode 100644 index 000000000000..faf6dbd93032 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osprofile.go @@ -0,0 +1,42 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OSProfile struct { + AdminPassword *string `json:"adminPassword,omitempty"` + AdminUsername *string `json:"adminUsername,omitempty"` + OsConfiguration OSConfiguration `json:"osConfiguration"` +} + +var _ json.Unmarshaler = &OSProfile{} + +func (s *OSProfile) UnmarshalJSON(bytes []byte) error { + type alias OSProfile + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into OSProfile: %+v", err) + } + + s.AdminPassword = decoded.AdminPassword + s.AdminUsername = decoded.AdminUsername + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OSProfile into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["osConfiguration"]; ok { + impl, err := unmarshalOSConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'OsConfiguration' for 'OSProfile': %+v", err) + } + s.OsConfiguration = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_ossapconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_ossapconfiguration.go new file mode 100644 index 000000000000..d5a1d18b2852 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_ossapconfiguration.go @@ -0,0 +1,9 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OsSapConfiguration struct { + DeployerVMPackages *DeployerVMPackages `json:"deployerVmPackages,omitempty"` + SapFqdn *string `json:"sapFqdn,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapconfiguration.go new file mode 100644 index 000000000000..5cbf8ec6874e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapconfiguration.go @@ -0,0 +1,69 @@ +package sapvirtualinstances + +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 SAPConfiguration interface { +} + +// RawSAPConfigurationImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSAPConfigurationImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSAPConfigurationImplementation(input []byte) (SAPConfiguration, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SAPConfiguration into map[string]interface: %+v", err) + } + + value, ok := temp["configurationType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Deployment") { + var out DeploymentConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeploymentConfiguration: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeploymentWithOSConfig") { + var out DeploymentWithOSConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeploymentWithOSConfiguration: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Discovery") { + var out DiscoveryConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DiscoveryConfiguration: %+v", err) + } + return out, nil + } + + out := RawSAPConfigurationImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapinstallwithoutosconfigsoftwareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapinstallwithoutosconfigsoftwareconfiguration.go new file mode 100644 index 000000000000..ba8a4310c7cd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapinstallwithoutosconfigsoftwareconfiguration.go @@ -0,0 +1,44 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SoftwareConfiguration = SAPInstallWithoutOSConfigSoftwareConfiguration{} + +type SAPInstallWithoutOSConfigSoftwareConfiguration struct { + BomUrl string `json:"bomUrl"` + HighAvailabilitySoftwareConfiguration *HighAvailabilitySoftwareConfiguration `json:"highAvailabilitySoftwareConfiguration,omitempty"` + SapBitsStorageAccountId string `json:"sapBitsStorageAccountId"` + SoftwareVersion string `json:"softwareVersion"` + + // Fields inherited from SoftwareConfiguration +} + +var _ json.Marshaler = SAPInstallWithoutOSConfigSoftwareConfiguration{} + +func (s SAPInstallWithoutOSConfigSoftwareConfiguration) MarshalJSON() ([]byte, error) { + type wrapper SAPInstallWithoutOSConfigSoftwareConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SAPInstallWithoutOSConfigSoftwareConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SAPInstallWithoutOSConfigSoftwareConfiguration: %+v", err) + } + decoded["softwareInstallationType"] = "SAPInstallWithoutOSConfig" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SAPInstallWithoutOSConfigSoftwareConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstance.go new file mode 100644 index 000000000000..608227eecd4b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstance.go @@ -0,0 +1,20 @@ +package sapvirtualinstances + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "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 SAPVirtualInstance struct { + Id *string `json:"id,omitempty"` + Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties SAPVirtualInstanceProperties `json:"properties"` + 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/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceerror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceerror.go new file mode 100644 index 000000000000..b473f684fcca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceerror.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPVirtualInstanceError struct { + Properties *ErrorDefinition `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceproperties.go new file mode 100644 index 000000000000..9df9160efa47 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceproperties.go @@ -0,0 +1,54 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPVirtualInstanceProperties struct { + Configuration SAPConfiguration `json:"configuration"` + Environment SAPEnvironmentType `json:"environment"` + Errors *SAPVirtualInstanceError `json:"errors,omitempty"` + Health *SAPHealthState `json:"health,omitempty"` + ManagedResourceGroupConfiguration *ManagedRGConfiguration `json:"managedResourceGroupConfiguration,omitempty"` + ProvisioningState *SapVirtualInstanceProvisioningState `json:"provisioningState,omitempty"` + SapProduct SAPProductType `json:"sapProduct"` + State *SAPVirtualInstanceState `json:"state,omitempty"` + Status *SAPVirtualInstanceStatus `json:"status,omitempty"` +} + +var _ json.Unmarshaler = &SAPVirtualInstanceProperties{} + +func (s *SAPVirtualInstanceProperties) UnmarshalJSON(bytes []byte) error { + type alias SAPVirtualInstanceProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SAPVirtualInstanceProperties: %+v", err) + } + + s.Environment = decoded.Environment + s.Errors = decoded.Errors + s.Health = decoded.Health + s.ManagedResourceGroupConfiguration = decoded.ManagedResourceGroupConfiguration + s.ProvisioningState = decoded.ProvisioningState + s.SapProduct = decoded.SapProduct + s.State = decoded.State + s.Status = decoded.Status + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SAPVirtualInstanceProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["configuration"]; ok { + impl, err := unmarshalSAPConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Configuration' for 'SAPVirtualInstanceProperties': %+v", err) + } + s.Configuration = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_serviceinitiatedsoftwareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_serviceinitiatedsoftwareconfiguration.go new file mode 100644 index 000000000000..55d76f5ab59f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_serviceinitiatedsoftwareconfiguration.go @@ -0,0 +1,46 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SoftwareConfiguration = ServiceInitiatedSoftwareConfiguration{} + +type ServiceInitiatedSoftwareConfiguration struct { + BomUrl string `json:"bomUrl"` + HighAvailabilitySoftwareConfiguration *HighAvailabilitySoftwareConfiguration `json:"highAvailabilitySoftwareConfiguration,omitempty"` + SapBitsStorageAccountId string `json:"sapBitsStorageAccountId"` + SapFqdn string `json:"sapFqdn"` + SoftwareVersion string `json:"softwareVersion"` + SshPrivateKey string `json:"sshPrivateKey"` + + // Fields inherited from SoftwareConfiguration +} + +var _ json.Marshaler = ServiceInitiatedSoftwareConfiguration{} + +func (s ServiceInitiatedSoftwareConfiguration) MarshalJSON() ([]byte, error) { + type wrapper ServiceInitiatedSoftwareConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceInitiatedSoftwareConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceInitiatedSoftwareConfiguration: %+v", err) + } + decoded["softwareInstallationType"] = "ServiceInitiated" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceInitiatedSoftwareConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sharedstorageresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sharedstorageresourcenames.go new file mode 100644 index 000000000000..0a5c9dd1dda1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sharedstorageresourcenames.go @@ -0,0 +1,9 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SharedStorageResourceNames struct { + SharedStorageAccountName *string `json:"sharedStorageAccountName,omitempty"` + SharedStorageAccountPrivateEndPointName *string `json:"sharedStorageAccountPrivateEndPointName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverconfiguration.go new file mode 100644 index 000000000000..441b04b16288 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverconfiguration.go @@ -0,0 +1,78 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ InfrastructureConfiguration = SingleServerConfiguration{} + +type SingleServerConfiguration struct { + CustomResourceNames SingleServerCustomResourceNames `json:"customResourceNames"` + DatabaseType *SAPDatabaseType `json:"databaseType,omitempty"` + DbDiskConfiguration *DiskConfiguration `json:"dbDiskConfiguration,omitempty"` + NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"` + SubnetId string `json:"subnetId"` + VirtualMachineConfiguration VirtualMachineConfiguration `json:"virtualMachineConfiguration"` + + // Fields inherited from InfrastructureConfiguration + AppResourceGroup string `json:"appResourceGroup"` +} + +var _ json.Marshaler = SingleServerConfiguration{} + +func (s SingleServerConfiguration) MarshalJSON() ([]byte, error) { + type wrapper SingleServerConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SingleServerConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SingleServerConfiguration: %+v", err) + } + decoded["deploymentType"] = "SingleServer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SingleServerConfiguration: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &SingleServerConfiguration{} + +func (s *SingleServerConfiguration) UnmarshalJSON(bytes []byte) error { + type alias SingleServerConfiguration + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SingleServerConfiguration: %+v", err) + } + + s.AppResourceGroup = decoded.AppResourceGroup + s.DatabaseType = decoded.DatabaseType + s.DbDiskConfiguration = decoded.DbDiskConfiguration + s.NetworkConfiguration = decoded.NetworkConfiguration + s.SubnetId = decoded.SubnetId + s.VirtualMachineConfiguration = decoded.VirtualMachineConfiguration + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SingleServerConfiguration into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["customResourceNames"]; ok { + impl, err := unmarshalSingleServerCustomResourceNamesImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'CustomResourceNames' for 'SingleServerConfiguration': %+v", err) + } + s.CustomResourceNames = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleservercustomresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleservercustomresourcenames.go new file mode 100644 index 000000000000..9b7b0814fe3a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleservercustomresourcenames.go @@ -0,0 +1,53 @@ +package sapvirtualinstances + +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 SingleServerCustomResourceNames interface { +} + +// RawSingleServerCustomResourceNamesImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSingleServerCustomResourceNamesImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSingleServerCustomResourceNamesImplementation(input []byte) (SingleServerCustomResourceNames, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SingleServerCustomResourceNames into map[string]interface: %+v", err) + } + + value, ok := temp["namingPatternType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "FullResourceName") { + var out SingleServerFullResourceNames + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SingleServerFullResourceNames: %+v", err) + } + return out, nil + } + + out := RawSingleServerCustomResourceNamesImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverfullresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverfullresourcenames.go new file mode 100644 index 000000000000..72c2cfdf3e6b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverfullresourcenames.go @@ -0,0 +1,41 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SingleServerCustomResourceNames = SingleServerFullResourceNames{} + +type SingleServerFullResourceNames struct { + VirtualMachine *VirtualMachineResourceNames `json:"virtualMachine,omitempty"` + + // Fields inherited from SingleServerCustomResourceNames +} + +var _ json.Marshaler = SingleServerFullResourceNames{} + +func (s SingleServerFullResourceNames) MarshalJSON() ([]byte, error) { + type wrapper SingleServerFullResourceNames + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SingleServerFullResourceNames: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SingleServerFullResourceNames: %+v", err) + } + decoded["namingPatternType"] = "FullResourceName" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SingleServerFullResourceNames: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_skipfileshareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_skipfileshareconfiguration.go new file mode 100644 index 000000000000..764e4ad74716 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_skipfileshareconfiguration.go @@ -0,0 +1,40 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FileShareConfiguration = SkipFileShareConfiguration{} + +type SkipFileShareConfiguration struct { + + // Fields inherited from FileShareConfiguration +} + +var _ json.Marshaler = SkipFileShareConfiguration{} + +func (s SkipFileShareConfiguration) MarshalJSON() ([]byte, error) { + type wrapper SkipFileShareConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SkipFileShareConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SkipFileShareConfiguration: %+v", err) + } + decoded["configurationType"] = "Skip" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SkipFileShareConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_softwareconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_softwareconfiguration.go new file mode 100644 index 000000000000..50f3ddb99cb7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_softwareconfiguration.go @@ -0,0 +1,69 @@ +package sapvirtualinstances + +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 SoftwareConfiguration interface { +} + +// RawSoftwareConfigurationImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSoftwareConfigurationImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSoftwareConfigurationImplementation(input []byte) (SoftwareConfiguration, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SoftwareConfiguration into map[string]interface: %+v", err) + } + + value, ok := temp["softwareInstallationType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "External") { + var out ExternalInstallationSoftwareConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ExternalInstallationSoftwareConfiguration: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SAPInstallWithoutOSConfig") { + var out SAPInstallWithoutOSConfigSoftwareConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SAPInstallWithoutOSConfigSoftwareConfiguration: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServiceInitiated") { + var out ServiceInitiatedSoftwareConfiguration + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceInitiatedSoftwareConfiguration: %+v", err) + } + return out, nil + } + + out := RawSoftwareConfigurationImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshconfiguration.go new file mode 100644 index 000000000000..8aa35391df67 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshconfiguration.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SshConfiguration struct { + PublicKeys *[]SshPublicKey `json:"publicKeys,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshkeypair.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshkeypair.go new file mode 100644 index 000000000000..c8c9f86c5358 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshkeypair.go @@ -0,0 +1,9 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SshKeyPair struct { + PrivateKey *string `json:"privateKey,omitempty"` + PublicKey *string `json:"publicKey,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshpublickey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshpublickey.go new file mode 100644 index 000000000000..4bd500694318 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sshpublickey.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SshPublicKey struct { + KeyData *string `json:"keyData,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_stoprequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_stoprequest.go new file mode 100644 index 000000000000..372c6b2f2af5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_stoprequest.go @@ -0,0 +1,8 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopRequest struct { + SoftStopTimeoutSeconds *int64 `json:"softStopTimeoutSeconds,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_storageconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_storageconfiguration.go new file mode 100644 index 000000000000..2c688a25d7af --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_storageconfiguration.go @@ -0,0 +1,32 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageConfiguration struct { + TransportFileShareConfiguration FileShareConfiguration `json:"transportFileShareConfiguration"` +} + +var _ json.Unmarshaler = &StorageConfiguration{} + +func (s *StorageConfiguration) UnmarshalJSON(bytes []byte) error { + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling StorageConfiguration into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["transportFileShareConfiguration"]; ok { + impl, err := unmarshalFileShareConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'TransportFileShareConfiguration' for 'StorageConfiguration': %+v", err) + } + s.TransportFileShareConfiguration = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierconfiguration.go new file mode 100644 index 000000000000..6ae4e32a5c0b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierconfiguration.go @@ -0,0 +1,80 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ InfrastructureConfiguration = ThreeTierConfiguration{} + +type ThreeTierConfiguration struct { + ApplicationServer ApplicationServerConfiguration `json:"applicationServer"` + CentralServer CentralServerConfiguration `json:"centralServer"` + CustomResourceNames ThreeTierCustomResourceNames `json:"customResourceNames"` + DatabaseServer DatabaseConfiguration `json:"databaseServer"` + HighAvailabilityConfig *HighAvailabilityConfiguration `json:"highAvailabilityConfig,omitempty"` + NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"` + StorageConfiguration *StorageConfiguration `json:"storageConfiguration,omitempty"` + + // Fields inherited from InfrastructureConfiguration + AppResourceGroup string `json:"appResourceGroup"` +} + +var _ json.Marshaler = ThreeTierConfiguration{} + +func (s ThreeTierConfiguration) MarshalJSON() ([]byte, error) { + type wrapper ThreeTierConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ThreeTierConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ThreeTierConfiguration: %+v", err) + } + decoded["deploymentType"] = "ThreeTier" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ThreeTierConfiguration: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &ThreeTierConfiguration{} + +func (s *ThreeTierConfiguration) UnmarshalJSON(bytes []byte) error { + type alias ThreeTierConfiguration + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ThreeTierConfiguration: %+v", err) + } + + s.AppResourceGroup = decoded.AppResourceGroup + s.ApplicationServer = decoded.ApplicationServer + s.CentralServer = decoded.CentralServer + s.DatabaseServer = decoded.DatabaseServer + s.HighAvailabilityConfig = decoded.HighAvailabilityConfig + s.NetworkConfiguration = decoded.NetworkConfiguration + s.StorageConfiguration = decoded.StorageConfiguration + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ThreeTierConfiguration into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["customResourceNames"]; ok { + impl, err := unmarshalThreeTierCustomResourceNamesImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'CustomResourceNames' for 'ThreeTierConfiguration': %+v", err) + } + s.CustomResourceNames = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetiercustomresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetiercustomresourcenames.go new file mode 100644 index 000000000000..55eebe79ef5d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetiercustomresourcenames.go @@ -0,0 +1,53 @@ +package sapvirtualinstances + +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 ThreeTierCustomResourceNames interface { +} + +// RawThreeTierCustomResourceNamesImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawThreeTierCustomResourceNamesImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalThreeTierCustomResourceNamesImplementation(input []byte) (ThreeTierCustomResourceNames, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling ThreeTierCustomResourceNames into map[string]interface: %+v", err) + } + + value, ok := temp["namingPatternType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "FullResourceName") { + var out ThreeTierFullResourceNames + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ThreeTierFullResourceNames: %+v", err) + } + return out, nil + } + + out := RawThreeTierCustomResourceNamesImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierfullresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierfullresourcenames.go new file mode 100644 index 000000000000..2d5be5fede64 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierfullresourcenames.go @@ -0,0 +1,44 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ThreeTierCustomResourceNames = ThreeTierFullResourceNames{} + +type ThreeTierFullResourceNames struct { + ApplicationServer *ApplicationServerFullResourceNames `json:"applicationServer,omitempty"` + CentralServer *CentralServerFullResourceNames `json:"centralServer,omitempty"` + DatabaseServer *DatabaseServerFullResourceNames `json:"databaseServer,omitempty"` + SharedStorage *SharedStorageResourceNames `json:"sharedStorage,omitempty"` + + // Fields inherited from ThreeTierCustomResourceNames +} + +var _ json.Marshaler = ThreeTierFullResourceNames{} + +func (s ThreeTierFullResourceNames) MarshalJSON() ([]byte, error) { + type wrapper ThreeTierFullResourceNames + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ThreeTierFullResourceNames: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ThreeTierFullResourceNames: %+v", err) + } + decoded["namingPatternType"] = "FullResourceName" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ThreeTierFullResourceNames: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_updatesapvirtualinstancerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_updatesapvirtualinstancerequest.go new file mode 100644 index 000000000000..bb73eb29185a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_updatesapvirtualinstancerequest.go @@ -0,0 +1,13 @@ +package sapvirtualinstances + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateSAPVirtualInstanceRequest struct { + Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_virtualmachineconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_virtualmachineconfiguration.go new file mode 100644 index 000000000000..ec4bdf513ab4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_virtualmachineconfiguration.go @@ -0,0 +1,10 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineConfiguration struct { + ImageReference ImageReference `json:"imageReference"` + OsProfile OSProfile `json:"osProfile"` + VMSize string `json:"vmSize"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_virtualmachineresourcenames.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_virtualmachineresourcenames.go new file mode 100644 index 000000000000..a9767d0a758c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_virtualmachineresourcenames.go @@ -0,0 +1,12 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineResourceNames struct { + DataDiskNames *map[string][]string `json:"dataDiskNames,omitempty"` + HostName *string `json:"hostName,omitempty"` + NetworkInterfaces *[]NetworkInterfaceResourceNames `json:"networkInterfaces,omitempty"` + OsDiskName *string `json:"osDiskName,omitempty"` + VirtualMachineName *string `json:"vmName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_windowsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_windowsconfiguration.go new file mode 100644 index 000000000000..138faef716a8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_windowsconfiguration.go @@ -0,0 +1,40 @@ +package sapvirtualinstances + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OSConfiguration = WindowsConfiguration{} + +type WindowsConfiguration struct { + + // Fields inherited from OSConfiguration +} + +var _ json.Marshaler = WindowsConfiguration{} + +func (s WindowsConfiguration) MarshalJSON() ([]byte, error) { + type wrapper WindowsConfiguration + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WindowsConfiguration: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WindowsConfiguration: %+v", err) + } + decoded["osType"] = "Windows" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WindowsConfiguration: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/predicates.go new file mode 100644 index 000000000000..7b18cd9294a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/predicates.go @@ -0,0 +1,32 @@ +package sapvirtualinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SAPVirtualInstanceOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p SAPVirtualInstanceOperationPredicate) Matches(input SAPVirtualInstance) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/version.go new file mode 100644 index 000000000000..7da86029fc41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/version.go @@ -0,0 +1,12 @@ +package sapvirtualinstances + +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/sapvirtualinstances/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index d3f8d7d27c08..a097789b9f0c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -659,6 +659,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroup github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication +github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01 github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules @@ -993,6 +994,18 @@ github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01 github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01 +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku +github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances github.com/hashicorp/go-azure-sdk/sdk/auth github.com/hashicorp/go-azure-sdk/sdk/auth/autorest github.com/hashicorp/go-azure-sdk/sdk/claims diff --git a/website/allowed-subcategories b/website/allowed-subcategories index 029eab4c9698..bd94d0866e11 100644 --- a/website/allowed-subcategories +++ b/website/allowed-subcategories @@ -107,4 +107,5 @@ Time Series Insights VMware (AVS) Video Analyzer Voice Services -Web PubSub \ No newline at end of file +Web PubSub +Workloads \ No newline at end of file diff --git a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown new file mode 100644 index 000000000000..df16e5ac9d9e --- /dev/null +++ b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown @@ -0,0 +1,565 @@ +--- +subcategory: "Workloads" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_workloads_sap_three_tier_virtual_instance" +description: |- + Manages a SAP Three Tier Virtual Instance with new SAP System. +--- + +# azurerm_workloads_sap_three_tier_virtual_instance + +Manages a SAP Three Tier Virtual Instance with new SAP System. + +-> **Note:** Before using this resource, it's required to submit the request of registering the Resource Provider with Azure CLI `az provider register --namespace "Microsoft.Workloads"`. The Resource Provider can take a while to register, you can check the status by running `az provider show --namespace "Microsoft.Workloads" --query "registrationState"`. Once this outputs "Registered" the Resource Provider is available for use. + +## Example Usage + +```hcl +resource "tls_private_key" "example" { + algorithm = "RSA" + rsa_bits = 4096 +} + +data "tls_public_key" "example" { + private_key_pem = tls_private_key.example.private_key_pem +} + +data "azurerm_subscription" "current" {} + +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_user_assigned_identity" "example" { + name = "example-uai" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_role_assignment" "example" { + scope = data.azurerm_subscription.current.id + role_definition_name = "Azure Center for SAP solutions service role" + principal_id = azurerm_user_assigned_identity.example.principal_id +} + +resource "azurerm_virtual_network" "example" { + name = "example-vnet" + address_space = ["10.0.0.0/16"] + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_subnet" "example" { + name = "example-subnet" + resource_group_name = azurerm_resource_group.example.name + virtual_network_name = azurerm_virtual_network.example.name + address_prefixes = ["10.0.2.0/24"] +} + +resource "azurerm_resource_group" "app" { + name = "example-sapapp" + location = "West Europe" + + depends_on = [ + azurerm_subnet.example + ] +} + +resource "azurerm_storage_account" "example" { + name = "examplesa" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_tier = "Standard" + account_replication_type = "LRS" +} + +resource "azurerm_workloads_sap_three_tier_virtual_instance" "example" { + name = "X05" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + environment = "NonProd" + sap_product = "S4HANA" + managed_resource_group_name = "exampleManagedRG" + + app_location = azurerm_resource_group.app.location + + os_sap_configuration { + sap_fqdn = "sap.bpaas.com" + + deployer_virtual_machine_packages { + storage_account_id = azurerm_storage_account.example.id + url = "https://www.bing.com" + } + } + + three_tier_configuration { + app_resource_group_name = azurerm_resource_group.app.name + secondary_ip_enabled = true + + application_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.example.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.example.private_key_pem + ssh_public_key = data.tls_public_key.example.public_key_openssh + } + } + } + + central_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.example.id + + virtual_machine_configuration { + virtual_machine_size = "Standard_D16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.example.private_key_pem + ssh_public_key = data.tls_public_key.example.public_key_openssh + } + } + } + + database_server_configuration { + instance_count = 1 + subnet_id = azurerm_subnet.example.id + database_type = "HANA" + + virtual_machine_configuration { + virtual_machine_size = "Standard_E16ds_v4" + + image { + offer = "RHEL-SAP-HA" + publisher = "RedHat" + sku = "82sapha-gen2" + version = "latest" + } + + os_profile { + admin_username = "testAdmin" + ssh_private_key = tls_private_key.example.private_key_pem + ssh_public_key = data.tls_public_key.example.public_key_openssh + } + } + + disk_volume_configuration { + volume_name = "hana/data" + number_of_disks = 3 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "hana/log" + number_of_disks = 3 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "hana/shared" + number_of_disks = 1 + size_in_gb = 256 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "usr/sap" + number_of_disks = 1 + size_in_gb = 128 + sku_name = "Premium_LRS" + } + + disk_volume_configuration { + volume_name = "backup" + number_of_disks = 2 + size_in_gb = 256 + sku_name = "StandardSSD_LRS" + } + + disk_volume_configuration { + volume_name = "os" + number_of_disks = 1 + size_in_gb = 64 + sku_name = "StandardSSD_LRS" + } + } + + full_resource_names { + application_server { + availability_set_name = "appAvSet" + + virtual_machine { + host_name = "apphostName0" + os_disk_name = "app0osdisk" + virtual_machine_name = "appvm0" + network_interface_names = ["appnic0"] + + data_disk_names = { + default = "app0disk0" + } + } + } + + central_server { + availability_set_name = "csAvSet" + + load_balancer { + name = "ascslb" + backend_pool_names = ["ascsBackendPool"] + frontend_ip_configuration_names = ["ascsip0"] + health_probe_names = ["ascsHealthProbe"] + } + + virtual_machine { + host_name = "ascshostName" + os_disk_name = "ascsosdisk" + virtual_machine_name = "ascsvm" + network_interface_names = ["ascsnic"] + + data_disk_names = { + default = "ascsdisk" + } + } + } + + database_server { + availability_set_name = "dbAvSet" + + load_balancer { + name = "dblb" + backend_pool_names = ["dbBackendPool"] + frontend_ip_configuration_names = ["dbip"] + health_probe_names = ["dbHealthProbe"] + } + + virtual_machine { + host_name = "dbprhost" + os_disk_name = "dbprosdisk" + virtual_machine_name = "dbvmpr" + network_interface_names = ["dbprnic"] + + data_disk_names = { + hanaData = "hanadatapr0,hanadatapr1" + hanaLog = "hanalogpr0,hanalogpr1,hanalogpr2" + usrSap = "usrsappr0" + hanaShared = "hanasharedpr0,hanasharedpr1" + } + } + } + + shared_storage { + account_name = "sharedexamplesa" + private_endpoint_name = "examplePE" + } + } + + transport_create_and_mount { + resource_group_id = azurerm_resource_group.app.id + storage_account_name = "exampletranssa" + } + } + + identity { + type = "UserAssigned" + + identity_ids = [ + azurerm_user_assigned_identity.example.id, + ] + } + + tags = { + Env = "Test" + } + + depends_on = [ + azurerm_role_assignment.example + ] +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `name` - (Required) The name which should be used for this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created. + +* `resource_group_name` - (Required) The name of the Resource Group where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created. + +* `location` - (Required) The Azure Region where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created. + +* `app_location` - (Required) The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created. + +* `environment` - (Required) The environment type for the SAP Three Tier Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created. + +* `os_sap_configuration` - (Required) An `os_sap_configuration` block as defined below. Changing this forces a new resource to be created. + +* `sap_product` - (Required) The SAP Product type for the SAP Three Tier Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created. + +* `three_tier_configuration` - (Required) A `three_tier_configuration` block as defined below. Changing this forces a new resource to be created. + +* `identity` - (Optional) An `identity` block as defined below. + +* `managed_resource_group_name` - (Optional) The name of the managed Resource Group for the SAP Three Tier Virtual Instance. Changing this forces a new resource to be created. + +* `tags` - (Optional) A mapping of tags which should be assigned to the SAP Three Tier Virtual Instance. + +--- + +An `os_sap_configuration` block supports the following: + +* `sap_fqdn` - (Required) The FQDN of the SAP system. Changing this forces a new resource to be created. + +* `deployer_virtual_machine_packages` - (Optional) A `deployer_virtual_machine_packages` block as defined below. Changing this forces a new resource to be created. + +--- + +A `deployer_virtual_machine_packages` block supports the following: + +* `storage_account_id` - (Required) The ID of the deployer VM packages storage account. Changing this forces a new resource to be created. + +* `url` - (Required) The URL of the deployer VM packages file. Changing this forces a new resource to be created. + +--- + +A `disk_volume_configuration` block supports the following: + +* `volume_name` - (Required) The name of the DB volume of the disk configuration. Possible values are `backup`, `hana/data`, `hana/log`, `hana/shared`, `os` and `usr/sap`. Changing this forces a new resource to be created. + +* `number_of_disks` - (Required) The total number of disks required for the concerned volume. Changing this forces a new resource to be created. + +* `size_in_gb` - (Required) The size of the Disk in GB. Changing this forces a new resource to be created. + +* `sku_name` - (Required) The name of the Disk SKU. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. Changing this forces a new resource to be created. + +--- + +A `virtual_machine_configuration` block supports the following: + +* `image` - (Required) An `image` block as defined below. Changing this forces a new resource to be created. + +* `os_profile` - (Required) An `os_profile` block as defined below. Changing this forces a new resource to be created. + +* `virtual_machine_size` - (Required) The size of the Virtual Machine. Changing this forces a new resource to be created. + +--- + +An `image` block supports the following: + +* `offer` - (Required) The offer of the platform image or marketplace image used to create the Virtual Machine. Changing this forces a new resource to be created. + +* `publisher` - (Required) The publisher of the Image. Possible values are `RedHat` and `SUSE`. Changing this forces a new resource to be created. + +* `sku` - (Required) The SKU of the Image. Changing this forces a new resource to be created. + +* `version` - (Required) The version of the platform image or marketplace image used to create the Virtual Machine. Changing this forces a new resource to be created. + +--- + +An `os_profile` block supports the following: + +* `admin_username` - (Required) The name of the administrator account. Changing this forces a new resource to be created. + +* `ssh_private_key` - (Required) The SSH public key that is used to authenticate with the VM. Changing this forces a new resource to be created. + +* `ssh_public_key` - (Required) The SSH private key that is used to authenticate with the VM. Changing this forces a new resource to be created. + +--- + +A `three_tier_configuration` block supports the following: + +* `app_resource_group_name` - (Required) The name of the application Resource Group where SAP system resources will be deployed. Changing this forces a new resource to be created. + +* `application_server_configuration` - (Required) An `application_server_configuration` block as defined below. Changing this forces a new resource to be created. + +* `central_server_configuration` - (Required) A `central_server_configuration` block as defined below. Changing this forces a new resource to be created. + +* `database_server_configuration` - (Required) A `database_server_configuration` block as defined below. Changing this forces a new resource to be created. + +* `full_resource_names` - (Optional) A `full_resource_names` block as defined below. Changing this forces a new resource to be created. + +* `high_availability_type` - (Optional) The high availability type for the three tier configuration. Possible values are `AvailabilitySet` and `AvailabilityZone`. Changing this forces a new resource to be created. + +* `secondary_ip_enabled` - (Optional) Is a secondary IP Address that should be added to the Network Interface on all VMs of the SAP system being deployed enabled? Defaults to `false`. Changing this forces a new resource to be created. + +* `transport_create_and_mount` - (Optional) A `transport_create_and_mount` block as defined below. Changing this forces a new resource to be created. + +* `transport_mount` - (Optional) A `transport_mount` block as defined below. Changing this forces a new resource to be created. + +~> **Note:** The `Skip` configuration type would be enabled when the `transport_create_and_mount` and the `transport_mount` aren't set. + +--- + +A `transport_create_and_mount` block supports the following: + +* `resource_group_id` - (Optional) The ID of the Resource Group of the transport File Share. Changing this forces a new resource to be created. + +* `storage_account_name` - (Optional) The name of the Storage Account of the File Share. Changing this forces a new resource to be created. + +--- + +A `transport_mount` block supports the following: + +* `file_share_id` - (Required) The resource ID of the Storage File Share. Changing this forces a new resource to be created. + +* `private_endpoint_id` - (Required) The resource ID of the Private Endpoint. Changing this forces a new resource to be created. + +--- + +An `application_server_configuration` block supports the following: + +* `instance_count` - (Required) The number of instances for the Application Server. Changing this forces a new resource to be created. + +* `subnet_id` - (Required) The resource ID of the Subnet for the Application Server. Changing this forces a new resource to be created. + +* `virtual_machine_configuration` - (Required) A `virtual_machine_configuration` block as defined below. Changing this forces a new resource to be created. + +--- + +A `central_server_configuration` block supports the following: + +* `instance_count` - (Required) The number of instances for the Central Server. Changing this forces a new resource to be created. + +* `subnet_id` - (Required) The resource ID of the Subnet for the Central Server. Changing this forces a new resource to be created. + +* `virtual_machine_configuration` - (Required) A `virtual_machine_configuration` block as defined below. Changing this forces a new resource to be created. + +--- + +A `database_server_configuration` block supports the following: + +* `instance_count` - (Required) The number of instances for the Database Server. Changing this forces a new resource to be created. + +* `subnet_id` - (Required) The resource ID of the Subnet for the Database Server. Changing this forces a new resource to be created. + +* `virtual_machine_configuration` - (Required) A `virtual_machine_configuration` block as defined below. Changing this forces a new resource to be created. + +* `database_type` - (Optional) The database type for the Database Server. Possible values are `DB2` and `HANA`. Changing this forces a new resource to be created. + +* `disk_volume_configuration` - (Optional) One or more `disk_volume_configuration` blocks as defined below. Changing this forces a new resource to be created. + +--- + +A `full_resource_names` block supports the following: + +* `application_server` - (Optional) An `application_server` block as defined below. Changing this forces a new resource to be created. + +* `central_server` - (Optional) A `central_server` block as defined below. Changing this forces a new resource to be created. + +* `database_server` - (Optional) A `database_server` block as defined below. Changing this forces a new resource to be created. + +* `shared_storage` - (Optional) A `shared_storage` block as defined below. Changing this forces a new resource to be created. + +--- + +An `application_server` block supports the following: + +* `availability_set_name` - (Optional) The full name for the availability set. Changing this forces a new resource to be created. + +* `virtual_machine` - (Optional) One or more `virtual_machine` blocks as defined below. Changing this forces a new resource to be created. + +--- + +A `virtual_machine` block supports the following: + +* `data_disk_names` - (Optional) A mapping of Data Disk names to pass to the backend host. The keys are Volume names and the values are a comma separated string of full names for Data Disks belonging to the specific Volume. This is converted to a list before being passed to the API. Changing this forces a new resource to be created. + +* `host_name` - (Optional) The full name of the host of the Virtual Machine. Changing this forces a new resource to be created. + +* `network_interface_names` - (Optional) A list of full names for the Network Interface of the Virtual Machine. Changing this forces a new resource to be created. + +* `os_disk_name` - (Optional) The full name of the OS Disk attached to the VM. Changing this forces a new resource to be created. + +* `virtual_machine_name` - (Optional) The full name of the Virtual Machine in a single server SAP system. Changing this forces a new resource to be created. + +--- + +A `central_server` block supports the following: + +* `availability_set_name` - (Optional) The full name for the availability set. Changing this forces a new resource to be created. + +* `load_balancer` - (Optional) A `load_balancer` block as defined below. Changing this forces a new resource to be created. + +* `virtual_machine` - (Optional) One or more `virtual_machine` blocks as defined below. Changing this forces a new resource to be created. + +--- + +A `load_balancer` block supports the following: + +* `name` - (Optional) The full resource name of the Load Balancer. Changing this forces a new resource to be created. + +* `backend_pool_names` - (Optional) A list of Backend Pool names for the Load Balancer. Changing this forces a new resource to be created. + +* `frontend_ip_configuration_names` - (Optional) A list of Frontend IP Configuration names. Changing this forces a new resource to be created. + +* `health_probe_names` - (Optional) A list of Health Probe names. Changing this forces a new resource to be created. + +--- + +A `database_server` block supports the following: + +* `availability_set_name` - (Optional) The full name for the availability set. Changing this forces a new resource to be created. + +* `load_balancer` - (Optional) A `load_balancer` block as defined below. Changing this forces a new resource to be created. + +* `virtual_machine` - (Optional) One or more `virtual_machine` blocks as defined below. Changing this forces a new resource to be created. + +--- + +A `shared_storage` block supports the following: + +* `account_name` - (Optional) The full name of the Shared Storage Account. Changing this forces a new resource to be created. + +* `private_endpoint_name` - (Optional) The full name of Private Endpoint for the Shared Storage Account. Changing this forces a new resource to be created. + +--- + +An `identity` block supports the following: + +* `type` - (Required) The type of Managed Service Identity that should be configured on this SAP Three Tier Virtual Instance. Only possible value is `UserAssigned`. + +* `identity_ids` - (Required) A list of User Assigned Managed Identity IDs to be assigned to this SAP Three Tier Virtual Instance. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the SAP Three Tier Virtual Instance. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: + +* `create` - (Defaults to 60 minutes) Used when creating the SAP Three Tier Virtual Instance with new SAP System. +* `read` - (Defaults to 5 minutes) Used when retrieving the SAP Three Tier Virtual Instance with new SAP System. +* `update` - (Defaults to 60 minutes) Used when updating the SAP Three Tier Virtual Instance with new SAP System. +* `delete` - (Defaults to 60 minutes) Used when deleting the SAP Three Tier Virtual Instance with new SAP System. + +## Import + +SAP Three Tier Virtual Instances with new SAP Systems can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_workloads_sap_three_tier_virtual_instance.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Workloads/sapVirtualInstances/vis1 +``` From dc41883a43e319261219fcc215d5a0fcc333ca7d Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 15 Jan 2024 14:23:48 +0800 Subject: [PATCH 02/12] update code --- ...ap_three_tier_virtual_instance_resource.go | 153 ++++-------------- ...ree_tier_virtual_instance_resource_test.go | 43 +---- ..._three_tier_virtual_instance.html.markdown | 23 +-- 3 files changed, 38 insertions(+), 181 deletions(-) diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go index 3aa6d9bddab3..226ecb1cf2ec 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go @@ -31,20 +31,15 @@ type WorkloadsSAPThreeTierVirtualInstanceModel struct { ResourceGroupName string `tfschema:"resource_group_name"` Location string `tfschema:"location"` AppLocation string `tfschema:"app_location"` - OsSapConfiguration []OsSapConfiguration `tfschema:"os_sap_configuration"` - ThreeTierConfiguration []ThreeTierConfiguration `tfschema:"three_tier_configuration"` Environment string `tfschema:"environment"` Identity []identity.ModelUserAssigned `tfschema:"identity"` ManagedResourceGroupName string `tfschema:"managed_resource_group_name"` + SapFqdn string `tfschema:"sap_fqdn"` SapProduct string `tfschema:"sap_product"` + ThreeTierConfiguration []ThreeTierConfiguration `tfschema:"three_tier_configuration"` Tags map[string]string `tfschema:"tags"` } -type OsSapConfiguration struct { - DeployerVmPackages []DeployerVmPackages `tfschema:"deployer_virtual_machine_packages"` - SapFqdn string `tfschema:"sap_fqdn"` -} - type DeployerVmPackages struct { StorageAccountId string `tfschema:"storage_account_id"` Url string `tfschema:"url"` @@ -193,45 +188,27 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl "app_location": commonschema.Location(), - "os_sap_configuration": { - Type: pluginsdk.TypeList, - Required: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "sap_fqdn": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validate.SAPFQDN, - }, + "environment": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice(sapvirtualinstances.PossibleValuesForSAPEnvironmentType(), false), + }, - "deployer_virtual_machine_packages": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "storage_account_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: commonids.ValidateStorageAccountID, - }, + "identity": commonschema.UserAssignedIdentityOptional(), - "url": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.IsURLWithHTTPorHTTPS, - }, - }, - }, - }, - }, - }, + "sap_fqdn": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.SAPFQDN, + }, + + "sap_product": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice(sapvirtualinstances.PossibleValuesForSAPProductType(), false), }, "three_tier_configuration": { @@ -1025,29 +1002,6 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl }, }, - "environment": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(sapvirtualinstances.SAPEnvironmentTypeNonProd), - string(sapvirtualinstances.SAPEnvironmentTypeProd), - }, false), - }, - - "identity": commonschema.UserAssignedIdentityOptional(), - - "sap_product": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{ - string(sapvirtualinstances.SAPProductTypeECC), - string(sapvirtualinstances.SAPProductTypeOther), - string(sapvirtualinstances.SAPProductTypeSFourHANA), - }, false), - }, - "managed_resource_group_name": { Type: pluginsdk.TypeString, Optional: true, @@ -1101,8 +1055,10 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Create() sdk.ResourceFunc } deploymentWithOSConfiguration := &sapvirtualinstances.DeploymentWithOSConfiguration{ - AppLocation: utils.String(model.AppLocation), - OsSapConfiguration: expandOsSapConfiguration(model.OsSapConfiguration), + AppLocation: utils.String(model.AppLocation), + OsSapConfiguration: &sapvirtualinstances.OsSapConfiguration{ + SapFqdn: utils.String(model.SapFqdn), + }, } threeTierConfiguration, err := expandThreeTierConfiguration(model.ThreeTierConfiguration) @@ -1209,7 +1165,10 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Read() sdk.ResourceFunc { if config := props.Configuration; config != nil { if v, ok := config.(sapvirtualinstances.DeploymentWithOSConfiguration); ok { state.AppLocation = pointer.From(v.AppLocation) - state.OsSapConfiguration = flattenOsSapConfiguration(v.OsSapConfiguration) + + if osSapConfiguration := v.OsSapConfiguration; osSapConfiguration != nil { + state.SapFqdn = pointer.From(osSapConfiguration.SapFqdn) + } if configuration := v.InfrastructureConfiguration; configuration != nil { if threeTierConfiguration, threeTierConfigurationExists := configuration.(sapvirtualinstances.ThreeTierConfiguration); threeTierConfigurationExists { @@ -1667,36 +1626,6 @@ func expandThreeTierConfiguration(input []ThreeTierConfiguration) (*sapvirtualin return result, nil } -func expandOsSapConfiguration(input []OsSapConfiguration) *sapvirtualinstances.OsSapConfiguration { - if len(input) == 0 { - return nil - } - - osSapConfiguration := input[0] - - result := &sapvirtualinstances.OsSapConfiguration{ - DeployerVMPackages: expandDeployerVmPackages(osSapConfiguration.DeployerVmPackages), - SapFqdn: utils.String(osSapConfiguration.SapFqdn), - } - - return result -} - -func expandDeployerVmPackages(input []DeployerVmPackages) *sapvirtualinstances.DeployerVMPackages { - if len(input) == 0 { - return nil - } - - deployerVmPackages := input[0] - - result := &sapvirtualinstances.DeployerVMPackages{ - StorageAccountId: utils.String(deployerVmPackages.StorageAccountId), - Url: utils.String(deployerVmPackages.Url), - } - - return result -} - func flattenApplicationServer(input sapvirtualinstances.ApplicationServerConfiguration, d *pluginsdk.ResourceData, basePath string) []ApplicationServerConfiguration { result := make([]ApplicationServerConfiguration, 0) @@ -2003,27 +1932,3 @@ func flattenTransportMount(input sapvirtualinstances.MountFileShareConfiguration PrivateEndpointId: input.PrivateEndpointId, }), nil } - -func flattenOsSapConfiguration(input *sapvirtualinstances.OsSapConfiguration) []OsSapConfiguration { - result := make([]OsSapConfiguration, 0) - if input == nil { - return result - } - - return append(result, OsSapConfiguration{ - DeployerVmPackages: flattenDeployerVMPackages(input.DeployerVMPackages), - SapFqdn: pointer.From(input.SapFqdn), - }) -} - -func flattenDeployerVMPackages(input *sapvirtualinstances.DeployerVMPackages) []DeployerVmPackages { - result := make([]DeployerVmPackages, 0) - if input == nil { - return result - } - - return append(result, DeployerVmPackages{ - StorageAccountId: pointer.From(input.StorageAccountId), - Url: pointer.From(input.Url), - }) -} diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go index 561f4bd1a275..939d04e70116 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go @@ -231,10 +231,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { sap_product = "S4HANA" managed_resource_group_name = "managedTestRG%d" app_location = azurerm_resource_group.app.location - - os_sap_configuration { - sap_fqdn = "sap.bpaas.com" - } + sap_fqdn = "sap.bpaas.com" three_tier_configuration { app_resource_group_name = azurerm_resource_group.app.name @@ -333,10 +330,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "import" { sap_product = azurerm_workloads_sap_three_tier_virtual_instance.test.sap_product managed_resource_group_name = azurerm_workloads_sap_three_tier_virtual_instance.test.managed_resource_group_name app_location = azurerm_workloads_sap_three_tier_virtual_instance.test.app_location - - os_sap_configuration { - sap_fqdn = "sap.bpaas.com" - } + sap_fqdn = "sap.bpaas.com" three_tier_configuration { app_resource_group_name = azurerm_resource_group.app.name @@ -451,15 +445,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { sap_product = "S4HANA" managed_resource_group_name = "managedTestRG%d" app_location = azurerm_resource_group.app.location - - os_sap_configuration { - sap_fqdn = "sap.bpaas.com" - - deployer_virtual_machine_packages { - storage_account_id = azurerm_storage_account.test.id - url = "https://www.bing.com" - } - } + sap_fqdn = "sap.bpaas.com" three_tier_configuration { app_resource_group_name = azurerm_resource_group.app.name @@ -696,15 +682,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { sap_product = "S4HANA" managed_resource_group_name = "managedTestRG%d" app_location = azurerm_resource_group.app.location - - os_sap_configuration { - sap_fqdn = "sap.bpaas.com" - - deployer_virtual_machine_packages { - storage_account_id = azurerm_storage_account.test.id - url = "https://www.bing.com" - } - } + sap_fqdn = "sap.bpaas.com" three_tier_configuration { app_resource_group_name = azurerm_resource_group.app.name @@ -961,17 +939,8 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { environment = "NonProd" sap_product = "S4HANA" managed_resource_group_name = "managedTestRG%d" - - app_location = azurerm_resource_group.app.location - - os_sap_configuration { - sap_fqdn = "sap.bpaas.com" - - deployer_virtual_machine_packages { - storage_account_id = azurerm_storage_account.test.id - url = "https://www.bing.com" - } - } + app_location = azurerm_resource_group.app.location + sap_fqdn = "sap.bpaas.com" three_tier_configuration { app_resource_group_name = azurerm_resource_group.app.name diff --git a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown index df16e5ac9d9e..34929fbc49c7 100644 --- a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown +++ b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown @@ -81,17 +81,8 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "example" { environment = "NonProd" sap_product = "S4HANA" managed_resource_group_name = "exampleManagedRG" - - app_location = azurerm_resource_group.app.location - - os_sap_configuration { - sap_fqdn = "sap.bpaas.com" - - deployer_virtual_machine_packages { - storage_account_id = azurerm_storage_account.example.id - url = "https://www.bing.com" - } - } + app_location = azurerm_resource_group.app.location + sap_fqdn = "sap.bpaas.com" three_tier_configuration { app_resource_group_name = azurerm_resource_group.app.name @@ -313,7 +304,7 @@ The following arguments are supported: * `environment` - (Required) The environment type for the SAP Three Tier Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created. -* `os_sap_configuration` - (Required) An `os_sap_configuration` block as defined below. Changing this forces a new resource to be created. +* `sap_fqdn` - (Required) The FQDN of the SAP system. Changing this forces a new resource to be created. * `sap_product` - (Required) The SAP Product type for the SAP Three Tier Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created. @@ -327,14 +318,6 @@ The following arguments are supported: --- -An `os_sap_configuration` block supports the following: - -* `sap_fqdn` - (Required) The FQDN of the SAP system. Changing this forces a new resource to be created. - -* `deployer_virtual_machine_packages` - (Optional) A `deployer_virtual_machine_packages` block as defined below. Changing this forces a new resource to be created. - ---- - A `deployer_virtual_machine_packages` block supports the following: * `storage_account_id` - (Required) The ID of the deployer VM packages storage account. Changing this forces a new resource to be created. From 26b9d64cc0e0112ad2a0de697af2e5fe89a251dc Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 15 Jan 2024 14:43:46 +0800 Subject: [PATCH 03/12] update code --- .../method_availableprivateendpointtypeslist.go | 6 ++++-- ...thod_availableprivateendpointtypeslistbyresourcegroup.go | 6 ++++-- .../network/2023-04-01/privateendpoints/method_list.go | 6 ++++-- .../privateendpoints/method_listbysubscription.go | 6 ++++-- .../workloads/2023-04-01/monitors/method_list.go | 6 ++++-- .../2023-04-01/monitors/method_listbyresourcegroup.go | 6 ++++-- .../workloads/2023-04-01/providerinstances/method_list.go | 6 ++++-- .../2023-04-01/sapapplicationserverinstances/method_list.go | 6 ++++-- .../workloads/2023-04-01/sapcentralinstances/method_list.go | 6 ++++-- .../2023-04-01/sapdatabaseinstances/method_list.go | 6 ++++-- .../sapvirtualinstances/method_listbyresourcegroup.go | 6 ++++-- .../sapvirtualinstances/method_listbysubscription.go | 6 ++++-- 12 files changed, 48 insertions(+), 24 deletions(-) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go index 2cb59080a74a..d7fdaf55d21b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go @@ -19,7 +19,8 @@ type AvailablePrivateEndpointTypesListOperationResponse struct { } type AvailablePrivateEndpointTypesListCompleteResult struct { - Items []AvailablePrivateEndpointType + LatestHttpResponse *http.Response + Items []AvailablePrivateEndpointType } // AvailablePrivateEndpointTypesList ... @@ -83,7 +84,8 @@ func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListCompleteMatchin } result = AvailablePrivateEndpointTypesListCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go index d819f6c432cc..acb79f31b4ea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go @@ -19,7 +19,8 @@ type AvailablePrivateEndpointTypesListByResourceGroupOperationResponse struct { } type AvailablePrivateEndpointTypesListByResourceGroupCompleteResult struct { - Items []AvailablePrivateEndpointType + LatestHttpResponse *http.Response + Items []AvailablePrivateEndpointType } // AvailablePrivateEndpointTypesListByResourceGroup ... @@ -83,7 +84,8 @@ func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroup } result = AvailablePrivateEndpointTypesListByResourceGroupCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go index 8191e9553b06..75a99d85e75d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go @@ -20,7 +20,8 @@ type ListOperationResponse struct { } type ListCompleteResult struct { - Items []PrivateEndpoint + LatestHttpResponse *http.Response + Items []PrivateEndpoint } // List ... @@ -84,7 +85,8 @@ func (c PrivateEndpointsClient) ListCompleteMatchingPredicate(ctx context.Contex } result = ListCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go index 52761988c2d6..77e120028814 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go @@ -20,7 +20,8 @@ type ListBySubscriptionOperationResponse struct { } type ListBySubscriptionCompleteResult struct { - Items []PrivateEndpoint + LatestHttpResponse *http.Response + Items []PrivateEndpoint } // ListBySubscription ... @@ -84,7 +85,8 @@ func (c PrivateEndpointsClient) ListBySubscriptionCompleteMatchingPredicate(ctx } result = ListBySubscriptionCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_list.go index c229098d311b..10f73f6ce50e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_list.go @@ -20,7 +20,8 @@ type ListOperationResponse struct { } type ListCompleteResult struct { - Items []Monitor + LatestHttpResponse *http.Response + Items []Monitor } // List ... @@ -84,7 +85,8 @@ func (c MonitorsClient) ListCompleteMatchingPredicate(ctx context.Context, id co } result = ListCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_listbyresourcegroup.go index 0ddbb346ba2d..a25be4e980a3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_listbyresourcegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_listbyresourcegroup.go @@ -20,7 +20,8 @@ type ListByResourceGroupOperationResponse struct { } type ListByResourceGroupCompleteResult struct { - Items []Monitor + LatestHttpResponse *http.Response + Items []Monitor } // ListByResourceGroup ... @@ -84,7 +85,8 @@ func (c MonitorsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context } result = ListByResourceGroupCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_list.go index c29a5c84f2f5..4fe65334980a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_list.go @@ -19,7 +19,8 @@ type ListOperationResponse struct { } type ListCompleteResult struct { - Items []ProviderInstance + LatestHttpResponse *http.Response + Items []ProviderInstance } // List ... @@ -83,7 +84,8 @@ func (c ProviderInstancesClient) ListCompleteMatchingPredicate(ctx context.Conte } result = ListCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_list.go index 5e88392d5af8..ff4232505b33 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_list.go @@ -19,7 +19,8 @@ type ListOperationResponse struct { } type ListCompleteResult struct { - Items []SAPApplicationServerInstance + LatestHttpResponse *http.Response + Items []SAPApplicationServerInstance } // List ... @@ -83,7 +84,8 @@ func (c SAPApplicationServerInstancesClient) ListCompleteMatchingPredicate(ctx c } result = ListCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_list.go index 6005ae2a28f4..756164c35d3e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_list.go @@ -19,7 +19,8 @@ type ListOperationResponse struct { } type ListCompleteResult struct { - Items []SAPCentralServerInstance + LatestHttpResponse *http.Response + Items []SAPCentralServerInstance } // List ... @@ -83,7 +84,8 @@ func (c SAPCentralInstancesClient) ListCompleteMatchingPredicate(ctx context.Con } result = ListCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_list.go index 0304cc2fd65b..fec2710c3fa3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_list.go @@ -19,7 +19,8 @@ type ListOperationResponse struct { } type ListCompleteResult struct { - Items []SAPDatabaseInstance + LatestHttpResponse *http.Response + Items []SAPDatabaseInstance } // List ... @@ -83,7 +84,8 @@ func (c SAPDatabaseInstancesClient) ListCompleteMatchingPredicate(ctx context.Co } result = ListCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbyresourcegroup.go index 6a8e8782f252..20f081580d52 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbyresourcegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbyresourcegroup.go @@ -20,7 +20,8 @@ type ListByResourceGroupOperationResponse struct { } type ListByResourceGroupCompleteResult struct { - Items []SAPVirtualInstance + LatestHttpResponse *http.Response + Items []SAPVirtualInstance } // ListByResourceGroup ... @@ -84,7 +85,8 @@ func (c SAPVirtualInstancesClient) ListByResourceGroupCompleteMatchingPredicate( } result = ListByResourceGroupCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbysubscription.go index 81f56b78a4e7..87632e143ec6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbysubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_listbysubscription.go @@ -20,7 +20,8 @@ type ListBySubscriptionOperationResponse struct { } type ListBySubscriptionCompleteResult struct { - Items []SAPVirtualInstance + LatestHttpResponse *http.Response + Items []SAPVirtualInstance } // ListBySubscription ... @@ -84,7 +85,8 @@ func (c SAPVirtualInstancesClient) ListBySubscriptionCompleteMatchingPredicate(c } result = ListBySubscriptionCompleteResult{ - Items: items, + LatestHttpResponse: resp.HttpResponse, + Items: items, } return } From 5af5819df6539a7be102aa91336c869fab8df2ce Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Wed, 17 Jan 2024 14:53:02 +0800 Subject: [PATCH 04/12] update code --- .../workloads/validate/admin_username.go | 21 -- .../workloads/validate/admin_username_test.go | 44 ---- .../validate/availability_set_name.go | 16 -- .../validate/availability_set_name_test.go | 44 ---- .../services/workloads/validate/disk_name.go | 21 -- .../workloads/validate/disk_name_test.go | 44 ---- .../services/workloads/validate/host_name.go | 21 -- .../workloads/validate/host_name_test.go | 44 ---- .../services/workloads/validate/sap_fqdn.go | 16 -- .../workloads/validate/sap_fqdn_test.go | 44 ---- ...ap_three_tier_virtual_instance_resource.go | 215 +++++++++--------- ...ree_tier_virtual_instance_resource_test.go | 6 +- ..._three_tier_virtual_instance.html.markdown | 30 +-- 13 files changed, 122 insertions(+), 444 deletions(-) delete mode 100644 internal/services/workloads/validate/admin_username.go delete mode 100644 internal/services/workloads/validate/admin_username_test.go delete mode 100644 internal/services/workloads/validate/availability_set_name.go delete mode 100644 internal/services/workloads/validate/availability_set_name_test.go delete mode 100644 internal/services/workloads/validate/disk_name.go delete mode 100644 internal/services/workloads/validate/disk_name_test.go delete mode 100644 internal/services/workloads/validate/host_name.go delete mode 100644 internal/services/workloads/validate/host_name_test.go delete mode 100644 internal/services/workloads/validate/sap_fqdn.go delete mode 100644 internal/services/workloads/validate/sap_fqdn_test.go diff --git a/internal/services/workloads/validate/admin_username.go b/internal/services/workloads/validate/admin_username.go deleted file mode 100644 index d179f082118e..000000000000 --- a/internal/services/workloads/validate/admin_username.go +++ /dev/null @@ -1,21 +0,0 @@ -package validate - -import ( - "fmt" -) - -func AdminUsername(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - if value == "" { - errors = append(errors, fmt.Errorf("%q must not be empty", k)) - return warnings, errors - } - - if len(value) > 64 { - errors = append(errors, fmt.Errorf("%q may contain at most 64 characters", k)) - return warnings, errors - } - - return warnings, errors -} diff --git a/internal/services/workloads/validate/admin_username_test.go b/internal/services/workloads/validate/admin_username_test.go deleted file mode 100644 index 1841f8c79ab8..000000000000 --- a/internal/services/workloads/validate/admin_username_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package validate - -import ( - "strings" - "testing" -) - -func TestAdminUsername(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - { - Input: "", - Valid: false, - }, - { - Input: "testAdmin", - Valid: true, - }, - { - Input: strings.Repeat("s", 63), - Valid: true, - }, - { - Input: strings.Repeat("s", 64), - Valid: true, - }, - { - Input: strings.Repeat("s", 65), - Valid: false, - }, - } - - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := AdminUsername(tc.Input, "admin_username") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/workloads/validate/availability_set_name.go b/internal/services/workloads/validate/availability_set_name.go deleted file mode 100644 index 2de1ebddc259..000000000000 --- a/internal/services/workloads/validate/availability_set_name.go +++ /dev/null @@ -1,16 +0,0 @@ -package validate - -import ( - "fmt" -) - -func AvailabilitySetName(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - if len(value) < 1 || len(value) > 80 { - errors = append(errors, fmt.Errorf("%q must be between 1 and 80 characters in length", k)) - return warnings, errors - } - - return warnings, errors -} diff --git a/internal/services/workloads/validate/availability_set_name_test.go b/internal/services/workloads/validate/availability_set_name_test.go deleted file mode 100644 index 4b5c11882210..000000000000 --- a/internal/services/workloads/validate/availability_set_name_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package validate - -import ( - "strings" - "testing" -) - -func TestAvailabilitySetName(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - { - Input: "", - Valid: false, - }, - { - Input: "testname", - Valid: true, - }, - { - Input: strings.Repeat("s", 79), - Valid: true, - }, - { - Input: strings.Repeat("s", 80), - Valid: true, - }, - { - Input: strings.Repeat("s", 81), - Valid: false, - }, - } - - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := AvailabilitySetName(tc.Input, "availability_set_name") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/workloads/validate/disk_name.go b/internal/services/workloads/validate/disk_name.go deleted file mode 100644 index 0ad4611a8906..000000000000 --- a/internal/services/workloads/validate/disk_name.go +++ /dev/null @@ -1,21 +0,0 @@ -package validate - -import ( - "fmt" -) - -func DiskName(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - if value == "" { - errors = append(errors, fmt.Errorf("%q must not be empty", k)) - return warnings, errors - } - - if len(value) < 1 || len(value) > 80 { - errors = append(errors, fmt.Errorf("%q must be between 1 and 80 characters in length", k)) - return warnings, errors - } - - return warnings, errors -} diff --git a/internal/services/workloads/validate/disk_name_test.go b/internal/services/workloads/validate/disk_name_test.go deleted file mode 100644 index 06ec65db5b8f..000000000000 --- a/internal/services/workloads/validate/disk_name_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package validate - -import ( - "strings" - "testing" -) - -func TestDiskName(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - { - Input: "", - Valid: false, - }, - { - Input: "testosdisk", - Valid: true, - }, - { - Input: strings.Repeat("s", 79), - Valid: true, - }, - { - Input: strings.Repeat("s", 80), - Valid: true, - }, - { - Input: strings.Repeat("s", 81), - Valid: false, - }, - } - - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := DiskName(tc.Input, "name") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/workloads/validate/host_name.go b/internal/services/workloads/validate/host_name.go deleted file mode 100644 index 3eff69fafd86..000000000000 --- a/internal/services/workloads/validate/host_name.go +++ /dev/null @@ -1,21 +0,0 @@ -package validate - -import ( - "fmt" -) - -func HostName(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - if value == "" { - errors = append(errors, fmt.Errorf("%q must not be empty", k)) - return warnings, errors - } - - if len(value) > 13 { - errors = append(errors, fmt.Errorf("%q may contain at most 13 characters", k)) - return warnings, errors - } - - return warnings, errors -} diff --git a/internal/services/workloads/validate/host_name_test.go b/internal/services/workloads/validate/host_name_test.go deleted file mode 100644 index d35bead3fa8a..000000000000 --- a/internal/services/workloads/validate/host_name_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package validate - -import ( - "strings" - "testing" -) - -func TestHostName(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - { - Input: "", - Valid: false, - }, - { - Input: "testhost", - Valid: true, - }, - { - Input: strings.Repeat("s", 12), - Valid: true, - }, - { - Input: strings.Repeat("s", 13), - Valid: true, - }, - { - Input: strings.Repeat("s", 14), - Valid: false, - }, - } - - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := HostName(tc.Input, "host_name") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/workloads/validate/sap_fqdn.go b/internal/services/workloads/validate/sap_fqdn.go deleted file mode 100644 index 72d86f1e325b..000000000000 --- a/internal/services/workloads/validate/sap_fqdn.go +++ /dev/null @@ -1,16 +0,0 @@ -package validate - -import ( - "fmt" -) - -func SAPFQDN(v interface{}, k string) (warnings []string, errors []error) { - value := v.(string) - - if len(value) < 2 || len(value) > 34 { - errors = append(errors, fmt.Errorf("%q must be between 2 and 34 characters in length", k)) - return warnings, errors - } - - return warnings, errors -} diff --git a/internal/services/workloads/validate/sap_fqdn_test.go b/internal/services/workloads/validate/sap_fqdn_test.go deleted file mode 100644 index d4edf6d1e0de..000000000000 --- a/internal/services/workloads/validate/sap_fqdn_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package validate - -import ( - "strings" - "testing" -) - -func TestSAPFQDN(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - { - Input: "", - Valid: false, - }, - { - Input: "sap.contoso.com", - Valid: true, - }, - { - Input: strings.Repeat("s", 33), - Valid: true, - }, - { - Input: strings.Repeat("s", 34), - Valid: true, - }, - { - Input: strings.Repeat("s", 35), - Valid: false, - }, - } - - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := SAPFQDN(tc.Input, "sap_fqdn") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go index 226ecb1cf2ec..0e79b60ee14a 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go @@ -40,11 +40,6 @@ type WorkloadsSAPThreeTierVirtualInstanceModel struct { Tags map[string]string `tfschema:"tags"` } -type DeployerVmPackages struct { - StorageAccountId string `tfschema:"storage_account_id"` - Url string `tfschema:"url"` -} - type DiskVolumeConfiguration struct { VolumeName string `tfschema:"volume_name"` NumberOfDisks int `tfschema:"number_of_disks"` @@ -71,7 +66,7 @@ type OSProfile struct { SshPublicKey string `tfschema:"ssh_public_key"` } -type VirtualMachineFullResourceNames struct { +type VirtualMachineResourceNames struct { DataDiskNames map[string]interface{} `tfschema:"data_disk_names"` HostName string `tfschema:"host_name"` NetworkInterfaceNames []string `tfschema:"network_interface_names"` @@ -84,7 +79,7 @@ type ThreeTierConfiguration struct { AppResourceGroupName string `tfschema:"app_resource_group_name"` CentralServerConfiguration []CentralServerConfiguration `tfschema:"central_server_configuration"` DatabaseServerConfiguration []DatabaseServerConfiguration `tfschema:"database_server_configuration"` - FullResourceNames []FullResourceNames `tfschema:"full_resource_names"` + ResourceNames []ResourceNames `tfschema:"resource_names"` HighAvailabilityType string `tfschema:"high_availability_type"` IsSecondaryIpEnabled bool `tfschema:"secondary_ip_enabled"` TransportCreateAndMount []TransportCreateAndMount `tfschema:"transport_create_and_mount"` @@ -121,28 +116,28 @@ type DatabaseServerConfiguration struct { VirtualMachineConfiguration []VirtualMachineConfiguration `tfschema:"virtual_machine_configuration"` } -type FullResourceNames struct { - ApplicationServer []ApplicationServerFullResourceNames `tfschema:"application_server"` - CentralServer []CentralServerFullResourceNames `tfschema:"central_server"` - DatabaseServer []DatabaseServerFullResourceNames `tfschema:"database_server"` - SharedStorage []SharedStorage `tfschema:"shared_storage"` +type ResourceNames struct { + ApplicationServer []ApplicationServerResourceNames `tfschema:"application_server"` + CentralServer []CentralServerResourceNames `tfschema:"central_server"` + DatabaseServer []DatabaseServerResourceNames `tfschema:"database_server"` + SharedStorage []SharedStorage `tfschema:"shared_storage"` } -type ApplicationServerFullResourceNames struct { - AvailabilitySetName string `tfschema:"availability_set_name"` - VirtualMachines []VirtualMachineFullResourceNames `tfschema:"virtual_machine"` +type ApplicationServerResourceNames struct { + AvailabilitySetName string `tfschema:"availability_set_name"` + VirtualMachines []VirtualMachineResourceNames `tfschema:"virtual_machine"` } -type CentralServerFullResourceNames struct { - AvailabilitySetName string `tfschema:"availability_set_name"` - LoadBalancer []LoadBalancer `tfschema:"load_balancer"` - VirtualMachines []VirtualMachineFullResourceNames `tfschema:"virtual_machine"` +type CentralServerResourceNames struct { + AvailabilitySetName string `tfschema:"availability_set_name"` + LoadBalancer []LoadBalancer `tfschema:"load_balancer"` + VirtualMachines []VirtualMachineResourceNames `tfschema:"virtual_machine"` } -type DatabaseServerFullResourceNames struct { - AvailabilitySetName string `tfschema:"availability_set_name"` - LoadBalancer []LoadBalancer `tfschema:"load_balancer"` - VirtualMachines []VirtualMachineFullResourceNames `tfschema:"virtual_machine"` +type DatabaseServerResourceNames struct { + AvailabilitySetName string `tfschema:"availability_set_name"` + LoadBalancer []LoadBalancer `tfschema:"load_balancer"` + VirtualMachines []VirtualMachineResourceNames `tfschema:"virtual_machine"` } type LoadBalancer struct { @@ -201,7 +196,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validate.SAPFQDN, + ValidateFunc: validation.StringLenBetween(2, 34), }, "sap_product": { @@ -299,7 +294,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validate.AdminUsername, + ValidateFunc: validation.StringLenBetween(1, 64), }, "ssh_private_key": { @@ -412,7 +407,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validate.AdminUsername, + ValidateFunc: validation.StringLenBetween(1, 64), }, "ssh_private_key": { @@ -525,7 +520,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validate.AdminUsername, + ValidateFunc: validation.StringLenBetween(1, 64), }, "ssh_private_key": { @@ -608,7 +603,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl }, }, - "full_resource_names": { + "resource_names": { Type: pluginsdk.TypeList, Optional: true, ForceNew: true, @@ -626,7 +621,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.AvailabilitySetName, + ValidateFunc: validation.StringLenBetween(1, 80), }, "virtual_machine": { @@ -641,7 +636,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, - ValidateFunc: validate.DiskName, + ValidateFunc: validation.StringLenBetween(1, 80), }, }, @@ -649,7 +644,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.HostName, + ValidateFunc: validation.StringLenBetween(1, 13), }, "network_interface_names": { @@ -666,7 +661,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.DiskName, + ValidateFunc: validation.StringLenBetween(1, 80), }, "virtual_machine_name": { @@ -693,7 +688,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.AvailabilitySetName, + ValidateFunc: validation.StringLenBetween(1, 80), }, "load_balancer": { @@ -755,7 +750,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, - ValidateFunc: validate.DiskName, + ValidateFunc: validation.StringLenBetween(1, 80), }, }, @@ -763,7 +758,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.HostName, + ValidateFunc: validation.StringLenBetween(1, 13), }, "network_interface_names": { @@ -780,7 +775,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.DiskName, + ValidateFunc: validation.StringLenBetween(1, 80), }, "virtual_machine_name": { @@ -807,7 +802,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.AvailabilitySetName, + ValidateFunc: validation.StringLenBetween(1, 80), }, "load_balancer": { @@ -869,7 +864,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, - ValidateFunc: validate.DiskName, + ValidateFunc: validation.StringLenBetween(1, 80), }, }, @@ -877,7 +872,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.HostName, + ValidateFunc: validation.StringLenBetween(1, 13), }, "network_interface_names": { @@ -894,7 +889,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.DiskName, + ValidateFunc: validation.StringLenBetween(1, 80), }, "virtual_machine_name": { @@ -1055,7 +1050,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Create() sdk.ResourceFunc } deploymentWithOSConfiguration := &sapvirtualinstances.DeploymentWithOSConfiguration{ - AppLocation: utils.String(model.AppLocation), + AppLocation: utils.String(location.Normalize(model.AppLocation)), OsSapConfiguration: &sapvirtualinstances.OsSapConfiguration{ SapFqdn: utils.String(model.SapFqdn), }, @@ -1164,7 +1159,11 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Read() sdk.ResourceFunc { if config := props.Configuration; config != nil { if v, ok := config.(sapvirtualinstances.DeploymentWithOSConfiguration); ok { - state.AppLocation = pointer.From(v.AppLocation) + appLocation := "" + if appLocationVal := v.AppLocation; appLocationVal != nil { + appLocation = *v.AppLocation + } + state.AppLocation = location.Normalize(appLocation) if osSapConfiguration := v.OsSapConfiguration; osSapConfiguration != nil { state.SapFqdn = pointer.From(osSapConfiguration.SapFqdn) @@ -1448,42 +1447,42 @@ func expandTransportMount(input []TransportMount) (*sapvirtualinstances.MountFil return result, nil } -func expandFullResourceNames(input []FullResourceNames) *sapvirtualinstances.ThreeTierFullResourceNames { +func expandResourceNames(input []ResourceNames) *sapvirtualinstances.ThreeTierFullResourceNames { if len(input) == 0 { return nil } - fullResourceNames := input[0] + resourceNames := input[0] result := &sapvirtualinstances.ThreeTierFullResourceNames{ - ApplicationServer: expandApplicationServerFullResourceNames(fullResourceNames.ApplicationServer), - CentralServer: expandCentralServerFullResourceNames(fullResourceNames.CentralServer), - DatabaseServer: expandDatabaseServerFullResourceNames(fullResourceNames.DatabaseServer), - SharedStorage: expandSharedStorage(fullResourceNames.SharedStorage), + ApplicationServer: expandApplicationServerResourceNames(resourceNames.ApplicationServer), + CentralServer: expandCentralServerResourceNames(resourceNames.CentralServer), + DatabaseServer: expandDatabaseServerResourceNames(resourceNames.DatabaseServer), + SharedStorage: expandSharedStorage(resourceNames.SharedStorage), } return result } -func expandApplicationServerFullResourceNames(input []ApplicationServerFullResourceNames) *sapvirtualinstances.ApplicationServerFullResourceNames { +func expandApplicationServerResourceNames(input []ApplicationServerResourceNames) *sapvirtualinstances.ApplicationServerFullResourceNames { if len(input) == 0 { return nil } - applicationServerFullResourceNames := input[0] + applicationServerResourceNames := input[0] result := &sapvirtualinstances.ApplicationServerFullResourceNames{ - VirtualMachines: expandVirtualMachinesFullResourceNames(applicationServerFullResourceNames.VirtualMachines), + VirtualMachines: expandVirtualMachinesResourceNames(applicationServerResourceNames.VirtualMachines), } - if v := applicationServerFullResourceNames.AvailabilitySetName; v != "" { + if v := applicationServerResourceNames.AvailabilitySetName; v != "" { result.AvailabilitySetName = utils.String(v) } return result } -func expandVirtualMachinesFullResourceNames(input []VirtualMachineFullResourceNames) *[]sapvirtualinstances.VirtualMachineResourceNames { +func expandVirtualMachinesResourceNames(input []VirtualMachineResourceNames) *[]sapvirtualinstances.VirtualMachineResourceNames { result := make([]sapvirtualinstances.VirtualMachineResourceNames, 0) if len(input) == 0 { return &result @@ -1513,65 +1512,65 @@ func expandVirtualMachinesFullResourceNames(input []VirtualMachineFullResourceNa return &result } -func expandCentralServerFullResourceNames(input []CentralServerFullResourceNames) *sapvirtualinstances.CentralServerFullResourceNames { +func expandCentralServerResourceNames(input []CentralServerResourceNames) *sapvirtualinstances.CentralServerFullResourceNames { if len(input) == 0 { return nil } - centralServerFullResourceNames := input[0] + centralServerResourceNames := input[0] result := &sapvirtualinstances.CentralServerFullResourceNames{ - LoadBalancer: expandLoadBalancerFullResourceNames(centralServerFullResourceNames.LoadBalancer), - VirtualMachines: expandVirtualMachinesFullResourceNames(centralServerFullResourceNames.VirtualMachines), + LoadBalancer: expandLoadBalancerResourceNames(centralServerResourceNames.LoadBalancer), + VirtualMachines: expandVirtualMachinesResourceNames(centralServerResourceNames.VirtualMachines), } - if v := centralServerFullResourceNames.AvailabilitySetName; v != "" { + if v := centralServerResourceNames.AvailabilitySetName; v != "" { result.AvailabilitySetName = utils.String(v) } return result } -func expandLoadBalancerFullResourceNames(input []LoadBalancer) *sapvirtualinstances.LoadBalancerResourceNames { +func expandLoadBalancerResourceNames(input []LoadBalancer) *sapvirtualinstances.LoadBalancerResourceNames { result := &sapvirtualinstances.LoadBalancerResourceNames{} if len(input) == 0 { return result } - loadBalancerFullResourceNames := input[0] + loadBalancerResourceNames := input[0] - if v := loadBalancerFullResourceNames.Name; v != "" { + if v := loadBalancerResourceNames.Name; v != "" { result.LoadBalancerName = utils.String(v) } - if v := loadBalancerFullResourceNames.BackendPoolNames; v != nil { + if v := loadBalancerResourceNames.BackendPoolNames; v != nil { result.BackendPoolNames = &v } - if v := loadBalancerFullResourceNames.FrontendIpConfigurationNames; v != nil { + if v := loadBalancerResourceNames.FrontendIpConfigurationNames; v != nil { result.FrontendIPConfigurationNames = &v } - if v := loadBalancerFullResourceNames.HealthProbeNames; v != nil { + if v := loadBalancerResourceNames.HealthProbeNames; v != nil { result.HealthProbeNames = &v } return result } -func expandDatabaseServerFullResourceNames(input []DatabaseServerFullResourceNames) *sapvirtualinstances.DatabaseServerFullResourceNames { +func expandDatabaseServerResourceNames(input []DatabaseServerResourceNames) *sapvirtualinstances.DatabaseServerFullResourceNames { if len(input) == 0 { return nil } - databaseServerFullResourceNames := input[0] + databaseServerResourceNames := input[0] result := &sapvirtualinstances.DatabaseServerFullResourceNames{ - LoadBalancer: expandLoadBalancerFullResourceNames(databaseServerFullResourceNames.LoadBalancer), - VirtualMachines: expandVirtualMachinesFullResourceNames(databaseServerFullResourceNames.VirtualMachines), + LoadBalancer: expandLoadBalancerResourceNames(databaseServerResourceNames.LoadBalancer), + VirtualMachines: expandVirtualMachinesResourceNames(databaseServerResourceNames.VirtualMachines), } - if v := databaseServerFullResourceNames.AvailabilitySetName; v != "" { + if v := databaseServerResourceNames.AvailabilitySetName; v != "" { result.AvailabilitySetName = utils.String(v) } @@ -1604,7 +1603,7 @@ func expandThreeTierConfiguration(input []ThreeTierConfiguration) (*sapvirtualin ApplicationServer: pointer.From(expandApplicationServer(threeTierConfiguration.ApplicationServerConfiguration)), AppResourceGroup: threeTierConfiguration.AppResourceGroupName, CentralServer: pointer.From(expandCentralServer(threeTierConfiguration.CentralServerConfiguration)), - CustomResourceNames: expandFullResourceNames(threeTierConfiguration.FullResourceNames), + CustomResourceNames: expandResourceNames(threeTierConfiguration.ResourceNames), DatabaseServer: pointer.From(expandDatabaseServer(threeTierConfiguration.DatabaseServerConfiguration)), NetworkConfiguration: &sapvirtualinstances.NetworkConfiguration{ IsSecondaryIPEnabled: utils.Bool(threeTierConfiguration.IsSecondaryIpEnabled), @@ -1667,39 +1666,39 @@ func flattenDatabaseServer(input sapvirtualinstances.DatabaseConfiguration, d *p return append(result, databaseServerConfig) } -func flattenFullResourceNames(input sapvirtualinstances.ThreeTierFullResourceNames) []FullResourceNames { - result := make([]FullResourceNames, 0) +func flattenResourceNames(input sapvirtualinstances.ThreeTierFullResourceNames) []ResourceNames { + result := make([]ResourceNames, 0) - fullResourceNames := FullResourceNames{ - ApplicationServer: flattenApplicationServerFullResourceNames(input.ApplicationServer), - CentralServer: flattenCentralServerFullResourceNames(input.CentralServer), - DatabaseServer: flattenDatabaseServerFullResourceNames(input.DatabaseServer), + resourceNames := ResourceNames{ + ApplicationServer: flattenApplicationServerResourceNames(input.ApplicationServer), + CentralServer: flattenCentralServerResourceNames(input.CentralServer), + DatabaseServer: flattenDatabaseServerResourceNames(input.DatabaseServer), SharedStorage: flattenSharedStorage(input.SharedStorage), } - return append(result, fullResourceNames) + return append(result, resourceNames) } -func flattenApplicationServerFullResourceNames(input *sapvirtualinstances.ApplicationServerFullResourceNames) []ApplicationServerFullResourceNames { - result := make([]ApplicationServerFullResourceNames, 0) +func flattenApplicationServerResourceNames(input *sapvirtualinstances.ApplicationServerFullResourceNames) []ApplicationServerResourceNames { + result := make([]ApplicationServerResourceNames, 0) if input == nil { return result } - return append(result, ApplicationServerFullResourceNames{ + return append(result, ApplicationServerResourceNames{ AvailabilitySetName: pointer.From(input.AvailabilitySetName), - VirtualMachines: flattenVirtualMachinesFullResourceNames(input.VirtualMachines), + VirtualMachines: flattenVirtualMachinesResourceNames(input.VirtualMachines), }) } -func flattenVirtualMachinesFullResourceNames(input *[]sapvirtualinstances.VirtualMachineResourceNames) []VirtualMachineFullResourceNames { - result := make([]VirtualMachineFullResourceNames, 0) +func flattenVirtualMachinesResourceNames(input *[]sapvirtualinstances.VirtualMachineResourceNames) []VirtualMachineResourceNames { + result := make([]VirtualMachineResourceNames, 0) if input == nil { return result } for _, item := range *input { - result = append(result, VirtualMachineFullResourceNames{ + result = append(result, VirtualMachineResourceNames{ HostName: pointer.From(item.HostName), OSDiskName: pointer.From(item.OsDiskName), VMName: pointer.From(item.VirtualMachineName), @@ -1711,22 +1710,22 @@ func flattenVirtualMachinesFullResourceNames(input *[]sapvirtualinstances.Virtua return result } -func flattenCentralServerFullResourceNames(input *sapvirtualinstances.CentralServerFullResourceNames) []CentralServerFullResourceNames { - result := make([]CentralServerFullResourceNames, 0) +func flattenCentralServerResourceNames(input *sapvirtualinstances.CentralServerFullResourceNames) []CentralServerResourceNames { + result := make([]CentralServerResourceNames, 0) if input == nil { return result } - centralServerFullResourceNames := CentralServerFullResourceNames{ + centralServerResourceNames := CentralServerResourceNames{ AvailabilitySetName: pointer.From(input.AvailabilitySetName), - LoadBalancer: flattenLoadBalancerFullResourceNames(input.LoadBalancer), - VirtualMachines: flattenVirtualMachinesFullResourceNames(input.VirtualMachines), + LoadBalancer: flattenLoadBalancerResourceNames(input.LoadBalancer), + VirtualMachines: flattenVirtualMachinesResourceNames(input.VirtualMachines), } - return append(result, centralServerFullResourceNames) + return append(result, centralServerResourceNames) } -func flattenLoadBalancerFullResourceNames(input *sapvirtualinstances.LoadBalancerResourceNames) []LoadBalancer { +func flattenLoadBalancerResourceNames(input *sapvirtualinstances.LoadBalancerResourceNames) []LoadBalancer { result := make([]LoadBalancer, 0) if input == nil { return result @@ -1740,16 +1739,16 @@ func flattenLoadBalancerFullResourceNames(input *sapvirtualinstances.LoadBalance }) } -func flattenDatabaseServerFullResourceNames(input *sapvirtualinstances.DatabaseServerFullResourceNames) []DatabaseServerFullResourceNames { - result := make([]DatabaseServerFullResourceNames, 0) +func flattenDatabaseServerResourceNames(input *sapvirtualinstances.DatabaseServerFullResourceNames) []DatabaseServerResourceNames { + result := make([]DatabaseServerResourceNames, 0) if input == nil { return result } - return append(result, DatabaseServerFullResourceNames{ + return append(result, DatabaseServerResourceNames{ AvailabilitySetName: pointer.From(input.AvailabilitySetName), - LoadBalancer: flattenLoadBalancerFullResourceNames(input.LoadBalancer), - VirtualMachines: flattenVirtualMachinesFullResourceNames(input.VirtualMachines), + LoadBalancer: flattenLoadBalancerResourceNames(input.LoadBalancer), + VirtualMachines: flattenVirtualMachinesResourceNames(input.VirtualMachines), }) } @@ -1773,19 +1772,13 @@ func flattenDiskVolumeConfigurations(input *sapvirtualinstances.DiskConfiguratio for k, v := range *input.DiskVolumeConfigurations { diskVolumeConfiguration := DiskVolumeConfiguration{ - VolumeName: k, - } - - if count := v.Count; count != nil { - diskVolumeConfiguration.NumberOfDisks = int(*count) + NumberOfDisks: int(pointer.From(v.Count)), + SizeGb: int(pointer.From(v.SizeGB)), + VolumeName: k, } - if sizeGb := v.SizeGB; sizeGb != nil { - diskVolumeConfiguration.SizeGb = int(*sizeGb) - } - - if sku := v.Sku; sku != nil && sku.Name != nil { - diskVolumeConfiguration.SkuName = string(*sku.Name) + if sku := v.Sku; sku != nil { + diskVolumeConfiguration.SkuName = string(pointer.From(sku.Name)) } result = append(result, diskVolumeConfiguration) @@ -1833,14 +1826,12 @@ func flattenVirtualMachineConfiguration(input sapvirtualinstances.VirtualMachine func flattenImageReference(input sapvirtualinstances.ImageReference) []ImageReference { result := make([]ImageReference, 0) - imageReference := ImageReference{ + return append(result, ImageReference{ Offer: pointer.From(input.Offer), Publisher: pointer.From(input.Publisher), Sku: pointer.From(input.Sku), Version: pointer.From(input.Version), - } - - return append(result, imageReference) + }) } func flattenOSProfile(input sapvirtualinstances.OSProfile, d *pluginsdk.ResourceData, basePath string) []OSProfile { @@ -1874,7 +1865,7 @@ func flattenThreeTierConfiguration(input sapvirtualinstances.ThreeTierConfigurat if customResourceNames := input.CustomResourceNames; customResourceNames != nil { if v, ok := customResourceNames.(sapvirtualinstances.ThreeTierFullResourceNames); ok { - threeTierConfig.FullResourceNames = flattenFullResourceNames(v) + threeTierConfig.ResourceNames = flattenResourceNames(v) } } diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go index 939d04e70116..7c7b5aef2d8e 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go @@ -560,7 +560,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { } } - full_resource_names { + resource_names { application_server { availability_set_name = "appAvSet" @@ -797,7 +797,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { } } - full_resource_names { + resource_names { application_server { availability_set_name = "appAvSet" @@ -1055,7 +1055,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { } } - full_resource_names { + resource_names { application_server { availability_set_name = "appAvSet" diff --git a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown index 34929fbc49c7..ae06c22814f3 100644 --- a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown +++ b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown @@ -3,12 +3,12 @@ subcategory: "Workloads" layout: "azurerm" page_title: "Azure Resource Manager: azurerm_workloads_sap_three_tier_virtual_instance" description: |- - Manages a SAP Three Tier Virtual Instance with new SAP System. + Manages an SAP Three Tier Virtual Instance with new SAP System. --- # azurerm_workloads_sap_three_tier_virtual_instance -Manages a SAP Three Tier Virtual Instance with new SAP System. +Manages an SAP Three Tier Virtual Instance with new SAP System. -> **Note:** Before using this resource, it's required to submit the request of registering the Resource Provider with Azure CLI `az provider register --namespace "Microsoft.Workloads"`. The Resource Provider can take a while to register, you can check the status by running `az provider show --namespace "Microsoft.Workloads" --query "registrationState"`. Once this outputs "Registered" the Resource Provider is available for use. @@ -197,7 +197,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "example" { } } - full_resource_names { + resource_names { application_server { availability_set_name = "appAvSet" @@ -294,7 +294,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "example" { The following arguments are supported: -* `name` - (Required) The name which should be used for this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created. +* `name` - (Required) Specifies the name of this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created. * `resource_group_name` - (Required) The name of the Resource Group where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created. @@ -328,7 +328,7 @@ A `deployer_virtual_machine_packages` block supports the following: A `disk_volume_configuration` block supports the following: -* `volume_name` - (Required) The name of the DB volume of the disk configuration. Possible values are `backup`, `hana/data`, `hana/log`, `hana/shared`, `os` and `usr/sap`. Changing this forces a new resource to be created. +* `volume_name` - (Required) Specifies the volumn name of the database disk. Possible values are `backup`, `hana/data`, `hana/log`, `hana/shared`, `os` and `usr/sap`. Changing this forces a new resource to be created. * `number_of_disks` - (Required) The total number of disks required for the concerned volume. Changing this forces a new resource to be created. @@ -350,13 +350,13 @@ A `virtual_machine_configuration` block supports the following: An `image` block supports the following: -* `offer` - (Required) The offer of the platform image or marketplace image used to create the Virtual Machine. Changing this forces a new resource to be created. +* `offer` - (Required) Specifies the offer of the platform image or marketplace image used to create the virtual machine. Changing this forces a new resource to be created. * `publisher` - (Required) The publisher of the Image. Possible values are `RedHat` and `SUSE`. Changing this forces a new resource to be created. * `sku` - (Required) The SKU of the Image. Changing this forces a new resource to be created. -* `version` - (Required) The version of the platform image or marketplace image used to create the Virtual Machine. Changing this forces a new resource to be created. +* `version` - (Required) Specifies the version of the platform image or marketplace image used to create the virtual machine. Changing this forces a new resource to be created. --- @@ -364,9 +364,9 @@ An `os_profile` block supports the following: * `admin_username` - (Required) The name of the administrator account. Changing this forces a new resource to be created. -* `ssh_private_key` - (Required) The SSH public key that is used to authenticate with the VM. Changing this forces a new resource to be created. +* `ssh_private_key` - (Required) The SSH public key that is used to authenticate with the Virtual Machine. Changing this forces a new resource to be created. -* `ssh_public_key` - (Required) The SSH private key that is used to authenticate with the VM. Changing this forces a new resource to be created. +* `ssh_public_key` - (Required) The SSH private key that is used to authenticate with the Virtual Machine. Changing this forces a new resource to be created. --- @@ -374,17 +374,19 @@ A `three_tier_configuration` block supports the following: * `app_resource_group_name` - (Required) The name of the application Resource Group where SAP system resources will be deployed. Changing this forces a new resource to be created. +~> **Note:** While creating an SAP Three Tier Virtual Instance, the service would provision the extra SAP system/component in the `app_resource_group_name` that isn't defined in the HCL Configurations. At this time, if the `app_resource_group_name` is different from the Resource Group where SAP Three Tier Virtual Instance exists, you can set `prevent_deletion_if_contains_resources` to `false` to delete all resources defined in the HCL Configurations and the resources created in the `app_resource_group_name` with `terraform destroy`. However, if the `app_resource_group_name` is the same with the Resource Group where SAP Three Tier Virtual Instance exists, some resources such as the subnet defined in the HCL Configurations cannot be deleted with `terraform destroy` since the resources defined in the HCL Configurations are being referenced by the SAP system/component. In this case, you have to manually delete the SAP system/component before deleting the resources in the HCL Configurations. + * `application_server_configuration` - (Required) An `application_server_configuration` block as defined below. Changing this forces a new resource to be created. * `central_server_configuration` - (Required) A `central_server_configuration` block as defined below. Changing this forces a new resource to be created. * `database_server_configuration` - (Required) A `database_server_configuration` block as defined below. Changing this forces a new resource to be created. -* `full_resource_names` - (Optional) A `full_resource_names` block as defined below. Changing this forces a new resource to be created. +* `resource_names` - (Optional) A `resource_names` block as defined below. Changing this forces a new resource to be created. * `high_availability_type` - (Optional) The high availability type for the three tier configuration. Possible values are `AvailabilitySet` and `AvailabilityZone`. Changing this forces a new resource to be created. -* `secondary_ip_enabled` - (Optional) Is a secondary IP Address that should be added to the Network Interface on all VMs of the SAP system being deployed enabled? Defaults to `false`. Changing this forces a new resource to be created. +* `secondary_ip_enabled` - (Optional) Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. Defaults to `false`. Changing this forces a new resource to be created. * `transport_create_and_mount` - (Optional) A `transport_create_and_mount` block as defined below. Changing this forces a new resource to be created. @@ -444,7 +446,7 @@ A `database_server_configuration` block supports the following: --- -A `full_resource_names` block supports the following: +A `resource_names` block supports the following: * `application_server` - (Optional) An `application_server` block as defined below. Changing this forces a new resource to be created. @@ -466,13 +468,13 @@ An `application_server` block supports the following: A `virtual_machine` block supports the following: -* `data_disk_names` - (Optional) A mapping of Data Disk names to pass to the backend host. The keys are Volume names and the values are a comma separated string of full names for Data Disks belonging to the specific Volume. This is converted to a list before being passed to the API. Changing this forces a new resource to be created. +* `data_disk_names` - (Optional) A mapping of Data Disk names passed to the backend host. The keys are volume names, and the values are a comma separated list of full names of Data Disks per volume. Changing this forces a new resource to be created. * `host_name` - (Optional) The full name of the host of the Virtual Machine. Changing this forces a new resource to be created. * `network_interface_names` - (Optional) A list of full names for the Network Interface of the Virtual Machine. Changing this forces a new resource to be created. -* `os_disk_name` - (Optional) The full name of the OS Disk attached to the VM. Changing this forces a new resource to be created. +* `os_disk_name` - (Optional) The full name of the OS Disk attached to the Virtual Machine. Changing this forces a new resource to be created. * `virtual_machine_name` - (Optional) The full name of the Virtual Machine in a single server SAP system. Changing this forces a new resource to be created. From 908e52304f233ae3c30ba5c142f6fbf98452150d Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 22 Jan 2024 14:37:52 +0800 Subject: [PATCH 05/12] update code --- ...ap_three_tier_virtual_instance_resource.go | 86 +++++++++++++------ ..._three_tier_virtual_instance.html.markdown | 22 ++--- 2 files changed, 68 insertions(+), 40 deletions(-) diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go index 0e79b60ee14a..48b5f734ccd0 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go @@ -223,9 +223,10 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "instance_count": { - Type: pluginsdk.TypeInt, - Required: true, - ForceNew: true, + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntAtLeast(1), }, "subnet_id": { @@ -336,9 +337,10 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "instance_count": { - Type: pluginsdk.TypeInt, - Required: true, - ForceNew: true, + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntAtLeast(1), }, "subnet_id": { @@ -449,9 +451,10 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "instance_count": { - Type: pluginsdk.TypeInt, - Required: true, - ForceNew: true, + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntAtLeast(1), }, "subnet_id": { @@ -579,9 +582,10 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl }, "number_of_disks": { - Type: pluginsdk.TypeInt, - Required: true, - ForceNew: true, + Type: pluginsdk.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntAtLeast(1), }, "size_in_gb": { @@ -947,10 +951,11 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl }, "transport_create_and_mount": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + ConflictsWith: []string{"three_tier_configuration.0.transport_mount"}, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "resource_group_id": { @@ -971,10 +976,11 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl }, "transport_mount": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + ConflictsWith: []string{"three_tier_configuration.0.transport_create_and_mount"}, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "file_share_id": { @@ -1012,6 +1018,40 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Attributes() map[string]*p return map[string]*pluginsdk.Schema{} } +func (r WorkloadsSAPThreeTierVirtualInstanceResource) CustomizeDiff() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + rd := metadata.ResourceDiff + + if v := rd.Get("three_tier_configuration.0.database_server_configuration.0.disk_volume_configuration"); v != nil { + diskVolumes := v.(*pluginsdk.Set).List() + if hasDuplicateVolumeName(diskVolumes) { + return fmt.Errorf("`volume_name` cannot be duplicated") + } + } + + return nil + }, + } +} + +func hasDuplicateVolumeName(input []interface{}) bool { + seen := make(map[string]bool) + + for _, v := range input { + diskVolume := v.(map[string]interface{}) + volumeName := diskVolume["volume_name"].(string) + + if seen[volumeName] { + return true + } + seen[volumeName] = true + } + + return false +} + func (r WorkloadsSAPThreeTierVirtualInstanceResource) Create() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 60 * time.Minute, @@ -1159,11 +1199,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Read() sdk.ResourceFunc { if config := props.Configuration; config != nil { if v, ok := config.(sapvirtualinstances.DeploymentWithOSConfiguration); ok { - appLocation := "" - if appLocationVal := v.AppLocation; appLocationVal != nil { - appLocation = *v.AppLocation - } - state.AppLocation = location.Normalize(appLocation) + state.AppLocation = location.Normalize(pointer.From(v.AppLocation)) if osSapConfiguration := v.OsSapConfiguration; osSapConfiguration != nil { state.SapFqdn = pointer.From(osSapConfiguration.SapFqdn) diff --git a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown index ae06c22814f3..292e4b1629d9 100644 --- a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown +++ b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown @@ -3,12 +3,12 @@ subcategory: "Workloads" layout: "azurerm" page_title: "Azure Resource Manager: azurerm_workloads_sap_three_tier_virtual_instance" description: |- - Manages an SAP Three Tier Virtual Instance with new SAP System. + Manages an SAP Three Tier Virtual Instance with a new SAP System. --- # azurerm_workloads_sap_three_tier_virtual_instance -Manages an SAP Three Tier Virtual Instance with new SAP System. +Manages an SAP Three Tier Virtual Instance with a new SAP System. -> **Note:** Before using this resource, it's required to submit the request of registering the Resource Provider with Azure CLI `az provider register --namespace "Microsoft.Workloads"`. The Resource Provider can take a while to register, you can check the status by running `az provider show --namespace "Microsoft.Workloads" --query "registrationState"`. Once this outputs "Registered" the Resource Provider is available for use. @@ -318,19 +318,11 @@ The following arguments are supported: --- -A `deployer_virtual_machine_packages` block supports the following: - -* `storage_account_id` - (Required) The ID of the deployer VM packages storage account. Changing this forces a new resource to be created. - -* `url` - (Required) The URL of the deployer VM packages file. Changing this forces a new resource to be created. - ---- - A `disk_volume_configuration` block supports the following: * `volume_name` - (Required) Specifies the volumn name of the database disk. Possible values are `backup`, `hana/data`, `hana/log`, `hana/shared`, `os` and `usr/sap`. Changing this forces a new resource to be created. -* `number_of_disks` - (Required) The total number of disks required for the concerned volume. Changing this forces a new resource to be created. +* `number_of_disks` - (Required) The total number of disks required for the concerned volume. Possible values are at least `1`. Changing this forces a new resource to be created. * `size_in_gb` - (Required) The size of the Disk in GB. Changing this forces a new resource to be created. @@ -392,7 +384,7 @@ A `three_tier_configuration` block supports the following: * `transport_mount` - (Optional) A `transport_mount` block as defined below. Changing this forces a new resource to be created. -~> **Note:** The `Skip` configuration type would be enabled when the `transport_create_and_mount` and the `transport_mount` aren't set. +~> **Note:** The file share configuration uses `skip` by default If neither `transport_create_and_mount` nor `transport_mount` is set. --- @@ -414,7 +406,7 @@ A `transport_mount` block supports the following: An `application_server_configuration` block supports the following: -* `instance_count` - (Required) The number of instances for the Application Server. Changing this forces a new resource to be created. +* `instance_count` - (Required) The number of instances for the Application Server. Possible values are at least `1`. Changing this forces a new resource to be created. * `subnet_id` - (Required) The resource ID of the Subnet for the Application Server. Changing this forces a new resource to be created. @@ -424,7 +416,7 @@ An `application_server_configuration` block supports the following: A `central_server_configuration` block supports the following: -* `instance_count` - (Required) The number of instances for the Central Server. Changing this forces a new resource to be created. +* `instance_count` - (Required) The number of instances for the Central Server. Possible values are at least `1`. Changing this forces a new resource to be created. * `subnet_id` - (Required) The resource ID of the Subnet for the Central Server. Changing this forces a new resource to be created. @@ -434,7 +426,7 @@ A `central_server_configuration` block supports the following: A `database_server_configuration` block supports the following: -* `instance_count` - (Required) The number of instances for the Database Server. Changing this forces a new resource to be created. +* `instance_count` - (Required) The number of instances for the Database Server. Possible values are at least `1`. Changing this forces a new resource to be created. * `subnet_id` - (Required) The resource ID of the Subnet for the Database Server. Changing this forces a new resource to be created. From 38601fcfae5bdc90fc9bf62e957d86b9bf25be95 Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 22 Jan 2024 18:21:15 +0800 Subject: [PATCH 06/12] update code --- .../network/2023-04-01/privateendpoints/id_location.go | 6 +++--- .../2023-04-01/privateendpoints/id_privateendpoint.go | 6 +++--- .../2023-04-01/privateendpoints/id_providerlocation.go | 6 +++--- .../workloads/2023-04-01/monitors/id_monitor.go | 6 +++--- .../workloads/2023-04-01/providerinstances/id_monitor.go | 6 +++--- .../2023-04-01/providerinstances/id_providerinstance.go | 6 +++--- .../sapapplicationserverinstances/id_applicationinstance.go | 6 +++--- .../sapapplicationserverinstances/id_sapvirtualinstance.go | 6 +++--- .../2023-04-01/sapavailabilityzonedetails/id_location.go | 6 +++--- .../2023-04-01/sapcentralinstances/id_centralinstance.go | 6 +++--- .../2023-04-01/sapcentralinstances/id_sapvirtualinstance.go | 6 +++--- .../2023-04-01/sapdatabaseinstances/id_databaseinstance.go | 6 +++--- .../sapdatabaseinstances/id_sapvirtualinstance.go | 6 +++--- .../2023-04-01/sapdiskconfigurations/id_location.go | 6 +++--- .../workloads/2023-04-01/saplandscapemonitor/id_monitor.go | 6 +++--- .../workloads/2023-04-01/saprecommendations/id_location.go | 6 +++--- .../workloads/2023-04-01/sapsupportedsku/id_location.go | 6 +++--- .../2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go | 6 +++--- 18 files changed, 54 insertions(+), 54 deletions(-) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go index f2d861344268..d0ec2701c9f6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go @@ -10,7 +10,7 @@ import ( // 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 = LocationId{} +var _ resourceids.ResourceId = &LocationId{} // LocationId is a struct representing the Resource ID for a Location type LocationId struct { @@ -28,7 +28,7 @@ func NewLocationID(subscriptionId string, locationName string) LocationId { // ParseLocationID parses 'input' into a LocationId func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -45,7 +45,7 @@ func ParseLocationID(input string) (*LocationId, error) { // ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId // note: this method should only be used for API response data and not user input func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go index 2122ecbbc30b..2ea7644e3d40 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go @@ -10,7 +10,7 @@ import ( // 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 = PrivateEndpointId{} +var _ resourceids.ResourceId = &PrivateEndpointId{} // PrivateEndpointId is a struct representing the Resource ID for a Private Endpoint type PrivateEndpointId struct { @@ -30,7 +30,7 @@ func NewPrivateEndpointID(subscriptionId string, resourceGroupName string, priva // ParsePrivateEndpointID parses 'input' into a PrivateEndpointId func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) + parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { // ParsePrivateEndpointIDInsensitively parses 'input' case-insensitively into a PrivateEndpointId // note: this method should only be used for API response data and not user input func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) + parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go index e412f544122d..e7270dd4d020 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go @@ -10,7 +10,7 @@ import ( // 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 = ProviderLocationId{} +var _ resourceids.ResourceId = &ProviderLocationId{} // ProviderLocationId is a struct representing the Resource ID for a Provider Location type ProviderLocationId struct { @@ -30,7 +30,7 @@ func NewProviderLocationID(subscriptionId string, resourceGroupName string, loca // ParseProviderLocationID parses 'input' into a ProviderLocationId func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) + parser := resourceids.NewParserFromResourceIdType(&ProviderLocationId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { // ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId // note: this method should only be used for API response data and not user input func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) + parser := resourceids.NewParserFromResourceIdType(&ProviderLocationId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/id_monitor.go index d9ded30d5d7a..91ad9135d1a9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/id_monitor.go @@ -10,7 +10,7 @@ import ( // 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 = MonitorId{} +var _ resourceids.ResourceId = &MonitorId{} // MonitorId is a struct representing the Resource ID for a Monitor type MonitorId struct { @@ -30,7 +30,7 @@ func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName s // ParseMonitorID parses 'input' into a MonitorId func ParseMonitorID(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { // ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId // note: this method should only be used for API response data and not user input func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go index 10c3ca3d1e86..fafec7a18c2d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go @@ -10,7 +10,7 @@ import ( // 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 = MonitorId{} +var _ resourceids.ResourceId = &MonitorId{} // MonitorId is a struct representing the Resource ID for a Monitor type MonitorId struct { @@ -30,7 +30,7 @@ func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName s // ParseMonitorID parses 'input' into a MonitorId func ParseMonitorID(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { // ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId // note: this method should only be used for API response data and not user input func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go index 7a39b14c89de..4826fcc56cc5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go @@ -10,7 +10,7 @@ import ( // 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 = ProviderInstanceId{} +var _ resourceids.ResourceId = &ProviderInstanceId{} // ProviderInstanceId is a struct representing the Resource ID for a Provider Instance type ProviderInstanceId struct { @@ -32,7 +32,7 @@ func NewProviderInstanceID(subscriptionId string, resourceGroupName string, moni // ParseProviderInstanceID parses 'input' into a ProviderInstanceId func ParseProviderInstanceID(input string) (*ProviderInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&ProviderInstanceId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -49,7 +49,7 @@ func ParseProviderInstanceID(input string) (*ProviderInstanceId, error) { // ParseProviderInstanceIDInsensitively parses 'input' case-insensitively into a ProviderInstanceId // note: this method should only be used for API response data and not user input func ParseProviderInstanceIDInsensitively(input string) (*ProviderInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&ProviderInstanceId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go index 32b5c81a6f82..107f89447ae2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go @@ -10,7 +10,7 @@ import ( // 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 = ApplicationInstanceId{} +var _ resourceids.ResourceId = &ApplicationInstanceId{} // ApplicationInstanceId is a struct representing the Resource ID for a Application Instance type ApplicationInstanceId struct { @@ -32,7 +32,7 @@ func NewApplicationInstanceID(subscriptionId string, resourceGroupName string, s // ParseApplicationInstanceID parses 'input' into a ApplicationInstanceId func ParseApplicationInstanceID(input string) (*ApplicationInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&ApplicationInstanceId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -49,7 +49,7 @@ func ParseApplicationInstanceID(input string) (*ApplicationInstanceId, error) { // ParseApplicationInstanceIDInsensitively parses 'input' case-insensitively into a ApplicationInstanceId // note: this method should only be used for API response data and not user input func ParseApplicationInstanceIDInsensitively(input string) (*ApplicationInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&ApplicationInstanceId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go index a3da8c074727..1b4bcea90dc7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go @@ -10,7 +10,7 @@ import ( // 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 = SapVirtualInstanceId{} +var _ resourceids.ResourceId = &SapVirtualInstanceId{} // SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance type SapVirtualInstanceId struct { @@ -30,7 +30,7 @@ func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sa // ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&SapVirtualInstanceId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { // ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId // note: this method should only be used for API response data and not user input func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&SapVirtualInstanceId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go index 1ac88fba322b..b0f5a74ab600 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go @@ -10,7 +10,7 @@ import ( // 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 = LocationId{} +var _ resourceids.ResourceId = &LocationId{} // LocationId is a struct representing the Resource ID for a Location type LocationId struct { @@ -28,7 +28,7 @@ func NewLocationID(subscriptionId string, locationName string) LocationId { // ParseLocationID parses 'input' into a LocationId func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -45,7 +45,7 @@ func ParseLocationID(input string) (*LocationId, error) { // ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId // note: this method should only be used for API response data and not user input func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go index 31c92e65e5d9..e31f9d21c6a1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go @@ -10,7 +10,7 @@ import ( // 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 = CentralInstanceId{} +var _ resourceids.ResourceId = &CentralInstanceId{} // CentralInstanceId is a struct representing the Resource ID for a Central Instance type CentralInstanceId struct { @@ -32,7 +32,7 @@ func NewCentralInstanceID(subscriptionId string, resourceGroupName string, sapVi // ParseCentralInstanceID parses 'input' into a CentralInstanceId func ParseCentralInstanceID(input string) (*CentralInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(CentralInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&CentralInstanceId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -49,7 +49,7 @@ func ParseCentralInstanceID(input string) (*CentralInstanceId, error) { // ParseCentralInstanceIDInsensitively parses 'input' case-insensitively into a CentralInstanceId // note: this method should only be used for API response data and not user input func ParseCentralInstanceIDInsensitively(input string) (*CentralInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(CentralInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&CentralInstanceId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go index 883a1f1c0cbb..560571748dac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go @@ -10,7 +10,7 @@ import ( // 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 = SapVirtualInstanceId{} +var _ resourceids.ResourceId = &SapVirtualInstanceId{} // SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance type SapVirtualInstanceId struct { @@ -30,7 +30,7 @@ func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sa // ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&SapVirtualInstanceId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { // ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId // note: this method should only be used for API response data and not user input func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&SapVirtualInstanceId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go index 3501bed913b4..75e06feb8743 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go @@ -10,7 +10,7 @@ import ( // 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 = DatabaseInstanceId{} +var _ resourceids.ResourceId = &DatabaseInstanceId{} // DatabaseInstanceId is a struct representing the Resource ID for a Database Instance type DatabaseInstanceId struct { @@ -32,7 +32,7 @@ func NewDatabaseInstanceID(subscriptionId string, resourceGroupName string, sapV // ParseDatabaseInstanceID parses 'input' into a DatabaseInstanceId func ParseDatabaseInstanceID(input string) (*DatabaseInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&DatabaseInstanceId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -49,7 +49,7 @@ func ParseDatabaseInstanceID(input string) (*DatabaseInstanceId, error) { // ParseDatabaseInstanceIDInsensitively parses 'input' case-insensitively into a DatabaseInstanceId // note: this method should only be used for API response data and not user input func ParseDatabaseInstanceIDInsensitively(input string) (*DatabaseInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&DatabaseInstanceId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go index 2d37fb8e8ade..21c8f676f8db 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go @@ -10,7 +10,7 @@ import ( // 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 = SapVirtualInstanceId{} +var _ resourceids.ResourceId = &SapVirtualInstanceId{} // SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance type SapVirtualInstanceId struct { @@ -30,7 +30,7 @@ func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sa // ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&SapVirtualInstanceId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { // ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId // note: this method should only be used for API response data and not user input func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&SapVirtualInstanceId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go index 8c24504e326b..d736416b9386 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go @@ -10,7 +10,7 @@ import ( // 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 = LocationId{} +var _ resourceids.ResourceId = &LocationId{} // LocationId is a struct representing the Resource ID for a Location type LocationId struct { @@ -28,7 +28,7 @@ func NewLocationID(subscriptionId string, locationName string) LocationId { // ParseLocationID parses 'input' into a LocationId func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -45,7 +45,7 @@ func ParseLocationID(input string) (*LocationId, error) { // ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId // note: this method should only be used for API response data and not user input func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go index aa8b9997ae92..8a48c6c7886d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go @@ -10,7 +10,7 @@ import ( // 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 = MonitorId{} +var _ resourceids.ResourceId = &MonitorId{} // MonitorId is a struct representing the Resource ID for a Monitor type MonitorId struct { @@ -30,7 +30,7 @@ func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName s // ParseMonitorID parses 'input' into a MonitorId func ParseMonitorID(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { // ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId // note: this method should only be used for API response data and not user input func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(MonitorId{}) + parser := resourceids.NewParserFromResourceIdType(&MonitorId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go index 76463fa1e0c0..3094f0882fb6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go @@ -10,7 +10,7 @@ import ( // 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 = LocationId{} +var _ resourceids.ResourceId = &LocationId{} // LocationId is a struct representing the Resource ID for a Location type LocationId struct { @@ -28,7 +28,7 @@ func NewLocationID(subscriptionId string, locationName string) LocationId { // ParseLocationID parses 'input' into a LocationId func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -45,7 +45,7 @@ func ParseLocationID(input string) (*LocationId, error) { // ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId // note: this method should only be used for API response data and not user input func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go index 27a3f191002c..258ff80da478 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go @@ -10,7 +10,7 @@ import ( // 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 = LocationId{} +var _ resourceids.ResourceId = &LocationId{} // LocationId is a struct representing the Resource ID for a Location type LocationId struct { @@ -28,7 +28,7 @@ func NewLocationID(subscriptionId string, locationName string) LocationId { // ParseLocationID parses 'input' into a LocationId func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -45,7 +45,7 @@ func ParseLocationID(input string) (*LocationId, error) { // ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId // note: this method should only be used for API response data and not user input func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go index 7bb7ed7a165d..5be70e9d470f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go @@ -10,7 +10,7 @@ import ( // 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 = SapVirtualInstanceId{} +var _ resourceids.ResourceId = &SapVirtualInstanceId{} // SapVirtualInstanceId is a struct representing the Resource ID for a Sap Virtual Instance type SapVirtualInstanceId struct { @@ -30,7 +30,7 @@ func NewSapVirtualInstanceID(subscriptionId string, resourceGroupName string, sa // ParseSapVirtualInstanceID parses 'input' into a SapVirtualInstanceId func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&SapVirtualInstanceId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,7 +47,7 @@ func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { // ParseSapVirtualInstanceIDInsensitively parses 'input' case-insensitively into a SapVirtualInstanceId // note: this method should only be used for API response data and not user input func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(SapVirtualInstanceId{}) + parser := resourceids.NewParserFromResourceIdType(&SapVirtualInstanceId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) From fa7772400559bc4b84b076cf1cbaf82b31f16925 Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 22 Jan 2024 19:37:51 +0800 Subject: [PATCH 07/12] update code --- .../2023-04-01/privateendpoints/method_createorupdate.go | 5 +++++ .../workloads/2023-04-01/monitors/method_create.go | 5 +++++ .../workloads/2023-04-01/monitors/method_delete.go | 5 +++++ .../workloads/2023-04-01/providerinstances/method_create.go | 5 +++++ .../workloads/2023-04-01/providerinstances/method_delete.go | 5 +++++ .../sapapplicationserverinstances/method_create.go | 5 +++++ .../sapapplicationserverinstances/method_delete.go | 5 +++++ .../sapapplicationserverinstances/method_startinstance.go | 5 +++++ .../sapapplicationserverinstances/method_stopinstance.go | 5 +++++ .../sapapplicationserverinstances/method_update.go | 5 +++++ .../2023-04-01/sapcentralinstances/method_create.go | 5 +++++ .../2023-04-01/sapcentralinstances/method_delete.go | 5 +++++ .../2023-04-01/sapcentralinstances/method_startinstance.go | 5 +++++ .../2023-04-01/sapcentralinstances/method_stopinstance.go | 5 +++++ .../2023-04-01/sapcentralinstances/method_update.go | 5 +++++ .../2023-04-01/sapdatabaseinstances/method_create.go | 5 +++++ .../2023-04-01/sapdatabaseinstances/method_delete.go | 5 +++++ .../2023-04-01/sapdatabaseinstances/method_startinstance.go | 5 +++++ .../2023-04-01/sapdatabaseinstances/method_stopinstance.go | 5 +++++ .../2023-04-01/sapdatabaseinstances/method_update.go | 5 +++++ .../2023-04-01/sapvirtualinstances/method_create.go | 5 +++++ .../2023-04-01/sapvirtualinstances/method_delete.go | 5 +++++ .../workloads/2023-04-01/sapvirtualinstances/method_start.go | 5 +++++ .../workloads/2023-04-01/sapvirtualinstances/method_stop.go | 5 +++++ 24 files changed, 120 insertions(+) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go index 04fee084ffc1..ba02190bc36b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go @@ -18,6 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *PrivateEndpoint } // CreateOrUpdate ... @@ -51,6 +52,10 @@ func (c PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, id PrivateEn return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_create.go index 08757e93a50c..14842c1fe95d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_create.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_create.go @@ -18,6 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *Monitor } // Create ... @@ -51,6 +52,10 @@ func (c MonitorsClient) Create(ctx context.Context, id MonitorId, input Monitor) return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_delete.go index ed121cfa76fb..7c4d21d7f044 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_delete.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors/method_delete.go @@ -18,6 +18,7 @@ type DeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // Delete ... @@ -48,6 +49,10 @@ func (c MonitorsClient) Delete(ctx context.Context, id MonitorId) (result Delete return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_create.go index 0377f1dbc80f..8aca8421054b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_create.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_create.go @@ -18,6 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *ProviderInstance } // Create ... @@ -51,6 +52,10 @@ func (c ProviderInstancesClient) Create(ctx context.Context, id ProviderInstance return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_delete.go index ef336a813e30..a133157f9688 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_delete.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances/method_delete.go @@ -18,6 +18,7 @@ type DeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // Delete ... @@ -48,6 +49,10 @@ func (c ProviderInstancesClient) Delete(ctx context.Context, id ProviderInstance return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_create.go index fcbeefc223f1..1e5893b98523 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_create.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_create.go @@ -18,6 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *SAPApplicationServerInstance } // Create ... @@ -51,6 +52,10 @@ func (c SAPApplicationServerInstancesClient) Create(ctx context.Context, id Appl return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_delete.go index a364eb11a2e6..d844dba754d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_delete.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_delete.go @@ -18,6 +18,7 @@ type DeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // Delete ... @@ -48,6 +49,10 @@ func (c SAPApplicationServerInstancesClient) Delete(ctx context.Context, id Appl return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_startinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_startinstance.go index 6eb4fcdea29e..2a73b14ecc22 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_startinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_startinstance.go @@ -18,6 +18,7 @@ type StartInstanceOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // StartInstance ... @@ -47,6 +48,10 @@ func (c SAPApplicationServerInstancesClient) StartInstance(ctx context.Context, return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_stopinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_stopinstance.go index 6863f0bddd86..1a2515d0bc31 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_stopinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_stopinstance.go @@ -18,6 +18,7 @@ type StopInstanceOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // StopInstance ... @@ -51,6 +52,10 @@ func (c SAPApplicationServerInstancesClient) StopInstance(ctx context.Context, i return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_update.go index 09fabe0ecea5..3e811e8b1ccf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_update.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_update.go @@ -18,6 +18,7 @@ type UpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *SAPApplicationServerInstance } // Update ... @@ -51,6 +52,10 @@ func (c SAPApplicationServerInstancesClient) Update(ctx context.Context, id Appl return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_create.go index 9de10497b0ea..fa1ef6576b37 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_create.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_create.go @@ -18,6 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *SAPCentralServerInstance } // Create ... @@ -51,6 +52,10 @@ func (c SAPCentralInstancesClient) Create(ctx context.Context, id CentralInstanc return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_delete.go index 0ba0c1b287d9..225c0776f26b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_delete.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_delete.go @@ -18,6 +18,7 @@ type DeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // Delete ... @@ -48,6 +49,10 @@ func (c SAPCentralInstancesClient) Delete(ctx context.Context, id CentralInstanc return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_startinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_startinstance.go index c29d73a105a2..ac5f3535143f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_startinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_startinstance.go @@ -18,6 +18,7 @@ type StartInstanceOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // StartInstance ... @@ -47,6 +48,10 @@ func (c SAPCentralInstancesClient) StartInstance(ctx context.Context, id Central return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_stopinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_stopinstance.go index c1560fa42b1a..b3630eae7162 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_stopinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_stopinstance.go @@ -18,6 +18,7 @@ type StopInstanceOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // StopInstance ... @@ -51,6 +52,10 @@ func (c SAPCentralInstancesClient) StopInstance(ctx context.Context, id CentralI return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_update.go index 237e8c83e82a..9232fb4a9a0a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_update.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances/method_update.go @@ -18,6 +18,7 @@ type UpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *SAPCentralServerInstance } // Update ... @@ -51,6 +52,10 @@ func (c SAPCentralInstancesClient) Update(ctx context.Context, id CentralInstanc return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_create.go index b09c733f4212..348852f97727 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_create.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_create.go @@ -18,6 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *SAPDatabaseInstance } // Create ... @@ -51,6 +52,10 @@ func (c SAPDatabaseInstancesClient) Create(ctx context.Context, id DatabaseInsta return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_delete.go index 858070a918e6..8a2935da4cf0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_delete.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_delete.go @@ -18,6 +18,7 @@ type DeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // Delete ... @@ -48,6 +49,10 @@ func (c SAPDatabaseInstancesClient) Delete(ctx context.Context, id DatabaseInsta return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_startinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_startinstance.go index 5b33e3a0798b..839b19329aac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_startinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_startinstance.go @@ -18,6 +18,7 @@ type StartInstanceOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // StartInstance ... @@ -47,6 +48,10 @@ func (c SAPDatabaseInstancesClient) StartInstance(ctx context.Context, id Databa return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_stopinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_stopinstance.go index f01ff4414c1c..224a536887e8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_stopinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_stopinstance.go @@ -18,6 +18,7 @@ type StopInstanceOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // StopInstance ... @@ -51,6 +52,10 @@ func (c SAPDatabaseInstancesClient) StopInstance(ctx context.Context, id Databas return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_update.go index 430362b83daf..d8656d108159 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_update.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_update.go @@ -18,6 +18,7 @@ type UpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *SAPDatabaseInstance } // Update ... @@ -51,6 +52,10 @@ func (c SAPDatabaseInstancesClient) Update(ctx context.Context, id DatabaseInsta return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_create.go index 4039bcf59782..7874106f48ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_create.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_create.go @@ -18,6 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *SAPVirtualInstance } // Create ... @@ -51,6 +52,10 @@ func (c SAPVirtualInstancesClient) Create(ctx context.Context, id SapVirtualInst return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_delete.go index ec782ce29c75..9a445c8fe99b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_delete.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_delete.go @@ -18,6 +18,7 @@ type DeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // Delete ... @@ -48,6 +49,10 @@ func (c SAPVirtualInstancesClient) Delete(ctx context.Context, id SapVirtualInst return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_start.go index 9733643e406e..fe70b73bd865 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_start.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_start.go @@ -18,6 +18,7 @@ type StartOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // Start ... @@ -47,6 +48,10 @@ func (c SAPVirtualInstancesClient) Start(ctx context.Context, id SapVirtualInsta return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_stop.go index d991b685dfca..03cd5535ebd7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_stop.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_stop.go @@ -18,6 +18,7 @@ type StopOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *OperationStatusResult } // Stop ... @@ -51,6 +52,10 @@ func (c SAPVirtualInstancesClient) Stop(ctx context.Context, id SapVirtualInstan return } + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) if err != nil { return From ee1d2d884b2d5c6688b194093bb458a0851185df Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 26 Feb 2024 13:51:56 +0800 Subject: [PATCH 08/12] update code --- .../legacy_storage_share_resource_manager.go | 84 ----- ...acy_storage_share_resource_manager_test.go | 147 --------- internal/services/storage/resourceids.go | 1 - ...egacy_storage_share_resource_manager_id.go | 26 -- ..._storage_share_resource_manager_id_test.go | 103 ------- ...ap_three_tier_virtual_instance_resource.go | 98 +----- ...ree_tier_virtual_instance_resource_test.go | 290 ------------------ ..._three_tier_virtual_instance.html.markdown | 12 +- 8 files changed, 9 insertions(+), 752 deletions(-) delete mode 100644 internal/services/storage/parse/legacy_storage_share_resource_manager.go delete mode 100644 internal/services/storage/parse/legacy_storage_share_resource_manager_test.go delete mode 100644 internal/services/storage/validate/legacy_storage_share_resource_manager_id.go delete mode 100644 internal/services/storage/validate/legacy_storage_share_resource_manager_id_test.go diff --git a/internal/services/storage/parse/legacy_storage_share_resource_manager.go b/internal/services/storage/parse/legacy_storage_share_resource_manager.go deleted file mode 100644 index 83210949246a..000000000000 --- a/internal/services/storage/parse/legacy_storage_share_resource_manager.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type LegacyStorageShareResourceManagerId struct { - SubscriptionId string - ResourceGroup string - StorageAccountName string - FileServiceName string - ShareName string -} - -func NewLegacyStorageShareResourceManagerID(subscriptionId, resourceGroup, storageAccountName, fileServiceName, shareName string) LegacyStorageShareResourceManagerId { - return LegacyStorageShareResourceManagerId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - StorageAccountName: storageAccountName, - FileServiceName: fileServiceName, - ShareName: shareName, - } -} - -func (id LegacyStorageShareResourceManagerId) String() string { - segments := []string{ - fmt.Sprintf("Share Name %q", id.ShareName), - fmt.Sprintf("File Service Name %q", id.FileServiceName), - fmt.Sprintf("Storage Account Name %q", id.StorageAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Legacy Storage Share Resource Manager", segmentsStr) -} - -func (id LegacyStorageShareResourceManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Storage/storageAccounts/%s/fileServices/%s/shares/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.StorageAccountName, id.FileServiceName, id.ShareName) -} - -// LegacyStorageShareResourceManagerID parses a LegacyStorageShareResourceManager ID into an LegacyStorageShareResourceManagerId struct -func LegacyStorageShareResourceManagerID(input string) (*LegacyStorageShareResourceManagerId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, fmt.Errorf("parsing %q as an LegacyStorageShareResourceManager ID: %+v", input, err) - } - - resourceId := LegacyStorageShareResourceManagerId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.StorageAccountName, err = id.PopSegment("storageAccounts"); err != nil { - return nil, err - } - if resourceId.FileServiceName, err = id.PopSegment("fileServices"); err != nil { - return nil, err - } - if resourceId.ShareName, err = id.PopSegment("shares"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/storage/parse/legacy_storage_share_resource_manager_test.go b/internal/services/storage/parse/legacy_storage_share_resource_manager_test.go deleted file mode 100644 index f3fd0a2ce93d..000000000000 --- a/internal/services/storage/parse/legacy_storage_share_resource_manager_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = LegacyStorageShareResourceManagerId{} - -func TestLegacyStorageShareResourceManagerIDFormatter(t *testing.T) { - actual := NewLegacyStorageShareResourceManagerID("12345678-1234-9876-4563-123456789012", "resGroup1", "storageAccount1", "fileService1", "share1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/share1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestLegacyStorageShareResourceManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LegacyStorageShareResourceManagerId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing StorageAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/", - Error: true, - }, - - { - // missing value for StorageAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/", - Error: true, - }, - - { - // missing FileServiceName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/", - Error: true, - }, - - { - // missing value for FileServiceName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/", - Error: true, - }, - - { - // missing ShareName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/", - Error: true, - }, - - { - // missing value for ShareName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/share1", - Expected: &LegacyStorageShareResourceManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "resGroup1", - StorageAccountName: "storageAccount1", - FileServiceName: "fileService1", - ShareName: "share1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.STORAGE/STORAGEACCOUNTS/STORAGEACCOUNT1/FILESERVICES/FILESERVICE1/SHARES/SHARE1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := LegacyStorageShareResourceManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.StorageAccountName != v.Expected.StorageAccountName { - t.Fatalf("Expected %q but got %q for StorageAccountName", v.Expected.StorageAccountName, actual.StorageAccountName) - } - if actual.FileServiceName != v.Expected.FileServiceName { - t.Fatalf("Expected %q but got %q for FileServiceName", v.Expected.FileServiceName, actual.FileServiceName) - } - if actual.ShareName != v.Expected.ShareName { - t.Fatalf("Expected %q but got %q for ShareName", v.Expected.ShareName, actual.ShareName) - } - } -} diff --git a/internal/services/storage/resourceids.go b/internal/services/storage/resourceids.go index fa7a920cc520..003c70183894 100644 --- a/internal/services/storage/resourceids.go +++ b/internal/services/storage/resourceids.go @@ -7,5 +7,4 @@ package storage //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=StorageAccountDefaultBlob -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/blobServices/default //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=StorageQueueResourceManager -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/queueServices/default/queues/queue1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=StorageShareResourceManager -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/fileshares/share1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=LegacyStorageShareResourceManager -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/share1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=StorageAccountManagementPolicy -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/managementPolicies/policy1 diff --git a/internal/services/storage/validate/legacy_storage_share_resource_manager_id.go b/internal/services/storage/validate/legacy_storage_share_resource_manager_id.go deleted file mode 100644 index f3a0e94d7aae..000000000000 --- a/internal/services/storage/validate/legacy_storage_share_resource_manager_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" -) - -func LegacyStorageShareResourceManagerID(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 := parse.LegacyStorageShareResourceManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/storage/validate/legacy_storage_share_resource_manager_id_test.go b/internal/services/storage/validate/legacy_storage_share_resource_manager_id_test.go deleted file mode 100644 index a6bf8ca7fbde..000000000000 --- a/internal/services/storage/validate/legacy_storage_share_resource_manager_id_test.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestLegacyStorageShareResourceManagerID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing StorageAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/", - Valid: false, - }, - - { - // missing value for StorageAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/", - Valid: false, - }, - - { - // missing FileServiceName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/", - Valid: false, - }, - - { - // missing value for FileServiceName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/", - Valid: false, - }, - - { - // missing ShareName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/", - Valid: false, - }, - - { - // missing value for ShareName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/fileServices/fileService1/shares/share1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/RESGROUP1/PROVIDERS/MICROSOFT.STORAGE/STORAGEACCOUNTS/STORAGEACCOUNT1/FILESERVICES/FILESERVICE1/SHARES/SHARE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := LegacyStorageShareResourceManagerID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go index 48b5f734ccd0..95f2a13d2ebf 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go @@ -13,12 +13,10 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/resourcegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints" "github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" computeValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/compute/validate" networkValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" - storageParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/parse" storageValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/services/workloads/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -83,7 +81,6 @@ type ThreeTierConfiguration struct { HighAvailabilityType string `tfschema:"high_availability_type"` IsSecondaryIpEnabled bool `tfschema:"secondary_ip_enabled"` TransportCreateAndMount []TransportCreateAndMount `tfschema:"transport_create_and_mount"` - TransportMount []TransportMount `tfschema:"transport_mount"` } type TransportCreateAndMount struct { @@ -91,11 +88,6 @@ type TransportCreateAndMount struct { StorageAccountName string `tfschema:"storage_account_name"` } -type TransportMount struct { - FileShareId string `tfschema:"file_share_id"` - PrivateEndpointId string `tfschema:"private_endpoint_id"` -} - type ApplicationServerConfiguration struct { InstanceCount int `tfschema:"instance_count"` SubnetId string `tfschema:"subnet_id"` @@ -951,11 +943,10 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl }, "transport_create_and_mount": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - ConflictsWith: []string{"three_tier_configuration.0.transport_mount"}, + Type: pluginsdk.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "resource_group_id": { @@ -974,31 +965,6 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl }, }, }, - - "transport_mount": { - Type: pluginsdk.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - ConflictsWith: []string{"three_tier_configuration.0.transport_create_and_mount"}, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "file_share_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: storageValidate.StorageShareResourceManagerID, - }, - - "private_endpoint_id": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: privateendpoints.ValidatePrivateEndpointID, - }, - }, - }, - }, }, }, }, @@ -1410,7 +1376,7 @@ func expandDatabaseServer(input []DatabaseServerConfiguration) *sapvirtualinstan } func expandStorageConfiguration(input ThreeTierConfiguration) (*sapvirtualinstances.StorageConfiguration, error) { - if len(input.TransportCreateAndMount) == 0 && len(input.TransportMount) == 0 { + if len(input.TransportCreateAndMount) == 0 { return &sapvirtualinstances.StorageConfiguration{ TransportFileShareConfiguration: sapvirtualinstances.SkipFileShareConfiguration{}, }, nil @@ -1418,14 +1384,6 @@ func expandStorageConfiguration(input ThreeTierConfiguration) (*sapvirtualinstan result := &sapvirtualinstances.StorageConfiguration{} - if len(input.TransportMount) != 0 { - transportMount, err := expandTransportMount(input.TransportMount) - if err != nil { - return nil, err - } - result.TransportFileShareConfiguration = transportMount - } - if len(input.TransportCreateAndMount) != 0 { transportCreateAndMount, err := expandTransportCreateAndMount(input.TransportCreateAndMount) if err != nil { @@ -1461,28 +1419,6 @@ func expandTransportCreateAndMount(input []TransportCreateAndMount) (*sapvirtual return result, nil } -func expandTransportMount(input []TransportMount) (*sapvirtualinstances.MountFileShareConfiguration, error) { - if len(input) == 0 { - return nil, nil - } - - transportMount := input[0] - - // Currently, the last segment of the Storage File Share resource manager ID in Swagger is defined as `/shares/` but it's unexpected. - // The last segment of the Storage File Share resource manager ID should be `/fileshares/` not `/shares/` in Swagger since the backend service is using `/fileshares/`. - // See more details from https://github.com/Azure/azure-rest-api-specs/issues/25209 - storageShareResourceManagerId, err := storageParse.StorageShareResourceManagerID(transportMount.FileShareId) - if err != nil { - return nil, err - } - result := &sapvirtualinstances.MountFileShareConfiguration{ - Id: storageParse.NewLegacyStorageShareResourceManagerID(storageShareResourceManagerId.SubscriptionId, storageShareResourceManagerId.ResourceGroup, storageShareResourceManagerId.StorageAccountName, storageShareResourceManagerId.FileServiceName, storageShareResourceManagerId.FileshareName).ID(), - PrivateEndpointId: transportMount.PrivateEndpointId, - } - - return result, nil -} - func expandResourceNames(input []ResourceNames) *sapvirtualinstances.ThreeTierFullResourceNames { if len(input) == 0 { return nil @@ -1931,31 +1867,11 @@ func flattenThreeTierConfiguration(input sapvirtualinstances.ThreeTierConfigurat } } - if v, ok := transportFileShareConfiguration.(sapvirtualinstances.MountFileShareConfiguration); ok { - transportMount, err := flattenTransportMount(v) - if err != nil { - return nil, err - } - threeTierConfig.TransportMount = transportMount + if _, ok := transportFileShareConfiguration.(sapvirtualinstances.MountFileShareConfiguration); ok { + return nil, fmt.Errorf("currently, the last segment of the Storage File Share resource manager ID in Swagger is defined as `/shares/` but it's unexpected. The last segment of the Storage File Share resource manager ID should be `/fileshares/` not `/shares/` in Swagger since the backend service is using `/fileshares/`. See more details from https://github.com/Azure/azure-rest-api-specs/issues/25209. So the feature of `TransportMount` isn't supported by TF for now due to this service API bug") } } } return append(result, threeTierConfig), nil } - -func flattenTransportMount(input sapvirtualinstances.MountFileShareConfiguration) ([]TransportMount, error) { - result := make([]TransportMount, 0) - - // Currently, the last segment of the Storage File Share resource manager ID in Swagger is defined as `/shares/` but it's unexpected. - // The last segment of the Storage File Share resource manager ID should be `/fileshares/` not `/shares/` in Swagger since the backend service is using `/fileshares/`. - // See more details from https://github.com/Azure/azure-rest-api-specs/issues/25209 - legacyStorageShareResourceManagerId, err := storageParse.LegacyStorageShareResourceManagerID(input.Id) - if err != nil { - return nil, err - } - return append(result, TransportMount{ - FileShareId: storageParse.NewStorageShareResourceManagerID(legacyStorageShareResourceManagerId.SubscriptionId, legacyStorageShareResourceManagerId.ResourceGroup, legacyStorageShareResourceManagerId.StorageAccountName, legacyStorageShareResourceManagerId.FileServiceName, legacyStorageShareResourceManagerId.ShareName).ID(), - PrivateEndpointId: input.PrivateEndpointId, - }), nil -} diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go index 7c7b5aef2d8e..5d59aadc84c5 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go @@ -119,26 +119,6 @@ func TestAccWorkloadsSAPThreeTierVirtualInstance_update(t *testing.T) { }) } -func TestAccWorkloadsSAPThreeTierVirtualInstance_transportMount(t *testing.T) { - data := acceptance.BuildTestData(t, "azurerm_workloads_sap_three_tier_virtual_instance", "test") - r := WorkloadsSAPThreeTierVirtualInstanceResource{} - sapVISNameSuffix := RandomInt() - - data.ResourceTest(t, r, []acceptance.TestStep{ - { - Config: r.transportMount(data, sapVISNameSuffix), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep( - "three_tier_configuration.0.application_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", - "three_tier_configuration.0.central_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", - "three_tier_configuration.0.database_server_configuration.0.virtual_machine_configuration.0.os_profile.0.ssh_private_key", - ), - }) -} - func (r WorkloadsSAPThreeTierVirtualInstanceResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { id, err := sapvirtualinstances.ParseSapVirtualInstanceID(state.ID) if err != nil { @@ -879,276 +859,6 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { `, r.template(data), data.RandomString, sapVISNameSuffix, data.RandomInteger, data.RandomString, data.RandomString, data.RandomString) } -func (r WorkloadsSAPThreeTierVirtualInstanceResource) transportMount(data acceptance.TestData, sapVISNameSuffix int) string { - return fmt.Sprintf(` -%s - -provider "azurerm" { - features { - resource_group { - prevent_deletion_if_contains_resources = false - } - } -} - -resource "azurerm_storage_account" "test" { - name = "acctestsa%s" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - account_kind = "FileStorage" - account_tier = "Premium" - account_replication_type = "LRS" - enable_https_traffic_only = false -} - -resource "azurerm_storage_share" "test" { - name = "acctestshare%d" - storage_account_name = azurerm_storage_account.test.name - enabled_protocol = "NFS" - quota = 100 -} - -resource "azurerm_private_dns_zone" "test" { - name = "acctest%d.privatelink.file.core.windows.net" - resource_group_name = azurerm_resource_group.test.name -} - -resource "azurerm_private_endpoint" "test" { - name = "acctest-pe-%d" - location = azurerm_resource_group.test.location - resource_group_name = azurerm_resource_group.test.name - subnet_id = azurerm_subnet.test.id - - private_dns_zone_group { - name = "acctest-dzg-%d" - private_dns_zone_ids = [azurerm_private_dns_zone.test.id] - } - - private_service_connection { - name = "acctest-privatelink-%d" - is_manual_connection = false - private_connection_resource_id = azurerm_storage_account.test.id - subresource_names = ["file"] - } -} - -resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { - name = "X%d" - resource_group_name = azurerm_resource_group.test.name - location = azurerm_resource_group.test.location - environment = "NonProd" - sap_product = "S4HANA" - managed_resource_group_name = "managedTestRG%d" - app_location = azurerm_resource_group.app.location - sap_fqdn = "sap.bpaas.com" - - three_tier_configuration { - app_resource_group_name = azurerm_resource_group.app.name - secondary_ip_enabled = true - - application_server_configuration { - instance_count = 1 - subnet_id = azurerm_subnet.test.id - - virtual_machine_configuration { - virtual_machine_size = "Standard_D16ds_v4" - - image { - offer = "RHEL-SAP-HA" - publisher = "RedHat" - sku = "82sapha-gen2" - version = "latest" - } - - os_profile { - admin_username = "testAdmin" - ssh_private_key = tls_private_key.test.private_key_pem - ssh_public_key = data.tls_public_key.test.public_key_openssh - } - } - } - - central_server_configuration { - instance_count = 1 - subnet_id = azurerm_subnet.test.id - - virtual_machine_configuration { - virtual_machine_size = "Standard_D16ds_v4" - - image { - offer = "RHEL-SAP-HA" - publisher = "RedHat" - sku = "82sapha-gen2" - version = "latest" - } - - os_profile { - admin_username = "testAdmin" - ssh_private_key = tls_private_key.test.private_key_pem - ssh_public_key = data.tls_public_key.test.public_key_openssh - } - } - } - - database_server_configuration { - instance_count = 1 - subnet_id = azurerm_subnet.test.id - database_type = "HANA" - - virtual_machine_configuration { - virtual_machine_size = "Standard_E16ds_v4" - - image { - offer = "RHEL-SAP-HA" - publisher = "RedHat" - sku = "82sapha-gen2" - version = "latest" - } - - os_profile { - admin_username = "testAdmin" - ssh_private_key = tls_private_key.test.private_key_pem - ssh_public_key = data.tls_public_key.test.public_key_openssh - } - } - - disk_volume_configuration { - volume_name = "hana/data" - number_of_disks = 3 - size_in_gb = 128 - sku_name = "Premium_LRS" - } - - disk_volume_configuration { - volume_name = "hana/log" - number_of_disks = 3 - size_in_gb = 128 - sku_name = "Premium_LRS" - } - - disk_volume_configuration { - volume_name = "hana/shared" - number_of_disks = 1 - size_in_gb = 256 - sku_name = "Premium_LRS" - } - - disk_volume_configuration { - volume_name = "usr/sap" - number_of_disks = 1 - size_in_gb = 128 - sku_name = "Premium_LRS" - } - - disk_volume_configuration { - volume_name = "backup" - number_of_disks = 2 - size_in_gb = 256 - sku_name = "StandardSSD_LRS" - } - - disk_volume_configuration { - volume_name = "os" - number_of_disks = 1 - size_in_gb = 64 - sku_name = "StandardSSD_LRS" - } - } - - resource_names { - application_server { - availability_set_name = "appAvSet" - - virtual_machine { - host_name = "apphostName0" - os_disk_name = "app0osdisk" - virtual_machine_name = "appvm0" - network_interface_names = ["appnic0"] - - data_disk_names = { - default = "app0disk0" - } - } - } - - central_server { - availability_set_name = "csAvSet" - - load_balancer { - name = "ascslb" - backend_pool_names = ["ascsBackendPool"] - frontend_ip_configuration_names = ["ascsip0"] - health_probe_names = ["ascsHealthProbe"] - } - - virtual_machine { - host_name = "ascshostName" - os_disk_name = "ascsosdisk" - virtual_machine_name = "ascsvm" - network_interface_names = ["ascsnic"] - - data_disk_names = { - default = "ascsdisk" - } - } - } - - database_server { - availability_set_name = "dbAvSet" - - load_balancer { - name = "dblb" - backend_pool_names = ["dbBackendPool"] - frontend_ip_configuration_names = ["dbip"] - health_probe_names = ["dbHealthProbe"] - } - - virtual_machine { - host_name = "dbprhost" - os_disk_name = "dbprosdisk" - virtual_machine_name = "dbvmpr" - network_interface_names = ["dbprnic"] - - data_disk_names = { - hanaData = "hanadatapr0,hanadatapr1" - hanaLog = "hanalogpr0,hanalogpr1,hanalogpr2" - usrSap = "usrsappr0" - hanaShared = "hanasharedpr0,hanasharedpr1" - } - } - } - - shared_storage { - account_name = "sharedtestsa%s" - private_endpoint_name = "testPE%s" - } - } - - transport_mount { - file_share_id = azurerm_storage_share.test.resource_manager_id - private_endpoint_id = azurerm_private_endpoint.test.id - } - } - - identity { - type = "UserAssigned" - - identity_ids = [ - azurerm_user_assigned_identity.test.id, - ] - } - - tags = { - Env = "Test" - } - - depends_on = [ - azurerm_role_assignment.test - ] -} -`, r.template(data), data.RandomString, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, data.RandomInteger, sapVISNameSuffix, data.RandomInteger, data.RandomString, data.RandomString) -} - func RandomInt() int { rand.NewSource(time.Now().UnixNano()) num := rand.Intn(90) + 10 diff --git a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown index 292e4b1629d9..61bc3fec66f0 100644 --- a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown +++ b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown @@ -382,9 +382,9 @@ A `three_tier_configuration` block supports the following: * `transport_create_and_mount` - (Optional) A `transport_create_and_mount` block as defined below. Changing this forces a new resource to be created. -* `transport_mount` - (Optional) A `transport_mount` block as defined below. Changing this forces a new resource to be created. +~> **Note:** The file share configuration uses `skip` by default when `transport_create_and_mount` isn't set. -~> **Note:** The file share configuration uses `skip` by default If neither `transport_create_and_mount` nor `transport_mount` is set. +~> **Note:** Currently, the last segment of the Storage File Share resource manager ID in Swagger is defined as `/shares/` but it's unexpected. The last segment of the Storage File Share resource manager ID should be `/fileshares/` not `/shares/` in Swagger since the backend service is using `/fileshares/`. See more details from https://github.com/Azure/azure-rest-api-specs/issues/25209. So the feature of `TransportMount` isn't supported by TF for now due to this service API bug. --- @@ -396,14 +396,6 @@ A `transport_create_and_mount` block supports the following: --- -A `transport_mount` block supports the following: - -* `file_share_id` - (Required) The resource ID of the Storage File Share. Changing this forces a new resource to be created. - -* `private_endpoint_id` - (Required) The resource ID of the Private Endpoint. Changing this forces a new resource to be created. - ---- - An `application_server_configuration` block supports the following: * `instance_count` - (Required) The number of instances for the Application Server. Possible values are at least `1`. Changing this forces a new resource to be created. From 63d9ce8d2d435b96fd9b25616fa94560851cfee4 Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 26 Feb 2024 14:16:29 +0800 Subject: [PATCH 09/12] update code --- .../2023-04-01/privateendpoints/README.md | 134 -- .../2023-04-01/privateendpoints/client.go | 26 - .../2023-04-01/privateendpoints/constants.go | 1151 ----------------- .../privateendpoints/id_location.go | 116 -- .../privateendpoints/id_privateendpoint.go | 125 -- .../privateendpoints/id_providerlocation.go | 125 -- ...ethod_availableprivateendpointtypeslist.go | 91 -- ...privateendpointtypeslistbyresourcegroup.go | 91 -- .../privateendpoints/method_createorupdate.go | 75 -- .../privateendpoints/method_delete.go | 71 - .../2023-04-01/privateendpoints/method_get.go | 80 -- .../privateendpoints/method_list.go | 92 -- .../method_listbysubscription.go | 92 -- .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_availableprivateendpointtype.go | 12 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 19 - .../model_customdnsconfigpropertiesformat.go | 9 - .../privateendpoints/model_ddossettings.go | 9 - .../privateendpoints/model_delegation.go | 12 - .../privateendpoints/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../privateendpoints/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../privateendpoints/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../privateendpoints/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../privateendpoints/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../privateendpoints/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../privateendpoints/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../privateendpoints/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../privateendpoints/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../privateendpoints/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../privateendpoints/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../privateendpoints/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../privateendpoints/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../privateendpoints/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2023-04-01/privateendpoints/predicates.go | 70 - .../2023-04-01/privateendpoints/version.go | 12 - vendor/modules.txt | 1 - 100 files changed, 3448 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/README.md delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/client.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/constants.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_delete.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_get.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddress.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspool.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygroup.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_availableprivateendpointtype.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspool.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspoolpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_customdnsconfigpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ddossettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_delegation.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlog.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogformatparameters.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrule.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrulepropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofile.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_iptag.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddress.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgateway.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaypropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaysku.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natruleportmapping.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterface.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacednssettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacepropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygroup.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygrouppropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpoint.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnection.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnectionproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfigurationproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkservice.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnection.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionstate.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfiguration.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddress.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddressdnssettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresspropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresssku.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlink.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlinkformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourceset.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_retentionpolicyparameters.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_route.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routepropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetable.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetablepropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrule.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrulepropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlink.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_servicedelegationpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicy.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinition.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnet.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnetpropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subresource.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktap.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktappropertiesformat.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/predicates.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/version.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/README.md deleted file mode 100644 index 3ecac2cbff0b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/README.md +++ /dev/null @@ -1,134 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints` Documentation - -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `network` (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/network/2023-04-01/privateendpoints" -``` - - -### Client Initialization - -```go -client := privateendpoints.NewPrivateEndpointsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateEndpointsClient.AvailablePrivateEndpointTypesList` - -```go -ctx := context.TODO() -id := privateendpoints.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailablePrivateEndpointTypesList(ctx, id)` can be used to do batched pagination -items, err := client.AvailablePrivateEndpointTypesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.AvailablePrivateEndpointTypesListByResourceGroup` - -```go -ctx := context.TODO() -id := privateendpoints.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.AvailablePrivateEndpointTypesListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.AvailablePrivateEndpointTypesListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -payload := privateendpoints.PrivateEndpoint{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointsClient.Delete` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointsClient.Get` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -read, err := client.Get(ctx, id, privateendpoints.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateEndpointsClient.List` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.ListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/client.go deleted file mode 100644 index 149437b13342..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privateendpoints - -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 PrivateEndpointsClient struct { - Client *resourcemanager.Client -} - -func NewPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpoints", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) - } - - return &PrivateEndpointsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/constants.go deleted file mode 100644 index fe61de76a0e8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/constants.go +++ /dev/null @@ -1,1151 +0,0 @@ -package privateendpoints - -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 DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type SyncMode string - -const ( - SyncModeAutomatic SyncMode = "Automatic" - SyncModeManual SyncMode = "Manual" -) - -func PossibleValuesForSyncMode() []string { - return []string{ - string(SyncModeAutomatic), - string(SyncModeManual), - } -} - -func (s *SyncMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncMode(input string) (*SyncMode, error) { - vals := map[string]SyncMode{ - "automatic": SyncModeAutomatic, - "manual": SyncModeManual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncMode(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go deleted file mode 100644 index d0ec2701c9f6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_location.go +++ /dev/null @@ -1,116 +0,0 @@ -package privateendpoints - -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 = &LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(&LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.LocationName, ok = input.Parsed["locationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) - } - - return nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(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 := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) 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("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go deleted file mode 100644 index 2ea7644e3d40..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_privateendpoint.go +++ /dev/null @@ -1,125 +0,0 @@ -package privateendpoints - -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 = &PrivateEndpointId{} - -// PrivateEndpointId is a struct representing the Resource ID for a Private Endpoint -type PrivateEndpointId struct { - SubscriptionId string - ResourceGroupName string - PrivateEndpointName string -} - -// NewPrivateEndpointID returns a new PrivateEndpointId struct -func NewPrivateEndpointID(subscriptionId string, resourceGroupName string, privateEndpointName string) PrivateEndpointId { - return PrivateEndpointId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateEndpointName: privateEndpointName, - } -} - -// ParsePrivateEndpointID parses 'input' into a PrivateEndpointId -func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParsePrivateEndpointIDInsensitively parses 'input' case-insensitively into a PrivateEndpointId -// note: this method should only be used for API response data and not user input -func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *PrivateEndpointId) 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.PrivateEndpointName, ok = input.Parsed["privateEndpointName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", input) - } - - return nil -} - -// ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID -func ValidatePrivateEndpointID(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 := ParsePrivateEndpointID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Endpoint ID -func (id PrivateEndpointId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateEndpoints/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateEndpointName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint ID -func (id PrivateEndpointId) 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("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateEndpoints", "privateEndpoints", "privateEndpoints"), - resourceids.UserSpecifiedSegment("privateEndpointName", "privateEndpointValue"), - } -} - -// String returns a human-readable description of this Private Endpoint ID -func (id PrivateEndpointId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Endpoint Name: %q", id.PrivateEndpointName), - } - return fmt.Sprintf("Private Endpoint (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go deleted file mode 100644 index e7270dd4d020..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/id_providerlocation.go +++ /dev/null @@ -1,125 +0,0 @@ -package privateendpoints - -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 = &ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(&ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(&ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ProviderLocationId) 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.LocationName, ok = input.Parsed["locationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) - } - - return nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(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 := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) 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("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go deleted file mode 100644 index d7fdaf55d21b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslist.go +++ /dev/null @@ -1,91 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "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 AvailablePrivateEndpointTypesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailablePrivateEndpointType -} - -type AvailablePrivateEndpointTypesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []AvailablePrivateEndpointType -} - -// AvailablePrivateEndpointTypesList ... -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesList(ctx context.Context, id LocationId) (result AvailablePrivateEndpointTypesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availablePrivateEndpointTypes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailablePrivateEndpointType `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailablePrivateEndpointTypesListComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListComplete(ctx context.Context, id LocationId) (AvailablePrivateEndpointTypesListCompleteResult, error) { - return c.AvailablePrivateEndpointTypesListCompleteMatchingPredicate(ctx, id, AvailablePrivateEndpointTypeOperationPredicate{}) -} - -// AvailablePrivateEndpointTypesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AvailablePrivateEndpointTypeOperationPredicate) (result AvailablePrivateEndpointTypesListCompleteResult, err error) { - items := make([]AvailablePrivateEndpointType, 0) - - resp, err := c.AvailablePrivateEndpointTypesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailablePrivateEndpointTypesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go deleted file mode 100644 index acb79f31b4ea..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go +++ /dev/null @@ -1,91 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "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 AvailablePrivateEndpointTypesListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailablePrivateEndpointType -} - -type AvailablePrivateEndpointTypesListByResourceGroupCompleteResult struct { - LatestHttpResponse *http.Response - Items []AvailablePrivateEndpointType -} - -// AvailablePrivateEndpointTypesListByResourceGroup ... -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroup(ctx context.Context, id ProviderLocationId) (result AvailablePrivateEndpointTypesListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availablePrivateEndpointTypes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailablePrivateEndpointType `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailablePrivateEndpointTypesListByResourceGroupComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroupComplete(ctx context.Context, id ProviderLocationId) (AvailablePrivateEndpointTypesListByResourceGroupCompleteResult, error) { - return c.AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate(ctx, id, AvailablePrivateEndpointTypeOperationPredicate{}) -} - -// AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AvailablePrivateEndpointTypeOperationPredicate) (result AvailablePrivateEndpointTypesListByResourceGroupCompleteResult, err error) { - items := make([]AvailablePrivateEndpointType, 0) - - resp, err := c.AvailablePrivateEndpointTypesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailablePrivateEndpointTypesListByResourceGroupCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go deleted file mode 100644 index b5055a0cda4b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "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 CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpoint -} - -// CreateOrUpdate ... -func (c PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, id PrivateEndpointId, input PrivateEndpoint) (result CreateOrUpdateOperationResponse, 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 - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PrivateEndpointsClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateEndpointId, input PrivateEndpoint) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_delete.go deleted file mode 100644 index 70f382bf8e3b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "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 DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PrivateEndpointsClient) Delete(ctx context.Context, id PrivateEndpointId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - 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 - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PrivateEndpointsClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_get.go deleted file mode 100644 index 3530642f24ed..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "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 *PrivateEndpoint -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - 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 - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go deleted file mode 100644 index 75a99d85e75d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_list.go +++ /dev/null @@ -1,92 +0,0 @@ -package privateendpoints - -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 *[]PrivateEndpoint -} - -type ListCompleteResult struct { - LatestHttpResponse *http.Response - Items []PrivateEndpoint -} - -// List ... -func (c PrivateEndpointsClient) List(ctx context.Context, id commonids.ResourceGroupId) (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.Network/privateEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PrivateEndpointOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PrivateEndpointOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PrivateEndpoint, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go deleted file mode 100644 index 77e120028814..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/method_listbysubscription.go +++ /dev/null @@ -1,92 +0,0 @@ -package privateendpoints - -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 ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateEndpoint -} - -type ListBySubscriptionCompleteResult struct { - LatestHttpResponse *http.Response - Items []PrivateEndpoint -} - -// ListBySubscription ... -func (c PrivateEndpointsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, PrivateEndpointOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PrivateEndpointOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]PrivateEndpoint, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b8767a924d33..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index faea7af96350..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index bc45532ef998..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfiguration.go deleted file mode 100644 index d7b619385a01..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 0975b3a3c18e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygroup.go deleted file mode 100644 index b514ce65a104..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index c505be8adad1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_availableprivateendpointtype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_availableprivateendpointtype.go deleted file mode 100644 index c6aa8839dc14..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_availableprivateendpointtype.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointType struct { - DisplayName *string `json:"displayName,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspool.go deleted file mode 100644 index afaee89cd0ab..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspoolpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 7079b8612911..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SyncMode *SyncMode `json:"syncMode,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_customdnsconfigpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index a078479b1cf9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ddossettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ddossettings.go deleted file mode 100644 index 6253ff1e5a4f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_delegation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_delegation.go deleted file mode 100644 index fd6104e1e68c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlog.go deleted file mode 100644 index bce1bcfe8ad0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_flowlogformatparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogformatparameters.go deleted file mode 100644 index a15c48049c6c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogpropertiesformat.go deleted file mode 100644 index 6f45378b9d17..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfiguration.go deleted file mode 100644 index 3dcb8560fec0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 8980fc3756f2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index dde47c23fb21..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrule.go deleted file mode 100644 index 38c0ffd67281..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index b952302ddebd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfiguration.go deleted file mode 100644 index cf18ee9415ba..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofile.go deleted file mode 100644 index d493529c992a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index dabdbd7c8411..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index fdfdcd1d175e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_iptag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_iptag.go deleted file mode 100644 index 83206500edce..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddress.go deleted file mode 100644 index ee77fec93c3d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 9be73b64841e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgateway.go deleted file mode 100644 index e197bcd7adab..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaypropertiesformat.go deleted file mode 100644 index fc0ee1ef6da7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaysku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaysku.go deleted file mode 100644 index c0b2d583e49e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natruleportmapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natruleportmapping.go deleted file mode 100644 index 07eeaf979f4e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterface.go deleted file mode 100644 index 9e9c7fcfa82f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_networkinterfacednssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacednssettings.go deleted file mode 100644 index 5182d846bf12..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfiguration.go deleted file mode 100644 index e41eb348a7b5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index ac6a234dd34b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index cacb1e17719f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacepropertiesformat.go deleted file mode 100644 index a5fd36f92666..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfiguration.go deleted file mode 100644 index ebe35c0a1782..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 54e437f339f3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygroup.go deleted file mode 100644 index cb420b609909..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_networksecuritygrouppropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index b03a951faff7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpoint.go deleted file mode 100644 index 5e9da21fedbc..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,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/network/2023-04-01/privateendpoints/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnection.go deleted file mode 100644 index 5bd8301f4f34..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnectionproperties.go deleted file mode 100644 index 8c0662fe4e26..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfiguration.go deleted file mode 100644 index 1fbe08553f6e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 3772b023f53f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointproperties.go deleted file mode 100644 index ac88e7637f3a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkservice.go deleted file mode 100644 index e4c8723fc8bd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,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/network/2023-04-01/privateendpoints/model_privatelinkserviceconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnection.go deleted file mode 100644 index be10aca683dc..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index da2a7ed38710..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 1d19bec0830a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 358ee0e74506..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 81634dd44b1d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceproperties.go deleted file mode 100644 index d246ec00f40a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddress.go deleted file mode 100644 index eeca2133c315..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddressdnssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddressdnssettings.go deleted file mode 100644 index bc8acd1515a6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresspropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresspropertiesformat.go deleted file mode 100644 index bed9d0ba8d76..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresssku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresssku.go deleted file mode 100644 index 2bbd107f243e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlink.go deleted file mode 100644 index d88904429239..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlinkformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlinkformat.go deleted file mode 100644 index 281da0ffc970..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourceset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourceset.go deleted file mode 100644 index 999b1817a305..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_retentionpolicyparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_retentionpolicyparameters.go deleted file mode 100644 index b3df6ba5fd1f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_route.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_route.go deleted file mode 100644 index 98c7a5ae4760..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routepropertiesformat.go deleted file mode 100644 index ca3956916f35..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetable.go deleted file mode 100644 index e1f695300d86..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_routetablepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetablepropertiesformat.go deleted file mode 100644 index 4976a28f0ea0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrule.go deleted file mode 100644 index ccfc50b4a7e0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrulepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrulepropertiesformat.go deleted file mode 100644 index 2b19d6a628d7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlink.go deleted file mode 100644 index a88015b02e11..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 7a779312074e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_servicedelegationpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 84e538e83503..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicy.go deleted file mode 100644 index ea8ff121174c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinition.go deleted file mode 100644 index cc2054776fa3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 8355dfbaae00..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index dbdcdea14422..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5b54f3ef673c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnet.go deleted file mode 100644 index 1eee73db2bda..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnetpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnetpropertiesformat.go deleted file mode 100644 index 01c2d0455cec..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subresource.go deleted file mode 100644 index 134c4f661024..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index fc7cf55257e2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsproperties.go deleted file mode 100644 index 8a4f6042fa41..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktap.go deleted file mode 100644 index 99fe7d7fe1d2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,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/network/2023-04-01/privateendpoints/model_virtualnetworktappropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index c7fa6565e0f5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/predicates.go deleted file mode 100644 index c99098d01631..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/predicates.go +++ /dev/null @@ -1,70 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointTypeOperationPredicate struct { - DisplayName *string - Id *string - Name *string - ResourceName *string - Type *string -} - -func (p AvailablePrivateEndpointTypeOperationPredicate) Matches(input AvailablePrivateEndpointType) bool { - - if p.DisplayName != nil && (input.DisplayName == nil || *p.DisplayName != *input.DisplayName) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ResourceName != nil && (input.ResourceName == nil || *p.ResourceName != *input.ResourceName) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type PrivateEndpointOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PrivateEndpointOperationPredicate) Matches(input PrivateEndpoint) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/version.go deleted file mode 100644 index b6036c6529bb..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -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/privateendpoints/%s", defaultApiVersion) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 799ac86b7d68..cb8e8843c4a7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -686,7 +686,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroup github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication -github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/privateendpoints github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01 github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules From 34d0ac4c4e78dbefe4b1e346d4f3230ece4bb6a2 Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 26 Feb 2024 17:30:39 +0800 Subject: [PATCH 10/12] update code --- ...ap_three_tier_virtual_instance_resource.go | 115 +++++++++++++----- ...ree_tier_virtual_instance_resource_test.go | 66 +++++++--- ..._three_tier_virtual_instance.html.markdown | 10 +- 3 files changed, 143 insertions(+), 48 deletions(-) diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go index 95f2a13d2ebf..c60ca4bbb9f9 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go @@ -3,7 +3,6 @@ package workloads import ( "context" "fmt" - "strings" "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" @@ -65,11 +64,16 @@ type OSProfile struct { } type VirtualMachineResourceNames struct { - DataDiskNames map[string]interface{} `tfschema:"data_disk_names"` - HostName string `tfschema:"host_name"` - NetworkInterfaceNames []string `tfschema:"network_interface_names"` - OSDiskName string `tfschema:"os_disk_name"` - VMName string `tfschema:"virtual_machine_name"` + DataDisks []DataDisk `tfschema:"data_disk"` + HostName string `tfschema:"host_name"` + NetworkInterfaceNames []string `tfschema:"network_interface_names"` + OSDiskName string `tfschema:"os_disk_name"` + VMName string `tfschema:"virtual_machine_name"` +} + +type DataDisk struct { + VolumeName string `tfschema:"volume_name"` + Names []string `tfschema:"names"` } type ThreeTierConfiguration struct { @@ -626,13 +630,29 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ - "data_disk_names": { - Type: pluginsdk.TypeMap, + "data_disk": { + Type: pluginsdk.TypeSet, Optional: true, ForceNew: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringLenBetween(1, 80), + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "volume_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "names": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, }, }, @@ -740,13 +760,29 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ - "data_disk_names": { - Type: pluginsdk.TypeMap, + "data_disk": { + Type: pluginsdk.TypeSet, Optional: true, ForceNew: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringLenBetween(1, 80), + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "volume_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "names": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, }, }, @@ -854,13 +890,29 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ - "data_disk_names": { - Type: pluginsdk.TypeMap, + "data_disk": { + Type: pluginsdk.TypeSet, Optional: true, ForceNew: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringLenBetween(1, 80), + Elem: &pluginsdk.Resource{ + Schema: map[string]*pluginsdk.Schema{ + "volume_name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + + "names": { + Type: pluginsdk.TypeList, + Required: true, + ForceNew: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringIsNotEmpty, + }, + }, + }, }, }, @@ -1284,14 +1336,14 @@ func expandNetworkInterfaceNames(input []string) *[]sapvirtualinstances.NetworkI return &result } -func expandDataDiskNames(input map[string]interface{}) *map[string][]string { +func expandDataDisks(input []DataDisk) *map[string][]string { result := make(map[string][]string) if len(input) == 0 { return &result } - for k, v := range input { - result[k] = strings.Split(v.(string), ",") + for _, v := range input { + result[v.VolumeName] = v.Names } return &result @@ -1462,7 +1514,7 @@ func expandVirtualMachinesResourceNames(input []VirtualMachineResourceNames) *[] for _, item := range input { vmResourceNames := sapvirtualinstances.VirtualMachineResourceNames{ - DataDiskNames: expandDataDiskNames(item.DataDiskNames), + DataDiskNames: expandDataDisks(item.DataDisks), NetworkInterfaces: expandNetworkInterfaceNames(item.NetworkInterfaceNames), } @@ -1674,7 +1726,7 @@ func flattenVirtualMachinesResourceNames(input *[]sapvirtualinstances.VirtualMac HostName: pointer.From(item.HostName), OSDiskName: pointer.From(item.OsDiskName), VMName: pointer.From(item.VirtualMachineName), - DataDiskNames: flattenDataDiskNames(item.DataDiskNames), + DataDisks: flattenDataDisks(item.DataDiskNames), NetworkInterfaceNames: flattenNetworkInterfaceResourceNames(item.NetworkInterfaces), }) } @@ -1772,14 +1824,19 @@ func flattenNetworkInterfaceResourceNames(input *[]sapvirtualinstances.NetworkIn return result } -func flattenDataDiskNames(input *map[string][]string) map[string]interface{} { - results := make(map[string]interface{}) +func flattenDataDisks(input *map[string][]string) []DataDisk { + results := make([]DataDisk, 0) if input == nil { return results } for k, v := range *input { - results[k] = strings.Join(v, ",") + dataDisk := DataDisk{ + VolumeName: k, + Names: v, + } + + results = append(results, dataDisk) } return results diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go index 5d59aadc84c5..b6e5586c3edb 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go @@ -550,8 +550,9 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { virtual_machine_name = "appvm0" network_interface_names = ["appnic0"] - data_disk_names = { - default = "app0disk0" + data_disk { + volume_name = "default" + names = ["app0disk0"] } } } @@ -572,8 +573,9 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { virtual_machine_name = "ascsvm" network_interface_names = ["ascsnic"] - data_disk_names = { - default = "ascsdisk" + data_disk { + volume_name = "default" + names = ["ascsdisk"] } } } @@ -594,11 +596,24 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { virtual_machine_name = "dbvmpr" network_interface_names = ["dbprnic"] - data_disk_names = { - hanaData = "hanadatapr0,hanadatapr1" - hanaLog = "hanalogpr0,hanalogpr1,hanalogpr2" - usrSap = "usrsappr0" - hanaShared = "hanasharedpr0,hanasharedpr1" + data_disk { + volume_name = "hanaData" + names = ["hanadatapr0", "hanadatapr1"] + } + + data_disk { + volume_name = "hanaLog" + names = ["hanalogpr0", "hanalogpr1", "hanalogpr2"] + } + + data_disk { + volume_name = "usrSap" + names = ["usrsappr0"] + } + + data_disk { + volume_name = "hanaShared" + names = ["hanasharedpr0", "hanasharedpr1"] } } } @@ -787,8 +802,9 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { virtual_machine_name = "appvm0" network_interface_names = ["appnic0"] - data_disk_names = { - default = "app0disk0" + data_disk { + volume_name = "default" + names = ["app0disk0"] } } } @@ -809,8 +825,9 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { virtual_machine_name = "ascsvm" network_interface_names = ["ascsnic"] - data_disk_names = { - default = "ascsdisk" + data_disk { + volume_name = "default" + names = ["ascsdisk"] } } } @@ -831,11 +848,24 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { virtual_machine_name = "dbvmpr" network_interface_names = ["dbprnic"] - data_disk_names = { - hanaData = "hanadatapr0,hanadatapr1" - hanaLog = "hanalogpr0,hanalogpr1,hanalogpr2" - usrSap = "usrsappr0" - hanaShared = "hanasharedpr0,hanasharedpr1" + data_disk { + volume_name = "hanaData" + names = ["hanadatapr0", "hanadatapr1"] + } + + data_disk { + volume_name = "hanaLog" + names = ["hanalogpr0", "hanalogpr1", "hanalogpr2"] + } + + data_disk { + volume_name = "usrSap" + names = ["usrsappr0"] + } + + data_disk { + volume_name = "hanaShared" + names = ["hanasharedpr0", "hanasharedpr1"] } } } diff --git a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown index 61bc3fec66f0..6ee43f036c3f 100644 --- a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown +++ b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown @@ -452,7 +452,7 @@ An `application_server` block supports the following: A `virtual_machine` block supports the following: -* `data_disk_names` - (Optional) A mapping of Data Disk names passed to the backend host. The keys are volume names, and the values are a comma separated list of full names of Data Disks per volume. Changing this forces a new resource to be created. +* `data_disk` - (Optional) One or more `data_disk` blocks as defined below. Changing this forces a new resource to be created. * `host_name` - (Optional) The full name of the host of the Virtual Machine. Changing this forces a new resource to be created. @@ -464,6 +464,14 @@ A `virtual_machine` block supports the following: --- +A `data_disk` block supports the following: + +* `volume_name` - (Required) The name of the Volume. Changing this forces a new resource to be created. + +* `names` - (Required) A list of full names of Data Disks per Volume. Changing this forces a new resource to be created. + +--- + A `central_server` block supports the following: * `availability_set_name` - (Optional) The full name for the availability set. Changing this forces a new resource to be created. From 11c99944f4702b0e115feda7eae2cbc3a611b841 Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Mon, 26 Feb 2024 19:30:34 +0800 Subject: [PATCH 11/12] update code --- ...ap_three_tier_virtual_instance_resource.go | 39 ++++++++++++------- ..._three_tier_virtual_instance.html.markdown | 4 ++ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go index c60ca4bbb9f9..4698c74a29d6 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource.go @@ -637,10 +637,12 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "volume_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "default", + }, false), }, "names": { @@ -649,7 +651,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, + ValidateFunc: validation.StringLenBetween(1, 80), }, }, }, @@ -767,10 +769,12 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "volume_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "default", + }, false), }, "names": { @@ -779,7 +783,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, + ValidateFunc: validation.StringLenBetween(1, 80), }, }, }, @@ -897,10 +901,15 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "volume_name": { - Type: pluginsdk.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringIsNotEmpty, + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "hanaData", + "hanaLog", + "hanaShared", + "usrSap", + }, false), }, "names": { @@ -909,7 +918,7 @@ func (r WorkloadsSAPThreeTierVirtualInstanceResource) Arguments() map[string]*pl ForceNew: true, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, - ValidateFunc: validation.StringIsNotEmpty, + ValidateFunc: validation.StringLenBetween(1, 80), }, }, }, diff --git a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown index 6ee43f036c3f..51100bbdbaf4 100644 --- a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown +++ b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown @@ -468,6 +468,10 @@ A `data_disk` block supports the following: * `volume_name` - (Required) The name of the Volume. Changing this forces a new resource to be created. +~> **Note:** Possible value for Application Server and Central Server is `default`. + +~> **Note:** Possible values for Database Server are `hanaData`, `hanaLog`, `hanaShared` and `usrSap`. + * `names` - (Required) A list of full names of Data Disks per Volume. Changing this forces a new resource to be created. --- From 7c1107c7e0056b58d67630c03df8ed560f5a6df5 Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Wed, 6 Mar 2024 18:39:48 +0800 Subject: [PATCH 12/12] update code --- .../validate/sap_virtual_instance_name.go | 2 +- ...ree_tier_virtual_instance_resource_test.go | 6 +-- ..._three_tier_virtual_instance.html.markdown | 37 +++++++++++++------ 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/internal/services/workloads/validate/sap_virtual_instance_name.go b/internal/services/workloads/validate/sap_virtual_instance_name.go index b43ba3fedfd7..11260313428d 100644 --- a/internal/services/workloads/validate/sap_virtual_instance_name.go +++ b/internal/services/workloads/validate/sap_virtual_instance_name.go @@ -9,7 +9,7 @@ func SAPVirtualInstanceName(v interface{}, k string) (warnings []string, errors value := v.(string) if matched := regexp.MustCompile(`^[A-Z][A-Z0-9][A-Z0-9]$`).Match([]byte(value)); !matched { - errors = append(errors, fmt.Errorf("%q must be an alphabet for the first letter. The second and third letters must be alphanumeric and all alphabets must be uppercase", k)) + errors = append(errors, fmt.Errorf("%q must have three characters. The first character must be alphabetic. The second and third characters must be alphanumerical. All alphabetic characters should be uppercase.", k)) return warnings, errors } diff --git a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go index b6e5586c3edb..93c357e011a6 100644 --- a/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go +++ b/internal/services/workloads/workloads_sap_three_tier_virtual_instance_resource_test.go @@ -209,7 +209,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { location = azurerm_resource_group.test.location environment = "NonProd" sap_product = "S4HANA" - managed_resource_group_name = "managedTestRG%d" + managed_resource_group_name = "acctestManagedRG%d" app_location = azurerm_resource_group.app.location sap_fqdn = "sap.bpaas.com" @@ -423,7 +423,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { location = azurerm_resource_group.test.location environment = "NonProd" sap_product = "S4HANA" - managed_resource_group_name = "managedTestRG%d" + managed_resource_group_name = "acctestManagedRG%d" app_location = azurerm_resource_group.app.location sap_fqdn = "sap.bpaas.com" @@ -675,7 +675,7 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "test" { location = azurerm_resource_group.test.location environment = "NonProd" sap_product = "S4HANA" - managed_resource_group_name = "managedTestRG%d" + managed_resource_group_name = "acctestManagedRG%d" app_location = azurerm_resource_group.app.location sap_fqdn = "sap.bpaas.com" diff --git a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown index 51100bbdbaf4..6ba9f89d015e 100644 --- a/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown +++ b/website/docs/r/workloads_sap_three_tier_virtual_instance.html.markdown @@ -207,8 +207,9 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "example" { virtual_machine_name = "appvm0" network_interface_names = ["appnic0"] - data_disk_names = { - default = "app0disk0" + data_disk { + volume_name = "default" + names = ["app0disk0"] } } } @@ -229,8 +230,9 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "example" { virtual_machine_name = "ascsvm" network_interface_names = ["ascsnic"] - data_disk_names = { - default = "ascsdisk" + data_disk { + volume_name = "default" + names = ["ascsdisk"] } } } @@ -251,11 +253,24 @@ resource "azurerm_workloads_sap_three_tier_virtual_instance" "example" { virtual_machine_name = "dbvmpr" network_interface_names = ["dbprnic"] - data_disk_names = { - hanaData = "hanadatapr0,hanadatapr1" - hanaLog = "hanalogpr0,hanalogpr1,hanalogpr2" - usrSap = "usrsappr0" - hanaShared = "hanasharedpr0,hanasharedpr1" + data_disk { + volume_name = "hanaData" + names = ["hanadatapr0", "hanadatapr1"] + } + + data_disk { + volume_name = "hanaLog" + names = ["hanalogpr0", "hanalogpr1", "hanalogpr2"] + } + + data_disk { + volume_name = "usrSap" + names = ["usrsappr0"] + } + + data_disk { + volume_name = "hanaShared" + names = ["hanasharedpr0", "hanasharedpr1"] } } } @@ -366,7 +381,7 @@ A `three_tier_configuration` block supports the following: * `app_resource_group_name` - (Required) The name of the application Resource Group where SAP system resources will be deployed. Changing this forces a new resource to be created. -~> **Note:** While creating an SAP Three Tier Virtual Instance, the service would provision the extra SAP system/component in the `app_resource_group_name` that isn't defined in the HCL Configurations. At this time, if the `app_resource_group_name` is different from the Resource Group where SAP Three Tier Virtual Instance exists, you can set `prevent_deletion_if_contains_resources` to `false` to delete all resources defined in the HCL Configurations and the resources created in the `app_resource_group_name` with `terraform destroy`. However, if the `app_resource_group_name` is the same with the Resource Group where SAP Three Tier Virtual Instance exists, some resources such as the subnet defined in the HCL Configurations cannot be deleted with `terraform destroy` since the resources defined in the HCL Configurations are being referenced by the SAP system/component. In this case, you have to manually delete the SAP system/component before deleting the resources in the HCL Configurations. +~> **Note:** While creating an SAP Three Tier Virtual Instance, the service will provision the extra SAP systems/components in the `app_resource_group_name` that are not defined in the HCL Configuration. At this time, if the `app_resource_group_name` is different from the Resource Group where SAP Three Tier Virtual Instance exists, you can set `prevent_deletion_if_contains_resources` to `false` to delete all resources defined in the HCL Configurations and the resources created in the `app_resource_group_name` with `terraform destroy`. However, if the `app_resource_group_name` is the same with the Resource Group where SAP Three Tier Virtual Instance exists, some resources, such as the subnet defined in the HCL Configuration, cannot be deleted with `terraform destroy` since the resources defined in the HCL Configuration are being referenced by the SAP system/component. In this case, you have to manually delete the SAP system/component before deleting the resources in the HCL Configuration. * `application_server_configuration` - (Required) An `application_server_configuration` block as defined below. Changing this forces a new resource to be created. @@ -384,7 +399,7 @@ A `three_tier_configuration` block supports the following: ~> **Note:** The file share configuration uses `skip` by default when `transport_create_and_mount` isn't set. -~> **Note:** Currently, the last segment of the Storage File Share resource manager ID in Swagger is defined as `/shares/` but it's unexpected. The last segment of the Storage File Share resource manager ID should be `/fileshares/` not `/shares/` in Swagger since the backend service is using `/fileshares/`. See more details from https://github.com/Azure/azure-rest-api-specs/issues/25209. So the feature of `TransportMount` isn't supported by TF for now due to this service API bug. +~> **Note:** Due to [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/25209) where the Storage File Share Id is not defined correctly, it is not currently possible to support using Transport Mount. ---