gpt4 book ai didi

c# - 什么是 ServiceObjectiveId?

转载 作者:行者123 更新时间:2023-12-03 04:36:52 24 4
gpt4 key购买 nike

我正在尝试掌握使用 Windows Azure Sql Database Managment Libraries 的技巧

但是示例省略了如何创建数据库。我在最后一部分遇到问题,因为我不知道 ServiceObjectiveId 是什么。

DatabaseCreateParameters dbParams = new DatabaseCreateParameters();
//default sql azure collation is SQL_LATIN1_GENERAL_CP1_CI_AS
dbParams.CollationName = "SQL_LATIN1_GENERAL_CP1_CI_AS";
dbParams.Edition = "Web";
dbParams.MaximumDatabaseSizeInGB = 1;
dbParams.Name = Name;
dbParams.ServiceObjectiveId = "?????"

client.Databases.Create(Cache.ProgramSettings.DefaultServerConnection.ServerName
, dbParams);

我花了大约 2 个小时试图在网上查找有关这意味着什么以及如何获取它的信息,但我一生都找不到它。

编辑

引用 Shiva 的回答,我省略了 ServiceObjectiveId,现在收到一条错误,指出找不到 uri 资源。如果我更深入地研究错误,我可以找到我的请求,看起来不错。

<ServiceResource xmlns="http://schemas.microsoft.com/windowsazure">
<Name>SQL Azure</Name>
<Edition>Web</Edition>
<MaxSizeGB>1</MaxSizeGB>
<CollationName>SQL_LATIN1_GENERAL_CP1_CI_AS</CollationName>
</ServiceResource>

编辑2

我检查了请求 uri,看起来也完全没问题。

{https://management.core.windows.net//obscured#/services/sqlservers/servers/obscured#.database.windows.net/databases}  

最佳答案

ServiceObjectiveId 是用于返回服务级别的 Azure 服务标识符的组成部分。

以下链接提供了一些引用信息:
http://msdn.microsoft.com/en-us/library/windowsazure/dn505709.aspx

注意请求 URL 中使用的 serviceObjectiveId 参数: https://management.core.windows.net:8443/ {subscriptionId}/services/sqlservers/servers/{serverName}/serviceobjectives/{serviceObjectiveId}

关于c# - 什么是 ServiceObjectiveId?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21170276/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com