ईवेंट्स
17 मार्च, 9 pm - 21 मार्च, 10 am
साथी डेवलपर्स और विशेषज्ञों के साथ वास्तविक दुनिया के उपयोग के मामलों के आधार पर स्केलेबल एआई समाधान बनाने के लिए मीटअप श्रृंखला में शामिल हों।
अभी पंजीकरण करेंयह ब्राउज़र अब समर्थित नहीं है.
नवीनतम सुविधाओं, सुरक्षा अपडेट और तकनीकी सहायता का लाभ लेने के लिए Microsoft Edge में अपग्रेड करें.
APPLIES TO:
NoSQL
This article explains the different ways to create an container in Azure Cosmos DB for NoSQL. It shows how to create a container using the Azure portal, Azure CLI, PowerShell, or supported SDKs. This article demonstrates how to create a container, specify the partition key, and provision throughput.
This article explains the different ways to create a container in Azure Cosmos DB for NoSQL. If you are using a different API, see API for MongoDB, API for Cassandra, API for Gremlin, and API for Table articles to create the container.
नोट
When creating containers, make sure you don’t create two containers with the same name but different casing. That’s because some parts of the Azure platform are not case-sensitive, and this can result in confusion/collision of telemetry and actions on containers with such names.
Sign in to the Azure portal.
Create a new Azure Cosmos DB account, or select an existing account.
Open the Data Explorer pane, and select New Container. Next, provide the following details:
/ItemID
).
Create a container with Azure CLI. For a listing of all Azure CLI samples across all Azure Cosmos DB APIs see, Azure CLI samples for Azure Cosmos DB.
Create a container with PowerShell. For a listing of all PowerShell samples across all Azure Cosmos DB APIs see, PowerShell Samples
If you encounter timeout exception when creating a collection, do a read operation to validate if the collection was created successfully. The read operation throws an exception until the collection create operation is successful. For the list of status codes supported by the create operation see the HTTP Status Codes for Azure Cosmos DB article.
TokenCredential credential = new DefaultAzureCredential();
CosmosClient client = new (
accountEndpoint: "<nosql-account-endpoint>",
tokenCredential: credential
);
// Create a container with a partition key and provision 400 RU/s manual throughput.
Database database = await client.CreateDatabaseIfNotExistsAsync(databaseId);
ContainerProperties containerProperties = new ContainerProperties()
{
Id = containerId,
PartitionKeyPath = "/myPartitionKey"
};
var throughput = ThroughputProperties.CreateManualThroughput(400);
Container container = await database.CreateContainerIfNotExistsAsync(containerProperties, throughput);
ईवेंट्स
17 मार्च, 9 pm - 21 मार्च, 10 am
साथी डेवलपर्स और विशेषज्ञों के साथ वास्तविक दुनिया के उपयोग के मामलों के आधार पर स्केलेबल एआई समाधान बनाने के लिए मीटअप श्रृंखला में शामिल हों।
अभी पंजीकरण करेंप्रशिक्षण
Certification
Microsoft प्रमाणित: Azure Cosmos DB डेवलपर विशेषता - Certifications
Microsoft Azure Cosmos DB के साथ SQL API और SDK में कुशल क्वेरीज़ लिखें, अनुक्रमण नीतियाँ बनाएँ, प्रबंधित करें और संसाधनों का प्रावधान करें.