Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.firestore/v1beta1.Index
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
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)
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:
- Database
Id string - Collection
Id string - The collection ID to which this index applies. Required.
- Fields
List<Pulumi.
Google Native. Firestore. V1Beta1. Inputs. Google Firestore Admin V1beta1Index Field> - The fields to index.
- Name string
- The resource name of the index. Output only.
- Project string
- State
Pulumi.
Google Native. Firestore. V1Beta1. Index State - The state of the index. Output only.
- Database
Id string - Collection
Id string - The collection ID to which this index applies. Required.
- Fields
[]Google
Firestore Admin V1beta1Index Field Args - The fields to index.
- Name string
- The resource name of the index. Output only.
- Project string
- State
Index
State Enum - The state of the index. Output only.
- database
Id String - collection
Id String - The collection ID to which this index applies. Required.
- fields
List<Google
Firestore Admin V1beta1Index Field> - The fields to index.
- name String
- The resource name of the index. Output only.
- project String
- state
Index
State - The state of the index. Output only.
- database
Id string - collection
Id string - The collection ID to which this index applies. Required.
- fields
Google
Firestore Admin V1beta1Index Field[] - The fields to index.
- name string
- The resource name of the index. Output only.
- project string
- state
Index
State - The state of the index. Output only.
- database_
id str - collection_
id str - The collection ID to which this index applies. Required.
- fields
Sequence[Google
Firestore Admin V1beta1Index Field Args] - The fields to index.
- name str
- The resource name of the index. Output only.
- project str
- state
Index
State - The state of the index. Output only.
- database
Id String - collection
Id 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
- 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
Pulumi.
Google Native. Firestore. V1Beta1. Google Firestore Admin V1beta1Index Field Mode - 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
Google
Firestore Admin V1beta1Index Field Mode - 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
Google
Firestore Admin V1beta1Index Field Mode - 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
Google
Firestore Admin V1beta1Index Field Mode - 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
Google
Firestore Admin V1beta1Index Field Mode - 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.
GoogleFirestoreAdminV1beta1IndexFieldMode, GoogleFirestoreAdminV1beta1IndexFieldModeArgs
- 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.
- Google
Firestore Admin V1beta1Index Field Mode Mode Unspecified - MODE_UNSPECIFIEDThe mode is unspecified.
- Google
Firestore Admin V1beta1Index Field Mode Ascending - ASCENDINGThe field's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
- Google
Firestore Admin V1beta1Index Field Mode Descending - DESCENDINGThe field's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
- Google
Firestore Admin V1beta1Index Field Mode 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.
- 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.
- "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
- 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.
IndexState, IndexStateArgs
- 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.
- Index
State State Unspecified - STATE_UNSPECIFIEDThe state is unspecified.
- Index
State 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.
- Index
State 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.
- Index
State 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.
- 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 Cloud Native is in preview. Google Cloud Classic is fully supported.