1. Packages
  2. Azure Native
  3. API Docs
  4. cosmosdb
  5. getMongoDBResourceMongoDBCollection
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi

azure-native.cosmosdb.getMongoDBResourceMongoDBCollection

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi

    Gets the MongoDB collection under an existing Azure Cosmos DB database account.

    Uses Azure REST API version 2024-11-15.

    Other available API versions: 2019-08-01, 2019-12-12, 2020-03-01, 2020-04-01, 2020-06-01-preview, 2020-09-01, 2021-01-15, 2021-03-01-preview, 2021-03-15, 2021-04-01-preview, 2021-04-15, 2021-05-15, 2021-06-15, 2021-07-01-preview, 2021-10-15, 2021-10-15-preview, 2021-11-15-preview, 2022-02-15-preview, 2022-05-15, 2022-05-15-preview, 2022-08-15, 2022-08-15-preview, 2022-11-15, 2022-11-15-preview, 2023-03-01-preview, 2023-03-15, 2023-03-15-preview, 2023-04-15, 2023-09-15, 2023-09-15-preview, 2023-11-15, 2023-11-15-preview, 2024-02-15-preview, 2024-05-15, 2024-05-15-preview, 2024-08-15, 2024-09-01-preview, 2024-12-01-preview, 2025-04-15, 2025-05-01-preview. 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 getMongoDBResourceMongoDBCollection

    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 getMongoDBResourceMongoDBCollection(args: GetMongoDBResourceMongoDBCollectionArgs, opts?: InvokeOptions): Promise<GetMongoDBResourceMongoDBCollectionResult>
    function getMongoDBResourceMongoDBCollectionOutput(args: GetMongoDBResourceMongoDBCollectionOutputArgs, opts?: InvokeOptions): Output<GetMongoDBResourceMongoDBCollectionResult>
    def get_mongo_db_resource_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) -> GetMongoDBResourceMongoDBCollectionResult
    def get_mongo_db_resource_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[GetMongoDBResourceMongoDBCollectionResult]
    func LookupMongoDBResourceMongoDBCollection(ctx *Context, args *LookupMongoDBResourceMongoDBCollectionArgs, opts ...InvokeOption) (*LookupMongoDBResourceMongoDBCollectionResult, error)
    func LookupMongoDBResourceMongoDBCollectionOutput(ctx *Context, args *LookupMongoDBResourceMongoDBCollectionOutputArgs, opts ...InvokeOption) LookupMongoDBResourceMongoDBCollectionResultOutput

    > Note: This function is named LookupMongoDBResourceMongoDBCollection in the Go SDK.

    public static class GetMongoDBResourceMongoDBCollection 
    {
        public static Task<GetMongoDBResourceMongoDBCollectionResult> InvokeAsync(GetMongoDBResourceMongoDBCollectionArgs args, InvokeOptions? opts = null)
        public static Output<GetMongoDBResourceMongoDBCollectionResult> Invoke(GetMongoDBResourceMongoDBCollectionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMongoDBResourceMongoDBCollectionResult> getMongoDBResourceMongoDBCollection(GetMongoDBResourceMongoDBCollectionArgs args, InvokeOptions options)
    public static Output<GetMongoDBResourceMongoDBCollectionResult> getMongoDBResourceMongoDBCollection(GetMongoDBResourceMongoDBCollectionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure-native:cosmosdb:getMongoDBResourceMongoDBCollection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountName string
    Cosmos DB database account name.
    CollectionName string
    Cosmos DB collection name.
    DatabaseName string
    Cosmos DB database name.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    AccountName string
    Cosmos DB database account name.
    CollectionName string
    Cosmos DB collection name.
    DatabaseName string
    Cosmos DB database name.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    accountName String
    Cosmos DB database account name.
    collectionName String
    Cosmos DB collection name.
    databaseName String
    Cosmos DB database name.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    accountName string
    Cosmos DB database account name.
    collectionName string
    Cosmos DB collection name.
    databaseName string
    Cosmos DB database name.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    account_name str
    Cosmos DB database account name.
    collection_name str
    Cosmos DB collection name.
    database_name str
    Cosmos DB database name.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    accountName String
    Cosmos DB database account name.
    collectionName String
    Cosmos DB collection name.
    databaseName String
    Cosmos DB database name.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.

    getMongoDBResourceMongoDBCollection Result

    The following output properties are available:

    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    The unique resource identifier of the ARM resource.
    Name string
    The name of the ARM resource.
    Type string
    The type of Azure resource.
    Location string
    The location of the resource group to which the resource belongs.
    Options Pulumi.AzureNative.CosmosDB.Outputs.MongoDBCollectionGetPropertiesResponseOptions
    Resource Pulumi.AzureNative.CosmosDB.Outputs.MongoDBCollectionGetPropertiesResponseResource
    Tags 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".
    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    The unique resource identifier of the ARM resource.
    Name string
    The name of the ARM resource.
    Type string
    The type of Azure resource.
    Location string
    The location of the resource group to which the resource belongs.
    Options MongoDBCollectionGetPropertiesResponseOptions
    Resource MongoDBCollectionGetPropertiesResponseResource
    Tags 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".
    azureApiVersion String
    The Azure API version of the resource.
    id String
    The unique resource identifier of the ARM resource.
    name String
    The name of the ARM resource.
    type String
    The type of Azure resource.
    location String
    The location of the resource group to which the resource belongs.
    options MongoDBCollectionGetPropertiesResponseOptions
    resource MongoDBCollectionGetPropertiesResponseResource
    tags 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".
    azureApiVersion string
    The Azure API version of the resource.
    id string
    The unique resource identifier of the ARM resource.
    name string
    The name of the ARM resource.
    type string
    The type of Azure resource.
    location string
    The location of the resource group to which the resource belongs.
    options MongoDBCollectionGetPropertiesResponseOptions
    resource MongoDBCollectionGetPropertiesResponseResource
    tags {[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_version str
    The Azure API version of the resource.
    id str
    The unique resource identifier of the ARM resource.
    name str
    The name of the ARM resource.
    type str
    The type of Azure resource.
    location str
    The location of the resource group to which the resource belongs.
    options MongoDBCollectionGetPropertiesResponseOptions
    resource MongoDBCollectionGetPropertiesResponseResource
    tags 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".
    azureApiVersion String
    The Azure API version of the resource.
    id String
    The unique resource identifier of the ARM resource.
    name String
    The name of the ARM resource.
    type String
    The type of Azure resource.
    location String
    The location of the resource group to which the resource belongs.
    options Property Map
    resource Property Map
    tags 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

    AutoscaleSettingsResponse

    MaxThroughput int
    Represents maximum throughput, the resource can scale up to.
    MaxThroughput int
    Represents maximum throughput, the resource can scale up to.
    maxThroughput Integer
    Represents maximum throughput, the resource can scale up to.
    maxThroughput number
    Represents maximum throughput, the resource can scale up to.
    max_throughput int
    Represents maximum throughput, the resource can scale up to.
    maxThroughput Number
    Represents maximum throughput, the resource can scale up to.

    MongoDBCollectionGetPropertiesResponseOptions

    AutoscaleSettings Pulumi.AzureNative.CosmosDB.Inputs.AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    Throughput int
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    AutoscaleSettings AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    Throughput int
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    autoscaleSettings AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    throughput Integer
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    autoscaleSettings AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    throughput number
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    autoscale_settings AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    throughput int
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    autoscaleSettings Property Map
    Specifies the Autoscale settings.
    throughput Number
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.

    MongoDBCollectionGetPropertiesResponseResource

    Etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    Id string
    Name of the Cosmos DB MongoDB collection
    Rid string
    A system generated property. A unique identifier.
    Ts double
    A system generated property that denotes the last updated timestamp of the resource.
    AnalyticalStorageTtl int
    Analytical TTL.
    CreateMode string
    Enum to indicate the mode of resource creation.
    Indexes List<Pulumi.AzureNative.CosmosDB.Inputs.MongoIndexResponse>
    List of index keys
    RestoreParameters Pulumi.AzureNative.CosmosDB.Inputs.ResourceRestoreParametersResponse
    Parameters to indicate the information about the restore
    ShardKey Dictionary<string, string>
    A key-value pair of shard keys to be applied for the request.
    Etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    Id string
    Name of the Cosmos DB MongoDB collection
    Rid string
    A system generated property. A unique identifier.
    Ts float64
    A system generated property that denotes the last updated timestamp of the resource.
    AnalyticalStorageTtl int
    Analytical TTL.
    CreateMode string
    Enum to indicate the mode of resource creation.
    Indexes []MongoIndexResponse
    List of index keys
    RestoreParameters ResourceRestoreParametersResponse
    Parameters to indicate the information about the restore
    ShardKey map[string]string
    A key-value pair of shard keys to be applied for the request.
    etag String
    A system generated property representing the resource etag required for optimistic concurrency control.
    id String
    Name of the Cosmos DB MongoDB collection
    rid String
    A system generated property. A unique identifier.
    ts Double
    A system generated property that denotes the last updated timestamp of the resource.
    analyticalStorageTtl Integer
    Analytical TTL.
    createMode String
    Enum to indicate the mode of resource creation.
    indexes List<MongoIndexResponse>
    List of index keys
    restoreParameters ResourceRestoreParametersResponse
    Parameters to indicate the information about the restore
    shardKey Map<String,String>
    A key-value pair of shard keys to be applied for the request.
    etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    id string
    Name of the Cosmos DB MongoDB collection
    rid string
    A system generated property. A unique identifier.
    ts number
    A system generated property that denotes the last updated timestamp of the resource.
    analyticalStorageTtl number
    Analytical TTL.
    createMode string
    Enum to indicate the mode of resource creation.
    indexes MongoIndexResponse[]
    List of index keys
    restoreParameters ResourceRestoreParametersResponse
    Parameters to indicate the information about the restore
    shardKey {[key: string]: string}
    A key-value pair of shard keys to be applied for the request.
    etag str
    A system generated property representing the resource etag required for optimistic concurrency control.
    id str
    Name of the Cosmos DB MongoDB collection
    rid str
    A system generated property. A unique identifier.
    ts float
    A system generated property that denotes the last updated timestamp of the resource.
    analytical_storage_ttl int
    Analytical TTL.
    create_mode str
    Enum to indicate the mode of resource creation.
    indexes Sequence[MongoIndexResponse]
    List of index keys
    restore_parameters ResourceRestoreParametersResponse
    Parameters to indicate the information about the restore
    shard_key Mapping[str, str]
    A key-value pair of shard keys to be applied for the request.
    etag String
    A system generated property representing the resource etag required for optimistic concurrency control.
    id String
    Name of the Cosmos DB MongoDB collection
    rid String
    A system generated property. A unique identifier.
    ts Number
    A system generated property that denotes the last updated timestamp of the resource.
    analyticalStorageTtl Number
    Analytical TTL.
    createMode String
    Enum to indicate the mode of resource creation.
    indexes List<Property Map>
    List of index keys
    restoreParameters Property Map
    Parameters to indicate the information about the restore
    shardKey Map<String>
    A key-value pair of shard keys to be applied for the request.

    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

    ExpireAfterSeconds int
    Expire after seconds
    Unique bool
    Is unique or not
    ExpireAfterSeconds int
    Expire after seconds
    Unique bool
    Is unique or not
    expireAfterSeconds Integer
    Expire after seconds
    unique Boolean
    Is unique or not
    expireAfterSeconds number
    Expire after seconds
    unique boolean
    Is unique or not
    expire_after_seconds int
    Expire after seconds
    unique bool
    Is unique or not
    expireAfterSeconds Number
    Expire after seconds
    unique Boolean
    Is unique or not

    MongoIndexResponse

    Key Pulumi.AzureNative.CosmosDB.Inputs.MongoIndexKeysResponse
    Cosmos DB MongoDB collection index keys
    Options Pulumi.AzureNative.CosmosDB.Inputs.MongoIndexOptionsResponse
    Cosmos DB MongoDB collection index key options
    Key MongoIndexKeysResponse
    Cosmos DB MongoDB collection index keys
    Options MongoIndexOptionsResponse
    Cosmos DB MongoDB collection index key options
    key MongoIndexKeysResponse
    Cosmos DB MongoDB collection index keys
    options MongoIndexOptionsResponse
    Cosmos DB MongoDB collection index key options
    key MongoIndexKeysResponse
    Cosmos DB MongoDB collection index keys
    options MongoIndexOptionsResponse
    Cosmos DB MongoDB collection index key options
    key MongoIndexKeysResponse
    Cosmos DB MongoDB collection index keys
    options MongoIndexOptionsResponse
    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

    ResourceRestoreParametersResponse

    RestoreSource string
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    RestoreTimestampInUtc string
    Time to which the account has to be restored (ISO-8601 format).
    RestoreWithTtlDisabled bool
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    RestoreSource string
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    RestoreTimestampInUtc string
    Time to which the account has to be restored (ISO-8601 format).
    RestoreWithTtlDisabled bool
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    restoreSource String
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    restoreTimestampInUtc String
    Time to which the account has to be restored (ISO-8601 format).
    restoreWithTtlDisabled Boolean
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    restoreSource string
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    restoreTimestampInUtc string
    Time to which the account has to be restored (ISO-8601 format).
    restoreWithTtlDisabled boolean
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    restore_source str
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    restore_timestamp_in_utc str
    Time to which the account has to be restored (ISO-8601 format).
    restore_with_ttl_disabled bool
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.
    restoreSource String
    The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}
    restoreTimestampInUtc String
    Time to which the account has to be restored (ISO-8601 format).
    restoreWithTtlDisabled Boolean
    Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi