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

This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

Viewing docs for Google Cloud Native v0.32.0
published on Wednesday, Nov 29, 2023 by Pulumi
google-native logo Google Cloud Native

This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

Viewing docs for 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.
    
    
    resource "google-native_firestore_v1beta1_index" "name" {
        # resource properties
    }

    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,
    })
    
    resource "google-native_firestore_v1beta1_index" "exampleindexResourceResourceFromFirestorev1beta1" {
      lifecycle {
        create_before_destroy = true
      }
      database_id   = "string"
      collection_id = "string"
      fields {
        field_path = "string"
        mode       = "MODE_UNSPECIFIED"
      }
      name    = "string"
      project = "string"
      state   = "STATE_UNSPECIFIED"
    }
    
    var exampleindexResourceResourceFromFirestorev1beta1 = new com.pulumi.googlenative.firestore_v1beta1.Index("exampleindexResourceResourceFromFirestorev1beta1", com.pulumi.googlenative.firestore_v1beta1.IndexArgs.builder()
        .databaseId("string")
        .collectionId("string")
        .fields(GoogleFirestoreAdminV1beta1IndexFieldArgs.builder()
            .fieldPath("string")
            .mode(com.pulumi.googlenative.firestore_v1beta1.enums.GoogleFirestoreAdminV1beta1IndexFieldMode.ModeUnspecified)
            .build())
        .name("string")
        .project("string")
        .state(com.pulumi.googlenative.firestore_v1beta1.enums.IndexState.StateUnspecified)
        .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.
    database_id string
    collection_id string
    The collection ID to which this index applies. Required.
    fields list(object)
    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.
    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 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.

    Look up Existing Index Resource

    Get an existing Index resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, opts?: CustomResourceOptions): Index
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> Index
    func GetIndex(ctx *Context, name string, id IDInput, state *IndexState, opts ...ResourceOption) (*Index, error)
    public static Index Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static Index get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingIndex:    type: google-native:firestore/v1beta1:Index    get:      id: ${id}
    import {
      to = google-native_firestore_v1beta1_index.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state IndexState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Supporting Types

    GoogleFirestoreAdminV1beta1IndexField, GoogleFirestoreAdminV1beta1IndexFieldArgs

    A field of an index.
    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.
    field_path 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.
    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

    The field's mode.
    NameValueDescription
    ModeUnspecifiedMODE_UNSPECIFIEDThe mode is unspecified.
    AscendingASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    DescendingDESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ArrayContainsARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    NameValueDescription
    GoogleFirestoreAdminV1beta1IndexFieldModeModeUnspecifiedMODE_UNSPECIFIEDThe mode is unspecified.
    GoogleFirestoreAdminV1beta1IndexFieldModeAscendingASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    GoogleFirestoreAdminV1beta1IndexFieldModeDescendingDESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    GoogleFirestoreAdminV1beta1IndexFieldModeArrayContainsARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    ValueDescription
    MODE_UNSPECIFIEDThe mode is unspecified.
    ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    NameValueDescription
    ModeUnspecifiedMODE_UNSPECIFIEDThe mode is unspecified.
    AscendingASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    DescendingDESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ArrayContainsARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    NameValueDescription
    ModeUnspecifiedMODE_UNSPECIFIEDThe mode is unspecified.
    AscendingASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    DescendingDESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ArrayContainsARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    NameValueDescription
    MODE_UNSPECIFIEDMODE_UNSPECIFIEDThe mode is unspecified.
    ASCENDINGASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    DESCENDINGDESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ARRAY_CONTAINSARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.
    ValueDescription
    MODE_UNSPECIFIEDThe mode is unspecified.
    ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
    DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
    ARRAY_CONTAINSThe field's array values are indexed so as to support membership using ARRAY_CONTAINS queries.

    GoogleFirestoreAdminV1beta1IndexFieldResponse, GoogleFirestoreAdminV1beta1IndexFieldResponseArgs

    A field of an index.
    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 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

    The state of the index. Output only.
    NameValueDescription
    StateUnspecifiedSTATE_UNSPECIFIEDThe state is unspecified.
    CreatingCREATINGThe 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.
    ReadyREADYThe 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.
    ErrorERRORThe 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.
    NameValueDescription
    IndexStateStateUnspecifiedSTATE_UNSPECIFIEDThe state is unspecified.
    IndexStateCreatingCREATINGThe 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.
    IndexStateReadyREADYThe 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.
    IndexStateErrorERRORThe 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.
    ValueDescription
    STATE_UNSPECIFIEDThe state is unspecified.
    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.
    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.
    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.
    NameValueDescription
    StateUnspecifiedSTATE_UNSPECIFIEDThe state is unspecified.
    CreatingCREATINGThe 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.
    ReadyREADYThe 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.
    ErrorERRORThe 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.
    NameValueDescription
    StateUnspecifiedSTATE_UNSPECIFIEDThe state is unspecified.
    CreatingCREATINGThe 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.
    ReadyREADYThe 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.
    ErrorERRORThe 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.
    NameValueDescription
    STATE_UNSPECIFIEDSTATE_UNSPECIFIEDThe state is unspecified.
    CREATINGCREATINGThe 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.
    READYREADYThe 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.
    ERRORERRORThe 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.
    ValueDescription
    STATE_UNSPECIFIEDThe state is unspecified.
    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.
    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.
    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

    This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

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

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial