Documentdb 简明教程

DocumentDB - Create Account

若要使用 Microsoft Azure DocumentDB,你必须创建一个 DocumentDB 帐户。在本章中,我们将使用 Azure 门户创建一个 DocumentDB 帐户。

To use Microsoft Azure DocumentDB, you must create a DocumentDB account. In this chapter, we will create a DocumentDB account using Azure portal.

Step 1 − 如果已拥有 Azure 订阅,请登录到在线 https://portal.azure.com ,否则你需要先登录。

Step 1 − Log in to the online https://portal.azure.com if you already have an Azure subscription otherwise you need to sign in first.

你将看到主仪表板。它完全可定制,因此你可以按任何需要的方式排列这些磁贴、调整它们的大小、增加和移除经常使用或不再使用的项目的磁贴。

You will see the main Dashboard. It is fully customizable so you can arrange these tiles any way you like, resize them, add and remove tiles for things you frequently use or no longer do.

dashboard

Step 2 − 选择页面左上角的“新建”选项。

Step 2 − Select the ‘New’ option on the top left side of the page.

new option

Step 3 − 现在选择数据 + 存储 > Azure DocumentDB 选项,你将看到以下新建 DocumentDB 帐户部分。

Step 3 − Now select Data + Storage > Azure DocumentDB option and you see the following New DocumentDB account section.

azure documentdb

我们需要想出一个全局唯一名称(ID),该名称与 .documents.azure.com 结合,是可公开寻址的 DocumentDB 帐户的端点。我们可以使用此端点访问通过该帐户创建的所有数据库。

We need to come up with a globally unique name (ID), which combined with .documents.azure.com is the publicly addressable endpoint to our DocumentDB account. All the databases we create beneath that account can be accessed over the internet using this endpoint.

Step 4 − 我们将其命名为 azuredocdbdemo,然后单击资源组 → new_resource。

Step 4 − Let’s name it azuredocdbdemo and click on Resource Group → new_resource.

resource group

Step 5 − 选择位置,即希望在哪个 Microsoft 数据中心托管此帐户。选择位置并选择你的区域。

Step 5 − Choose the location i.e., which Microsoft data center you want this account to be hosted. Select the location and choose your region.

select location

Step 6 − 选中固定到仪表板复选框,然后继续单击创建按钮。

Step 6 − Check Pin to dashboard checkbox and just go ahead and click Create button.

create button

你可以看到磁贴已添加到仪表板,并且它让我们知道该帐户正在创建。实际上,为新帐户设置可能需要几分钟,同时 DocumentDB 分配端点、配置副本并执行其他后台工作。

You can see that the tile has already been added to the Dashboard, and it’s letting us know that the account is being created. It can actually take a few minutes to set things up for a new account while DocumentDB allocates the endpoint, provisions replicas, and performs other work in the background.

完成后,你将看到仪表板。

Once it is done, you will see the dashboard.

account dashboard

Step 7 − 现在单击创建的 DocumentDB 帐户,你将看到一个详细的屏幕,如下所示。

Step 7 − Now click on the created DocumentDB account and you will see a detailed screen as the following image.

created documentdb