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.
firestore¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.
- class
pulumi_gcp.firestore.Index(resource_name, opts=None, collection=None, database=None, fields=None, project=None, query_scope=None, __props__=None, __name__=None, __opts__=None)¶ - 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:
How-to Guides
import pulumi import pulumi_gcp as gcp my_index = gcp.firestore.Index("my-index", collection="chatrooms", fields=[ { "fieldPath": "name", "order": "ASCENDING", }, { "fieldPath": "description", "order": "DESCENDING", }, { "fieldPath": "__name__", "order": "DESCENDING", }, ], project="my-project-name")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
collection (pulumi.Input[str]) – The collection being indexed.
database (pulumi.Input[str]) – The Firestore database id. Defaults to
"(default)".fields (pulumi.Input[list]) – 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.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
query_scope (pulumi.Input[str]) – The scope at which a query is run.
The fields object supports the following:
arrayConfig(pulumi.Input[str]) - Indicates that this field supports operations on arrayValues. Only one oforderandarrayConfigcan be specified.fieldPath(pulumi.Input[str]) - Name of the field.order(pulumi.Input[str]) - Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=. Only one oforderandarrayConfigcan be specified.
collection: pulumi.Output[str] = None¶The collection being indexed.
database: pulumi.Output[str] = None¶The Firestore database id. Defaults to
"(default)".
fields: pulumi.Output[list] = None¶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.arrayConfig(str) - Indicates that this field supports operations on arrayValues. Only one oforderandarrayConfigcan be specified.fieldPath(str) - Name of the field.order(str) - Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=. Only one oforderandarrayConfigcan be specified.
name: pulumi.Output[str] = None¶A server defined name for this index. Format: ‘projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/indexes/{{server_generated_id}}’
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
query_scope: pulumi.Output[str] = None¶The scope at which a query is run.
- static
get(resource_name, id, opts=None, collection=None, database=None, fields=None, name=None, project=None, query_scope=None)¶ Get an existing Index resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
collection (pulumi.Input[str]) – The collection being indexed.
database (pulumi.Input[str]) – The Firestore database id. Defaults to
"(default)".fields (pulumi.Input[list]) – 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.name (pulumi.Input[str]) – A server defined name for this index. Format: ‘projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/indexes/{{server_generated_id}}’
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
query_scope (pulumi.Input[str]) – The scope at which a query is run.
The fields object supports the following:
arrayConfig(pulumi.Input[str]) - Indicates that this field supports operations on arrayValues. Only one oforderandarrayConfigcan be specified.fieldPath(pulumi.Input[str]) - Name of the field.order(pulumi.Input[str]) - Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=. Only one oforderandarrayConfigcan be specified.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str