published on Friday, Mar 20, 2026 by Pulumi
published on Friday, Mar 20, 2026 by Pulumi
Gets the MongoDB collection under an existing Azure Cosmos DB database account.
Uses Azure REST API version 2016-03-31.
Other available API versions: 2015-04-01, 2015-04-08, 2015-11-06, 2016-03-19. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cosmosdb [ApiVersion]. See the version guide for details.
Using getDatabaseAccountMongoDBCollection
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDatabaseAccountMongoDBCollection(args: GetDatabaseAccountMongoDBCollectionArgs, opts?: InvokeOptions): Promise<GetDatabaseAccountMongoDBCollectionResult>
function getDatabaseAccountMongoDBCollectionOutput(args: GetDatabaseAccountMongoDBCollectionOutputArgs, opts?: InvokeOptions): Output<GetDatabaseAccountMongoDBCollectionResult>def get_database_account_mongo_db_collection(account_name: Optional[str] = None,
collection_name: Optional[str] = None,
database_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseAccountMongoDBCollectionResult
def get_database_account_mongo_db_collection_output(account_name: Optional[pulumi.Input[str]] = None,
collection_name: Optional[pulumi.Input[str]] = None,
database_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseAccountMongoDBCollectionResult]func LookupDatabaseAccountMongoDBCollection(ctx *Context, args *LookupDatabaseAccountMongoDBCollectionArgs, opts ...InvokeOption) (*LookupDatabaseAccountMongoDBCollectionResult, error)
func LookupDatabaseAccountMongoDBCollectionOutput(ctx *Context, args *LookupDatabaseAccountMongoDBCollectionOutputArgs, opts ...InvokeOption) LookupDatabaseAccountMongoDBCollectionResultOutput> Note: This function is named LookupDatabaseAccountMongoDBCollection in the Go SDK.
public static class GetDatabaseAccountMongoDBCollection
{
public static Task<GetDatabaseAccountMongoDBCollectionResult> InvokeAsync(GetDatabaseAccountMongoDBCollectionArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseAccountMongoDBCollectionResult> Invoke(GetDatabaseAccountMongoDBCollectionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabaseAccountMongoDBCollectionResult> getDatabaseAccountMongoDBCollection(GetDatabaseAccountMongoDBCollectionArgs args, InvokeOptions options)
public static Output<GetDatabaseAccountMongoDBCollectionResult> getDatabaseAccountMongoDBCollection(GetDatabaseAccountMongoDBCollectionArgs args, InvokeOptions options)
fn::invoke:
function: azure-native:cosmosdb:getDatabaseAccountMongoDBCollection
arguments:
# arguments dictionaryThe following arguments are supported:
- Account
Name string - Cosmos DB database account name.
- Collection
Name string - Cosmos DB collection name.
- Database
Name string - Cosmos DB database name.
- Resource
Group stringName - Name of an Azure resource group.
- Account
Name string - Cosmos DB database account name.
- Collection
Name string - Cosmos DB collection name.
- Database
Name string - Cosmos DB database name.
- Resource
Group stringName - Name of an Azure resource group.
- account
Name String - Cosmos DB database account name.
- collection
Name String - Cosmos DB collection name.
- database
Name String - Cosmos DB database name.
- resource
Group StringName - Name of an Azure resource group.
- account
Name string - Cosmos DB database account name.
- collection
Name string - Cosmos DB collection name.
- database
Name string - Cosmos DB database name.
- resource
Group stringName - Name of an Azure resource group.
- account_
name str - Cosmos DB database account name.
- collection_
name str - Cosmos DB collection name.
- database_
name str - Cosmos DB database name.
- resource_
group_ strname - Name of an Azure resource group.
- account
Name String - Cosmos DB database account name.
- collection
Name String - Cosmos DB collection name.
- database
Name String - Cosmos DB database name.
- resource
Group StringName - Name of an Azure resource group.
getDatabaseAccountMongoDBCollection Result
The following output properties are available:
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The unique resource identifier of the database account.
- Name string
- The name of the database account.
- Type string
- The type of Azure resource.
- Indexes
List<Pulumi.
Azure Native. Cosmos DB. Outputs. Mongo Index Response> - List of index keys
- Location string
- The location of the resource group to which the resource belongs.
- Dictionary<string, string>
- A key-value pair of shard keys to be applied for the request.
- Dictionary<string, string>
- Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The unique resource identifier of the database account.
- Name string
- The name of the database account.
- Type string
- The type of Azure resource.
- Indexes
[]Mongo
Index Response - List of index keys
- Location string
- The location of the resource group to which the resource belongs.
- map[string]string
- A key-value pair of shard keys to be applied for the request.
- map[string]string
- Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The unique resource identifier of the database account.
- name String
- The name of the database account.
- type String
- The type of Azure resource.
- indexes
List<Mongo
Index Response> - List of index keys
- location String
- The location of the resource group to which the resource belongs.
- Map<String,String>
- A key-value pair of shard keys to be applied for the request.
- Map<String,String>
- Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
- azure
Api stringVersion - The Azure API version of the resource.
- id string
- The unique resource identifier of the database account.
- name string
- The name of the database account.
- type string
- The type of Azure resource.
- indexes
Mongo
Index Response[] - List of index keys
- location string
- The location of the resource group to which the resource belongs.
- {[key: string]: string}
- A key-value pair of shard keys to be applied for the request.
- {[key: string]: string}
- Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
- azure_
api_ strversion - The Azure API version of the resource.
- id str
- The unique resource identifier of the database account.
- name str
- The name of the database account.
- type str
- The type of Azure resource.
- indexes
Sequence[Mongo
Index Response] - List of index keys
- location str
- The location of the resource group to which the resource belongs.
- Mapping[str, str]
- A key-value pair of shard keys to be applied for the request.
- Mapping[str, str]
- Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The unique resource identifier of the database account.
- name String
- The name of the database account.
- type String
- The type of Azure resource.
- indexes List<Property Map>
- List of index keys
- location String
- The location of the resource group to which the resource belongs.
- Map<String>
- A key-value pair of shard keys to be applied for the request.
- Map<String>
- Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
Supporting Types
MongoIndexKeysResponse
- Keys List<string>
- List of keys for each MongoDB collection in the Azure Cosmos DB service
- Keys []string
- List of keys for each MongoDB collection in the Azure Cosmos DB service
- keys List<String>
- List of keys for each MongoDB collection in the Azure Cosmos DB service
- keys string[]
- List of keys for each MongoDB collection in the Azure Cosmos DB service
- keys Sequence[str]
- List of keys for each MongoDB collection in the Azure Cosmos DB service
- keys List<String>
- List of keys for each MongoDB collection in the Azure Cosmos DB service
MongoIndexOptionsResponse
- Expire
After intSeconds - Expire after seconds
- Unique bool
- Is unique or not
- Expire
After intSeconds - Expire after seconds
- Unique bool
- Is unique or not
- expire
After IntegerSeconds - Expire after seconds
- unique Boolean
- Is unique or not
- expire
After numberSeconds - Expire after seconds
- unique boolean
- Is unique or not
- expire_
after_ intseconds - Expire after seconds
- unique bool
- Is unique or not
- expire
After NumberSeconds - Expire after seconds
- unique Boolean
- Is unique or not
MongoIndexResponse
- Key
Pulumi.
Azure Native. Cosmos DB. Inputs. Mongo Index Keys Response - Cosmos DB MongoDB collection index keys
- Options
Pulumi.
Azure Native. Cosmos DB. Inputs. Mongo Index Options Response - Cosmos DB MongoDB collection index key options
- Key
Mongo
Index Keys Response - Cosmos DB MongoDB collection index keys
- Options
Mongo
Index Options Response - Cosmos DB MongoDB collection index key options
- key
Mongo
Index Keys Response - Cosmos DB MongoDB collection index keys
- options
Mongo
Index Options Response - Cosmos DB MongoDB collection index key options
- key
Mongo
Index Keys Response - Cosmos DB MongoDB collection index keys
- options
Mongo
Index Options Response - Cosmos DB MongoDB collection index key options
- key
Mongo
Index Keys Response - Cosmos DB MongoDB collection index keys
- options
Mongo
Index Options Response - Cosmos DB MongoDB collection index key options
- key Property Map
- Cosmos DB MongoDB collection index keys
- options Property Map
- Cosmos DB MongoDB collection index key options
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
published on Friday, Mar 20, 2026 by Pulumi
