Google Native

Pulumi Official
Package maintained by Pulumi
v0.18.2 published on Monday, May 2, 2022 by Pulumi

Index

Creates a composite index. This returns a google.longrunning.Operation which may be used to track the status of the creation. The metadata for the operation will be the type IndexOperationMetadata. Auto-naming is currently not supported for this resource.

Create a Index Resource

new Index(name: string, args: IndexArgs, opts?: CustomResourceOptions);
@overload
def Index(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          collection_group_id: Optional[str] = None,
          database_id: Optional[str] = None,
          fields: Optional[Sequence[GoogleFirestoreAdminV1IndexFieldArgs]] = None,
          project: Optional[str] = None,
          query_scope: Optional[IndexQueryScope] = None)
@overload
def Index(resource_name: str,
          args: IndexArgs,
          opts: Optional[ResourceOptions] = 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/v1:Index
properties: # The arguments to resource properties.
options: # 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.
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.

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

The Index resource accepts the following input properties:

CollectionGroupId string
DatabaseId string
Fields List<Pulumi.GoogleNative.Firestore.V1.Inputs.GoogleFirestoreAdminV1IndexFieldArgs>

The fields supported by this index. For composite indexes, this is always 2 or more fields. 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). For single field indexes, this will always be exactly one entry with a field path equal to the field path of the associated field.

Project string
QueryScope Pulumi.GoogleNative.Firestore.V1.IndexQueryScope

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection id. Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection id as this index.

CollectionGroupId string
DatabaseId string
Fields []GoogleFirestoreAdminV1IndexFieldArgs

The fields supported by this index. For composite indexes, this is always 2 or more fields. 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). For single field indexes, this will always be exactly one entry with a field path equal to the field path of the associated field.

Project string
QueryScope IndexQueryScope

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection id. Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection id as this index.

collectionGroupId String
databaseId String
fields ListFirestoreAdminV1IndexFieldArgs>

The fields supported by this index. For composite indexes, this is always 2 or more fields. 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). For single field indexes, this will always be exactly one entry with a field path equal to the field path of the associated field.

project String
queryScope IndexQueryScope

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection id. Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection id as this index.

collectionGroupId string
databaseId string
fields GoogleFirestoreAdminV1IndexFieldArgs[]

The fields supported by this index. For composite indexes, this is always 2 or more fields. 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). For single field indexes, this will always be exactly one entry with a field path equal to the field path of the associated field.

project string
queryScope IndexQueryScope

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection id. Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection id as this index.

collection_group_id str
database_id str
fields Sequence[GoogleFirestoreAdminV1IndexFieldArgs]

The fields supported by this index. For composite indexes, this is always 2 or more fields. 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). For single field indexes, this will always be exactly one entry with a field path equal to the field path of the associated field.

project str
query_scope IndexQueryScope

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection id. Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection id as this index.

collectionGroupId String
databaseId String
fields List

The fields supported by this index. For composite indexes, this is always 2 or more fields. 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). For single field indexes, this will always be exactly one entry with a field path equal to the field path of the associated field.

project String
queryScope "QUERY_SCOPE_UNSPECIFIED" | "COLLECTION" | "COLLECTION_GROUP"

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection id. Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection id as this index.

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.

Name string

A server defined name for this index. The form of this name for composite indexes will be: projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id} For single field indexes, this field will be empty.

State string

The serving state of the index.

Id string

The provider-assigned unique ID for this managed resource.

Name string

A server defined name for this index. The form of this name for composite indexes will be: projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id} For single field indexes, this field will be empty.

State string

The serving state of the index.

id String

The provider-assigned unique ID for this managed resource.

name String

A server defined name for this index. The form of this name for composite indexes will be: projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id} For single field indexes, this field will be empty.

state String

The serving state of the index.

id string

The provider-assigned unique ID for this managed resource.

name string

A server defined name for this index. The form of this name for composite indexes will be: projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id} For single field indexes, this field will be empty.

state string

The serving state of the index.

id str

The provider-assigned unique ID for this managed resource.

name str

A server defined name for this index. The form of this name for composite indexes will be: projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id} For single field indexes, this field will be empty.

state str

The serving state of the index.

id String

The provider-assigned unique ID for this managed resource.

name String

A server defined name for this index. The form of this name for composite indexes will be: projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id} For single field indexes, this field will be empty.

state String

The serving state of the index.

Supporting Types

GoogleFirestoreAdminV1IndexField

ArrayConfig Pulumi.GoogleNative.Firestore.V1.GoogleFirestoreAdminV1IndexFieldArrayConfig

Indicates that this field supports operations on array_values.

FieldPath string

Can be name. For single field indexes, this must match the name of the field or may be omitted.

Order Pulumi.GoogleNative.Firestore.V1.GoogleFirestoreAdminV1IndexFieldOrder

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

ArrayConfig GoogleFirestoreAdminV1IndexFieldArrayConfig

Indicates that this field supports operations on array_values.

FieldPath string

Can be name. For single field indexes, this must match the name of the field or may be omitted.

Order GoogleFirestoreAdminV1IndexFieldOrder

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

arrayConfig GoogleFirestoreAdminV1IndexFieldArrayConfig

Indicates that this field supports operations on array_values.

fieldPath String

Can be name. For single field indexes, this must match the name of the field or may be omitted.

order GoogleFirestoreAdminV1IndexFieldOrder

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

arrayConfig GoogleFirestoreAdminV1IndexFieldArrayConfig

Indicates that this field supports operations on array_values.

fieldPath string

Can be name. For single field indexes, this must match the name of the field or may be omitted.

order GoogleFirestoreAdminV1IndexFieldOrder

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

array_config GoogleFirestoreAdminV1IndexFieldArrayConfig

Indicates that this field supports operations on array_values.

field_path str

Can be name. For single field indexes, this must match the name of the field or may be omitted.

order GoogleFirestoreAdminV1IndexFieldOrder

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

arrayConfig "ARRAY_CONFIG_UNSPECIFIED" | "CONTAINS"

Indicates that this field supports operations on array_values.

fieldPath String

Can be name. For single field indexes, this must match the name of the field or may be omitted.

order "ORDER_UNSPECIFIED" | "ASCENDING" | "DESCENDING"

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

GoogleFirestoreAdminV1IndexFieldArrayConfig

ArrayConfigUnspecified
ARRAY_CONFIG_UNSPECIFIED

The index does not support additional array queries.

Contains
CONTAINS

The index supports array containment queries.

GoogleFirestoreAdminV1IndexFieldArrayConfigArrayConfigUnspecified
ARRAY_CONFIG_UNSPECIFIED

The index does not support additional array queries.

GoogleFirestoreAdminV1IndexFieldArrayConfigContains
CONTAINS

The index supports array containment queries.

ArrayConfigUnspecified
ARRAY_CONFIG_UNSPECIFIED

The index does not support additional array queries.

Contains
CONTAINS

The index supports array containment queries.

ArrayConfigUnspecified
ARRAY_CONFIG_UNSPECIFIED

The index does not support additional array queries.

Contains
CONTAINS

The index supports array containment queries.

ARRAY_CONFIG_UNSPECIFIED
ARRAY_CONFIG_UNSPECIFIED

The index does not support additional array queries.

CONTAINS
CONTAINS

The index supports array containment queries.

"ARRAY_CONFIG_UNSPECIFIED"
ARRAY_CONFIG_UNSPECIFIED

The index does not support additional array queries.

"CONTAINS"
CONTAINS

The index supports array containment queries.

GoogleFirestoreAdminV1IndexFieldOrder

OrderUnspecified
ORDER_UNSPECIFIED

The ordering is unspecified. Not a valid option.

Ascending
ASCENDING

The field is ordered by ascending field value.

Descending
DESCENDING

The field is ordered by descending field value.

GoogleFirestoreAdminV1IndexFieldOrderOrderUnspecified
ORDER_UNSPECIFIED

The ordering is unspecified. Not a valid option.

GoogleFirestoreAdminV1IndexFieldOrderAscending
ASCENDING

The field is ordered by ascending field value.

GoogleFirestoreAdminV1IndexFieldOrderDescending
DESCENDING

The field is ordered by descending field value.

OrderUnspecified
ORDER_UNSPECIFIED

The ordering is unspecified. Not a valid option.

Ascending
ASCENDING

The field is ordered by ascending field value.

Descending
DESCENDING

The field is ordered by descending field value.

OrderUnspecified
ORDER_UNSPECIFIED

The ordering is unspecified. Not a valid option.

Ascending
ASCENDING

The field is ordered by ascending field value.

Descending
DESCENDING

The field is ordered by descending field value.

ORDER_UNSPECIFIED
ORDER_UNSPECIFIED

The ordering is unspecified. Not a valid option.

ASCENDING
ASCENDING

The field is ordered by ascending field value.

DESCENDING
DESCENDING

The field is ordered by descending field value.

"ORDER_UNSPECIFIED"
ORDER_UNSPECIFIED

The ordering is unspecified. Not a valid option.

"ASCENDING"
ASCENDING

The field is ordered by ascending field value.

"DESCENDING"
DESCENDING

The field is ordered by descending field value.

GoogleFirestoreAdminV1IndexFieldResponse

ArrayConfig string

Indicates that this field supports operations on array_values.

FieldPath string

Can be name. For single field indexes, this must match the name of the field or may be omitted.

Order string

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

ArrayConfig string

Indicates that this field supports operations on array_values.

FieldPath string

Can be name. For single field indexes, this must match the name of the field or may be omitted.

Order string

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

arrayConfig String

Indicates that this field supports operations on array_values.

fieldPath String

Can be name. For single field indexes, this must match the name of the field or may be omitted.

order String

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

arrayConfig string

Indicates that this field supports operations on array_values.

fieldPath string

Can be name. For single field indexes, this must match the name of the field or may be omitted.

order string

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

array_config str

Indicates that this field supports operations on array_values.

field_path str

Can be name. For single field indexes, this must match the name of the field or may be omitted.

order str

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

arrayConfig String

Indicates that this field supports operations on array_values.

fieldPath String

Can be name. For single field indexes, this must match the name of the field or may be omitted.

order String

Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.

IndexQueryScope

QueryScopeUnspecified
QUERY_SCOPE_UNSPECIFIED

The query scope is unspecified. Not a valid option.

Collection
COLLECTION

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the collection id specified by the index.

CollectionGroup
COLLECTION_GROUP

Indexes with a collection group query scope specified allow queries against all collections that has the collection id specified by the index.

IndexQueryScopeQueryScopeUnspecified
QUERY_SCOPE_UNSPECIFIED

The query scope is unspecified. Not a valid option.

IndexQueryScopeCollection
COLLECTION

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the collection id specified by the index.

IndexQueryScopeCollectionGroup
COLLECTION_GROUP

Indexes with a collection group query scope specified allow queries against all collections that has the collection id specified by the index.

QueryScopeUnspecified
QUERY_SCOPE_UNSPECIFIED

The query scope is unspecified. Not a valid option.

Collection
COLLECTION

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the collection id specified by the index.

CollectionGroup
COLLECTION_GROUP

Indexes with a collection group query scope specified allow queries against all collections that has the collection id specified by the index.

QueryScopeUnspecified
QUERY_SCOPE_UNSPECIFIED

The query scope is unspecified. Not a valid option.

Collection
COLLECTION

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the collection id specified by the index.

CollectionGroup
COLLECTION_GROUP

Indexes with a collection group query scope specified allow queries against all collections that has the collection id specified by the index.

QUERY_SCOPE_UNSPECIFIED
QUERY_SCOPE_UNSPECIFIED

The query scope is unspecified. Not a valid option.

COLLECTION
COLLECTION

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the collection id specified by the index.

COLLECTION_GROUP
COLLECTION_GROUP

Indexes with a collection group query scope specified allow queries against all collections that has the collection id specified by the index.

"QUERY_SCOPE_UNSPECIFIED"
QUERY_SCOPE_UNSPECIFIED

The query scope is unspecified. Not a valid option.

"COLLECTION"
COLLECTION

Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the collection id specified by the index.

"COLLECTION_GROUP"
COLLECTION_GROUP

Indexes with a collection group query scope specified allow queries against all collections that has the collection id specified by the index.

Package Details

Repository
https://github.com/pulumi/pulumi-google-native
License
Apache-2.0