Module firestore

This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource Index

class Index extends CustomResource

Cloud Firestore indexes enable simple and complex queries against documents in a database. This resource manages composite indexes and not single field indexes.

To get more information about Index, see:

Example Usage - Firestore Index Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myIndex = new gcp.firestore.Index("my-index", {
    collection: "chatrooms",
    fields: [
        {
            fieldPath: "name",
            order: "ASCENDING",
        },
        {
            fieldPath: "description",
            order: "DESCENDING",
        },
        {
            fieldPath: "__name__",
            order: "DESCENDING",
        },
    ],
    project: "my-project-name",
});

constructor

new Index(name: string, args: IndexArgs, opts?: pulumi.CustomResourceOptions)

Create a Index resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IndexState, opts?: pulumi.CustomResourceOptions): Index

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Index

Returns true if the given object is an instance of Index. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property collection

public collection: pulumi.Output<string>;

The collection being indexed.

property database

public database: pulumi.Output<string | undefined>;

The Firestore database id. Defaults to "(default)".

property fields

public fields: pulumi.Output<IndexField[]>;

The fields supported by this index. The last field entry is always for the field path __name__. If, on creation, __name__ was not specified as the last field, it will be added automatically with the same direction as that of the last field defined. If the final field in a composite index is not directional, the __name__ will be ordered "ASCENDING" (unless explicitly specified otherwise). Structure is documented below.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

A server defined name for this index. Format: ‘projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/indexes/{{server_generated_id}}’

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property queryScope

public queryScope: pulumi.Output<string | undefined>;

The scope at which a query is run.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

interface IndexArgs

interface IndexArgs

The set of arguments for constructing a Index resource.

property collection

collection: pulumi.Input<string>;

The collection being indexed.

property database

database?: pulumi.Input<string>;

The Firestore database id. Defaults to "(default)".

property fields

fields: pulumi.Input<pulumi.Input<IndexField>[]>;

The fields supported by this index. The last field entry is always for the field path __name__. If, on creation, __name__ was not specified as the last field, it will be added automatically with the same direction as that of the last field defined. If the final field in a composite index is not directional, the __name__ will be ordered "ASCENDING" (unless explicitly specified otherwise). Structure is documented below.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property queryScope

queryScope?: pulumi.Input<string>;

The scope at which a query is run.

interface IndexState

interface IndexState

Input properties used for looking up and filtering Index resources.

property collection

collection?: pulumi.Input<string>;

The collection being indexed.

property database

database?: pulumi.Input<string>;

The Firestore database id. Defaults to "(default)".

property fields

fields?: pulumi.Input<pulumi.Input<IndexField>[]>;

The fields supported by this index. The last field entry is always for the field path __name__. If, on creation, __name__ was not specified as the last field, it will be added automatically with the same direction as that of the last field defined. If the final field in a composite index is not directional, the __name__ will be ordered "ASCENDING" (unless explicitly specified otherwise). Structure is documented below.

property name

name?: pulumi.Input<string>;

A server defined name for this index. Format: ‘projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/indexes/{{server_generated_id}}’

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property queryScope

queryScope?: pulumi.Input<string>;

The scope at which a query is run.