Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.datastore/v1.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 index 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 property cannot be created.
Auto-naming is currently not supported for this resource.
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,
ancestor: Optional[IndexAncestor] = None,
kind: Optional[str] = None,
properties: Optional[Sequence[GoogleDatastoreAdminV1IndexedPropertyArgs]] = None,
project: Optional[str] = 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:datastore/v1: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 exampleindexResourceResourceFromDatastorev1 = new GoogleNative.Datastore.V1.Index("exampleindexResourceResourceFromDatastorev1", new()
{
Ancestor = GoogleNative.Datastore.V1.IndexAncestor.AncestorModeUnspecified,
Kind = "string",
Properties = new[]
{
new GoogleNative.Datastore.V1.Inputs.GoogleDatastoreAdminV1IndexedPropertyArgs
{
Direction = GoogleNative.Datastore.V1.GoogleDatastoreAdminV1IndexedPropertyDirection.DirectionUnspecified,
Name = "string",
},
},
Project = "string",
});
example, err := datastore.NewIndex(ctx, "exampleindexResourceResourceFromDatastorev1", &datastore.IndexArgs{
Ancestor: datastore.IndexAncestorAncestorModeUnspecified,
Kind: pulumi.String("string"),
Properties: datastore.GoogleDatastoreAdminV1IndexedPropertyArray{
&datastore.GoogleDatastoreAdminV1IndexedPropertyArgs{
Direction: datastore.GoogleDatastoreAdminV1IndexedPropertyDirectionDirectionUnspecified,
Name: pulumi.String("string"),
},
},
Project: pulumi.String("string"),
})
var exampleindexResourceResourceFromDatastorev1 = new Index("exampleindexResourceResourceFromDatastorev1", IndexArgs.builder()
.ancestor("ANCESTOR_MODE_UNSPECIFIED")
.kind("string")
.properties(GoogleDatastoreAdminV1IndexedPropertyArgs.builder()
.direction("DIRECTION_UNSPECIFIED")
.name("string")
.build())
.project("string")
.build());
exampleindex_resource_resource_from_datastorev1 = google_native.datastore.v1.Index("exampleindexResourceResourceFromDatastorev1",
ancestor=google_native.datastore.v1.IndexAncestor.ANCESTOR_MODE_UNSPECIFIED,
kind="string",
properties=[{
"direction": google_native.datastore.v1.GoogleDatastoreAdminV1IndexedPropertyDirection.DIRECTION_UNSPECIFIED,
"name": "string",
}],
project="string")
const exampleindexResourceResourceFromDatastorev1 = new google_native.datastore.v1.Index("exampleindexResourceResourceFromDatastorev1", {
ancestor: google_native.datastore.v1.IndexAncestor.AncestorModeUnspecified,
kind: "string",
properties: [{
direction: google_native.datastore.v1.GoogleDatastoreAdminV1IndexedPropertyDirection.DirectionUnspecified,
name: "string",
}],
project: "string",
});
type: google-native:datastore/v1:Index
properties:
ancestor: ANCESTOR_MODE_UNSPECIFIED
kind: string
project: string
properties:
- direction: DIRECTION_UNSPECIFIED
name: string
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:
- Ancestor
Pulumi.
Google Native. Datastore. V1. Index Ancestor - The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
- Kind string
- The entity kind to which this index applies.
- Properties
List<Pulumi.
Google Native. Datastore. V1. Inputs. Google Datastore Admin V1Indexed Property> - An ordered sequence of property names and their index attributes. Requires: * A maximum of 100 properties.
- Project string
- Ancestor
Index
Ancestor - The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
- Kind string
- The entity kind to which this index applies.
- Properties
[]Google
Datastore Admin V1Indexed Property Args - An ordered sequence of property names and their index attributes. Requires: * A maximum of 100 properties.
- Project string
- ancestor
Index
Ancestor - The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
- kind String
- The entity kind to which this index applies.
- properties
List<Google
Datastore Admin V1Indexed Property> - An ordered sequence of property names and their index attributes. Requires: * A maximum of 100 properties.
- project String
- ancestor
Index
Ancestor - The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
- kind string
- The entity kind to which this index applies.
- properties
Google
Datastore Admin V1Indexed Property[] - An ordered sequence of property names and their index attributes. Requires: * A maximum of 100 properties.
- project string
- ancestor
Index
Ancestor - The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
- kind str
- The entity kind to which this index applies.
- properties
Sequence[Google
Datastore Admin V1Indexed Property Args] - An ordered sequence of property names and their index attributes. Requires: * A maximum of 100 properties.
- project str
- ancestor "ANCESTOR_MODE_UNSPECIFIED" | "NONE" | "ALL_ANCESTORS"
- The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
- kind String
- The entity kind to which this index applies.
- properties List<Property Map>
- An ordered sequence of property names and their index attributes. Requires: * A maximum of 100 properties.
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the Index resource produces the following output properties:
Supporting Types
GoogleDatastoreAdminV1IndexedProperty, GoogleDatastoreAdminV1IndexedPropertyArgs
- Direction
Pulumi.
Google Native. Datastore. V1. Google Datastore Admin V1Indexed Property Direction - The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
- Name string
- The property name to index.
- Direction
Google
Datastore Admin V1Indexed Property Direction - The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
- Name string
- The property name to index.
- direction
Google
Datastore Admin V1Indexed Property Direction - The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
- name String
- The property name to index.
- direction
Google
Datastore Admin V1Indexed Property Direction - The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
- name string
- The property name to index.
- direction
Google
Datastore Admin V1Indexed Property Direction - The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
- name str
- The property name to index.
- direction "DIRECTION_UNSPECIFIED" | "ASCENDING" | "DESCENDING"
- The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
- name String
- The property name to index.
GoogleDatastoreAdminV1IndexedPropertyDirection, GoogleDatastoreAdminV1IndexedPropertyDirectionArgs
- Direction
Unspecified - DIRECTION_UNSPECIFIEDThe direction is unspecified.
- Ascending
- ASCENDINGThe property's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
- Descending
- DESCENDINGThe property's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
- Google
Datastore Admin V1Indexed Property Direction Direction Unspecified - DIRECTION_UNSPECIFIEDThe direction is unspecified.
- Google
Datastore Admin V1Indexed Property Direction Ascending - ASCENDINGThe property's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
- Google
Datastore Admin V1Indexed Property Direction Descending - DESCENDINGThe property's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
- Direction
Unspecified - DIRECTION_UNSPECIFIEDThe direction is unspecified.
- Ascending
- ASCENDINGThe property's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
- Descending
- DESCENDINGThe property's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
- Direction
Unspecified - DIRECTION_UNSPECIFIEDThe direction is unspecified.
- Ascending
- ASCENDINGThe property's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
- Descending
- DESCENDINGThe property's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
- DIRECTION_UNSPECIFIED
- DIRECTION_UNSPECIFIEDThe direction is unspecified.
- ASCENDING
- ASCENDINGThe property's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
- DESCENDING
- DESCENDINGThe property's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
- "DIRECTION_UNSPECIFIED"
- DIRECTION_UNSPECIFIEDThe direction is unspecified.
- "ASCENDING"
- ASCENDINGThe property's values are indexed so as to support sequencing in ascending order and also query by <, >, <=, >=, and =.
- "DESCENDING"
- DESCENDINGThe property's values are indexed so as to support sequencing in descending order and also query by <, >, <=, >=, and =.
GoogleDatastoreAdminV1IndexedPropertyResponse, GoogleDatastoreAdminV1IndexedPropertyResponseArgs
IndexAncestor, IndexAncestorArgs
- Ancestor
Mode Unspecified - ANCESTOR_MODE_UNSPECIFIEDThe ancestor mode is unspecified.
- None
- NONEDo not include the entity's ancestors in the index.
- All
Ancestors - ALL_ANCESTORSInclude all the entity's ancestors in the index.
- Index
Ancestor Ancestor Mode Unspecified - ANCESTOR_MODE_UNSPECIFIEDThe ancestor mode is unspecified.
- Index
Ancestor None - NONEDo not include the entity's ancestors in the index.
- Index
Ancestor All Ancestors - ALL_ANCESTORSInclude all the entity's ancestors in the index.
- Ancestor
Mode Unspecified - ANCESTOR_MODE_UNSPECIFIEDThe ancestor mode is unspecified.
- None
- NONEDo not include the entity's ancestors in the index.
- All
Ancestors - ALL_ANCESTORSInclude all the entity's ancestors in the index.
- Ancestor
Mode Unspecified - ANCESTOR_MODE_UNSPECIFIEDThe ancestor mode is unspecified.
- None
- NONEDo not include the entity's ancestors in the index.
- All
Ancestors - ALL_ANCESTORSInclude all the entity's ancestors in the index.
- ANCESTOR_MODE_UNSPECIFIED
- ANCESTOR_MODE_UNSPECIFIEDThe ancestor mode is unspecified.
- NONE
- NONEDo not include the entity's ancestors in the index.
- ALL_ANCESTORS
- ALL_ANCESTORSInclude all the entity's ancestors in the index.
- "ANCESTOR_MODE_UNSPECIFIED"
- ANCESTOR_MODE_UNSPECIFIEDThe ancestor mode is unspecified.
- "NONE"
- NONEDo not include the entity's ancestors in the index.
- "ALL_ANCESTORS"
- ALL_ANCESTORSInclude all the entity's ancestors in the index.
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.