适用于 Azure Cosmos DB SQL (Core) API 的 Azure CLI 示例Azure CLI samples for Azure Cosmos DB SQL (Core) API

下表包括适用于 Azure Cosmos DB SQL (Core) API 的示例 Azure CLI 脚本的链接。The following table includes links to sample Azure CLI scripts for Azure Cosmos DB SQL (Core) API. Azure CLI 参考中收录了所有 Azure Cosmos DB CLI 命令的参考页。Reference pages for all Azure Cosmos DB CLI commands are available in the Azure CLI Reference. 有关其他 Azure Cosmos DB API 的 Azure CLI 示例,请参阅 Cassandra APIMongoDB APIGremlin API表 APIFor Azure CLI samples for other Azure Cosmos DB APIs see, Cassandra API, MongoDB API, Gremlin API, and Table API. 可以在 Azure Cosmos DB CLI GitHub 存储库中找到所有 Azure Cosmos DB CLI 脚本示例。All Azure Cosmos DB CLI script samples can be found in the Azure Cosmos DB CLI GitHub Repository.

创建 Azure Cosmos 帐户、数据库和容器Create an Azure Cosmos account, database and container 为 SQL (Core) API 创建 Azure Cosmos DB 帐户、数据库和容器。Creates an Azure Cosmos DB account, database, and container for SQL (Core) API.
更改吞吐量Change throughput 更新数据库和容器的 RU/秒。Update RU/s on a database and container.
添加或故障转移区域Add or failover regions 添加区域、更改故障转移优先级、触发手动故障转移。Add a region, change failover priority, trigger a manual failover.
帐户密钥和连接字符串 Account keys and connection strings  列出帐户密钥、只读密钥,重新生成密钥并列出连接字符串。List account keys, read-only keys, regenerate keys and list connection strings.
使用 IP 防火墙保护Secure with IP firewall 创建配置了 IP 防火墙的 Cosmos 帐户。Create a Cosmos account with IP firewall configured.
使用服务终结点保护新帐户Secure new account with service endpoints 使用服务终结点创建 Cosmos 帐户并确保其安全。Create a Cosmos account and secure with service-endpoints.
使用服务终结点保护现有帐户Secure existing account with service endpoints 最终配置子网后,更新 Cosmos 帐户以使用服务终结点进行保护。Update a Cosmos account to secure with service-endpoints when the subnet is eventually configured.