This topic provides reference information about the Azure Cosmos DB Mongo API service (csb-azure-mongodb). It details the plans, configuration parameters, and binding credentials.
The following table lists the pre-configured plans available for Azure Cosmos DB Mongo API:
Plan | Description |
---|---|
small | Mongo Cosmos DB Account, no redundancy, and 400 request units. |
medium | Mongo Cosmos DB Account, single read failover location, and 1,000 request units. |
large | Mongo Cosmos DB Account, single read/write failover location, and 10,000 request units. |
When configuring Cloud Service Broker for Azure you can add additional plans. For how to configure plans, see Configure Services with Cloud Service Broker for Azure.
The following table lists parameters which can only be configured for additional plans:
Parameter Name | Description | Default |
---|---|---|
name * |
The plan name. | n/a |
id * |
A unique GUID. | n/a |
description * |
Description of the new plan. | n/a |
display_name |
Name to use when displaying plan in marketplace. | n/a |
private_endpoint_subnet_id |
ID of the subnet within which the Private Endpoint for the CosmosDB account is created. For example, "exampleID" |
"" |
private_dns_zone_ids |
Array of Private DNS Zone IDs to create private DNS zone groups for when using Private Endpoints. For example, ["exampleID1", "exampleID2"] |
[] |
* Required
You can also add any of the configuration parameters listed in the parameters section to your plan.
Note: If you set a parameter at plan level, developers cannot change the value when creating or updating service instances.
You can provision a service by running:
cf create-service csb-azure-mongodb PLAN-NAME SERVICE-INSTANCE-NAME -c '{"PARAMETER-NAME": "PARAMETER-VALUE"}'
You can update the configuration parameters for a service instance by running:
cf update-service SERVICE-INSTANCE-NAME -c '{"PARAMETER-NAME": "PARAMETER-VALUE"}'
The following table lists the parameters that you can configure, using the -c
flag, when provisioning a csb-azure-mongodb service:
Parameter Name | Type | Description | Default | Operation |
---|---|---|---|---|
request_units |
integer | (Required) The throughput of the MongoDB collection (RU/s). This parameter has the following constraints:
|
400 |
provision and update |
failover_locations |
array | A list of locations for the Cosmos DB account. The first location is the default write location. For available locations, see the Microsoft documentation. | ["westus"] |
provision and update |
instance_name |
string | The name of your Cosmos DB with API for MongoDB instance. This parameter has the following constraints:
|
csb-mongo-INSTANCE-ID |
provision |
account_name |
string | Account name for your Cosmos DB with API for MongoDB instance. After being set, this cannot be updated. This parameter has the following constraints:
|
csbINSTANCE-ID |
provision |
resource_group |
string | Name for the resource group for this instance. After being set, this cannot be updated. This parameter has the following constraints:
|
"" |
provision |
db_name |
string | Name for your Cosmos DB database with API for Mongo DB. This parameter has the following constraints:
|
csb-dbINSTANCE-ID |
provision and update |
collection_name |
string | Name for your collection. This parameter has the following constraints: maxLength: 255 | default_collection |
provision and update |
shard_key |
string | Name for your shard key. | uniqueKey |
provision and update |
location |
string | The location of the Mongo DB instance. For available locations, see the Microsoft documentation. | westus |
provision |
ip_range_filter |
string | CosmosDB Firewall Support. This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IP addresses for a given database account. IP addresses and ranges must be comma separated and must not contain any spaces. 0.0.0.0 allows access from Azure networks. An empty string "" allows access from all public networks. |
"0.0.0.0" |
provision and update |
consistency_level |
string | The Consistency Level to use for this CosmosDB Account. The options are BoundedStaleness , Eventual , Session , Strong , and ConsistentPrefix .If you choose BoundedStaleness , you must also set max_interval_in_seconds and max_staleness_prefix . |
Session |
provision and update |
max_interval_in_seconds |
integer | Required when consistency_level is set to BoundedStaleness . Sets the time in seconds that staleness is tolerated. Accepted range for this value is 5 - 86400 (1 day). |
5 |
provision and update |
max_staleness_prefix |
integer | Required when consistency_level is set to BoundedStaleness . Sets the number of stale requests tolerated. Accepted range for this value is 10 to 2147483647 . |
100 |
provision and update |
enable_multiple_write_locations |
boolean | Set to true to enable multi-master support for this Cosmos DB account. |
false |
provision and update |
enable_automatic_failover |
boolean | Set to true to enable automatic failover for this Cosmos DB account. |
false |
provision and update |
azure_tenant_id |
string | The ID of the Azure tenant for the instance. | The value the operator entered for Tenant ID in Ops Manager | provision and update |
azure_subscription_id |
string | The ID of the Azure subscription for the instance. | The value the operator entered for Subscription ID in Ops Manager | provision and update |
azure_client_id |
string | The ID of the Azure service principal to authenticate for service instance creation. | The value the operator entered for Client ID in Ops Manager | provision and update |
azure_client_secret |
string | The secret (password) for the Azure service principal to authenticate for service instance creation. | The value the operator entered for Client Secret in Ops Manager. | provision and update |
skip_provider_registration |
boolean | Set to true to skip automatic Azure provider registration. Set if the service principal being used does not have the rights to register providers. |
false |
provision and update |
authorized_network |
string | The subnet ID, of the Azure Virtual Network (VNet) that is attached to this instance. If left unspecified, it will be public. | "" |
provision and update |
public_network_access_enabled |
boolean | Set to allow or disallow public network access for this CosmosDB account. | true |
provision and update |
The format for binding credentials for Azure Cosmos DB Mongo API is as follows:
{
"uri" : "PRIMARY-MASTER-MONGODB-URI",
"status" : "STATUS-DESCRIPTION"
}
Where:
PRIMARY-MASTER-MONGODB-URI
is the primary master Mongo DB URI of the Cosmos DB Mongo Collection.STATUS-DESCRIPTION
is the status of the operation.