From ce11f4e68484c7c15d2034839b69693f7aea7443 Mon Sep 17 00:00:00 2001 From: Charles Todd Date: Fri, 13 Dec 2024 15:29:47 -0500 Subject: [PATCH] Update the redisenterprise sdk to 2024-10-01 --- .../services/redisenterprise/client/client.go | 4 +- .../redis_enterprise_cluster_resource.go | 2 +- .../redis_enterprise_cluster_resource_test.go | 2 +- .../redis_enterprise_database_data_source.go | 4 +- .../redis_enterprise_database_resource.go | 4 +- ...redis_enterprise_database_resource_test.go | 2 +- .../redis_enterprise_cluster_sku_name.go | 2 +- .../redisenterprise/2024-10-01/client.go | 55 +++ .../databases/README.md | 18 +- .../databases/client.go | 0 .../databases/constants.go | 41 --- .../databases/id_database.go | 0 .../2024-10-01/databases/id_database_test.go | 327 ++++++++++++++++++ .../databases/id_redisenterprise.go | 0 .../databases/id_redisenterprise_test.go | 282 +++++++++++++++ .../databases/method_create.go | 0 .../databases/method_delete.go | 0 .../databases/method_export.go | 0 .../databases/method_flush.go | 0 .../method_forcelinktoreplicationgroup.go | 0 .../databases/method_forceunlink.go | 0 .../databases/method_get.go | 0 .../databases/method_import.go | 0 .../databases/method_listbycluster.go | 0 .../databases/method_listkeys.go | 0 .../databases/method_regeneratekey.go | 0 .../databases/method_update.go | 0 .../databases/model_accesskeys.go | 0 .../databases/model_database.go | 0 .../databases/model_databaseproperties.go | 2 - .../model_databasepropertiesgeoreplication.go | 0 .../databases/model_databaseupdate.go | 0 .../model_exportclusterparameters.go | 0 .../databases/model_flushparameters.go | 0 .../databases/model_forcelinkparameters.go | 0 .../databases/model_forceunlinkparameters.go | 0 .../model_importclusterparameters.go | 0 .../databases/model_linkeddatabase.go | 0 .../databases/model_module.go | 0 .../databases/model_persistence.go | 0 .../model_regeneratekeyparameters.go | 0 .../databases/predicates.go | 0 .../databases/version.go | 4 +- .../privateendpointconnections/README.md | 81 +++++ .../privateendpointconnections/client.go | 26 ++ .../privateendpointconnections/constants.go | 101 ++++++ .../id_privateendpointconnection.go | 139 ++++++++ .../id_privateendpointconnection_test.go | 327 ++++++++++++++++++ .../id_redisenterprise.go | 130 +++++++ .../id_redisenterprise_test.go | 282 +++++++++++++++ .../method_delete.go} | 24 +- .../privateendpointconnections/method_get.go | 53 +++ .../privateendpointconnections/method_list.go | 54 +++ .../privateendpointconnections/method_put.go} | 29 +- .../model_privateendpoint.go | 8 + .../model_privateendpointconnection.go | 11 + ...del_privateendpointconnectionlistresult.go | 8 + ...del_privateendpointconnectionproperties.go | 10 + ...model_privatelinkserviceconnectionstate.go | 10 + .../privateendpointconnections/version.go | 10 + .../2024-10-01/privatelinkresources/README.md | 36 ++ .../2024-10-01/privatelinkresources/client.go | 26 ++ .../id_redisenterprise.go | 130 +++++++ .../id_redisenterprise_test.go | 282 +++++++++++++++ .../method_listbycluster.go | 54 +++ .../model_privatelinkresource.go | 11 + .../model_privatelinkresourcelistresult.go | 8 + .../model_privatelinkresourceproperties.go | 10 + .../privatelinkresources/version.go | 10 + .../redisenterprise/README.md | 18 +- .../redisenterprise/client.go | 0 .../redisenterprise/constants.go | 47 +-- .../redisenterprise/id_database.go | 0 .../redisenterprise/id_database_test.go | 327 ++++++++++++++++++ .../redisenterprise/id_redisenterprise.go | 0 .../id_redisenterprise_test.go | 282 +++++++++++++++ .../redisenterprise/method_create.go | 0 .../redisenterprise/method_databasescreate.go | 0 .../redisenterprise/method_databasesdelete.go | 0 .../redisenterprise/method_databasesexport.go | 0 .../redisenterprise/method_databasesflush.go | 0 ...od_databasesforcelinktoreplicationgroup.go | 0 .../method_databasesforceunlink.go | 0 .../redisenterprise/method_databasesget.go | 0 .../redisenterprise/method_databasesimport.go | 0 .../method_databaseslistbycluster.go | 0 .../method_databaseslistkeys.go | 0 .../method_databasesregeneratekey.go | 0 .../redisenterprise/method_databasesupdate.go | 0 .../redisenterprise/method_delete.go | 0 .../redisenterprise/method_get.go | 0 .../redisenterprise/method_list.go | 0 .../method_listbyresourcegroup.go | 0 .../redisenterprise/method_update.go | 0 .../redisenterprise/model_accesskeys.go | 0 .../redisenterprise/model_cluster.go | 0 .../model_clusterproperties.go | 0 .../model_clusterpropertiesencryption.go | 0 ...sencryptioncustomermanagedkeyencryption.go | 0 ...edkeyencryptionkeyencryptionkeyidentity.go | 0 .../redisenterprise/model_clusterupdate.go | 0 .../redisenterprise/model_database.go | 0 .../model_databaseproperties.go | 2 - .../model_databasepropertiesgeoreplication.go | 0 .../redisenterprise/model_databaseupdate.go | 0 .../model_exportclusterparameters.go | 0 .../redisenterprise/model_flushparameters.go | 0 .../model_forcelinkparameters.go | 0 .../model_forceunlinkparameters.go | 0 .../model_importclusterparameters.go | 0 .../redisenterprise/model_linkeddatabase.go | 0 .../redisenterprise/model_module.go | 0 .../redisenterprise/model_persistence.go | 0 .../redisenterprise/model_privateendpoint.go | 0 .../model_privateendpointconnection.go | 0 ...del_privateendpointconnectionproperties.go | 0 ...model_privatelinkserviceconnectionstate.go | 0 .../model_regeneratekeyparameters.go | 0 .../redisenterprise/model_sku.go | 0 .../redisenterprise/predicates.go | 0 .../redisenterprise/version.go | 4 +- vendor/modules.txt | 4 +- 122 files changed, 3148 insertions(+), 155 deletions(-) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/client.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/README.md (91%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/constants.go (92%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/id_database.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_database_test.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/id_redisenterprise.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_redisenterprise_test.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_export.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_flush.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_forcelinktoreplicationgroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_forceunlink.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_import.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_listbycluster.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_listkeys.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_regeneratekey.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_accesskeys.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_database.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_databaseproperties.go (85%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_databasepropertiesgeoreplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_databaseupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_exportclusterparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_flushparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_forcelinkparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_forceunlinkparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_importclusterparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_linkeddatabase.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_module.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_persistence.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/model_regeneratekeyparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/databases/version.go (65%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_privateendpointconnection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_privateendpointconnection_test.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_redisenterprise.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_redisenterprise_test.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview/databases/method_upgradedbredisversion.go => 2024-10-01/privateendpointconnections/method_delete.go} (60%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_list.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview/redisenterprise/method_databasesupgradedbredisversion.go => 2024-10-01/privateendpointconnections/method_put.go} (56%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpoint.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnectionlistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/id_redisenterprise.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/id_redisenterprise_test.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/method_listbycluster.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresource.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresourcelistresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresourceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/README.md (93%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/constants.go (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/id_database.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_database_test.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/id_redisenterprise.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_redisenterprise_test.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasescreate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesdelete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesexport.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesflush.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesforcelinktoreplicationgroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesforceunlink.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesimport.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databaseslistbycluster.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databaseslistkeys.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesregeneratekey.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_databasesupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_listbyresourcegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_accesskeys.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_cluster.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_clusterproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_clusterpropertiesencryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryptionkeyencryptionkeyidentity.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_clusterupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_database.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_databaseproperties.go (85%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_databasepropertiesgeoreplication.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_databaseupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_exportclusterparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_flushparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_forcelinkparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_forceunlinkparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_importclusterparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_linkeddatabase.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_module.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_persistence.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_privateendpoint.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_privateendpointconnection.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_privateendpointconnectionproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_privatelinkserviceconnectionstate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_regeneratekeyparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/model_sku.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/{2024-06-01-preview => 2024-10-01}/redisenterprise/version.go (64%) diff --git a/internal/services/redisenterprise/client/client.go b/internal/services/redisenterprise/client/client.go index 057cea361c93..279dab257693 100644 --- a/internal/services/redisenterprise/client/client.go +++ b/internal/services/redisenterprise/client/client.go @@ -6,8 +6,8 @@ package client import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/redisenterprise/redis_enterprise_cluster_resource.go b/internal/services/redisenterprise/redis_enterprise_cluster_resource.go index f6f2a01a37c8..be203eb93ccf 100644 --- a/internal/services/redisenterprise/redis_enterprise_cluster_resource.go +++ b/internal/services/redisenterprise/redis_enterprise_cluster_resource.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/redisenterprise/parse" diff --git a/internal/services/redisenterprise/redis_enterprise_cluster_resource_test.go b/internal/services/redisenterprise/redis_enterprise_cluster_resource_test.go index d59739dedaaf..b7dc82716fc3 100644 --- a/internal/services/redisenterprise/redis_enterprise_cluster_resource_test.go +++ b/internal/services/redisenterprise/redis_enterprise_cluster_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/redisenterprise/redis_enterprise_database_data_source.go b/internal/services/redisenterprise/redis_enterprise_database_data_source.go index 29c8724d031b..80d0d7d4ad88 100644 --- a/internal/services/redisenterprise/redis_enterprise_database_data_source.go +++ b/internal/services/redisenterprise/redis_enterprise_database_data_source.go @@ -8,8 +8,8 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/redisenterprise/redis_enterprise_database_resource.go b/internal/services/redisenterprise/redis_enterprise_database_resource.go index c39452aaf36a..5fe8717a0234 100644 --- a/internal/services/redisenterprise/redis_enterprise_database_resource.go +++ b/internal/services/redisenterprise/redis_enterprise_database_resource.go @@ -11,8 +11,8 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/redisenterprise/validate" diff --git a/internal/services/redisenterprise/redis_enterprise_database_resource_test.go b/internal/services/redisenterprise/redis_enterprise_database_resource_test.go index cca8c3c760bc..86d150e0b23d 100644 --- a/internal/services/redisenterprise/redis_enterprise_database_resource_test.go +++ b/internal/services/redisenterprise/redis_enterprise_database_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/redisenterprise/validate/redis_enterprise_cluster_sku_name.go b/internal/services/redisenterprise/validate/redis_enterprise_cluster_sku_name.go index 83c33ca97dcc..d59f321ea5e7 100644 --- a/internal/services/redisenterprise/validate/redis_enterprise_cluster_sku_name.go +++ b/internal/services/redisenterprise/validate/redis_enterprise_cluster_sku_name.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" ) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/client.go new file mode 100644 index 000000000000..a1d63b479935 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/client.go @@ -0,0 +1,55 @@ +package v2024_10_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/redisenterprise/2024-10-01/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + Databases *databases.DatabasesClient + PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient + PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient + RedisEnterprise *redisenterprise.RedisEnterpriseClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + databasesClient, err := databases.NewDatabasesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Databases client: %+v", err) + } + configureFunc(databasesClient.Client) + + privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) + } + configureFunc(privateEndpointConnectionsClient.Client) + + privateLinkResourcesClient, err := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateLinkResources client: %+v", err) + } + configureFunc(privateLinkResourcesClient.Client) + + redisEnterpriseClient, err := redisenterprise.NewRedisEnterpriseClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building RedisEnterprise client: %+v", err) + } + configureFunc(redisEnterpriseClient.Client) + + return &Client{ + Databases: databasesClient, + PrivateEndpointConnections: privateEndpointConnectionsClient, + PrivateLinkResources: privateLinkResourcesClient, + RedisEnterprise: redisEnterpriseClient, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/README.md similarity index 91% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/README.md index 90651b539a28..5a538577fdc2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases` Documentation -The `databases` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-06-01-preview`). +The `databases` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-10-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/redisenterprise/2024-06-01-preview/databases" +import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases" ``` @@ -215,15 +215,3 @@ if err := client.UpdateThenPoll(ctx, id, payload); err != nil { // handle the error } ``` - - -### Example Usage: `DatabasesClient.UpgradeDBRedisVersion` - -```go -ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "databaseName") - -if err := client.UpgradeDBRedisVersionThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/constants.go similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/constants.go index 075ec0d43cd3..e6c274c2c215 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/constants.go @@ -132,47 +132,6 @@ func parseClusteringPolicy(input string) (*ClusteringPolicy, error) { return &out, nil } -type DeferUpgradeSetting string - -const ( - DeferUpgradeSettingDeferred DeferUpgradeSetting = "Deferred" - DeferUpgradeSettingNotDeferred DeferUpgradeSetting = "NotDeferred" -) - -func PossibleValuesForDeferUpgradeSetting() []string { - return []string{ - string(DeferUpgradeSettingDeferred), - string(DeferUpgradeSettingNotDeferred), - } -} - -func (s *DeferUpgradeSetting) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeferUpgradeSetting(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeferUpgradeSetting(input string) (*DeferUpgradeSetting, error) { - vals := map[string]DeferUpgradeSetting{ - "deferred": DeferUpgradeSettingDeferred, - "notdeferred": DeferUpgradeSettingNotDeferred, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeferUpgradeSetting(input) - return &out, nil -} - type EvictionPolicy string const ( diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_database.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/id_database.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_database.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_database_test.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_database_test.go new file mode 100644 index 000000000000..5dbc49dabaf8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_database_test.go @@ -0,0 +1,327 @@ +package databases + +import ( + "testing" + + "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 = &DatabaseId{} + +func TestNewDatabaseID(t *testing.T) { + id := NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "databaseName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseName" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseName") + } + + if id.DatabaseName != "databaseName" { + t.Fatalf("Expected %q but got %q for Segment 'DatabaseName'", id.DatabaseName, "databaseName") + } +} + +func TestFormatDatabaseID(t *testing.T) { + actual := NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "databaseName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseDatabaseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *DatabaseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + DatabaseName: "databaseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseDatabaseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.DatabaseName != v.Expected.DatabaseName { + t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) + } + + } +} + +func TestParseDatabaseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *DatabaseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/dAtAbAsEs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + DatabaseName: "databaseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/dAtAbAsEs/dAtAbAsEnAmE", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeNaMe", + DatabaseName: "dAtAbAsEnAmE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/dAtAbAsEs/dAtAbAsEnAmE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseDatabaseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.DatabaseName != v.Expected.DatabaseName { + t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) + } + + } +} + +func TestSegmentsForDatabaseId(t *testing.T) { + segments := DatabaseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("DatabaseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/id_redisenterprise.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_redisenterprise.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/id_redisenterprise.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_redisenterprise.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_redisenterprise_test.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_redisenterprise_test.go new file mode 100644 index 000000000000..06c2b187531a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/id_redisenterprise_test.go @@ -0,0 +1,282 @@ +package databases + +import ( + "testing" + + "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 = &RedisEnterpriseId{} + +func TestNewRedisEnterpriseID(t *testing.T) { + id := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseName" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseName") + } +} + +func TestFormatRedisEnterpriseID(t *testing.T) { + actual := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRedisEnterpriseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestParseRedisEnterpriseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeNaMe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestSegmentsForRedisEnterpriseId(t *testing.T) { + segments := RedisEnterpriseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RedisEnterpriseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_export.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_export.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_export.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_export.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_flush.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_flush.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_flush.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_flush.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forcelinktoreplicationgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_forcelinktoreplicationgroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forcelinktoreplicationgroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_forcelinktoreplicationgroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forceunlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_forceunlink.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forceunlink.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_forceunlink.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_import.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_import.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_import.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_import.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listbycluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_listbycluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listbycluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_listbycluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_listkeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listkeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_listkeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_regeneratekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_regeneratekey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_regeneratekey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_regeneratekey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_accesskeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_accesskeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_accesskeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_accesskeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_database.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_database.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_database.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_databaseproperties.go similarity index 85% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_databaseproperties.go index 09bde8edb557..85d805064ef7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_databaseproperties.go @@ -6,13 +6,11 @@ package databases type DatabaseProperties struct { ClientProtocol *Protocol `json:"clientProtocol,omitempty"` ClusteringPolicy *ClusteringPolicy `json:"clusteringPolicy,omitempty"` - DeferUpgrade *DeferUpgradeSetting `json:"deferUpgrade,omitempty"` EvictionPolicy *EvictionPolicy `json:"evictionPolicy,omitempty"` GeoReplication *DatabasePropertiesGeoReplication `json:"geoReplication,omitempty"` Modules *[]Module `json:"modules,omitempty"` Persistence *Persistence `json:"persistence,omitempty"` Port *int64 `json:"port,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedisVersion *string `json:"redisVersion,omitempty"` ResourceState *ResourceState `json:"resourceState,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databasepropertiesgeoreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_databasepropertiesgeoreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databasepropertiesgeoreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_databasepropertiesgeoreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_databaseupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_databaseupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_exportclusterparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_exportclusterparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_exportclusterparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_exportclusterparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_flushparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_flushparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_flushparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_flushparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forceunlinkparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_forceunlinkparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forceunlinkparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_forceunlinkparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_importclusterparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_importclusterparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_importclusterparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_importclusterparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_linkeddatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_linkeddatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_linkeddatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_linkeddatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_module.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_module.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_module.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_module.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_persistence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_persistence.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_persistence.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_persistence.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_regeneratekeyparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_regeneratekeyparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/model_regeneratekeyparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/model_regeneratekeyparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/version.go similarity index 65% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/version.go index 93eecd011fc4..53706fab4719 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases/version.go @@ -3,8 +3,8 @@ package databases // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2024-06-01-preview" +const defaultApiVersion = "2024-10-01" func userAgent() string { - return "hashicorp/go-azure-sdk/databases/2024-06-01-preview" + return "hashicorp/go-azure-sdk/databases/2024-10-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/README.md new file mode 100644 index 000000000000..26afd3760792 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/README.md @@ -0,0 +1,81 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections` Documentation + +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-10-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/redisenterprise/2024-10-01/privateendpointconnections" +``` + + +### Client Initialization + +```go +client := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Delete` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "privateEndpointConnectionName") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Get` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "privateEndpointConnectionName") + +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: `PrivateEndpointConnectionsClient.List` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName") + +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: `PrivateEndpointConnectionsClient.Put` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "privateEndpointConnectionName") + +payload := privateendpointconnections.PrivateEndpointConnection{ + // ... +} + + +if err := client.PutThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/client.go new file mode 100644 index 000000000000..50eaf09dcce9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/client.go @@ -0,0 +1,26 @@ +package privateendpointconnections + +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 PrivateEndpointConnectionsClient struct { + Client *resourcemanager.Client +} + +func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) + } + + return &PrivateEndpointConnectionsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/constants.go new file mode 100644 index 000000000000..c5850609650f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/constants.go @@ -0,0 +1,101 @@ +package privateendpointconnections + +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 PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointConnectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointServiceConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_privateendpointconnection.go new file mode 100644 index 000000000000..26ef2c080582 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_privateendpointconnection.go @@ -0,0 +1,139 @@ +package privateendpointconnections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&PrivateEndpointConnectionId{}) +} + +var _ resourceids.ResourceId = &PrivateEndpointConnectionId{} + +// PrivateEndpointConnectionId is a struct representing the Resource ID for a Private Endpoint Connection +type PrivateEndpointConnectionId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string + PrivateEndpointConnectionName string +} + +// NewPrivateEndpointConnectionID returns a new PrivateEndpointConnectionId struct +func NewPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, redisEnterpriseName string, privateEndpointConnectionName string) PrivateEndpointConnectionId { + return PrivateEndpointConnectionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + PrivateEndpointConnectionName: privateEndpointConnectionName, + } +} + +// ParsePrivateEndpointConnectionID parses 'input' into a PrivateEndpointConnectionId +func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointConnectionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateEndpointConnectionId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePrivateEndpointConnectionIDInsensitively parses 'input' case-insensitively into a PrivateEndpointConnectionId +// note: this method should only be used for API response data and not user input +func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpointConnectionId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointConnectionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateEndpointConnectionId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) 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.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) + } + + return nil +} + +// ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID +func ValidatePrivateEndpointConnectionID(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 := ParsePrivateEndpointConnectionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s/privateEndpointConnections/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName, id.PrivateEndpointConnectionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) 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("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseName"), + resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), + resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionName"), + } +} + +// String returns a human-readable description of this Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), + } + return fmt.Sprintf("Private Endpoint Connection (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_privateendpointconnection_test.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_privateendpointconnection_test.go new file mode 100644 index 000000000000..6361371497e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_privateendpointconnection_test.go @@ -0,0 +1,327 @@ +package privateendpointconnections + +import ( + "testing" + + "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 = &PrivateEndpointConnectionId{} + +func TestNewPrivateEndpointConnectionID(t *testing.T) { + id := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "privateEndpointConnectionName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseName" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseName") + } + + if id.PrivateEndpointConnectionName != "privateEndpointConnectionName" { + t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointConnectionName'", id.PrivateEndpointConnectionName, "privateEndpointConnectionName") + } +} + +func TestFormatPrivateEndpointConnectionID(t *testing.T) { + actual := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "privateEndpointConnectionName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/privateEndpointConnections/privateEndpointConnectionName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParsePrivateEndpointConnectionID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PrivateEndpointConnectionId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/privateEndpointConnections", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/privateEndpointConnections/privateEndpointConnectionName", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + PrivateEndpointConnectionName: "privateEndpointConnectionName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/privateEndpointConnections/privateEndpointConnectionName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePrivateEndpointConnectionID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { + t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) + } + + } +} + +func TestParsePrivateEndpointConnectionIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PrivateEndpointConnectionId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/privateEndpointConnections", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/pRiVaTeEnDpOiNtCoNnEcTiOnS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/privateEndpointConnections/privateEndpointConnectionName", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + PrivateEndpointConnectionName: "privateEndpointConnectionName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/privateEndpointConnections/privateEndpointConnectionName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnNaMe", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeNaMe", + PrivateEndpointConnectionName: "pRiVaTeEnDpOiNtCoNnEcTiOnNaMe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnNaMe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePrivateEndpointConnectionIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { + t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) + } + + } +} + +func TestSegmentsForPrivateEndpointConnectionId(t *testing.T) { + segments := PrivateEndpointConnectionId{}.Segments() + if len(segments) == 0 { + t.Fatalf("PrivateEndpointConnectionId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_redisenterprise.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_redisenterprise.go new file mode 100644 index 000000000000..6449511cb2f8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_redisenterprise.go @@ -0,0 +1,130 @@ +package privateendpointconnections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&RedisEnterpriseId{}) +} + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +// RedisEnterpriseId is a struct representing the Resource ID for a Redis Enterprise +type RedisEnterpriseId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string +} + +// NewRedisEnterpriseID returns a new RedisEnterpriseId struct +func NewRedisEnterpriseID(subscriptionId string, resourceGroupName string, redisEnterpriseName string) RedisEnterpriseId { + return RedisEnterpriseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + } +} + +// ParseRedisEnterpriseID parses 'input' into a RedisEnterpriseId +func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRedisEnterpriseIDInsensitively parses 'input' case-insensitively into a RedisEnterpriseId +// note: this method should only be used for API response data and not user input +func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RedisEnterpriseId) 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.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + return nil +} + +// ValidateRedisEnterpriseID checks that 'input' can be parsed as a Redis Enterprise ID +func ValidateRedisEnterpriseID(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 := ParseRedisEnterpriseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Redis Enterprise ID +func (id RedisEnterpriseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Redis Enterprise ID +func (id RedisEnterpriseId) 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("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseName"), + } +} + +// String returns a human-readable description of this Redis Enterprise ID +func (id RedisEnterpriseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + } + return fmt.Sprintf("Redis Enterprise (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_redisenterprise_test.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_redisenterprise_test.go new file mode 100644 index 000000000000..d5ce5afd6e99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/id_redisenterprise_test.go @@ -0,0 +1,282 @@ +package privateendpointconnections + +import ( + "testing" + + "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 = &RedisEnterpriseId{} + +func TestNewRedisEnterpriseID(t *testing.T) { + id := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseName" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseName") + } +} + +func TestFormatRedisEnterpriseID(t *testing.T) { + actual := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRedisEnterpriseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestParseRedisEnterpriseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeNaMe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestSegmentsForRedisEnterpriseId(t *testing.T) { + segments := RedisEnterpriseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RedisEnterpriseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_upgradedbredisversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_delete.go similarity index 60% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_upgradedbredisversion.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_delete.go index ad7e756b1dc4..63c26e8f27f8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases/method_upgradedbredisversion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_delete.go @@ -1,4 +1,4 @@ -package databases +package privateendpointconnections import ( "context" @@ -14,21 +14,23 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type UpgradeDBRedisVersionOperationResponse struct { +type DeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// UpgradeDBRedisVersion ... -func (c DatabasesClient) UpgradeDBRedisVersion(ctx context.Context, id DatabaseId) (result UpgradeDBRedisVersionOperationResponse, err error) { +// Delete ... +func (c PrivateEndpointConnectionsClient) Delete(ctx context.Context, id PrivateEndpointConnectionId) (result DeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/upgradeDBRedisVersion", id.ID()), + HttpMethod: http.MethodDelete, + Path: id.ID(), } req, err := c.Client.NewRequest(ctx, opts) @@ -54,15 +56,15 @@ func (c DatabasesClient) UpgradeDBRedisVersion(ctx context.Context, id DatabaseI return } -// UpgradeDBRedisVersionThenPoll performs UpgradeDBRedisVersion then polls until it's completed -func (c DatabasesClient) UpgradeDBRedisVersionThenPoll(ctx context.Context, id DatabaseId) error { - result, err := c.UpgradeDBRedisVersion(ctx, id) +// DeleteThenPoll performs Delete then polls until it's completed +func (c PrivateEndpointConnectionsClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointConnectionId) error { + result, err := c.Delete(ctx, id) if err != nil { - return fmt.Errorf("performing UpgradeDBRedisVersion: %+v", err) + return fmt.Errorf("performing Delete: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpgradeDBRedisVersion: %+v", err) + return fmt.Errorf("polling after Delete: %+v", err) } return nil diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_get.go new file mode 100644 index 000000000000..351242746d44 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_get.go @@ -0,0 +1,53 @@ +package privateendpointconnections + +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 *PrivateEndpointConnection +} + +// Get ... +func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEndpointConnectionId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateEndpointConnection + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_list.go new file mode 100644 index 000000000000..fbc4f5b3c1cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_list.go @@ -0,0 +1,54 @@ +package privateendpointconnections + +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 *PrivateEndpointConnectionListResult +} + +// List ... +func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id RedisEnterpriseId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateEndpointConnectionListResult + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupgradedbredisversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_put.go similarity index 56% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupgradedbredisversion.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_put.go index 5c3e29659aca..8f6e3022d15a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupgradedbredisversion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/method_put.go @@ -1,4 +1,4 @@ -package redisenterprise +package privateendpointconnections import ( "context" @@ -14,21 +14,22 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DatabasesUpgradeDBRedisVersionOperationResponse struct { +type PutOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData + Model *PrivateEndpointConnection } -// DatabasesUpgradeDBRedisVersion ... -func (c RedisEnterpriseClient) DatabasesUpgradeDBRedisVersion(ctx context.Context, id DatabaseId) (result DatabasesUpgradeDBRedisVersionOperationResponse, err error) { +// Put ... +func (c PrivateEndpointConnectionsClient) Put(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) (result PutOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ - http.StatusAccepted, + http.StatusCreated, }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/upgradeDBRedisVersion", id.ID()), + HttpMethod: http.MethodPut, + Path: id.ID(), } req, err := c.Client.NewRequest(ctx, opts) @@ -36,6 +37,10 @@ func (c RedisEnterpriseClient) DatabasesUpgradeDBRedisVersion(ctx context.Contex return } + if err = req.Marshal(input); err != nil { + return + } + var resp *client.Response resp, err = req.Execute(ctx) if resp != nil { @@ -54,15 +59,15 @@ func (c RedisEnterpriseClient) DatabasesUpgradeDBRedisVersion(ctx context.Contex return } -// DatabasesUpgradeDBRedisVersionThenPoll performs DatabasesUpgradeDBRedisVersion then polls until it's completed -func (c RedisEnterpriseClient) DatabasesUpgradeDBRedisVersionThenPoll(ctx context.Context, id DatabaseId) error { - result, err := c.DatabasesUpgradeDBRedisVersion(ctx, id) +// PutThenPoll performs Put then polls until it's completed +func (c PrivateEndpointConnectionsClient) PutThenPoll(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) error { + result, err := c.Put(ctx, id, input) if err != nil { - return fmt.Errorf("performing DatabasesUpgradeDBRedisVersion: %+v", err) + return fmt.Errorf("performing Put: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DatabasesUpgradeDBRedisVersion: %+v", err) + return fmt.Errorf("polling after Put: %+v", err) } return nil diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpoint.go new file mode 100644 index 000000000000..1bc8cf2a97c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpoint.go @@ -0,0 +1,8 @@ +package privateendpointconnections + +// 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 { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnection.go new file mode 100644 index 000000000000..fde7f4db0fc0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnection.go @@ -0,0 +1,11 @@ +package privateendpointconnections + +// 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 { + 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/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnectionlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnectionlistresult.go new file mode 100644 index 000000000000..92a9ecb105a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnectionlistresult.go @@ -0,0 +1,8 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionListResult struct { + Value *[]PrivateEndpointConnection `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnectionproperties.go new file mode 100644 index 000000000000..549d255f0696 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privateendpointconnectionproperties.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// 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 { + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go new file mode 100644 index 000000000000..ec3f7a9f24cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// 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 *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/version.go new file mode 100644 index 000000000000..dcbda23c7b38 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privateendpointconnections/version.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-10-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-10-01" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/README.md new file mode 100644 index 000000000000..1db32e6e4158 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/README.md @@ -0,0 +1,36 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources` Documentation + +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-10-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/redisenterprise/2024-10-01/privatelinkresources" +``` + + +### Client Initialization + +```go +client := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateLinkResourcesClient.ListByCluster` + +```go +ctx := context.TODO() +id := privatelinkresources.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName") + +read, err := client.ListByCluster(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/client.go new file mode 100644 index 000000000000..28c00b21f034 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/client.go @@ -0,0 +1,26 @@ +package privatelinkresources + +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 PrivateLinkResourcesClient struct { + Client *resourcemanager.Client +} + +func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) + } + + return &PrivateLinkResourcesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/id_redisenterprise.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/id_redisenterprise.go new file mode 100644 index 000000000000..b57b6c2bd424 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/id_redisenterprise.go @@ -0,0 +1,130 @@ +package privatelinkresources + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&RedisEnterpriseId{}) +} + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +// RedisEnterpriseId is a struct representing the Resource ID for a Redis Enterprise +type RedisEnterpriseId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string +} + +// NewRedisEnterpriseID returns a new RedisEnterpriseId struct +func NewRedisEnterpriseID(subscriptionId string, resourceGroupName string, redisEnterpriseName string) RedisEnterpriseId { + return RedisEnterpriseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + } +} + +// ParseRedisEnterpriseID parses 'input' into a RedisEnterpriseId +func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRedisEnterpriseIDInsensitively parses 'input' case-insensitively into a RedisEnterpriseId +// note: this method should only be used for API response data and not user input +func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RedisEnterpriseId) 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.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + return nil +} + +// ValidateRedisEnterpriseID checks that 'input' can be parsed as a Redis Enterprise ID +func ValidateRedisEnterpriseID(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 := ParseRedisEnterpriseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Redis Enterprise ID +func (id RedisEnterpriseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Redis Enterprise ID +func (id RedisEnterpriseId) 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("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseName"), + } +} + +// String returns a human-readable description of this Redis Enterprise ID +func (id RedisEnterpriseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + } + return fmt.Sprintf("Redis Enterprise (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/id_redisenterprise_test.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/id_redisenterprise_test.go new file mode 100644 index 000000000000..c43caa9e0f68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/id_redisenterprise_test.go @@ -0,0 +1,282 @@ +package privatelinkresources + +import ( + "testing" + + "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 = &RedisEnterpriseId{} + +func TestNewRedisEnterpriseID(t *testing.T) { + id := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseName" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseName") + } +} + +func TestFormatRedisEnterpriseID(t *testing.T) { + actual := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRedisEnterpriseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestParseRedisEnterpriseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeNaMe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestSegmentsForRedisEnterpriseId(t *testing.T) { + segments := RedisEnterpriseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RedisEnterpriseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/method_listbycluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/method_listbycluster.go new file mode 100644 index 000000000000..ab94a7b4ec4b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/method_listbycluster.go @@ -0,0 +1,54 @@ +package privatelinkresources + +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 ListByClusterOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateLinkResourceListResult +} + +// ListByCluster ... +func (c PrivateLinkResourcesClient) ListByCluster(ctx context.Context, id RedisEnterpriseId) (result ListByClusterOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/privateLinkResources", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateLinkResourceListResult + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresource.go new file mode 100644 index 000000000000..69e8ae0e57a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresource.go @@ -0,0 +1,11 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResource struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresourcelistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresourcelistresult.go new file mode 100644 index 000000000000..fa950217c477 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresourcelistresult.go @@ -0,0 +1,8 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourceListResult struct { + Value *[]PrivateLinkResource `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresourceproperties.go new file mode 100644 index 000000000000..3c98012cdd1e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/model_privatelinkresourceproperties.go @@ -0,0 +1,10 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourceProperties struct { + GroupId *string `json:"groupId,omitempty"` + RequiredMembers *[]string `json:"requiredMembers,omitempty"` + RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/version.go new file mode 100644 index 000000000000..dd8da2937c99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/privatelinkresources/version.go @@ -0,0 +1,10 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-10-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/privatelinkresources/2024-10-01" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/README.md similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/README.md index 54800f2cd750..03f63dadefd1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise` Documentation -The `redisenterprise` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-06-01-preview`). +The `redisenterprise` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" +import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise" ``` @@ -235,18 +235,6 @@ if err := client.DatabasesUpdateThenPoll(ctx, id, payload); err != nil { ``` -### Example Usage: `RedisEnterpriseClient.DatabasesUpgradeDBRedisVersion` - -```go -ctx := context.TODO() -id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "databaseName") - -if err := client.DatabasesUpgradeDBRedisVersionThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - ### Example Usage: `RedisEnterpriseClient.Delete` ```go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/constants.go similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/constants.go index 79e57ef39a2d..d9ac97ee81a3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/constants.go @@ -173,47 +173,6 @@ func parseCmkIdentityType(input string) (*CmkIdentityType, error) { return &out, nil } -type DeferUpgradeSetting string - -const ( - DeferUpgradeSettingDeferred DeferUpgradeSetting = "Deferred" - DeferUpgradeSettingNotDeferred DeferUpgradeSetting = "NotDeferred" -) - -func PossibleValuesForDeferUpgradeSetting() []string { - return []string{ - string(DeferUpgradeSettingDeferred), - string(DeferUpgradeSettingNotDeferred), - } -} - -func (s *DeferUpgradeSetting) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeferUpgradeSetting(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeferUpgradeSetting(input string) (*DeferUpgradeSetting, error) { - vals := map[string]DeferUpgradeSetting{ - "deferred": DeferUpgradeSettingDeferred, - "notdeferred": DeferUpgradeSettingNotDeferred, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeferUpgradeSetting(input) - return &out, nil -} - type EvictionPolicy string const ( @@ -634,9 +593,11 @@ type SkuName string const ( SkuNameEnterpriseEFive SkuName = "Enterprise_E5" SkuNameEnterpriseEFiveZero SkuName = "Enterprise_E50" + SkuNameEnterpriseEFourHundred SkuName = "Enterprise_E400" SkuNameEnterpriseEOne SkuName = "Enterprise_E1" SkuNameEnterpriseEOneHundred SkuName = "Enterprise_E100" SkuNameEnterpriseEOneZero SkuName = "Enterprise_E10" + SkuNameEnterpriseETwoHundred SkuName = "Enterprise_E200" SkuNameEnterpriseETwoZero SkuName = "Enterprise_E20" SkuNameEnterpriseFlashFOneFiveHundred SkuName = "EnterpriseFlash_F1500" SkuNameEnterpriseFlashFSevenHundred SkuName = "EnterpriseFlash_F700" @@ -647,9 +608,11 @@ func PossibleValuesForSkuName() []string { return []string{ string(SkuNameEnterpriseEFive), string(SkuNameEnterpriseEFiveZero), + string(SkuNameEnterpriseEFourHundred), string(SkuNameEnterpriseEOne), string(SkuNameEnterpriseEOneHundred), string(SkuNameEnterpriseEOneZero), + string(SkuNameEnterpriseETwoHundred), string(SkuNameEnterpriseETwoZero), string(SkuNameEnterpriseFlashFOneFiveHundred), string(SkuNameEnterpriseFlashFSevenHundred), @@ -674,9 +637,11 @@ func parseSkuName(input string) (*SkuName, error) { vals := map[string]SkuName{ "enterprise_e5": SkuNameEnterpriseEFive, "enterprise_e50": SkuNameEnterpriseEFiveZero, + "enterprise_e400": SkuNameEnterpriseEFourHundred, "enterprise_e1": SkuNameEnterpriseEOne, "enterprise_e100": SkuNameEnterpriseEOneHundred, "enterprise_e10": SkuNameEnterpriseEOneZero, + "enterprise_e200": SkuNameEnterpriseETwoHundred, "enterprise_e20": SkuNameEnterpriseETwoZero, "enterpriseflash_f1500": SkuNameEnterpriseFlashFOneFiveHundred, "enterpriseflash_f700": SkuNameEnterpriseFlashFSevenHundred, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_database.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_database.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_database.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_database_test.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_database_test.go new file mode 100644 index 000000000000..ec9168fdb8cd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_database_test.go @@ -0,0 +1,327 @@ +package redisenterprise + +import ( + "testing" + + "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 = &DatabaseId{} + +func TestNewDatabaseID(t *testing.T) { + id := NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "databaseName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseName" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseName") + } + + if id.DatabaseName != "databaseName" { + t.Fatalf("Expected %q but got %q for Segment 'DatabaseName'", id.DatabaseName, "databaseName") + } +} + +func TestFormatDatabaseID(t *testing.T) { + actual := NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName", "databaseName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseDatabaseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *DatabaseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + DatabaseName: "databaseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseDatabaseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.DatabaseName != v.Expected.DatabaseName { + t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) + } + + } +} + +func TestParseDatabaseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *DatabaseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/dAtAbAsEs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + DatabaseName: "databaseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/databases/databaseName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/dAtAbAsEs/dAtAbAsEnAmE", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeNaMe", + DatabaseName: "dAtAbAsEnAmE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/dAtAbAsEs/dAtAbAsEnAmE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseDatabaseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.DatabaseName != v.Expected.DatabaseName { + t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) + } + + } +} + +func TestSegmentsForDatabaseId(t *testing.T) { + segments := DatabaseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("DatabaseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_redisenterprise.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_redisenterprise.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_redisenterprise.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_redisenterprise.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_redisenterprise_test.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_redisenterprise_test.go new file mode 100644 index 000000000000..8676cc8523e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/id_redisenterprise_test.go @@ -0,0 +1,282 @@ +package redisenterprise + +import ( + "testing" + + "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 = &RedisEnterpriseId{} + +func TestNewRedisEnterpriseID(t *testing.T) { + id := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseName" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseName") + } +} + +func TestFormatRedisEnterpriseID(t *testing.T) { + actual := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRedisEnterpriseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestParseRedisEnterpriseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeNaMe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeNaMe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestSegmentsForRedisEnterpriseId(t *testing.T) { + segments := RedisEnterpriseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RedisEnterpriseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasescreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasescreate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasescreate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasescreate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesexport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesexport.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesexport.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesexport.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesflush.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesflush.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesflush.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesflush.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforcelinktoreplicationgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesforcelinktoreplicationgroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforcelinktoreplicationgroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesforcelinktoreplicationgroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforceunlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesforceunlink.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforceunlink.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesforceunlink.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesimport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesimport.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesimport.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesimport.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistbycluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databaseslistbycluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistbycluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databaseslistbycluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databaseslistkeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistkeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databaseslistkeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesregeneratekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesregeneratekey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesregeneratekey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesregeneratekey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_databasesupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_accesskeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_accesskeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_accesskeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_accesskeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_cluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterpropertiesencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterpropertiesencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryptionkeyencryptionkeyidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryptionkeyencryptionkeyidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryptionkeyencryptionkeyidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryptionkeyencryptionkeyidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_clusterupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_database.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_database.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_database.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_databaseproperties.go similarity index 85% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_databaseproperties.go index 2b5cfe11a8b6..c8ca12b1385e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_databaseproperties.go @@ -6,13 +6,11 @@ package redisenterprise type DatabaseProperties struct { ClientProtocol *Protocol `json:"clientProtocol,omitempty"` ClusteringPolicy *ClusteringPolicy `json:"clusteringPolicy,omitempty"` - DeferUpgrade *DeferUpgradeSetting `json:"deferUpgrade,omitempty"` EvictionPolicy *EvictionPolicy `json:"evictionPolicy,omitempty"` GeoReplication *DatabasePropertiesGeoReplication `json:"geoReplication,omitempty"` Modules *[]Module `json:"modules,omitempty"` Persistence *Persistence `json:"persistence,omitempty"` Port *int64 `json:"port,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedisVersion *string `json:"redisVersion,omitempty"` ResourceState *ResourceState `json:"resourceState,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databasepropertiesgeoreplication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_databasepropertiesgeoreplication.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databasepropertiesgeoreplication.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_databasepropertiesgeoreplication.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_databaseupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_databaseupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_exportclusterparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_exportclusterparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_exportclusterparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_exportclusterparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_flushparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_flushparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_flushparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_flushparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forceunlinkparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forceunlinkparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forceunlinkparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forceunlinkparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_importclusterparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_importclusterparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_importclusterparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_importclusterparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_linkeddatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_linkeddatabase.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_linkeddatabase.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_linkeddatabase.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_module.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_module.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_module.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_module.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_persistence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_persistence.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_persistence.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_persistence.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_privateendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_privateendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_privateendpointconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_privateendpointconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_privatelinkserviceconnectionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privatelinkserviceconnectionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_privatelinkserviceconnectionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_regeneratekeyparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_regeneratekeyparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_regeneratekeyparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_regeneratekeyparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/version.go similarity index 64% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/version.go index d9e44a1872cf..dce3600f7165 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise/version.go @@ -3,8 +3,8 @@ package redisenterprise // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2024-06-01-preview" +const defaultApiVersion = "2024-10-01" func userAgent() string { - return "hashicorp/go-azure-sdk/redisenterprise/2024-06-01-preview" + return "hashicorp/go-azure-sdk/redisenterprise/2024-10-01" } diff --git a/vendor/modules.txt b/vendor/modules.txt index a00e6eefd3fc..28d54c11c760 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -984,8 +984,8 @@ github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/patchschedul github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/privateendpointconnections github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/privatelinkresources github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/redis -github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases -github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise +github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/databases +github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances