1. Packages
  2. Pinecone
  3. API Docs
  4. PineconeIndex
Pinecone v0.4.3 published on Thursday, May 9, 2024 by pinecone-io

pinecone.PineconeIndex

Explore with Pulumi AI

Create PineconeIndex Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PineconeIndex(name: string, args: PineconeIndexArgs, opts?: CustomResourceOptions);
@overload
def PineconeIndex(resource_name: str,
                  args: PineconeIndexArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def PineconeIndex(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  metric: Optional[IndexMetric] = None,
                  name: Optional[str] = None,
                  spec: Optional[PineconeSpecArgs] = None,
                  dimension: Optional[int] = None)
func NewPineconeIndex(ctx *Context, name string, args PineconeIndexArgs, opts ...ResourceOption) (*PineconeIndex, error)
public PineconeIndex(string name, PineconeIndexArgs args, CustomResourceOptions? opts = null)
public PineconeIndex(String name, PineconeIndexArgs args)
public PineconeIndex(String name, PineconeIndexArgs args, CustomResourceOptions options)
type: pinecone:PineconeIndex
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PineconeIndexArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PineconeIndexArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PineconeIndexArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PineconeIndexArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PineconeIndexArgs
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 pineconeIndexResource = new Pinecone.PineconeIndex("pineconeIndexResource", new()
{
    Metric = Pinecone.IndexMetric.Dotproduct,
    Name = "string",
    Spec = new Pinecone.Inputs.PineconeSpecArgs
    {
        Pod = new Pinecone.Inputs.PineconePodSpecArgs
        {
            Environment = "string",
            PodType = "string",
            Replicas = 0,
            MetaDataConfig = new Pinecone.Inputs.MetaDataConfigArgs
            {
                Indexed = new[]
                {
                    "string",
                },
            },
            Pods = 0,
            Shards = 0,
            SourceCollection = "string",
        },
        Serverless = new Pinecone.Inputs.PineconeServerlessSpecArgs
        {
            Cloud = Pinecone.ServerlessSpecCloud.Aws,
            Region = "string",
        },
    },
    Dimension = 0,
});
Copy
example, err := pinecone.NewPineconeIndex(ctx, "pineconeIndexResource", &pinecone.PineconeIndexArgs{
	Metric: pinecone.IndexMetricDotproduct,
	Name:   pulumi.String("string"),
	Spec: &pinecone.PineconeSpecArgs{
		Pod: &pinecone.PineconePodSpecArgs{
			Environment: pulumi.String("string"),
			PodType:     pulumi.String("string"),
			Replicas:    pulumi.Int(0),
			MetaDataConfig: &pinecone.MetaDataConfigArgs{
				Indexed: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			Pods:             pulumi.Int(0),
			Shards:           pulumi.Int(0),
			SourceCollection: pulumi.String("string"),
		},
		Serverless: &pinecone.PineconeServerlessSpecArgs{
			Cloud:  pinecone.ServerlessSpecCloudAws,
			Region: pulumi.String("string"),
		},
	},
	Dimension: pulumi.Int(0),
})
Copy
var pineconeIndexResource = new PineconeIndex("pineconeIndexResource", PineconeIndexArgs.builder()
    .metric("dotproduct")
    .name("string")
    .spec(PineconeSpecArgs.builder()
        .pod(PineconePodSpecArgs.builder()
            .environment("string")
            .podType("string")
            .replicas(0)
            .metaDataConfig(MetaDataConfigArgs.builder()
                .indexed("string")
                .build())
            .pods(0)
            .shards(0)
            .sourceCollection("string")
            .build())
        .serverless(PineconeServerlessSpecArgs.builder()
            .cloud("aws")
            .region("string")
            .build())
        .build())
    .dimension(0)
    .build());
Copy
pinecone_index_resource = pinecone.PineconeIndex("pineconeIndexResource",
    metric=pinecone.IndexMetric.DOTPRODUCT,
    name="string",
    spec={
        "pod": {
            "environment": "string",
            "pod_type": "string",
            "replicas": 0,
            "meta_data_config": {
                "indexed": ["string"],
            },
            "pods": 0,
            "shards": 0,
            "source_collection": "string",
        },
        "serverless": {
            "cloud": pinecone.ServerlessSpecCloud.AWS,
            "region": "string",
        },
    },
    dimension=0)
Copy
const pineconeIndexResource = new pinecone.PineconeIndex("pineconeIndexResource", {
    metric: pinecone.IndexMetric.Dotproduct,
    name: "string",
    spec: {
        pod: {
            environment: "string",
            podType: "string",
            replicas: 0,
            metaDataConfig: {
                indexed: ["string"],
            },
            pods: 0,
            shards: 0,
            sourceCollection: "string",
        },
        serverless: {
            cloud: pinecone.ServerlessSpecCloud.Aws,
            region: "string",
        },
    },
    dimension: 0,
});
Copy
type: pinecone:PineconeIndex
properties:
    dimension: 0
    metric: dotproduct
    name: string
    spec:
        pod:
            environment: string
            metaDataConfig:
                indexed:
                    - string
            podType: string
            pods: 0
            replicas: 0
            shards: 0
            sourceCollection: string
        serverless:
            cloud: aws
            region: string
Copy

PineconeIndex 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 PineconeIndex resource accepts the following input properties:

Metric This property is required. PineconeDatabase.Pinecone.IndexMetric
The metric used to compute the distance between vectors.
Name This property is required. string
The name of the Pinecone index.
Spec This property is required. PineconeDatabase.Pinecone.Inputs.PineconeSpec
Describe how the index should be deployed.
Dimension int
The dimensions of the vectors in the index. Defaults to 1536.
Metric This property is required. IndexMetric
The metric used to compute the distance between vectors.
Name This property is required. string
The name of the Pinecone index.
Spec This property is required. PineconeSpecArgs
Describe how the index should be deployed.
Dimension int
The dimensions of the vectors in the index. Defaults to 1536.
metric This property is required. IndexMetric
The metric used to compute the distance between vectors.
name This property is required. String
The name of the Pinecone index.
spec This property is required. PineconeSpec
Describe how the index should be deployed.
dimension Integer
The dimensions of the vectors in the index. Defaults to 1536.
metric This property is required. IndexMetric
The metric used to compute the distance between vectors.
name This property is required. string
The name of the Pinecone index.
spec This property is required. PineconeSpec
Describe how the index should be deployed.
dimension number
The dimensions of the vectors in the index. Defaults to 1536.
metric This property is required. IndexMetric
The metric used to compute the distance between vectors.
name This property is required. str
The name of the Pinecone index.
spec This property is required. PineconeSpecArgs
Describe how the index should be deployed.
dimension int
The dimensions of the vectors in the index. Defaults to 1536.
metric This property is required. "dotproduct" | "cosine" | "euclidean"
The metric used to compute the distance between vectors.
name This property is required. String
The name of the Pinecone index.
spec This property is required. Property Map
Describe how the index should be deployed.
dimension Number
The dimensions of the vectors in the index. Defaults to 1536.

Outputs

All input properties are implicitly available as output properties. Additionally, the PineconeIndex resource produces the following output properties:

Host string
The URL address where the index is hosted.
Id string
The provider-assigned unique ID for this managed resource.
Host string
The URL address where the index is hosted.
Id string
The provider-assigned unique ID for this managed resource.
host String
The URL address where the index is hosted.
id String
The provider-assigned unique ID for this managed resource.
host string
The URL address where the index is hosted.
id string
The provider-assigned unique ID for this managed resource.
host str
The URL address where the index is hosted.
id str
The provider-assigned unique ID for this managed resource.
host String
The URL address where the index is hosted.
id String
The provider-assigned unique ID for this managed resource.

Supporting Types

IndexMetric
, IndexMetricArgs

Dotproduct
dotproduct
Cosine
cosine
Euclidean
euclidean
IndexMetricDotproduct
dotproduct
IndexMetricCosine
cosine
IndexMetricEuclidean
euclidean
Dotproduct
dotproduct
Cosine
cosine
Euclidean
euclidean
Dotproduct
dotproduct
Cosine
cosine
Euclidean
euclidean
DOTPRODUCT
dotproduct
COSINE
cosine
EUCLIDEAN
euclidean
"dotproduct"
dotproduct
"cosine"
cosine
"euclidean"
euclidean

MetaDataConfig
, MetaDataConfigArgs

Indexed List<string>
Indexed By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields which should be indexed.
Indexed []string
Indexed By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields which should be indexed.
indexed List<String>
Indexed By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields which should be indexed.
indexed string[]
Indexed By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields which should be indexed.
indexed Sequence[str]
Indexed By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields which should be indexed.
indexed List<String>
Indexed By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields which should be indexed.

PineconePodSpec
, PineconePodSpecArgs

Environment This property is required. string
The environment where the index is hosted.
PodType This property is required. string
The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8.
Replicas This property is required. int
The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
MetaDataConfig PineconeDatabase.Pinecone.Inputs.MetaDataConfig
Configuration for the behavior of Pinecone's internal metadata index.
Pods int
The number of pods to be used in the index. This should be equal to shards x replicas.
Shards int
The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
SourceCollection string
The name of the collection to be used as the source for the index.
Environment This property is required. string
The environment where the index is hosted.
PodType This property is required. string
The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8.
Replicas This property is required. int
The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
MetaDataConfig MetaDataConfig
Configuration for the behavior of Pinecone's internal metadata index.
Pods int
The number of pods to be used in the index. This should be equal to shards x replicas.
Shards int
The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
SourceCollection string
The name of the collection to be used as the source for the index.
environment This property is required. String
The environment where the index is hosted.
podType This property is required. String
The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8.
replicas This property is required. Integer
The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
metaDataConfig MetaDataConfig
Configuration for the behavior of Pinecone's internal metadata index.
pods Integer
The number of pods to be used in the index. This should be equal to shards x replicas.
shards Integer
The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
sourceCollection String
The name of the collection to be used as the source for the index.
environment This property is required. string
The environment where the index is hosted.
podType This property is required. string
The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8.
replicas This property is required. number
The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
metaDataConfig MetaDataConfig
Configuration for the behavior of Pinecone's internal metadata index.
pods number
The number of pods to be used in the index. This should be equal to shards x replicas.
shards number
The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
sourceCollection string
The name of the collection to be used as the source for the index.
environment This property is required. str
The environment where the index is hosted.
pod_type This property is required. str
The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8.
replicas This property is required. int
The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
meta_data_config MetaDataConfig
Configuration for the behavior of Pinecone's internal metadata index.
pods int
The number of pods to be used in the index. This should be equal to shards x replicas.
shards int
The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
source_collection str
The name of the collection to be used as the source for the index.
environment This property is required. String
The environment where the index is hosted.
podType This property is required. String
The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8.
replicas This property is required. Number
The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
metaDataConfig Property Map
Configuration for the behavior of Pinecone's internal metadata index.
pods Number
The number of pods to be used in the index. This should be equal to shards x replicas.
shards Number
The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
sourceCollection String
The name of the collection to be used as the source for the index.

PineconeServerlessSpec
, PineconeServerlessSpecArgs

Cloud This property is required. PineconeDatabase.Pinecone.ServerlessSpecCloud
The public cloud where you would like your index hosted.
Region This property is required. string
The region where you would like your index to be created. Different cloud providers have different regions available.
Cloud This property is required. ServerlessSpecCloud
The public cloud where you would like your index hosted.
Region This property is required. string
The region where you would like your index to be created. Different cloud providers have different regions available.
cloud This property is required. ServerlessSpecCloud
The public cloud where you would like your index hosted.
region This property is required. String
The region where you would like your index to be created. Different cloud providers have different regions available.
cloud This property is required. ServerlessSpecCloud
The public cloud where you would like your index hosted.
region This property is required. string
The region where you would like your index to be created. Different cloud providers have different regions available.
cloud This property is required. ServerlessSpecCloud
The public cloud where you would like your index hosted.
region This property is required. str
The region where you would like your index to be created. Different cloud providers have different regions available.
cloud This property is required. "aws" | "azure" | "gcp"
The public cloud where you would like your index hosted.
region This property is required. String
The region where you would like your index to be created. Different cloud providers have different regions available.

PineconeSpec
, PineconeSpecArgs

Pod PineconeDatabase.Pinecone.Inputs.PineconePodSpec
Configuration needed to deploy a pod index.
Serverless PineconeDatabase.Pinecone.Inputs.PineconeServerlessSpec
Configuration needed to deploy a serverless index.
Pod PineconePodSpec
Configuration needed to deploy a pod index.
Serverless PineconeServerlessSpec
Configuration needed to deploy a serverless index.
pod PineconePodSpec
Configuration needed to deploy a pod index.
serverless PineconeServerlessSpec
Configuration needed to deploy a serverless index.
pod PineconePodSpec
Configuration needed to deploy a pod index.
serverless PineconeServerlessSpec
Configuration needed to deploy a serverless index.
pod PineconePodSpec
Configuration needed to deploy a pod index.
serverless PineconeServerlessSpec
Configuration needed to deploy a serverless index.
pod Property Map
Configuration needed to deploy a pod index.
serverless Property Map
Configuration needed to deploy a serverless index.

ServerlessSpecCloud
, ServerlessSpecCloudArgs

Aws
aws
Azure
azure
Gcp
gcp
ServerlessSpecCloudAws
aws
ServerlessSpecCloudAzure
azure
ServerlessSpecCloudGcp
gcp
Aws
aws
Azure
azure
Gcp
gcp
Aws
aws
Azure
azure
Gcp
gcp
AWS
aws
AZURE
azure
GCP
gcp
"aws"
aws
"azure"
azure
"gcp"
gcp

Package Details

Repository
pinecone pinecone-io/pulumi-pinecone
License
Apache-2.0