为什么我不能使用PowerShell创建CosmosDB?

编程入门 行业动态 更新时间:2024-10-26 11:14:59
本文介绍了为什么我不能使用PowerShell创建CosmosDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

#创建数据库 New-AzureRmResource -ResourceType"Microsoft.DocumentDb/databaseAccounts"; ` -ApiVersion"2015-04-08"; ` -ResourceGroupName $ resourceGroupName` -Location $位置` -Name $ DBName` -PropertyObject $ DBProperties

# Create the database New-AzureRmResource -ResourceType "Microsoft.DocumentDb/databaseAccounts" ` -ApiVersion "2015-04-08" ` -ResourceGroupName $resourceGroupName ` -Location $Location ` -Name $DBName ` -PropertyObject $DBProperties

错误:

New-AzureRmResource:MissingSubscriptionRegistration:未注册该订阅以使用名称空间"Microsoft.DocumentDB".有关如何注册的信息,请参见aka.ms/rps-not-found 订阅. 在C:\ Toyota \ ARM \ From Scratch \ Create_FP_IoT.ps1:116 char:1 + New-AzureRmResource -ResourceType" Microsoft.DocumentDb/databaseAccou ...

New-AzureRmResource : MissingSubscriptionRegistration : The subscription is not registered to use namespace 'Microsoft.DocumentDB'. See aka.ms/rps-not-found for how to register subscriptions. At C:\Toyota\ARM\From Scratch\Create_FP_IoT.ps1:116 char:1 + New-AzureRmResource -ResourceType "Microsoft.DocumentDb/databaseAccou ...

尝试注册,但也失败:

Kenny_I

推荐答案

您好@Kenny_I,如果可以,请尝试使用Azure门户而不是PowerShell创建cosmos数据库.有效.

Hi @Kenny_I, Could you please try creating the cosmos db using the Azure portal instead of PowerShell, if that works.

使用Azure门户创建CosmosDB的参考链接:docs.microsoft/zh-cn/azure/cosmos-db/create-sql-api-dotnet

Reference link for creating CosmosDB using Azure portal :docs.microsoft/en-us/azure/cosmos-db/create-sql-api-dotnet

如有任何疑问,请通知我们.

Please let us know in case of any concerns.

更多推荐

为什么我不能使用PowerShell创建CosmosDB?

本文发布于:2023-07-05 08:57:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1035454.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我不   PowerShell   CosmosDB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!