DataStoreIndexArgs

data class DataStoreIndexArgs(val ancestor: Output<String>? = null, val kind: Output<String>? = null, val project: Output<String>? = null, val properties: Output<List<DataStoreIndexPropertyArgs>>? = null) : ConvertibleToJava<DataStoreIndexArgs>

Describes a composite index for Cloud Datastore. To get more information about Index, see:

Warning: This resource creates a Datastore Index on a project that has already enabled a Datastore-compatible database. If you haven't already enabled one, you can create a gcp.appengine.Application resource with database_type set to "CLOUD_DATASTORE_COMPATIBILITY" to do so. Your Datastore location will be the same as the App Engine location specified.

Example Usage

Datastore Index

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.datastore.DataStoreIndex;
import com.pulumi.gcp.datastore.DataStoreIndexArgs;
import com.pulumi.gcp.datastore.inputs.DataStoreIndexPropertyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new DataStoreIndex("default", DataStoreIndexArgs.builder()
.kind("foo")
.properties(
DataStoreIndexPropertyArgs.builder()
.direction("ASCENDING")
.name("property_a")
.build(),
DataStoreIndexPropertyArgs.builder()
.direction("ASCENDING")
.name("property_b")
.build())
.build());
}
}

Import

Index can be imported using any of these accepted formats

$ pulumi import gcp:datastore/dataStoreIndex:DataStoreIndex default projects/{{project}}/indexes/{{index_id}}
$ pulumi import gcp:datastore/dataStoreIndex:DataStoreIndex default {{project}}/{{index_id}}
$ pulumi import gcp:datastore/dataStoreIndex:DataStoreIndex default {{index_id}}

Constructors

Link copied to clipboard
constructor(ancestor: Output<String>? = null, kind: Output<String>? = null, project: Output<String>? = null, properties: Output<List<DataStoreIndexPropertyArgs>>? = null)

Properties

Link copied to clipboard
val ancestor: Output<String>? = null

Policy for including ancestors in the index. Default value is NONE. Possible values are: NONE, ALL_ANCESTORS.

Link copied to clipboard
val kind: Output<String>? = null

The entity kind which the index applies to.

Link copied to clipboard
val project: Output<String>? = null

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

Link copied to clipboard

An ordered list of properties to index on. Structure is documented below.

Functions

Link copied to clipboard
open override fun toJava(): DataStoreIndexArgs