1. Packages
  2. Google Cloud Native
  3. API Docs
  4. firestore
  5. firestore/v1beta1
  6. Index

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.firestore/v1beta1.Index

Explore with Pulumi AI

google-native logo

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

    Creates the specified index. A newly created index’s initial state is CREATING. On completion of the returned google.longrunning.Operation, the state will be READY. If the index already exists, the call will return an ALREADY_EXISTS status. During creation, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, removing the index with delete, then re-creating the index with create. Indexes with a single field cannot be created.

    Create Index Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Index(name: string, args: IndexArgs, opts?: CustomResourceOptions);
    @overload
    def Index(resource_name: str,
              args: IndexArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Index(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              database_id: Optional[str] = None,
              collection_id: Optional[str] = None,
              fields: Optional[Sequence[GoogleFirestoreAdminV1beta1IndexFieldArgs]] = None,
              name: Optional[str] = None,
              project: Optional[str] = None,
              state: Optional[IndexState] = None)
    func NewIndex(ctx *Context, name string, args IndexArgs, opts ...ResourceOption) (*Index, error)
    public Index(string name, IndexArgs args, CustomResourceOptions? opts = null)
    public Index(String name, IndexArgs args)
    public Index(String name, IndexArgs args, CustomResourceOptions options)
    
    type: google-native:firestore/v1beta1:Index
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IndexArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IndexArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IndexArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IndexArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IndexArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exampleindexResourceResourceFromFirestorev1beta1 = new GoogleNative.Firestore.V1Beta1.Index("exampleindexResourceResourceFromFirestorev1beta1", new()
    {
        DatabaseId = "string",
        CollectionId = "string",
        Fields = new[]
        {
            new GoogleNative.Firestore.V1Beta1.Inputs.GoogleFirestoreAdminV1beta1IndexFieldArgs
            {
                FieldPath = "string",
                Mode = GoogleNative.Firestore.V1Beta1.GoogleFirestoreAdminV1beta1IndexFieldMode.ModeUnspecified,
            },
        },
        Name = "string",
        Project = "string",
        State = GoogleNative.Firestore.V1Beta1.IndexState.StateUnspecified,
    });
    
    example, err := firestorev1beta1.NewIndex(ctx, "exampleindexResourceResourceFromFirestorev1beta1", &firestorev1beta1.IndexArgs{
    	DatabaseId:   pulumi.String("string"),
    	CollectionId: pulumi.String("string"),
    	Fields: firestore.GoogleFirestoreAdminV1beta1IndexFieldArray{
    		&firestore.GoogleFirestoreAdminV1beta1IndexFieldArgs{
    			FieldPath: pulumi.String("string"),
    			Mode:      firestorev1beta1.GoogleFirestoreAdminV1beta1IndexFieldModeModeUnspecified,
    		},
    	},
    	Name:    pulumi.String("string"),
    	Project: pulumi.String("string"),
    	State:   firestorev1beta1.IndexStateStateUnspecified,
    })
    
    var exampleindexResourceResourceFromFirestorev1beta1 = new Index("exampleindexResourceResourceFromFirestorev1beta1", IndexArgs.builder()
        .databaseId("string")
        .collectionId("string")
        .fields(GoogleFirestoreAdminV1beta1IndexFieldArgs.builder()
            .fieldPath("string")
            .mode("MODE_UNSPECIFIED")
            .build())
        .name("string")
        .project("string")
        .state("STATE_UNSPECIFIED")
        .build());
    
    exampleindex_resource_resource_from_firestorev1beta1 = google_native.firestore.v1beta1.Index("exampleindexResourceResourceFromFirestorev1beta1",
        database_id="string",
        collection_id="string",
        fields=[{
            "field_path": "string",
            "mode": google_native.firestore.v1beta1.GoogleFirestoreAdminV1beta1IndexFieldMode.MODE_UNSPECIFIED,
        }],
        name="string",
        project="string",
        state=google_native.firestore.v1beta1.IndexState.STATE_UNSPECIFIED)
    
    const exampleindexResourceResourceFromFirestorev1beta1 = new google_native.firestore.v1beta1.Index("exampleindexResourceResourceFromFirestorev1beta1", {
        databaseId: "string",
        collectionId: "string",
        fields: [{
            fieldPath: "string",
            mode: google_native.firestore.v1beta1.GoogleFirestoreAdminV1beta1IndexFieldMode.ModeUnspecified,
        }],
        name: "string",
        project: "string",
        state: google_native.firestore.v1beta1.IndexState.StateUnspecified,
    });
    
    type: google-native:firestore/v1beta1:Index
    properties:
        collectionId: string
        databaseId: string
        fields:
            - fieldPath: string
              mode: MODE_UNSPECIFIED
        name: string
        project: string
        state: STATE_UNSPECIFIED
    

    Index Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Index resource accepts the following input properties:

    DatabaseId string
    CollectionId string
    The collection ID to which this index applies. Required.
    Fields List<Pulumi.GoogleNative.Firestore.V1Beta1.Inputs.GoogleFirestoreAdminV1beta1IndexField>
    The fields to index.
    Name string
    The resource name of the index. Output only.
    Project string
    State Pulumi.GoogleNative.Firestore.V1Beta1.IndexState
    The state of the index. Output only.
    DatabaseId string
    CollectionId string
    The collection ID to which this index applies. Required.
    Fields []GoogleFirestoreAdminV1beta1IndexFieldArgs
    The fields to index.
    Name string
    The resource name of the index. Output only.
    Project string
    State IndexStateEnum
    The state of the index. Output only.
    databaseId String
    collectionId String
    The collection ID to which this index applies. Required.
    fields List<GoogleFirestoreAdminV1beta1IndexField>
    The fields to index.
    name String
    The resource name of the index. Output only.
    project String
    state IndexState
    The state of the index. Output only.
    databaseId string
    collectionId string
    The collection ID to which this index applies. Required.
    fields GoogleFirestoreAdminV1beta1IndexField[]
    The fields to index.
    name string
    The resource name of the index. Output only.
    project string
    state IndexState
    The state of the index. Output only.
    database_id str
    collection_id str
    The collection ID to which this index applies. Required.
    fields Sequence[GoogleFirestoreAdminV1beta1IndexFieldArgs]
    The fields to index.
    name str
    The resource name of the index. Output only.
    project str
    state IndexState
    The state of the index. Output only.
    databaseId String
    collectionId String
    The collection ID to which this index applies. Required.
    fields List<Property Map>
    The fields to index.
    name String
    The resource name of the index. Output only.
    project String
    state "STATE_UNSPECIFIED" | "CREATING" | "READY" | "ERROR"
    The state of the index. Output only.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Index resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    GoogleFirestoreAdminV1beta1IndexField, GoogleFirestoreAdminV1beta1IndexFieldArgs

    FieldPath string
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    Mode Pulumi.GoogleNative.Firestore.V1Beta1.GoogleFirestoreAdminV1beta1IndexFieldMode
    The field's mode.
    FieldPath string
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    Mode GoogleFirestoreAdminV1beta1IndexFieldMode
    The field's mode.
    fieldPath String
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    mode GoogleFirestoreAdminV1beta1IndexFieldMode
    The field's mode.
    fieldPath string
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    mode GoogleFirestoreAdminV1beta1IndexFieldMode
    The field's mode.
    field_path str
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    mode GoogleFirestoreAdminV1beta1IndexFieldMode
    The field's mode.
    fieldPath String
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    mode "MODE_UNSPECIFIED" | "ASCENDING" | "DESCENDING" | "ARRAY_CONTAINS"
    The field's mode.

    GoogleFirestoreAdminV1beta1IndexFieldMode, GoogleFirestoreAdminV1beta1IndexFieldModeArgs

    ModeUnspecified
    MODE_UNSPECIFIEDThe mode is unspecified.
    Ascending
    ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    Descending
    DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ArrayContains
    ARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    GoogleFirestoreAdminV1beta1IndexFieldModeModeUnspecified
    MODE_UNSPECIFIEDThe mode is unspecified.
    GoogleFirestoreAdminV1beta1IndexFieldModeAscending
    ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    GoogleFirestoreAdminV1beta1IndexFieldModeDescending
    DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    GoogleFirestoreAdminV1beta1IndexFieldModeArrayContains
    ARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    ModeUnspecified
    MODE_UNSPECIFIEDThe mode is unspecified.
    Ascending
    ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    Descending
    DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ArrayContains
    ARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    ModeUnspecified
    MODE_UNSPECIFIEDThe mode is unspecified.
    Ascending
    ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    Descending
    DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ArrayContains
    ARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    MODE_UNSPECIFIED
    MODE_UNSPECIFIEDThe mode is unspecified.
    ASCENDING
    ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    DESCENDING
    DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ARRAY_CONTAINS
    ARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    "MODE_UNSPECIFIED"
    MODE_UNSPECIFIEDThe mode is unspecified.
    "ASCENDING"
    ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    "DESCENDING"
    DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    "ARRAY_CONTAINS"
    ARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.

    GoogleFirestoreAdminV1beta1IndexFieldResponse, GoogleFirestoreAdminV1beta1IndexFieldResponseArgs

    FieldPath string
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    Mode string
    The field's mode.
    FieldPath string
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    Mode string
    The field's mode.
    fieldPath String
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    mode String
    The field's mode.
    fieldPath string
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    mode string
    The field's mode.
    field_path str
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    mode str
    The field's mode.
    fieldPath String
    The path of the field. Must match the field path specification described by google.firestore.v1beta1.Document.fields. Special field path __name__ may be used by itself or at the end of a path. __type__ may be used only at the end of path.
    mode String
    The field's mode.

    IndexState, IndexStateArgs

    StateUnspecified
    STATE_UNSPECIFIEDThe state is unspecified.
    Creating
    CREATINGThe index is being created. There is an active long-running operation for the index. The index is updated when writing a document. Some index data may exist.
    Ready
    READYThe index is ready to be used. The index is updated when writing a document. The index is fully populated from all stored documents it applies to.
    Error
    ERRORThe index was being created, but something went wrong. There is no active long-running operation for the index, and the most recently finished long-running operation failed. The index is not updated when writing a document. Some index data may exist.
    IndexStateStateUnspecified
    STATE_UNSPECIFIEDThe state is unspecified.
    IndexStateCreating
    CREATINGThe index is being created. There is an active long-running operation for the index. The index is updated when writing a document. Some index data may exist.
    IndexStateReady
    READYThe index is ready to be used. The index is updated when writing a document. The index is fully populated from all stored documents it applies to.
    IndexStateError
    ERRORThe index was being created, but something went wrong. There is no active long-running operation for the index, and the most recently finished long-running operation failed. The index is not updated when writing a document. Some index data may exist.
    StateUnspecified
    STATE_UNSPECIFIEDThe state is unspecified.
    Creating
    CREATINGThe index is being created. There is an active long-running operation for the index. The index is updated when writing a document. Some index data may exist.
    Ready
    READYThe index is ready to be used. The index is updated when writing a document. The index is fully populated from all stored documents it applies to.
    Error
    ERRORThe index was being created, but something went wrong. There is no active long-running operation for the index, and the most recently finished long-running operation failed. The index is not updated when writing a document. Some index data may exist.
    StateUnspecified
    STATE_UNSPECIFIEDThe state is unspecified.
    Creating
    CREATINGThe index is being created. There is an active long-running operation for the index. The index is updated when writing a document. Some index data may exist.
    Ready
    READYThe index is ready to be used. The index is updated when writing a document. The index is fully populated from all stored documents it applies to.
    Error
    ERRORThe index was being created, but something went wrong. There is no active long-running operation for the index, and the most recently finished long-running operation failed. The index is not updated when writing a document. Some index data may exist.
    STATE_UNSPECIFIED
    STATE_UNSPECIFIEDThe state is unspecified.
    CREATING
    CREATINGThe index is being created. There is an active long-running operation for the index. The index is updated when writing a document. Some index data may exist.
    READY
    READYThe index is ready to be used. The index is updated when writing a document. The index is fully populated from all stored documents it applies to.
    ERROR
    ERRORThe index was being created, but something went wrong. There is no active long-running operation for the index, and the most recently finished long-running operation failed. The index is not updated when writing a document. Some index data may exist.
    "STATE_UNSPECIFIED"
    STATE_UNSPECIFIEDThe state is unspecified.
    "CREATING"
    CREATINGThe index is being created. There is an active long-running operation for the index. The index is updated when writing a document. Some index data may exist.
    "READY"
    READYThe index is ready to be used. The index is updated when writing a document. The index is fully populated from all stored documents it applies to.
    "ERROR"
    ERRORThe index was being created, but something went wrong. There is no active long-running operation for the index, and the most recently finished long-running operation failed. The index is not updated when writing a document. Some index data may exist.

    Package Details

    Repository
    Google Cloud Native pulumi/pulumi-google-native
    License
    Apache-2.0
    google-native logo

    Google Cloud Native is in preview. Google Cloud Classic is fully supported.

    Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi