【问题标题】:How to scale up and down Azure Cosmos DB using some scripts like power shell如何使用诸如 powershell 之类的脚本来扩大和缩小 Azure Cosmos DB
【发布时间】:2017-12-12 12:10:59
【问题描述】:

如何使用一些脚本(如 power shell)或通过任何方法来扩展和缩减 Azure Cosmos DB。当我运行它时,我想在我的脚本中增加 Cosmos DB 的 RU。我认为我们可以使用 Azure 函数来实现,但需要寻找更多选项

【问题讨论】:

    标签: powershell azure azure-cosmosdb


    【解决方案1】:

    目前,没有 Azure Power Shell 可以管理 Azure Cosmos DB 集合。请参考这个feedback。

    目前,您可以使用Azure CLI 2.0(基于python)增加RU。

    对于example。

    # Scale throughput
    az cosmosdb collection update \
        --collection-name $collectionName \
        --name $name \
        --db-name $databaseName \
        --resource-group $resourceGroupName \
        --throughput $newThroughput
    

    如果您想使用 Power Shell 来执行此操作,则需要调用 API。这个blog 会很有帮助。

    【讨论】:

      【解决方案2】:

      到目前为止,您可以使用 azure-cosmos Python SDK 与 Azure Cosmos DB 进行交互。

      【讨论】:

        【解决方案3】:
        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-01-09
        • 1970-01-01
        • 1970-01-01
        • 2019-02-06
        • 1970-01-01
        相关资源
        最近更新 更多