1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. getSearchIndex
MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi

mongodbatlas.getSearchIndex

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi

    mongodbatlas.SearchIndex describe a single search indexes. This represents a single search index that have been created.

    NOTE: Groups and projects are synonymous terms. You may find groupId in the official documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = mongodbatlas.getSearchIndex({
        indexId: "<INDEX_ID",
        projectId: "<PROJECT_ID>",
        clusterName: "<CLUSTER_NAME>",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.get_search_index(index_id="<INDEX_ID",
        project_id="<PROJECT_ID>",
        cluster_name="<CLUSTER_NAME>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.LookupSearchIndex(ctx, &mongodbatlas.LookupSearchIndexArgs{
    			IndexId:     "<INDEX_ID",
    			ProjectId:   "<PROJECT_ID>",
    			ClusterName: "<CLUSTER_NAME>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Mongodbatlas.GetSearchIndex.Invoke(new()
        {
            IndexId = "<INDEX_ID",
            ProjectId = "<PROJECT_ID>",
            ClusterName = "<CLUSTER_NAME>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetSearchIndexArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var test = MongodbatlasFunctions.getSearchIndex(GetSearchIndexArgs.builder()
                .indexId("<INDEX_ID")
                .projectId("<PROJECT_ID>")
                .clusterName("<CLUSTER_NAME>")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: mongodbatlas:getSearchIndex
          Arguments:
            indexId: <INDEX_ID
            projectId: <PROJECT_ID>
            clusterName: <CLUSTER_NAME>
    

    Using getSearchIndex

    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 getSearchIndex(args: GetSearchIndexArgs, opts?: InvokeOptions): Promise<GetSearchIndexResult>
    function getSearchIndexOutput(args: GetSearchIndexOutputArgs, opts?: InvokeOptions): Output<GetSearchIndexResult>
    def get_search_index(analyzer: Optional[str] = None,
                         analyzers: Optional[str] = None,
                         cluster_name: Optional[str] = None,
                         collection_name: Optional[str] = None,
                         database: Optional[str] = None,
                         fields: Optional[str] = None,
                         index_id: Optional[str] = None,
                         mappings_dynamic: Optional[bool] = None,
                         mappings_fields: Optional[str] = None,
                         name: Optional[str] = None,
                         project_id: Optional[str] = None,
                         search_analyzer: Optional[str] = None,
                         type: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSearchIndexResult
    def get_search_index_output(analyzer: Optional[pulumi.Input[str]] = None,
                         analyzers: Optional[pulumi.Input[str]] = None,
                         cluster_name: Optional[pulumi.Input[str]] = None,
                         collection_name: Optional[pulumi.Input[str]] = None,
                         database: Optional[pulumi.Input[str]] = None,
                         fields: Optional[pulumi.Input[str]] = None,
                         index_id: Optional[pulumi.Input[str]] = None,
                         mappings_dynamic: Optional[pulumi.Input[bool]] = None,
                         mappings_fields: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         project_id: Optional[pulumi.Input[str]] = None,
                         search_analyzer: Optional[pulumi.Input[str]] = None,
                         type: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSearchIndexResult]
    func LookupSearchIndex(ctx *Context, args *LookupSearchIndexArgs, opts ...InvokeOption) (*LookupSearchIndexResult, error)
    func LookupSearchIndexOutput(ctx *Context, args *LookupSearchIndexOutputArgs, opts ...InvokeOption) LookupSearchIndexResultOutput

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

    public static class GetSearchIndex 
    {
        public static Task<GetSearchIndexResult> InvokeAsync(GetSearchIndexArgs args, InvokeOptions? opts = null)
        public static Output<GetSearchIndexResult> Invoke(GetSearchIndexInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSearchIndexResult> getSearchIndex(GetSearchIndexArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: mongodbatlas:index/getSearchIndex:getSearchIndex
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterName string
    The name of the cluster containing the collection with one or more Atlas Search indexes.
    IndexId string
    The unique identifier of the Atlas Search index. Use the mongodbatlas.getSearchIndexesdatasource to find the IDs of all Atlas Search indexes.
    ProjectId string
    The unique identifier for the project that contains the specified cluster.
    Analyzer string
    Analyzer to use when creating the index.
    Analyzers string
    Custom analyzers to use in this index (this is an array of objects).
    CollectionName string
    Name of the collection the index is on.
    Database string
    Name of the database the collection is in.
    Fields string
    MappingsDynamic bool
    Flag indicating whether the index uses dynamic or static mappings.
    MappingsFields string
    Object containing one or more field specifications.
    Name string
    Name of the index.
    SearchAnalyzer string
    Analyzer to use when searching the index.
    Type string
    ClusterName string
    The name of the cluster containing the collection with one or more Atlas Search indexes.
    IndexId string
    The unique identifier of the Atlas Search index. Use the mongodbatlas.getSearchIndexesdatasource to find the IDs of all Atlas Search indexes.
    ProjectId string
    The unique identifier for the project that contains the specified cluster.
    Analyzer string
    Analyzer to use when creating the index.
    Analyzers string
    Custom analyzers to use in this index (this is an array of objects).
    CollectionName string
    Name of the collection the index is on.
    Database string
    Name of the database the collection is in.
    Fields string
    MappingsDynamic bool
    Flag indicating whether the index uses dynamic or static mappings.
    MappingsFields string
    Object containing one or more field specifications.
    Name string
    Name of the index.
    SearchAnalyzer string
    Analyzer to use when searching the index.
    Type string
    clusterName String
    The name of the cluster containing the collection with one or more Atlas Search indexes.
    indexId String
    The unique identifier of the Atlas Search index. Use the mongodbatlas.getSearchIndexesdatasource to find the IDs of all Atlas Search indexes.
    projectId String
    The unique identifier for the project that contains the specified cluster.
    analyzer String
    Analyzer to use when creating the index.
    analyzers String
    Custom analyzers to use in this index (this is an array of objects).
    collectionName String
    Name of the collection the index is on.
    database String
    Name of the database the collection is in.
    fields String
    mappingsDynamic Boolean
    Flag indicating whether the index uses dynamic or static mappings.
    mappingsFields String
    Object containing one or more field specifications.
    name String
    Name of the index.
    searchAnalyzer String
    Analyzer to use when searching the index.
    type String
    clusterName string
    The name of the cluster containing the collection with one or more Atlas Search indexes.
    indexId string
    The unique identifier of the Atlas Search index. Use the mongodbatlas.getSearchIndexesdatasource to find the IDs of all Atlas Search indexes.
    projectId string
    The unique identifier for the project that contains the specified cluster.
    analyzer string
    Analyzer to use when creating the index.
    analyzers string
    Custom analyzers to use in this index (this is an array of objects).
    collectionName string
    Name of the collection the index is on.
    database string
    Name of the database the collection is in.
    fields string
    mappingsDynamic boolean
    Flag indicating whether the index uses dynamic or static mappings.
    mappingsFields string
    Object containing one or more field specifications.
    name string
    Name of the index.
    searchAnalyzer string
    Analyzer to use when searching the index.
    type string
    cluster_name str
    The name of the cluster containing the collection with one or more Atlas Search indexes.
    index_id str
    The unique identifier of the Atlas Search index. Use the mongodbatlas.getSearchIndexesdatasource to find the IDs of all Atlas Search indexes.
    project_id str
    The unique identifier for the project that contains the specified cluster.
    analyzer str
    Analyzer to use when creating the index.
    analyzers str
    Custom analyzers to use in this index (this is an array of objects).
    collection_name str
    Name of the collection the index is on.
    database str
    Name of the database the collection is in.
    fields str
    mappings_dynamic bool
    Flag indicating whether the index uses dynamic or static mappings.
    mappings_fields str
    Object containing one or more field specifications.
    name str
    Name of the index.
    search_analyzer str
    Analyzer to use when searching the index.
    type str
    clusterName String
    The name of the cluster containing the collection with one or more Atlas Search indexes.
    indexId String
    The unique identifier of the Atlas Search index. Use the mongodbatlas.getSearchIndexesdatasource to find the IDs of all Atlas Search indexes.
    projectId String
    The unique identifier for the project that contains the specified cluster.
    analyzer String
    Analyzer to use when creating the index.
    analyzers String
    Custom analyzers to use in this index (this is an array of objects).
    collectionName String
    Name of the collection the index is on.
    database String
    Name of the database the collection is in.
    fields String
    mappingsDynamic Boolean
    Flag indicating whether the index uses dynamic or static mappings.
    mappingsFields String
    Object containing one or more field specifications.
    name String
    Name of the index.
    searchAnalyzer String
    Analyzer to use when searching the index.
    type String

    getSearchIndex Result

    The following output properties are available:

    ClusterName string
    Id string
    The provider-assigned unique ID for this managed resource.
    IndexId string
    ProjectId string
    Status string
    Current status of the index.
    Synonyms List<GetSearchIndexSynonym>
    Synonyms mapping definition to use in this index.

    • synonyms.#.name - Name of the synonym mapping definition.
    • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
    • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
    Analyzer string
    Analyzer to use when creating the index.
    Analyzers string
    Custom analyzers to use in this index (this is an array of objects).
    CollectionName string
    Name of the collection the index is on.
    Database string
    Name of the database the collection is in.
    Fields string
    MappingsDynamic bool
    Flag indicating whether the index uses dynamic or static mappings.
    MappingsFields string
    Object containing one or more field specifications.
    Name string
    Name of the index.
    SearchAnalyzer string
    Analyzer to use when searching the index.
    Type string
    ClusterName string
    Id string
    The provider-assigned unique ID for this managed resource.
    IndexId string
    ProjectId string
    Status string
    Current status of the index.
    Synonyms []GetSearchIndexSynonym
    Synonyms mapping definition to use in this index.

    • synonyms.#.name - Name of the synonym mapping definition.
    • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
    • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
    Analyzer string
    Analyzer to use when creating the index.
    Analyzers string
    Custom analyzers to use in this index (this is an array of objects).
    CollectionName string
    Name of the collection the index is on.
    Database string
    Name of the database the collection is in.
    Fields string
    MappingsDynamic bool
    Flag indicating whether the index uses dynamic or static mappings.
    MappingsFields string
    Object containing one or more field specifications.
    Name string
    Name of the index.
    SearchAnalyzer string
    Analyzer to use when searching the index.
    Type string
    clusterName String
    id String
    The provider-assigned unique ID for this managed resource.
    indexId String
    projectId String
    status String
    Current status of the index.
    synonyms List<GetSearchIndexSynonym>
    Synonyms mapping definition to use in this index.

    • synonyms.#.name - Name of the synonym mapping definition.
    • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
    • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
    analyzer String
    Analyzer to use when creating the index.
    analyzers String
    Custom analyzers to use in this index (this is an array of objects).
    collectionName String
    Name of the collection the index is on.
    database String
    Name of the database the collection is in.
    fields String
    mappingsDynamic Boolean
    Flag indicating whether the index uses dynamic or static mappings.
    mappingsFields String
    Object containing one or more field specifications.
    name String
    Name of the index.
    searchAnalyzer String
    Analyzer to use when searching the index.
    type String
    clusterName string
    id string
    The provider-assigned unique ID for this managed resource.
    indexId string
    projectId string
    status string
    Current status of the index.
    synonyms GetSearchIndexSynonym[]
    Synonyms mapping definition to use in this index.

    • synonyms.#.name - Name of the synonym mapping definition.
    • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
    • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
    analyzer string
    Analyzer to use when creating the index.
    analyzers string
    Custom analyzers to use in this index (this is an array of objects).
    collectionName string
    Name of the collection the index is on.
    database string
    Name of the database the collection is in.
    fields string
    mappingsDynamic boolean
    Flag indicating whether the index uses dynamic or static mappings.
    mappingsFields string
    Object containing one or more field specifications.
    name string
    Name of the index.
    searchAnalyzer string
    Analyzer to use when searching the index.
    type string
    cluster_name str
    id str
    The provider-assigned unique ID for this managed resource.
    index_id str
    project_id str
    status str
    Current status of the index.
    synonyms Sequence[GetSearchIndexSynonym]
    Synonyms mapping definition to use in this index.

    • synonyms.#.name - Name of the synonym mapping definition.
    • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
    • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
    analyzer str
    Analyzer to use when creating the index.
    analyzers str
    Custom analyzers to use in this index (this is an array of objects).
    collection_name str
    Name of the collection the index is on.
    database str
    Name of the database the collection is in.
    fields str
    mappings_dynamic bool
    Flag indicating whether the index uses dynamic or static mappings.
    mappings_fields str
    Object containing one or more field specifications.
    name str
    Name of the index.
    search_analyzer str
    Analyzer to use when searching the index.
    type str
    clusterName String
    id String
    The provider-assigned unique ID for this managed resource.
    indexId String
    projectId String
    status String
    Current status of the index.
    synonyms List<Property Map>
    Synonyms mapping definition to use in this index.

    • synonyms.#.name - Name of the synonym mapping definition.
    • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
    • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
    analyzer String
    Analyzer to use when creating the index.
    analyzers String
    Custom analyzers to use in this index (this is an array of objects).
    collectionName String
    Name of the collection the index is on.
    database String
    Name of the database the collection is in.
    fields String
    mappingsDynamic Boolean
    Flag indicating whether the index uses dynamic or static mappings.
    mappingsFields String
    Object containing one or more field specifications.
    name String
    Name of the index.
    searchAnalyzer String
    Analyzer to use when searching the index.
    type String

    Supporting Types

    GetSearchIndexSynonym

    Analyzer string
    Analyzer to use when creating the index.
    Name string
    Name of the index.
    SourceCollection string
    Analyzer string
    Analyzer to use when creating the index.
    Name string
    Name of the index.
    SourceCollection string
    analyzer String
    Analyzer to use when creating the index.
    name String
    Name of the index.
    sourceCollection String
    analyzer string
    Analyzer to use when creating the index.
    name string
    Name of the index.
    sourceCollection string
    analyzer str
    Analyzer to use when creating the index.
    name str
    Name of the index.
    source_collection str
    analyzer String
    Analyzer to use when creating the index.
    name String
    Name of the index.
    sourceCollection String

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi