datastore

package
v4.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStoreIndex

type DataStoreIndex struct {
	pulumi.CustomResourceState

	// Policy for including ancestors in the index.
	// Default value is `NONE`.
	// Possible values are `NONE` and `ALL_ANCESTORS`.
	Ancestor pulumi.StringPtrOutput `pulumi:"ancestor"`
	// The index id.
	IndexId pulumi.StringOutput `pulumi:"indexId"`
	// The entity kind which the index applies to.
	Kind pulumi.StringOutput `pulumi:"kind"`
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringOutput `pulumi:"project"`
	// An ordered list of properties to index on.
	// Structure is documented below.
	Properties DataStoreIndexPropertyArrayOutput `pulumi:"properties"`
}

Describes a composite index for Cloud Datastore.

To get more information about Index, see:

* [API documentation](https://cloud.google.com/datastore/docs/reference/admin/rest/v1/projects.indexes) * How-to Guides

> **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 `appengine.Application` resource with `databaseType` 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

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/datastore"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datastore.NewDataStoreIndex(ctx, "_default", &datastore.DataStoreIndexArgs{
			Kind: pulumi.String("foo"),
			Properties: datastore.DataStoreIndexPropertyArray{
				&datastore.DataStoreIndexPropertyArgs{
					Direction: pulumi.String("ASCENDING"),
					Name:      pulumi.String("property_a"),
				},
				&datastore.DataStoreIndexPropertyArgs{
					Direction: pulumi.String("ASCENDING"),
					Name:      pulumi.String("property_b"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Index can be imported using any of these accepted formats

```sh

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

```

```sh

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

```

```sh

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

```

func GetDataStoreIndex

func GetDataStoreIndex(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DataStoreIndexState, opts ...pulumi.ResourceOption) (*DataStoreIndex, error)

GetDataStoreIndex gets an existing DataStoreIndex resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDataStoreIndex

func NewDataStoreIndex(ctx *pulumi.Context,
	name string, args *DataStoreIndexArgs, opts ...pulumi.ResourceOption) (*DataStoreIndex, error)

NewDataStoreIndex registers a new resource with the given unique name, arguments, and options.

func (*DataStoreIndex) ElementType added in v4.4.0

func (*DataStoreIndex) ElementType() reflect.Type

func (*DataStoreIndex) ToDataStoreIndexOutput added in v4.4.0

func (i *DataStoreIndex) ToDataStoreIndexOutput() DataStoreIndexOutput

func (*DataStoreIndex) ToDataStoreIndexOutputWithContext added in v4.4.0

func (i *DataStoreIndex) ToDataStoreIndexOutputWithContext(ctx context.Context) DataStoreIndexOutput

func (*DataStoreIndex) ToDataStoreIndexPtrOutput added in v4.11.1

func (i *DataStoreIndex) ToDataStoreIndexPtrOutput() DataStoreIndexPtrOutput

func (*DataStoreIndex) ToDataStoreIndexPtrOutputWithContext added in v4.11.1

func (i *DataStoreIndex) ToDataStoreIndexPtrOutputWithContext(ctx context.Context) DataStoreIndexPtrOutput

type DataStoreIndexArgs

type DataStoreIndexArgs struct {
	// Policy for including ancestors in the index.
	// Default value is `NONE`.
	// Possible values are `NONE` and `ALL_ANCESTORS`.
	Ancestor pulumi.StringPtrInput
	// The entity kind which the index applies to.
	Kind pulumi.StringInput
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringPtrInput
	// An ordered list of properties to index on.
	// Structure is documented below.
	Properties DataStoreIndexPropertyArrayInput
}

The set of arguments for constructing a DataStoreIndex resource.

func (DataStoreIndexArgs) ElementType

func (DataStoreIndexArgs) ElementType() reflect.Type

type DataStoreIndexArray added in v4.11.1

type DataStoreIndexArray []DataStoreIndexInput

func (DataStoreIndexArray) ElementType added in v4.11.1

func (DataStoreIndexArray) ElementType() reflect.Type

func (DataStoreIndexArray) ToDataStoreIndexArrayOutput added in v4.11.1

func (i DataStoreIndexArray) ToDataStoreIndexArrayOutput() DataStoreIndexArrayOutput

func (DataStoreIndexArray) ToDataStoreIndexArrayOutputWithContext added in v4.11.1

func (i DataStoreIndexArray) ToDataStoreIndexArrayOutputWithContext(ctx context.Context) DataStoreIndexArrayOutput

type DataStoreIndexArrayInput added in v4.11.1

type DataStoreIndexArrayInput interface {
	pulumi.Input

	ToDataStoreIndexArrayOutput() DataStoreIndexArrayOutput
	ToDataStoreIndexArrayOutputWithContext(context.Context) DataStoreIndexArrayOutput
}

DataStoreIndexArrayInput is an input type that accepts DataStoreIndexArray and DataStoreIndexArrayOutput values. You can construct a concrete instance of `DataStoreIndexArrayInput` via:

DataStoreIndexArray{ DataStoreIndexArgs{...} }

type DataStoreIndexArrayOutput added in v4.11.1

type DataStoreIndexArrayOutput struct{ *pulumi.OutputState }

func (DataStoreIndexArrayOutput) ElementType added in v4.11.1

func (DataStoreIndexArrayOutput) ElementType() reflect.Type

func (DataStoreIndexArrayOutput) Index added in v4.11.1

func (DataStoreIndexArrayOutput) ToDataStoreIndexArrayOutput added in v4.11.1

func (o DataStoreIndexArrayOutput) ToDataStoreIndexArrayOutput() DataStoreIndexArrayOutput

func (DataStoreIndexArrayOutput) ToDataStoreIndexArrayOutputWithContext added in v4.11.1

func (o DataStoreIndexArrayOutput) ToDataStoreIndexArrayOutputWithContext(ctx context.Context) DataStoreIndexArrayOutput

type DataStoreIndexInput added in v4.4.0

type DataStoreIndexInput interface {
	pulumi.Input

	ToDataStoreIndexOutput() DataStoreIndexOutput
	ToDataStoreIndexOutputWithContext(ctx context.Context) DataStoreIndexOutput
}

type DataStoreIndexMap added in v4.11.1

type DataStoreIndexMap map[string]DataStoreIndexInput

func (DataStoreIndexMap) ElementType added in v4.11.1

func (DataStoreIndexMap) ElementType() reflect.Type

func (DataStoreIndexMap) ToDataStoreIndexMapOutput added in v4.11.1

func (i DataStoreIndexMap) ToDataStoreIndexMapOutput() DataStoreIndexMapOutput

func (DataStoreIndexMap) ToDataStoreIndexMapOutputWithContext added in v4.11.1

func (i DataStoreIndexMap) ToDataStoreIndexMapOutputWithContext(ctx context.Context) DataStoreIndexMapOutput

type DataStoreIndexMapInput added in v4.11.1

type DataStoreIndexMapInput interface {
	pulumi.Input

	ToDataStoreIndexMapOutput() DataStoreIndexMapOutput
	ToDataStoreIndexMapOutputWithContext(context.Context) DataStoreIndexMapOutput
}

DataStoreIndexMapInput is an input type that accepts DataStoreIndexMap and DataStoreIndexMapOutput values. You can construct a concrete instance of `DataStoreIndexMapInput` via:

DataStoreIndexMap{ "key": DataStoreIndexArgs{...} }

type DataStoreIndexMapOutput added in v4.11.1

type DataStoreIndexMapOutput struct{ *pulumi.OutputState }

func (DataStoreIndexMapOutput) ElementType added in v4.11.1

func (DataStoreIndexMapOutput) ElementType() reflect.Type

func (DataStoreIndexMapOutput) MapIndex added in v4.11.1

func (DataStoreIndexMapOutput) ToDataStoreIndexMapOutput added in v4.11.1

func (o DataStoreIndexMapOutput) ToDataStoreIndexMapOutput() DataStoreIndexMapOutput

func (DataStoreIndexMapOutput) ToDataStoreIndexMapOutputWithContext added in v4.11.1

func (o DataStoreIndexMapOutput) ToDataStoreIndexMapOutputWithContext(ctx context.Context) DataStoreIndexMapOutput

type DataStoreIndexOutput added in v4.4.0

type DataStoreIndexOutput struct {
	*pulumi.OutputState
}

func (DataStoreIndexOutput) ElementType added in v4.4.0

func (DataStoreIndexOutput) ElementType() reflect.Type

func (DataStoreIndexOutput) ToDataStoreIndexOutput added in v4.4.0

func (o DataStoreIndexOutput) ToDataStoreIndexOutput() DataStoreIndexOutput

func (DataStoreIndexOutput) ToDataStoreIndexOutputWithContext added in v4.4.0

func (o DataStoreIndexOutput) ToDataStoreIndexOutputWithContext(ctx context.Context) DataStoreIndexOutput

func (DataStoreIndexOutput) ToDataStoreIndexPtrOutput added in v4.11.1

func (o DataStoreIndexOutput) ToDataStoreIndexPtrOutput() DataStoreIndexPtrOutput

func (DataStoreIndexOutput) ToDataStoreIndexPtrOutputWithContext added in v4.11.1

func (o DataStoreIndexOutput) ToDataStoreIndexPtrOutputWithContext(ctx context.Context) DataStoreIndexPtrOutput

type DataStoreIndexProperty

type DataStoreIndexProperty struct {
	// The direction the index should optimize for sorting.
	// Possible values are `ASCENDING` and `DESCENDING`.
	Direction string `pulumi:"direction"`
	// The property name to index.
	Name string `pulumi:"name"`
}

type DataStoreIndexPropertyArgs

type DataStoreIndexPropertyArgs struct {
	// The direction the index should optimize for sorting.
	// Possible values are `ASCENDING` and `DESCENDING`.
	Direction pulumi.StringInput `pulumi:"direction"`
	// The property name to index.
	Name pulumi.StringInput `pulumi:"name"`
}

func (DataStoreIndexPropertyArgs) ElementType

func (DataStoreIndexPropertyArgs) ElementType() reflect.Type

func (DataStoreIndexPropertyArgs) ToDataStoreIndexPropertyOutput

func (i DataStoreIndexPropertyArgs) ToDataStoreIndexPropertyOutput() DataStoreIndexPropertyOutput

func (DataStoreIndexPropertyArgs) ToDataStoreIndexPropertyOutputWithContext

func (i DataStoreIndexPropertyArgs) ToDataStoreIndexPropertyOutputWithContext(ctx context.Context) DataStoreIndexPropertyOutput

type DataStoreIndexPropertyArray

type DataStoreIndexPropertyArray []DataStoreIndexPropertyInput

func (DataStoreIndexPropertyArray) ElementType

func (DataStoreIndexPropertyArray) ToDataStoreIndexPropertyArrayOutput

func (i DataStoreIndexPropertyArray) ToDataStoreIndexPropertyArrayOutput() DataStoreIndexPropertyArrayOutput

func (DataStoreIndexPropertyArray) ToDataStoreIndexPropertyArrayOutputWithContext

func (i DataStoreIndexPropertyArray) ToDataStoreIndexPropertyArrayOutputWithContext(ctx context.Context) DataStoreIndexPropertyArrayOutput

type DataStoreIndexPropertyArrayInput

type DataStoreIndexPropertyArrayInput interface {
	pulumi.Input

	ToDataStoreIndexPropertyArrayOutput() DataStoreIndexPropertyArrayOutput
	ToDataStoreIndexPropertyArrayOutputWithContext(context.Context) DataStoreIndexPropertyArrayOutput
}

DataStoreIndexPropertyArrayInput is an input type that accepts DataStoreIndexPropertyArray and DataStoreIndexPropertyArrayOutput values. You can construct a concrete instance of `DataStoreIndexPropertyArrayInput` via:

DataStoreIndexPropertyArray{ DataStoreIndexPropertyArgs{...} }

type DataStoreIndexPropertyArrayOutput

type DataStoreIndexPropertyArrayOutput struct{ *pulumi.OutputState }

func (DataStoreIndexPropertyArrayOutput) ElementType

func (DataStoreIndexPropertyArrayOutput) Index

func (DataStoreIndexPropertyArrayOutput) ToDataStoreIndexPropertyArrayOutput

func (o DataStoreIndexPropertyArrayOutput) ToDataStoreIndexPropertyArrayOutput() DataStoreIndexPropertyArrayOutput

func (DataStoreIndexPropertyArrayOutput) ToDataStoreIndexPropertyArrayOutputWithContext

func (o DataStoreIndexPropertyArrayOutput) ToDataStoreIndexPropertyArrayOutputWithContext(ctx context.Context) DataStoreIndexPropertyArrayOutput

type DataStoreIndexPropertyInput

type DataStoreIndexPropertyInput interface {
	pulumi.Input

	ToDataStoreIndexPropertyOutput() DataStoreIndexPropertyOutput
	ToDataStoreIndexPropertyOutputWithContext(context.Context) DataStoreIndexPropertyOutput
}

DataStoreIndexPropertyInput is an input type that accepts DataStoreIndexPropertyArgs and DataStoreIndexPropertyOutput values. You can construct a concrete instance of `DataStoreIndexPropertyInput` via:

DataStoreIndexPropertyArgs{...}

type DataStoreIndexPropertyOutput

type DataStoreIndexPropertyOutput struct{ *pulumi.OutputState }

func (DataStoreIndexPropertyOutput) Direction

The direction the index should optimize for sorting. Possible values are `ASCENDING` and `DESCENDING`.

func (DataStoreIndexPropertyOutput) ElementType

func (DataStoreIndexPropertyOutput) Name

The property name to index.

func (DataStoreIndexPropertyOutput) ToDataStoreIndexPropertyOutput

func (o DataStoreIndexPropertyOutput) ToDataStoreIndexPropertyOutput() DataStoreIndexPropertyOutput

func (DataStoreIndexPropertyOutput) ToDataStoreIndexPropertyOutputWithContext

func (o DataStoreIndexPropertyOutput) ToDataStoreIndexPropertyOutputWithContext(ctx context.Context) DataStoreIndexPropertyOutput

type DataStoreIndexPtrInput added in v4.11.1

type DataStoreIndexPtrInput interface {
	pulumi.Input

	ToDataStoreIndexPtrOutput() DataStoreIndexPtrOutput
	ToDataStoreIndexPtrOutputWithContext(ctx context.Context) DataStoreIndexPtrOutput
}

type DataStoreIndexPtrOutput added in v4.11.1

type DataStoreIndexPtrOutput struct {
	*pulumi.OutputState
}

func (DataStoreIndexPtrOutput) ElementType added in v4.11.1

func (DataStoreIndexPtrOutput) ElementType() reflect.Type

func (DataStoreIndexPtrOutput) ToDataStoreIndexPtrOutput added in v4.11.1

func (o DataStoreIndexPtrOutput) ToDataStoreIndexPtrOutput() DataStoreIndexPtrOutput

func (DataStoreIndexPtrOutput) ToDataStoreIndexPtrOutputWithContext added in v4.11.1

func (o DataStoreIndexPtrOutput) ToDataStoreIndexPtrOutputWithContext(ctx context.Context) DataStoreIndexPtrOutput

type DataStoreIndexState

type DataStoreIndexState struct {
	// Policy for including ancestors in the index.
	// Default value is `NONE`.
	// Possible values are `NONE` and `ALL_ANCESTORS`.
	Ancestor pulumi.StringPtrInput
	// The index id.
	IndexId pulumi.StringPtrInput
	// The entity kind which the index applies to.
	Kind pulumi.StringPtrInput
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringPtrInput
	// An ordered list of properties to index on.
	// Structure is documented below.
	Properties DataStoreIndexPropertyArrayInput
}

func (DataStoreIndexState) ElementType

func (DataStoreIndexState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL