我正在尝试使用用于Ruby的azure SDK创建Azure SQL服务器和SQL DB。
运行代码时出现反序列化错误。尽管它创建了SQL Server,但我可以在门户网站中看到甚至手动添加数据库。请帮忙。
require 'fog/azurerm'
require 'azure_mgmt_sql'
fog_sql_service = Fog::Sql::AzureRM.new(
tenant_id: 'tenant_id',
client_id: 'client_id',
client_secret: 'client_secret',
subscription_id: 'subscription _id',
environment: 'AzureCloud' )
server_data = {:resource_group = "group_name", :name = "server_name",
:location = "location", :version = "12.0", :administrator_login =
"username", :administrator_login_password = "password"}
fog_sql_service.sql_servers.create(server_data)
Error message :
"message": "Error occurred in deserializing the response",