From e02eb7cdac71b84301b45dd1e5115aacc9ab3646 Mon Sep 17 00:00:00 2001 From: "Yun Liu (from Dev Box)" Date: Fri, 1 Nov 2024 14:45:43 +0800 Subject: [PATCH 1/7] Update SDK version for Cognitive RP --- ...bot_channel_direct_line_speech_resource.go | 2 +- .../cognitive/ai_services_resource.go | 2 +- .../cognitive/ai_services_resource_test.go | 2 +- internal/services/cognitive/client/client.go | 4 +- ...e_account_customer_managed_key_resource.go | 2 +- ...ount_customer_managed_key_resource_test.go | 2 +- .../cognitive_account_data_source.go | 2 +- .../cognitive/cognitive_account_resource.go | 2 +- .../cognitive_account_resource_test.go | 2 +- .../cognitive_deployment_resource.go | 4 +- .../cognitive_deployment_resource_test.go | 2 +- .../model_capacityconfig.go | 11 -- .../deployments/model_deploymentproperties.go | 15 --- .../cognitiveservicesaccounts/README.md | 27 ++++- .../cognitiveservicesaccounts/client.go | 0 .../cognitiveservicesaccounts/constants.go | 50 +++++++++ .../cognitiveservicesaccounts/id_account.go | 0 .../id_deletedaccount.go | 0 .../cognitiveservicesaccounts/id_location.go | 0 .../method_accountscreate.go | 0 .../method_accountsdelete.go | 0 .../method_accountsget.go | 0 .../method_accountslist.go | 0 .../method_accountslistbyresourcegroup.go | 0 .../method_accountslistkeys.go | 0 .../method_accountslistmodels.go | 0 .../method_accountslistskus.go | 0 .../method_accountslistusages.go | 0 .../method_accountsregeneratekey.go | 0 .../method_accountsupdate.go | 0 .../method_calculatemodelcapacity.go | 59 ++++++++++ .../method_checkdomainavailability.go | 0 .../method_checkskuavailability.go | 0 .../method_deletedaccountsget.go | 0 .../method_deletedaccountslist.go | 0 .../method_deletedaccountspurge.go | 0 .../method_resourceskuslist.go | 0 .../model_abusepenalty.go | 0 .../model_account.go | 0 .../model_accountmodel.go | 2 + .../model_accountproperties.go | 2 + .../model_accountsku.go | 0 .../model_accountskulistresult.go | 0 .../model_apikeys.go | 0 .../model_apiproperties.go | 0 .../model_billingmeterinfo.go | 10 ++ .../model_calculatemodelcapacityparameter.go | 10 ++ .../model_calculatemodelcapacityresult.go | 10 ++ ...atemodelcapacityresultestimatedcapacity.go | 9 ++ .../model_callratelimit.go | 0 .../model_capacityconfig.go | 12 ++ .../model_checkdomainavailabilityparameter.go | 0 .../model_checkskuavailabilityparameter.go | 0 .../model_commitmentplanassociation.go | 0 .../model_deploymentmodel.go | 2 + .../model_domainavailability.go | 0 .../model_encryption.go | 0 .../cognitiveservicesaccounts/model_iprule.go | 0 .../model_keyvaultproperties.go | 0 .../model_metricname.go | 0 .../model_modelcapacitycalculatorworkload.go | 9 ++ ...lcapacitycalculatorworkloadrequestparam.go | 9 ++ .../model_modeldeprecationinfo.go | 0 .../model_modelsku.go | 11 +- .../model_multiregionsettings.go | 0 .../model_networkruleset.go | 1 + .../model_privateendpoint.go | 0 .../model_privateendpointconnection.go | 0 ...del_privateendpointconnectionproperties.go | 0 ...model_privatelinkserviceconnectionstate.go | 0 .../model_quotalimit.go | 0 .../model_raimonitorconfig.go | 9 ++ .../model_regeneratekeyparameters.go | 0 .../model_regionsetting.go | 0 .../model_requestmatchpattern.go | 0 .../model_resourcesku.go | 0 .../model_resourceskurestrictioninfo.go | 0 .../model_resourceskurestrictions.go | 0 .../cognitiveservicesaccounts/model_sku.go | 0 .../model_skuavailability.go | 0 .../model_skuavailabilitylistresult.go | 0 .../model_skucapability.go | 0 .../model_skuchangeinfo.go | 0 .../model_throttlingrule.go | 0 .../cognitiveservicesaccounts/model_usage.go | 0 .../model_userownedamlworkspace.go | 9 ++ .../model_userownedstorage.go | 0 .../model_virtualnetworkrule.go | 0 .../cognitiveservicesaccounts/predicates.go | 10 ++ .../cognitiveservicesaccounts/version.go | 4 +- .../deployments/README.md | 40 ++++++- .../deployments/client.go | 0 .../deployments/constants.go | 0 .../deployments/id_account.go | 0 .../deployments/id_deployment.go | 0 .../deployments/method_createorupdate.go | 0 .../deployments/method_delete.go | 0 .../deployments/method_get.go | 0 .../deployments/method_list.go | 0 .../2024-10-01/deployments/method_listskus.go | 105 ++++++++++++++++++ .../2024-10-01/deployments/method_update.go | 75 +++++++++++++ .../deployments/model_callratelimit.go | 0 .../deployments/model_capacityconfig.go | 12 ++ .../deployments/model_deployment.go | 1 + .../model_deploymentcapacitysettings.go | 9 ++ .../deployments/model_deploymentmodel.go | 2 + .../deployments/model_deploymentproperties.go | 19 ++++ .../model_deploymentscalesettings.go | 0 .../model_patchresourcetagsandsku.go | 9 ++ .../deployments/model_requestmatchpattern.go | 0 .../deployments/model_sku.go | 0 .../deployments/model_skuresource.go | 10 ++ .../deployments/model_throttlingrule.go | 0 .../deployments/predicates.go | 13 +++ .../deployments/version.go | 4 +- vendor/modules.txt | 4 +- 116 files changed, 554 insertions(+), 56 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_capacityconfig.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/README.md (92%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/constants.go (92%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/id_account.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/id_deletedaccount.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/id_location.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountscreate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountsdelete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountsget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountslistbyresourcegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountslistkeys.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountslistmodels.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountslistskus.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountslistusages.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountsregeneratekey.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_accountsupdate.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_calculatemodelcapacity.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_checkdomainavailability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_checkskuavailability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_deletedaccountsget.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_deletedaccountslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_deletedaccountspurge.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/method_resourceskuslist.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_abusepenalty.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_account.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_accountmodel.go (89%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_accountproperties.go (93%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_accountsku.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_accountskulistresult.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_apikeys.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_apiproperties.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_billingmeterinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityparameter.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityresultestimatedcapacity.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_callratelimit.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_capacityconfig.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_checkdomainavailabilityparameter.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_checkskuavailabilityparameter.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_commitmentplanassociation.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_deploymentmodel.go (80%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_domainavailability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_encryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_iprule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_keyvaultproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_metricname.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelcapacitycalculatorworkload.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelcapacitycalculatorworkloadrequestparam.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_modeldeprecationinfo.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_modelsku.go (62%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_multiregionsettings.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_networkruleset.go (86%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_privateendpoint.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_privateendpointconnection.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_privateendpointconnectionproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_privatelinkserviceconnectionstate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_quotalimit.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_raimonitorconfig.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_regeneratekeyparameters.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_regionsetting.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_requestmatchpattern.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_resourcesku.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_resourceskurestrictioninfo.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_resourceskurestrictions.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_sku.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_skuavailability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_skuavailabilitylistresult.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_skucapability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_skuchangeinfo.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_throttlingrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_usage.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_userownedamlworkspace.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_userownedstorage.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/model_virtualnetworkrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/predicates.go (91%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/cognitiveservicesaccounts/version.go (66%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/README.md (68%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/id_account.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/id_deployment.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/method_list.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_listskus.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_update.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/model_callratelimit.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_capacityconfig.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/model_deployment.go (92%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentcapacitysettings.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/model_deploymentmodel.go (80%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/model_deploymentscalesettings.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_patchresourcetagsandsku.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/model_requestmatchpattern.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/model_sku.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_skuresource.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/model_throttlingrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/predicates.go (71%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/{2023-05-01 => 2024-10-01}/deployments/version.go (68%) diff --git a/internal/services/bot/bot_channel_direct_line_speech_resource.go b/internal/services/bot/bot_channel_direct_line_speech_resource.go index d07ffc5fe8ca..ed59c9a8785e 100644 --- a/internal/services/bot/bot_channel_direct_line_speech_resource.go +++ b/internal/services/bot/bot_channel_direct_line_speech_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" diff --git a/internal/services/cognitive/ai_services_resource.go b/internal/services/cognitive/ai_services_resource.go index c3443483bb3b..5b3457b334fe 100644 --- a/internal/services/cognitive/ai_services_resource.go +++ b/internal/services/cognitive/ai_services_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" "github.com/hashicorp/go-azure-sdk/sdk/environments" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" commonValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" diff --git a/internal/services/cognitive/ai_services_resource_test.go b/internal/services/cognitive/ai_services_resource_test.go index 0873df63cfe9..9e08e0d319e7 100644 --- a/internal/services/cognitive/ai_services_resource_test.go +++ b/internal/services/cognitive/ai_services_resource_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" "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/cognitive/client/client.go b/internal/services/cognitive/client/client.go index 81eddda7f77a..4ff11ddd38c8 100644 --- a/internal/services/cognitive/client/client.go +++ b/internal/services/cognitive/client/client.go @@ -6,8 +6,8 @@ package client import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/cognitive/cognitive_account_customer_managed_key_resource.go b/internal/services/cognitive/cognitive_account_customer_managed_key_resource.go index be9e25d9e413..04b2387f6754 100644 --- a/internal/services/cognitive/cognitive_account_customer_managed_key_resource.go +++ b/internal/services/cognitive/cognitive_account_customer_managed_key_resource.go @@ -8,7 +8,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" diff --git a/internal/services/cognitive/cognitive_account_customer_managed_key_resource_test.go b/internal/services/cognitive/cognitive_account_customer_managed_key_resource_test.go index 9076fcabbbb2..be252624cd51 100644 --- a/internal/services/cognitive/cognitive_account_customer_managed_key_resource_test.go +++ b/internal/services/cognitive/cognitive_account_customer_managed_key_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" "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/cognitive/cognitive_account_data_source.go b/internal/services/cognitive/cognitive_account_data_source.go index 3f42fbaaa455..5ec19dea8939 100644 --- a/internal/services/cognitive/cognitive_account_data_source.go +++ b/internal/services/cognitive/cognitive_account_data_source.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" "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/cognitive/cognitive_account_resource.go b/internal/services/cognitive/cognitive_account_resource.go index 056a8e8e6108..d4786127ec59 100644 --- a/internal/services/cognitive/cognitive_account_resource.go +++ b/internal/services/cognitive/cognitive_account_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" search "github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/services" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" diff --git a/internal/services/cognitive/cognitive_account_resource_test.go b/internal/services/cognitive/cognitive_account_resource_test.go index 1fbed7e979e0..142431d9aedc 100644 --- a/internal/services/cognitive/cognitive_account_resource_test.go +++ b/internal/services/cognitive/cognitive_account_resource_test.go @@ -9,7 +9,7 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" "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/cognitive/cognitive_deployment_resource.go b/internal/services/cognitive/cognitive_deployment_resource.go index b7c18eb74511..eb58dc9046e9 100644 --- a/internal/services/cognitive/cognitive_deployment_resource.go +++ b/internal/services/cognitive/cognitive_deployment_resource.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts" - "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" diff --git a/internal/services/cognitive/cognitive_deployment_resource_test.go b/internal/services/cognitive/cognitive_deployment_resource_test.go index 589c7d2cae10..1cb9cffd5746 100644 --- a/internal/services/cognitive/cognitive_deployment_resource_test.go +++ b/internal/services/cognitive/cognitive_deployment_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/cognitive/2023-05-01/deployments" + "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments" "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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_capacityconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_capacityconfig.go deleted file mode 100644 index 2368beec6df8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_capacityconfig.go +++ /dev/null @@ -1,11 +0,0 @@ -package cognitiveservicesaccounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CapacityConfig struct { - Default *int64 `json:"default,omitempty"` - Maximum *int64 `json:"maximum,omitempty"` - Minimum *int64 `json:"minimum,omitempty"` - Step *int64 `json:"step,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentproperties.go deleted file mode 100644 index e72c000ba700..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package deployments - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeploymentProperties struct { - CallRateLimit *CallRateLimit `json:"callRateLimit,omitempty"` - Capabilities *map[string]string `json:"capabilities,omitempty"` - Model *DeploymentModel `json:"model,omitempty"` - ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty"` - RaiPolicyName *string `json:"raiPolicyName,omitempty"` - RateLimits *[]ThrottlingRule `json:"rateLimits,omitempty"` - ScaleSettings *DeploymentScaleSettings `json:"scaleSettings,omitempty"` - VersionUpgradeOption *DeploymentModelVersionUpgradeOption `json:"versionUpgradeOption,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/README.md similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/README.md index a7105880596f..d25bcd4ab012 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts` Documentation -The `cognitiveservicesaccounts` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). +The `cognitiveservicesaccounts` SDK allows for interaction with Azure Resource Manager `cognitive` (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/cognitive/2023-05-01/cognitiveservicesaccounts" +import "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts" ``` @@ -204,6 +204,27 @@ if err := client.AccountsUpdateThenPoll(ctx, id, payload); err != nil { ``` +### Example Usage: `CognitiveServicesAccountsClient.CalculateModelCapacity` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := cognitiveservicesaccounts.CalculateModelCapacityParameter{ + // ... +} + + +read, err := client.CalculateModelCapacity(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + ### Example Usage: `CognitiveServicesAccountsClient.CheckDomainAvailability` ```go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/constants.go similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/constants.go index 8df13caf0293..2a176db9f2d9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/constants.go @@ -50,6 +50,47 @@ func parseAbusePenaltyAction(input string) (*AbusePenaltyAction, error) { return &out, nil } +type ByPassSelection string + +const ( + ByPassSelectionAzureServices ByPassSelection = "AzureServices" + ByPassSelectionNone ByPassSelection = "None" +) + +func PossibleValuesForByPassSelection() []string { + return []string{ + string(ByPassSelectionAzureServices), + string(ByPassSelectionNone), + } +} + +func (s *ByPassSelection) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseByPassSelection(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseByPassSelection(input string) (*ByPassSelection, error) { + vals := map[string]ByPassSelection{ + "azureservices": ByPassSelectionAzureServices, + "none": ByPassSelectionNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ByPassSelection(input) + return &out, nil +} + type KeyName string const ( @@ -135,14 +176,20 @@ func parseKeySource(input string) (*KeySource, error) { type ModelLifecycleStatus string const ( + ModelLifecycleStatusDeprecated ModelLifecycleStatus = "Deprecated" + ModelLifecycleStatusDeprecating ModelLifecycleStatus = "Deprecating" ModelLifecycleStatusGenerallyAvailable ModelLifecycleStatus = "GenerallyAvailable" ModelLifecycleStatusPreview ModelLifecycleStatus = "Preview" + ModelLifecycleStatusStable ModelLifecycleStatus = "Stable" ) func PossibleValuesForModelLifecycleStatus() []string { return []string{ + string(ModelLifecycleStatusDeprecated), + string(ModelLifecycleStatusDeprecating), string(ModelLifecycleStatusGenerallyAvailable), string(ModelLifecycleStatusPreview), + string(ModelLifecycleStatusStable), } } @@ -161,8 +208,11 @@ func (s *ModelLifecycleStatus) UnmarshalJSON(bytes []byte) error { func parseModelLifecycleStatus(input string) (*ModelLifecycleStatus, error) { vals := map[string]ModelLifecycleStatus{ + "deprecated": ModelLifecycleStatusDeprecated, + "deprecating": ModelLifecycleStatusDeprecating, "generallyavailable": ModelLifecycleStatusGenerallyAvailable, "preview": ModelLifecycleStatusPreview, + "stable": ModelLifecycleStatusStable, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/id_account.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/id_account.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/id_deletedaccount.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/id_deletedaccount.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/id_location.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/id_location.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountscreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountscreate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountscreate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountscreate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountsdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountsdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistkeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistkeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistkeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistmodels.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistmodels.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistmodels.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistmodels.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistskus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistskus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistskus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistskus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistusages.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistusages.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistusages.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountslistusages.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsregeneratekey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountsregeneratekey.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsregeneratekey.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountsregeneratekey.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountsupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_accountsupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_calculatemodelcapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_calculatemodelcapacity.go new file mode 100644 index 000000000000..81b572048706 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_calculatemodelcapacity.go @@ -0,0 +1,59 @@ +package cognitiveservicesaccounts + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CalculateModelCapacityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CalculateModelCapacityResult +} + +// CalculateModelCapacity ... +func (c CognitiveServicesAccountsClient) CalculateModelCapacity(ctx context.Context, id commonids.SubscriptionId, input CalculateModelCapacityParameter) (result CalculateModelCapacityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.CognitiveServices/calculateModelCapacity", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CalculateModelCapacityResult + 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/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkdomainavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_checkdomainavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkdomainavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_checkdomainavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkskuavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_checkskuavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkskuavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_checkskuavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_deletedaccountsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_deletedaccountsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_deletedaccountslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_deletedaccountslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountspurge.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_deletedaccountspurge.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountspurge.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_deletedaccountspurge.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_resourceskuslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_resourceskuslist.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_resourceskuslist.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/method_resourceskuslist.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_abusepenalty.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_abusepenalty.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_abusepenalty.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_abusepenalty.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_account.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_account.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_account.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountmodel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountmodel.go similarity index 89% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountmodel.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountmodel.go index 45438b90ddaa..ad762bba25be 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountmodel.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountmodel.go @@ -18,8 +18,10 @@ type AccountModel struct { LifecycleStatus *ModelLifecycleStatus `json:"lifecycleStatus,omitempty"` MaxCapacity *int64 `json:"maxCapacity,omitempty"` Name *string `json:"name,omitempty"` + Publisher *string `json:"publisher,omitempty"` Skus *[]ModelSku `json:"skus,omitempty"` Source *string `json:"source,omitempty"` + SourceAccount *string `json:"sourceAccount,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Version *string `json:"version,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountproperties.go similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountproperties.go index db635bef6359..ac4404fd09cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountproperties.go @@ -6,6 +6,7 @@ package cognitiveservicesaccounts type AccountProperties struct { AbusePenalty *AbusePenalty `json:"abusePenalty,omitempty"` AllowedFqdnList *[]string `json:"allowedFqdnList,omitempty"` + AmlWorkspace *UserOwnedAmlWorkspace `json:"amlWorkspace,omitempty"` ApiProperties *ApiProperties `json:"apiProperties,omitempty"` CallRateLimit *CallRateLimit `json:"callRateLimit,omitempty"` Capabilities *[]SkuCapability `json:"capabilities,omitempty"` @@ -27,6 +28,7 @@ type AccountProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` QuotaLimit *QuotaLimit `json:"quotaLimit,omitempty"` + RaiMonitorConfig *RaiMonitorConfig `json:"raiMonitorConfig,omitempty"` Restore *bool `json:"restore,omitempty"` RestrictOutboundNetworkAccess *bool `json:"restrictOutboundNetworkAccess,omitempty"` ScheduledPurgeDate *string `json:"scheduledPurgeDate,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountsku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountsku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountsku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountskulistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountskulistresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_accountskulistresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_accountskulistresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_apikeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_apikeys.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_apikeys.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_apikeys.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_apiproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_apiproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_apiproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_apiproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_billingmeterinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_billingmeterinfo.go new file mode 100644 index 000000000000..0fc7f160036d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_billingmeterinfo.go @@ -0,0 +1,10 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BillingMeterInfo struct { + MeterId *string `json:"meterId,omitempty"` + Name *string `json:"name,omitempty"` + Unit *string `json:"unit,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityparameter.go new file mode 100644 index 000000000000..ec4e238dd4d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityparameter.go @@ -0,0 +1,10 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CalculateModelCapacityParameter struct { + Model *DeploymentModel `json:"model,omitempty"` + SkuName *string `json:"skuName,omitempty"` + Workloads *[]ModelCapacityCalculatorWorkload `json:"workloads,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityresult.go new file mode 100644 index 000000000000..315de7a56daf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityresult.go @@ -0,0 +1,10 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CalculateModelCapacityResult struct { + EstimatedCapacity *CalculateModelCapacityResultEstimatedCapacity `json:"estimatedCapacity,omitempty"` + Model *DeploymentModel `json:"model,omitempty"` + SkuName *string `json:"skuName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityresultestimatedcapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityresultestimatedcapacity.go new file mode 100644 index 000000000000..c4366ef65e8e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_calculatemodelcapacityresultestimatedcapacity.go @@ -0,0 +1,9 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CalculateModelCapacityResultEstimatedCapacity struct { + DeployableValue *int64 `json:"deployableValue,omitempty"` + Value *int64 `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_callratelimit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_callratelimit.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_callratelimit.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_callratelimit.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_capacityconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_capacityconfig.go new file mode 100644 index 000000000000..aab7af4c33b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_capacityconfig.go @@ -0,0 +1,12 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CapacityConfig struct { + AllowedValues *[]int64 `json:"allowedValues,omitempty"` + Default *int64 `json:"default,omitempty"` + Maximum *int64 `json:"maximum,omitempty"` + Minimum *int64 `json:"minimum,omitempty"` + Step *int64 `json:"step,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_checkdomainavailabilityparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_checkdomainavailabilityparameter.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_checkdomainavailabilityparameter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_checkdomainavailabilityparameter.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_checkskuavailabilityparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_checkskuavailabilityparameter.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_checkskuavailabilityparameter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_checkskuavailabilityparameter.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_commitmentplanassociation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_commitmentplanassociation.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_commitmentplanassociation.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_commitmentplanassociation.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_deploymentmodel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_deploymentmodel.go similarity index 80% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_deploymentmodel.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_deploymentmodel.go index 6d21121cc19e..4b6dc451f8a2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_deploymentmodel.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_deploymentmodel.go @@ -7,6 +7,8 @@ type DeploymentModel struct { CallRateLimit *CallRateLimit `json:"callRateLimit,omitempty"` Format *string `json:"format,omitempty"` Name *string `json:"name,omitempty"` + Publisher *string `json:"publisher,omitempty"` Source *string `json:"source,omitempty"` + SourceAccount *string `json:"sourceAccount,omitempty"` Version *string `json:"version,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_domainavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_domainavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_domainavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_domainavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_encryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_encryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_encryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_encryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_iprule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_iprule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_iprule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_iprule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_keyvaultproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_keyvaultproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_keyvaultproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_metricname.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_metricname.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_metricname.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_metricname.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelcapacitycalculatorworkload.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelcapacitycalculatorworkload.go new file mode 100644 index 000000000000..12beb03c7ce5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelcapacitycalculatorworkload.go @@ -0,0 +1,9 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ModelCapacityCalculatorWorkload struct { + RequestParameters *ModelCapacityCalculatorWorkloadRequestParam `json:"requestParameters,omitempty"` + RequestPerMinute *int64 `json:"requestPerMinute,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelcapacitycalculatorworkloadrequestparam.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelcapacitycalculatorworkloadrequestparam.go new file mode 100644 index 000000000000..8035e384d76e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelcapacitycalculatorworkloadrequestparam.go @@ -0,0 +1,9 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ModelCapacityCalculatorWorkloadRequestParam struct { + AvgGeneratedTokens *int64 `json:"avgGeneratedTokens,omitempty"` + AvgPromptTokens *int64 `json:"avgPromptTokens,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_modeldeprecationinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modeldeprecationinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_modeldeprecationinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modeldeprecationinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_modelsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelsku.go similarity index 62% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_modelsku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelsku.go index 4905fd21d36a..76385796be18 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_modelsku.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_modelsku.go @@ -10,11 +10,12 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ModelSku struct { - Capacity *CapacityConfig `json:"capacity,omitempty"` - DeprecationDate *string `json:"deprecationDate,omitempty"` - Name *string `json:"name,omitempty"` - RateLimits *[]CallRateLimit `json:"rateLimits,omitempty"` - UsageName *string `json:"usageName,omitempty"` + Capacity *CapacityConfig `json:"capacity,omitempty"` + Cost *[]BillingMeterInfo `json:"cost,omitempty"` + DeprecationDate *string `json:"deprecationDate,omitempty"` + Name *string `json:"name,omitempty"` + RateLimits *[]CallRateLimit `json:"rateLimits,omitempty"` + UsageName *string `json:"usageName,omitempty"` } func (o *ModelSku) GetDeprecationDateAsTime() (*time.Time, error) { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_multiregionsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_multiregionsettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_multiregionsettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_multiregionsettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_networkruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_networkruleset.go similarity index 86% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_networkruleset.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_networkruleset.go index 7362b165a129..37f976f1c64f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_networkruleset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_networkruleset.go @@ -4,6 +4,7 @@ package cognitiveservicesaccounts // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkRuleSet struct { + Bypass *ByPassSelection `json:"bypass,omitempty"` DefaultAction *NetworkRuleAction `json:"defaultAction,omitempty"` IPRules *[]IPRule `json:"ipRules,omitempty"` VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_privateendpoint.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_privateendpoint.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_privateendpoint.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_privateendpointconnection.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_privateendpointconnection.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_privateendpointconnection.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_privateendpointconnectionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_privateendpointconnectionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_privateendpointconnectionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_privatelinkserviceconnectionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_privatelinkserviceconnectionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_privatelinkserviceconnectionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_quotalimit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_quotalimit.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_quotalimit.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_quotalimit.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_raimonitorconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_raimonitorconfig.go new file mode 100644 index 000000000000..b82e2c6c8134 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_raimonitorconfig.go @@ -0,0 +1,9 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RaiMonitorConfig struct { + AdxStorageResourceId *string `json:"adxStorageResourceId,omitempty"` + IdentityClientId *string `json:"identityClientId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_regeneratekeyparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_regeneratekeyparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_regeneratekeyparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_regeneratekeyparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_regionsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_regionsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_regionsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_regionsetting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_requestmatchpattern.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_requestmatchpattern.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_requestmatchpattern.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_requestmatchpattern.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_resourcesku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_resourcesku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_resourcesku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_resourcesku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_resourceskurestrictioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_resourceskurestrictioninfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_resourceskurestrictioninfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_resourceskurestrictioninfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_resourceskurestrictions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_resourceskurestrictions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_resourceskurestrictions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_resourceskurestrictions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_skuavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_skuavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_skuavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_skuavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_skuavailabilitylistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_skuavailabilitylistresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_skuavailabilitylistresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_skuavailabilitylistresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_skucapability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_skucapability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_skucapability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_skucapability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_skuchangeinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_skuchangeinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_skuchangeinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_skuchangeinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_throttlingrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_throttlingrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_throttlingrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_throttlingrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_usage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_usage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_usage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_usage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_userownedamlworkspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_userownedamlworkspace.go new file mode 100644 index 000000000000..ab8a7ab7cfe2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_userownedamlworkspace.go @@ -0,0 +1,9 @@ +package cognitiveservicesaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UserOwnedAmlWorkspace struct { + IdentityClientId *string `json:"identityClientId,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_userownedstorage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_userownedstorage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_userownedstorage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_userownedstorage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_virtualnetworkrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/model_virtualnetworkrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/model_virtualnetworkrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/predicates.go similarity index 91% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/predicates.go index 4711b3cb54fd..fdbf685923a5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/predicates.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/predicates.go @@ -46,7 +46,9 @@ type AccountModelOperationPredicate struct { IsDefaultVersion *bool MaxCapacity *int64 Name *string + Publisher *string Source *string + SourceAccount *string Version *string } @@ -68,10 +70,18 @@ func (p AccountModelOperationPredicate) Matches(input AccountModel) bool { return false } + if p.Publisher != nil && (input.Publisher == nil || *p.Publisher != *input.Publisher) { + return false + } + if p.Source != nil && (input.Source == nil || *p.Source != *input.Source) { return false } + if p.SourceAccount != nil && (input.SourceAccount == nil || *p.SourceAccount != *input.SourceAccount) { + return false + } + if p.Version != nil && (input.Version == nil || *p.Version != *input.Version) { return false } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/version.go similarity index 66% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/version.go index c5666ad98808..4b30550b89da 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts/version.go @@ -3,8 +3,8 @@ package cognitiveservicesaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2023-05-01" +const defaultApiVersion = "2024-10-01" func userAgent() string { - return "hashicorp/go-azure-sdk/cognitiveservicesaccounts/2023-05-01" + return "hashicorp/go-azure-sdk/cognitiveservicesaccounts/2024-10-01" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/README.md similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/README.md index 4652baa68534..23b32fdca9d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments` Documentation -The `deployments` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `cognitive` (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/cognitive/2023-05-01/deployments" +import "github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments" ``` @@ -80,3 +80,37 @@ for _, item := range items { // do something } ``` + + +### Example Usage: `DeploymentsClient.ListSkus` + +```go +ctx := context.TODO() +id := deployments.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountName", "deploymentName") + +// alternatively `client.ListSkus(ctx, id)` can be used to do batched pagination +items, err := client.ListSkusComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DeploymentsClient.Update` + +```go +ctx := context.TODO() +id := deployments.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountName", "deploymentName") + +payload := deployments.PatchResourceTagsAndSku{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/id_account.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_account.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/id_account.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/id_deployment.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/id_deployment.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_listskus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_listskus.go new file mode 100644 index 000000000000..512ae6396a9a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_listskus.go @@ -0,0 +1,105 @@ +package deployments + +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 ListSkusOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SkuResource +} + +type ListSkusCompleteResult struct { + LatestHttpResponse *http.Response + Items []SkuResource +} + +type ListSkusCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListSkusCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListSkus ... +func (c DeploymentsClient) ListSkus(ctx context.Context, id DeploymentId) (result ListSkusOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListSkusCustomPager{}, + Path: fmt.Sprintf("%s/skus", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SkuResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListSkusComplete retrieves all the results into a single object +func (c DeploymentsClient) ListSkusComplete(ctx context.Context, id DeploymentId) (ListSkusCompleteResult, error) { + return c.ListSkusCompleteMatchingPredicate(ctx, id, SkuResourceOperationPredicate{}) +} + +// ListSkusCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c DeploymentsClient) ListSkusCompleteMatchingPredicate(ctx context.Context, id DeploymentId, predicate SkuResourceOperationPredicate) (result ListSkusCompleteResult, err error) { + items := make([]SkuResource, 0) + + resp, err := c.ListSkus(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListSkusCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_update.go new file mode 100644 index 000000000000..38169cc3cc13 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/method_update.go @@ -0,0 +1,75 @@ +package deployments + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Deployment +} + +// Update ... +func (c DeploymentsClient) Update(ctx context.Context, id DeploymentId, input PatchResourceTagsAndSku) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c DeploymentsClient) UpdateThenPoll(ctx context.Context, id DeploymentId, input PatchResourceTagsAndSku) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_callratelimit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_callratelimit.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_callratelimit.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_callratelimit.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_capacityconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_capacityconfig.go new file mode 100644 index 000000000000..3a9fbfb28db2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_capacityconfig.go @@ -0,0 +1,12 @@ +package deployments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CapacityConfig struct { + AllowedValues *[]int64 `json:"allowedValues,omitempty"` + Default *int64 `json:"default,omitempty"` + Maximum *int64 `json:"maximum,omitempty"` + Minimum *int64 `json:"minimum,omitempty"` + Step *int64 `json:"step,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deployment.go similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deployment.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deployment.go index 38a32ee8b08e..46d1f30b18f8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deployment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deployment.go @@ -14,5 +14,6 @@ type Deployment struct { Properties *DeploymentProperties `json:"properties,omitempty"` Sku *Sku `json:"sku,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentcapacitysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentcapacitysettings.go new file mode 100644 index 000000000000..513b4429493e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentcapacitysettings.go @@ -0,0 +1,9 @@ +package deployments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentCapacitySettings struct { + DesignatedCapacity *int64 `json:"designatedCapacity,omitempty"` + Priority *int64 `json:"priority,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentmodel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentmodel.go similarity index 80% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentmodel.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentmodel.go index dc69b396c5f5..738db77935d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentmodel.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentmodel.go @@ -7,6 +7,8 @@ type DeploymentModel struct { CallRateLimit *CallRateLimit `json:"callRateLimit,omitempty"` Format *string `json:"format,omitempty"` Name *string `json:"name,omitempty"` + Publisher *string `json:"publisher,omitempty"` Source *string `json:"source,omitempty"` + SourceAccount *string `json:"sourceAccount,omitempty"` Version *string `json:"version,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentproperties.go new file mode 100644 index 000000000000..3268ecae2647 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentproperties.go @@ -0,0 +1,19 @@ +package deployments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentProperties struct { + CallRateLimit *CallRateLimit `json:"callRateLimit,omitempty"` + Capabilities *map[string]string `json:"capabilities,omitempty"` + CapacitySettings *DeploymentCapacitySettings `json:"capacitySettings,omitempty"` + CurrentCapacity *int64 `json:"currentCapacity,omitempty"` + DynamicThrottlingEnabled *bool `json:"dynamicThrottlingEnabled,omitempty"` + Model *DeploymentModel `json:"model,omitempty"` + ParentDeploymentName *string `json:"parentDeploymentName,omitempty"` + ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty"` + RaiPolicyName *string `json:"raiPolicyName,omitempty"` + RateLimits *[]ThrottlingRule `json:"rateLimits,omitempty"` + ScaleSettings *DeploymentScaleSettings `json:"scaleSettings,omitempty"` + VersionUpgradeOption *DeploymentModelVersionUpgradeOption `json:"versionUpgradeOption,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentscalesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentscalesettings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_deploymentscalesettings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_deploymentscalesettings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_patchresourcetagsandsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_patchresourcetagsandsku.go new file mode 100644 index 000000000000..2dcdac738c4c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_patchresourcetagsandsku.go @@ -0,0 +1,9 @@ +package deployments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PatchResourceTagsAndSku struct { + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_requestmatchpattern.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_requestmatchpattern.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_requestmatchpattern.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_requestmatchpattern.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_skuresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_skuresource.go new file mode 100644 index 000000000000..6899d4d1037c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_skuresource.go @@ -0,0 +1,10 @@ +package deployments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkuResource struct { + Capacity *CapacityConfig `json:"capacity,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Sku *Sku `json:"sku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_throttlingrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_throttlingrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/model_throttlingrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/model_throttlingrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/predicates.go similarity index 71% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/predicates.go index 6d9ad35e72e0..ad325be8cdf5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/predicates.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/predicates.go @@ -30,3 +30,16 @@ func (p DeploymentOperationPredicate) Matches(input Deployment) bool { return true } + +type SkuResourceOperationPredicate struct { + ResourceType *string +} + +func (p SkuResourceOperationPredicate) Matches(input SkuResource) bool { + + if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/version.go index a4d532834a54..a00b01a94f4f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments/version.go @@ -3,8 +3,8 @@ package deployments // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2023-05-01" +const defaultApiVersion = "2024-10-01" func userAgent() string { - return "hashicorp/go-azure-sdk/deployments/2023-05-01" + return "hashicorp/go-azure-sdk/deployments/2024-10-01" } diff --git a/vendor/modules.txt b/vendor/modules.txt index ccf5bf115b74..825d94d6daca 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -318,8 +318,8 @@ github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/target github.com/hashicorp/go-azure-sdk/resource-manager/codesigning/2024-09-30-preview github.com/hashicorp/go-azure-sdk/resource-manager/codesigning/2024-09-30-preview/certificateprofiles github.com/hashicorp/go-azure-sdk/resource-manager/codesigning/2024-09-30-preview/codesigningaccounts -github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts -github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments +github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/cognitiveservicesaccounts +github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2024-10-01/deployments github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/communicationservices github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/domains github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/emailservices From 923d54ab4d113f15de9399af34d636274444227b Mon Sep 17 00:00:00 2001 From: "Yun Liu (from Dev Box)" Date: Wed, 6 Nov 2024 14:23:57 +0800 Subject: [PATCH 2/7] Setting access keys only when localAuth is enabled to resolve accTests failure --- .../cognitive/ai_services_resource.go | 22 +++++++++-------- .../cognitive/ai_services_resource_test.go | 4 ---- .../cognitive/cognitive_account_resource.go | 24 ++++++++++--------- .../cognitive_account_resource_test.go | 4 ---- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/internal/services/cognitive/ai_services_resource.go b/internal/services/cognitive/ai_services_resource.go index 5b3457b334fe..5210730855fc 100644 --- a/internal/services/cognitive/ai_services_resource.go +++ b/internal/services/cognitive/ai_services_resource.go @@ -389,16 +389,6 @@ func (AzureAIServicesResource) Read() sdk.ResourceFunc { return fmt.Errorf("retrieving %s: %+v", *id, err) } - keys, err := client.AccountsListKeys(ctx, *id) - if err != nil { - return fmt.Errorf("listing the Keys for %s: %+v", id, err) - } - - if model := keys.Model; model != nil { - state.PrimaryAccessKey = pointer.From(model.Key1) - state.SecondaryAccessKey = pointer.From(model.Key2) - } - state.Name = id.AccountName state.ResourceGroupName = id.ResourceGroupName @@ -427,6 +417,18 @@ func (AzureAIServicesResource) Read() sdk.ResourceFunc { if props.DisableLocalAuth != nil { localAuthEnabled = !*props.DisableLocalAuth } + + if localAuthEnabled { + keys, err := client.AccountsListKeys(ctx, *id) + if err != nil { + return fmt.Errorf("listing the Keys for %s: %+v", id, err) + } + + if model := keys.Model; model != nil { + state.PrimaryAccessKey = pointer.From(model.Key1) + state.SecondaryAccessKey = pointer.From(model.Key2) + } + } state.LocalAuthorizationEnabled = localAuthEnabled customerManagedKey, err := flattenAzureAIServicesCustomerManagedKey(props.Encryption, env) diff --git a/internal/services/cognitive/ai_services_resource_test.go b/internal/services/cognitive/ai_services_resource_test.go index 9e08e0d319e7..0c48ca4304ff 100644 --- a/internal/services/cognitive/ai_services_resource_test.go +++ b/internal/services/cognitive/ai_services_resource_test.go @@ -66,8 +66,6 @@ func TestAccCognitiveAzureAIServices_complete(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("tags.%").HasValue("1"), check.That(data.ResourceName).Key("tags.Acceptance").HasValue("Test"), - check.That(data.ResourceName).Key("primary_access_key").Exists(), - check.That(data.ResourceName).Key("secondary_access_key").Exists(), ), }, data.ImportStep(), @@ -94,8 +92,6 @@ func TestAccCognitiveAzureAIServices_update(t *testing.T) { check.That(data.ResourceName).ExistsInAzure(r), check.That(data.ResourceName).Key("tags.%").HasValue("1"), check.That(data.ResourceName).Key("tags.Acceptance").HasValue("Test"), - check.That(data.ResourceName).Key("primary_access_key").Exists(), - check.That(data.ResourceName).Key("secondary_access_key").Exists(), ), }, }) diff --git a/internal/services/cognitive/cognitive_account_resource.go b/internal/services/cognitive/cognitive_account_resource.go index d4786127ec59..e2a281147b2f 100644 --- a/internal/services/cognitive/cognitive_account_resource.go +++ b/internal/services/cognitive/cognitive_account_resource.go @@ -518,17 +518,6 @@ func resourceCognitiveAccountRead(d *pluginsdk.ResourceData, meta interface{}) e return fmt.Errorf("retrieving %s: %+v", *id, err) } - keys, err := client.AccountsListKeys(ctx, *id) - if err != nil { - // note for the resource we shouldn't gracefully fail since we have permission to CRUD it - return fmt.Errorf("listing the Keys for %s: %+v", *id, err) - } - - if model := keys.Model; model != nil { - d.Set("primary_access_key", model.Key1) - d.Set("secondary_access_key", model.Key2) - } - d.Set("name", id.AccountName) d.Set("resource_group_name", id.ResourceGroupName) @@ -591,6 +580,19 @@ func resourceCognitiveAccountRead(d *pluginsdk.ResourceData, meta interface{}) e } d.Set("local_auth_enabled", localAuthEnabled) + if localAuthEnabled { + keys, err := client.AccountsListKeys(ctx, *id) + if err != nil { + // note for the resource we shouldn't gracefully fail since we have permission to CRUD it + return fmt.Errorf("listing the Keys for %s: %+v", *id, err) + } + + if model := keys.Model; model != nil { + d.Set("primary_access_key", model.Key1) + d.Set("secondary_access_key", model.Key2) + } + } + customerManagedKey, err := flattenCognitiveAccountCustomerManagedKey(props.Encryption) if err != nil { return err diff --git a/internal/services/cognitive/cognitive_account_resource_test.go b/internal/services/cognitive/cognitive_account_resource_test.go index 142431d9aedc..96a8ac43715d 100644 --- a/internal/services/cognitive/cognitive_account_resource_test.go +++ b/internal/services/cognitive/cognitive_account_resource_test.go @@ -133,8 +133,6 @@ func TestAccCognitiveAccount_complete(t *testing.T) { check.That(data.ResourceName).Key("kind").HasValue("Face"), check.That(data.ResourceName).Key("tags.%").HasValue("1"), check.That(data.ResourceName).Key("tags.Acceptance").HasValue("Test"), - check.That(data.ResourceName).Key("primary_access_key").Exists(), - check.That(data.ResourceName).Key("secondary_access_key").Exists(), ), }, data.ImportStep(), @@ -163,8 +161,6 @@ func TestAccCognitiveAccount_update(t *testing.T) { check.That(data.ResourceName).Key("kind").HasValue("Face"), check.That(data.ResourceName).Key("tags.%").HasValue("1"), check.That(data.ResourceName).Key("tags.Acceptance").HasValue("Test"), - check.That(data.ResourceName).Key("primary_access_key").Exists(), - check.That(data.ResourceName).Key("secondary_access_key").Exists(), ), }, }) From 763ef10af078cb95eaf1baf51c171e70d77b84c7 Mon Sep 17 00:00:00 2001 From: "Yun Liu (from Dev Box)" Date: Thu, 7 Nov 2024 10:27:56 +0800 Subject: [PATCH 3/7] Add notification on attributes and align changes in datasource --- .../cognitive_account_data_source.go | 30 ++++++++++++------- .../cognitive_account_data_source_test.go | 2 ++ .../docs/d/cognitive_account.html.markdown | 4 +++ website/docs/r/ai_services.html.markdown | 2 ++ .../docs/r/cognitive_account.html.markdown | 2 ++ 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/internal/services/cognitive/cognitive_account_data_source.go b/internal/services/cognitive/cognitive_account_data_source.go index 5ec19dea8939..67ec94ef87f0 100644 --- a/internal/services/cognitive/cognitive_account_data_source.go +++ b/internal/services/cognitive/cognitive_account_data_source.go @@ -90,19 +90,8 @@ func dataSourceCognitiveAccountRead(d *pluginsdk.ResourceData, meta interface{}) return fmt.Errorf("retrieving %s: %+v", id, err) } - keys, err := client.AccountsListKeys(ctx, id) - if err != nil { - // TODO: gracefully fail here - return fmt.Errorf("retrieving Keys for %s: %+v", id, err) - } - d.SetId(id.ID()) - if model := keys.Model; model != nil { - d.Set("primary_access_key", model.Key1) - d.Set("secondary_access_key", model.Key2) - } - if model := resp.Model; model != nil { d.Set("location", location.NormalizeNilable(model.Location)) d.Set("kind", model.Kind) @@ -115,6 +104,25 @@ func dataSourceCognitiveAccountRead(d *pluginsdk.ResourceData, meta interface{}) d.Set("qna_runtime_endpoint", apiProps.QnaRuntimeEndpoint) } d.Set("endpoint", props.Endpoint) + + localAuthEnabled := true + if props.DisableLocalAuth != nil { + localAuthEnabled = !*props.DisableLocalAuth + } + d.Set("local_auth_enabled", localAuthEnabled) + + if localAuthEnabled { + keys, err := client.AccountsListKeys(ctx, id) + if err != nil { + // note for the resource we shouldn't gracefully fail since we have permission to CRUD it + return fmt.Errorf("listing the Keys for %s: %+v", id, err) + } + + if model := keys.Model; model != nil { + d.Set("primary_access_key", model.Key1) + d.Set("secondary_access_key", model.Key2) + } + } } flattenedIdentity, err := identity.FlattenSystemAndUserAssignedMap(model.Identity) diff --git a/internal/services/cognitive/cognitive_account_data_source_test.go b/internal/services/cognitive/cognitive_account_data_source_test.go index db242ebd6e4e..d75fd8e82bfe 100644 --- a/internal/services/cognitive/cognitive_account_data_source_test.go +++ b/internal/services/cognitive/cognitive_account_data_source_test.go @@ -23,6 +23,7 @@ func TestAccCognitiveAccountDataSource_basic(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).Key("kind").HasValue("Face"), check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("local_auth_enabled").HasValue("true"), check.That(data.ResourceName).Key("primary_access_key").Exists(), check.That(data.ResourceName).Key("secondary_access_key").Exists(), ), @@ -40,6 +41,7 @@ func TestAccCognitiveAccountDataSource_identity(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).Key("kind").HasValue("Face"), check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("local_auth_enabled").HasValue("true"), check.That(data.ResourceName).Key("primary_access_key").Exists(), check.That(data.ResourceName).Key("secondary_access_key").Exists(), check.That(data.ResourceName).Key("identity.0.principal_id").Exists(), diff --git a/website/docs/d/cognitive_account.html.markdown b/website/docs/d/cognitive_account.html.markdown index c8dd365dbbba..fddeb5ef7aed 100644 --- a/website/docs/d/cognitive_account.html.markdown +++ b/website/docs/d/cognitive_account.html.markdown @@ -39,6 +39,8 @@ The following attributes are exported: * `location` - The Azure location where the Cognitive Services Account exists +* `local_auth_enabled` - Whether local authentication methods is enabled for the Cognitive Account. + * `kind` - The kind of the Cognitive Services Account * `sku_name` - The SKU name of the Cognitive Services Account @@ -51,6 +53,8 @@ The following attributes are exported: * `secondary_access_key` - The secondary access key of the Cognitive Services Account +-> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `location_auth_enabled` is `true`. + * `tags` - A mapping of tags to assigned to the resource. --- diff --git a/website/docs/r/ai_services.html.markdown b/website/docs/r/ai_services.html.markdown index 8110de3b1d94..ae8152892749 100644 --- a/website/docs/r/ai_services.html.markdown +++ b/website/docs/r/ai_services.html.markdown @@ -124,6 +124,8 @@ In addition to the Arguments listed above - the following Attributes are exporte * `secondary_access_key` - The secondary access key which can be used to connect to the AI Services Account. +-> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `local_authentication_enabled` is set to `true`. + --- An `identity` block exports the following: diff --git a/website/docs/r/cognitive_account.html.markdown b/website/docs/r/cognitive_account.html.markdown index bc08cc5dcb81..637534551c6e 100644 --- a/website/docs/r/cognitive_account.html.markdown +++ b/website/docs/r/cognitive_account.html.markdown @@ -154,6 +154,8 @@ In addition to the Arguments listed above - the following Attributes are exporte * `secondary_access_key` - The secondary access key which can be used to connect to the Cognitive Service Account. +-> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `location_auth_enabled` is set to `true`. + --- An `identity` block exports the following: From 4fad96b6e994611a6d8e0dd1fac31db9e9126d72 Mon Sep 17 00:00:00 2001 From: "Yun Liu (from Dev Box)" Date: Thu, 7 Nov 2024 10:27:56 +0800 Subject: [PATCH 4/7] Add notification on attributes and align changes in datasource --- .../cognitive_account_data_source.go | 35 +++++++++++++------ .../cognitive_account_data_source_test.go | 2 ++ .../docs/d/cognitive_account.html.markdown | 4 +++ website/docs/r/ai_services.html.markdown | 2 ++ .../docs/r/cognitive_account.html.markdown | 2 ++ 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/internal/services/cognitive/cognitive_account_data_source.go b/internal/services/cognitive/cognitive_account_data_source.go index 5ec19dea8939..f28486dcca70 100644 --- a/internal/services/cognitive/cognitive_account_data_source.go +++ b/internal/services/cognitive/cognitive_account_data_source.go @@ -36,6 +36,11 @@ func dataSourceCognitiveAccount() *pluginsdk.Resource { "location": commonschema.LocationComputed(), + "local_auth_enabled": { + Type: pluginsdk.TypeBool, + Computed: true, + }, + "kind": { Type: pluginsdk.TypeString, Computed: true, @@ -90,19 +95,8 @@ func dataSourceCognitiveAccountRead(d *pluginsdk.ResourceData, meta interface{}) return fmt.Errorf("retrieving %s: %+v", id, err) } - keys, err := client.AccountsListKeys(ctx, id) - if err != nil { - // TODO: gracefully fail here - return fmt.Errorf("retrieving Keys for %s: %+v", id, err) - } - d.SetId(id.ID()) - if model := keys.Model; model != nil { - d.Set("primary_access_key", model.Key1) - d.Set("secondary_access_key", model.Key2) - } - if model := resp.Model; model != nil { d.Set("location", location.NormalizeNilable(model.Location)) d.Set("kind", model.Kind) @@ -115,6 +109,25 @@ func dataSourceCognitiveAccountRead(d *pluginsdk.ResourceData, meta interface{}) d.Set("qna_runtime_endpoint", apiProps.QnaRuntimeEndpoint) } d.Set("endpoint", props.Endpoint) + + localAuthEnabled := true + if props.DisableLocalAuth != nil { + localAuthEnabled = !*props.DisableLocalAuth + } + d.Set("local_auth_enabled", localAuthEnabled) + + if localAuthEnabled { + keys, err := client.AccountsListKeys(ctx, id) + if err != nil { + // note for the resource we shouldn't gracefully fail since we have permission to CRUD it + return fmt.Errorf("listing the Keys for %s: %+v", id, err) + } + + if model := keys.Model; model != nil { + d.Set("primary_access_key", model.Key1) + d.Set("secondary_access_key", model.Key2) + } + } } flattenedIdentity, err := identity.FlattenSystemAndUserAssignedMap(model.Identity) diff --git a/internal/services/cognitive/cognitive_account_data_source_test.go b/internal/services/cognitive/cognitive_account_data_source_test.go index db242ebd6e4e..d75fd8e82bfe 100644 --- a/internal/services/cognitive/cognitive_account_data_source_test.go +++ b/internal/services/cognitive/cognitive_account_data_source_test.go @@ -23,6 +23,7 @@ func TestAccCognitiveAccountDataSource_basic(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).Key("kind").HasValue("Face"), check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("local_auth_enabled").HasValue("true"), check.That(data.ResourceName).Key("primary_access_key").Exists(), check.That(data.ResourceName).Key("secondary_access_key").Exists(), ), @@ -40,6 +41,7 @@ func TestAccCognitiveAccountDataSource_identity(t *testing.T) { Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).Key("kind").HasValue("Face"), check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("local_auth_enabled").HasValue("true"), check.That(data.ResourceName).Key("primary_access_key").Exists(), check.That(data.ResourceName).Key("secondary_access_key").Exists(), check.That(data.ResourceName).Key("identity.0.principal_id").Exists(), diff --git a/website/docs/d/cognitive_account.html.markdown b/website/docs/d/cognitive_account.html.markdown index c8dd365dbbba..fddeb5ef7aed 100644 --- a/website/docs/d/cognitive_account.html.markdown +++ b/website/docs/d/cognitive_account.html.markdown @@ -39,6 +39,8 @@ The following attributes are exported: * `location` - The Azure location where the Cognitive Services Account exists +* `local_auth_enabled` - Whether local authentication methods is enabled for the Cognitive Account. + * `kind` - The kind of the Cognitive Services Account * `sku_name` - The SKU name of the Cognitive Services Account @@ -51,6 +53,8 @@ The following attributes are exported: * `secondary_access_key` - The secondary access key of the Cognitive Services Account +-> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `location_auth_enabled` is `true`. + * `tags` - A mapping of tags to assigned to the resource. --- diff --git a/website/docs/r/ai_services.html.markdown b/website/docs/r/ai_services.html.markdown index 8110de3b1d94..ae8152892749 100644 --- a/website/docs/r/ai_services.html.markdown +++ b/website/docs/r/ai_services.html.markdown @@ -124,6 +124,8 @@ In addition to the Arguments listed above - the following Attributes are exporte * `secondary_access_key` - The secondary access key which can be used to connect to the AI Services Account. +-> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `local_authentication_enabled` is set to `true`. + --- An `identity` block exports the following: diff --git a/website/docs/r/cognitive_account.html.markdown b/website/docs/r/cognitive_account.html.markdown index bc08cc5dcb81..637534551c6e 100644 --- a/website/docs/r/cognitive_account.html.markdown +++ b/website/docs/r/cognitive_account.html.markdown @@ -154,6 +154,8 @@ In addition to the Arguments listed above - the following Attributes are exporte * `secondary_access_key` - The secondary access key which can be used to connect to the Cognitive Service Account. +-> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `location_auth_enabled` is set to `true`. + --- An `identity` block exports the following: From cc96d093848466e7a5e2da90a5cc79788c756c71 Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Fri, 8 Nov 2024 13:40:27 +0800 Subject: [PATCH 5/7] Update website/docs/d/cognitive_account.html.markdown Co-authored-by: stephybun --- website/docs/d/cognitive_account.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/d/cognitive_account.html.markdown b/website/docs/d/cognitive_account.html.markdown index fddeb5ef7aed..a79440e97a58 100644 --- a/website/docs/d/cognitive_account.html.markdown +++ b/website/docs/d/cognitive_account.html.markdown @@ -53,7 +53,7 @@ The following attributes are exported: * `secondary_access_key` - The secondary access key of the Cognitive Services Account --> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `location_auth_enabled` is `true`. +-> **NOTE:** The `primary_access_key` and `secondary_access_key` properties are only available when `location_auth_enabled` is `true`. * `tags` - A mapping of tags to assigned to the resource. From f24a708406fed0301f70670a80c1380199062d91 Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Fri, 8 Nov 2024 13:40:34 +0800 Subject: [PATCH 6/7] Update website/docs/r/ai_services.html.markdown Co-authored-by: stephybun --- website/docs/r/ai_services.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/ai_services.html.markdown b/website/docs/r/ai_services.html.markdown index ae8152892749..9133364e0008 100644 --- a/website/docs/r/ai_services.html.markdown +++ b/website/docs/r/ai_services.html.markdown @@ -124,7 +124,7 @@ In addition to the Arguments listed above - the following Attributes are exporte * `secondary_access_key` - The secondary access key which can be used to connect to the AI Services Account. --> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `local_authentication_enabled` is set to `true`. +-> **NOTE:** The `primary_access_key` and `secondary_access_key` properties are only available when `local_authentication_enabled` is set to `true`. --- From ab29b177485be99cbd2cd6311c21e9830a135d04 Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Fri, 8 Nov 2024 13:40:39 +0800 Subject: [PATCH 7/7] Update website/docs/r/cognitive_account.html.markdown Co-authored-by: stephybun --- website/docs/r/cognitive_account.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/cognitive_account.html.markdown b/website/docs/r/cognitive_account.html.markdown index 637534551c6e..67bbcec3f894 100644 --- a/website/docs/r/cognitive_account.html.markdown +++ b/website/docs/r/cognitive_account.html.markdown @@ -154,7 +154,7 @@ In addition to the Arguments listed above - the following Attributes are exporte * `secondary_access_key` - The secondary access key which can be used to connect to the Cognitive Service Account. --> **NOTE:** The `primary_access_key` and `secondary_access_key` attributes are only available when the `location_auth_enabled` is set to `true`. +-> **NOTE:** The `primary_access_key` and `secondary_access_key` properties are only available when `location_auth_enabled` is set to `true`. ---