pinecone.Collection
The pinecone.Collection resource lets you create and manage collections in Pinecone. Learn more about collections in the docs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as pinecone from "@pulumi/pinecone";
const test = new pinecone.Index("test", {
name: "tftestindex",
dimension: 10,
spec: {
pod: {
environment: "us-west4-gcp",
podType: "s1.x1",
},
},
});
const testCollection = new pinecone.Collection("test", {
name: "tftestcollection",
source: test.name,
});
import pulumi
import pulumi_pinecone as pinecone
test = pinecone.Index("test",
name="tftestindex",
dimension=10,
spec={
"pod": {
"environment": "us-west4-gcp",
"pod_type": "s1.x1",
},
})
test_collection = pinecone.Collection("test",
name="tftestcollection",
source=test.name)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/pinecone/v2/pinecone"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := pinecone.NewIndex(ctx, "test", &pinecone.IndexArgs{
Name: pulumi.String("tftestindex"),
Dimension: pulumi.Float64(10),
Spec: &pinecone.IndexSpecArgs{
Pod: &pinecone.IndexSpecPodArgs{
Environment: pulumi.String("us-west4-gcp"),
PodType: pulumi.String("s1.x1"),
},
},
})
if err != nil {
return err
}
_, err = pinecone.NewCollection(ctx, "test", &pinecone.CollectionArgs{
Name: pulumi.String("tftestcollection"),
Source: test.Name,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pinecone = Pulumi.Pinecone;
return await Deployment.RunAsync(() =>
{
var test = new Pinecone.Index("test", new()
{
Name = "tftestindex",
Dimension = 10,
Spec = new Pinecone.Inputs.IndexSpecArgs
{
Pod = new Pinecone.Inputs.IndexSpecPodArgs
{
Environment = "us-west4-gcp",
PodType = "s1.x1",
},
},
});
var testCollection = new Pinecone.Collection("test", new()
{
Name = "tftestcollection",
Source = test.Name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pinecone.Index;
import com.pulumi.pinecone.IndexArgs;
import com.pulumi.pinecone.inputs.IndexSpecArgs;
import com.pulumi.pinecone.inputs.IndexSpecPodArgs;
import com.pulumi.pinecone.Collection;
import com.pulumi.pinecone.CollectionArgs;
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 test = new Index("test", IndexArgs.builder()
.name("tftestindex")
.dimension(10.0)
.spec(IndexSpecArgs.builder()
.pod(IndexSpecPodArgs.builder()
.environment("us-west4-gcp")
.podType("s1.x1")
.build())
.build())
.build());
var testCollection = new Collection("testCollection", CollectionArgs.builder()
.name("tftestcollection")
.source(test.name())
.build());
}
}
resources:
test:
type: pinecone:Index
properties:
name: tftestindex
dimension: 10
spec:
pod:
environment: us-west4-gcp
podType: s1.x1
testCollection:
type: pinecone:Collection
name: test
properties:
name: tftestcollection
source: ${test.name}
Create Collection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Collection(name: string, args: CollectionArgs, opts?: CustomResourceOptions);@overload
def Collection(resource_name: str,
args: CollectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Collection(resource_name: str,
opts: Optional[ResourceOptions] = None,
source: Optional[str] = None,
dimension: Optional[int] = None,
name: Optional[str] = None,
size: Optional[int] = None,
timeouts: Optional[CollectionTimeoutsArgs] = None,
vector_count: Optional[int] = None)func NewCollection(ctx *Context, name string, args CollectionArgs, opts ...ResourceOption) (*Collection, error)public Collection(string name, CollectionArgs args, CustomResourceOptions? opts = null)
public Collection(String name, CollectionArgs args)
public Collection(String name, CollectionArgs args, CustomResourceOptions options)
type: pinecone:Collection
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 CollectionArgs
- 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 CollectionArgs
- 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 CollectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CollectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CollectionArgs
- 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 collectionResource = new Pinecone.Collection("collectionResource", new()
{
Source = "string",
Dimension = 0,
Name = "string",
Size = 0,
Timeouts = new Pinecone.Inputs.CollectionTimeoutsArgs
{
Create = "string",
Delete = "string",
},
VectorCount = 0,
});
example, err := pinecone.NewCollection(ctx, "collectionResource", &pinecone.CollectionArgs{
Source: pulumi.String("string"),
Dimension: pulumi.Int(0),
Name: pulumi.String("string"),
Size: pulumi.Int(0),
Timeouts: &pinecone.CollectionTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
VectorCount: pulumi.Int(0),
})
var collectionResource = new Collection("collectionResource", CollectionArgs.builder()
.source("string")
.dimension(0)
.name("string")
.size(0)
.timeouts(CollectionTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.vectorCount(0)
.build());
collection_resource = pinecone.Collection("collectionResource",
source="string",
dimension=0,
name="string",
size=0,
timeouts={
"create": "string",
"delete": "string",
},
vector_count=0)
const collectionResource = new pinecone.Collection("collectionResource", {
source: "string",
dimension: 0,
name: "string",
size: 0,
timeouts: {
create: "string",
"delete": "string",
},
vectorCount: 0,
});
type: pinecone:Collection
properties:
dimension: 0
name: string
size: 0
source: string
timeouts:
create: string
delete: string
vectorCount: 0
Collection 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 Collection resource accepts the following input properties:
- Source string
- The name of the source index to be used as the source for the collection.
- Dimension int
- The dimension of the vectors stored in each record held in the collection.
- Name string
- The name of the collection.
- Size int
- The size of the collection in bytes.
- Timeouts
Pinecone
Database. Pinecone. Inputs. Collection Timeouts - Vector
Count int - The number of records stored in the collection.
- Source string
- The name of the source index to be used as the source for the collection.
- Dimension int
- The dimension of the vectors stored in each record held in the collection.
- Name string
- The name of the collection.
- Size int
- The size of the collection in bytes.
- Timeouts
Collection
Timeouts Args - Vector
Count int - The number of records stored in the collection.
- source String
- The name of the source index to be used as the source for the collection.
- dimension Integer
- The dimension of the vectors stored in each record held in the collection.
- name String
- The name of the collection.
- size Integer
- The size of the collection in bytes.
- timeouts
Collection
Timeouts - vector
Count Integer - The number of records stored in the collection.
- source string
- The name of the source index to be used as the source for the collection.
- dimension number
- The dimension of the vectors stored in each record held in the collection.
- name string
- The name of the collection.
- size number
- The size of the collection in bytes.
- timeouts
Collection
Timeouts - vector
Count number - The number of records stored in the collection.
- source str
- The name of the source index to be used as the source for the collection.
- dimension int
- The dimension of the vectors stored in each record held in the collection.
- name str
- The name of the collection.
- size int
- The size of the collection in bytes.
- timeouts
Collection
Timeouts Args - vector_
count int - The number of records stored in the collection.
- source String
- The name of the source index to be used as the source for the collection.
- dimension Number
- The dimension of the vectors stored in each record held in the collection.
- name String
- The name of the collection.
- size Number
- The size of the collection in bytes.
- timeouts Property Map
- vector
Count Number - The number of records stored in the collection.
Outputs
All input properties are implicitly available as output properties. Additionally, the Collection resource produces the following output properties:
- Environment string
- The environment where the collection is hosted.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the collection.
- Environment string
- The environment where the collection is hosted.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the collection.
- environment String
- The environment where the collection is hosted.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the collection.
- environment string
- The environment where the collection is hosted.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of the collection.
- environment str
- The environment where the collection is hosted.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of the collection.
- environment String
- The environment where the collection is hosted.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the collection.
Look up Existing Collection Resource
Get an existing Collection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CollectionState, opts?: CustomResourceOptions): Collection@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dimension: Optional[int] = None,
environment: Optional[str] = None,
name: Optional[str] = None,
size: Optional[int] = None,
source: Optional[str] = None,
status: Optional[str] = None,
timeouts: Optional[CollectionTimeoutsArgs] = None,
vector_count: Optional[int] = None) -> Collectionfunc GetCollection(ctx *Context, name string, id IDInput, state *CollectionState, opts ...ResourceOption) (*Collection, error)public static Collection Get(string name, Input<string> id, CollectionState? state, CustomResourceOptions? opts = null)public static Collection get(String name, Output<String> id, CollectionState state, CustomResourceOptions options)resources: _: type: pinecone:Collection get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Dimension int
- The dimension of the vectors stored in each record held in the collection.
- Environment string
- The environment where the collection is hosted.
- Name string
- The name of the collection.
- Size int
- The size of the collection in bytes.
- Source string
- The name of the source index to be used as the source for the collection.
- Status string
- The status of the collection.
- Timeouts
Pinecone
Database. Pinecone. Inputs. Collection Timeouts - Vector
Count int - The number of records stored in the collection.
- Dimension int
- The dimension of the vectors stored in each record held in the collection.
- Environment string
- The environment where the collection is hosted.
- Name string
- The name of the collection.
- Size int
- The size of the collection in bytes.
- Source string
- The name of the source index to be used as the source for the collection.
- Status string
- The status of the collection.
- Timeouts
Collection
Timeouts Args - Vector
Count int - The number of records stored in the collection.
- dimension Integer
- The dimension of the vectors stored in each record held in the collection.
- environment String
- The environment where the collection is hosted.
- name String
- The name of the collection.
- size Integer
- The size of the collection in bytes.
- source String
- The name of the source index to be used as the source for the collection.
- status String
- The status of the collection.
- timeouts
Collection
Timeouts - vector
Count Integer - The number of records stored in the collection.
- dimension number
- The dimension of the vectors stored in each record held in the collection.
- environment string
- The environment where the collection is hosted.
- name string
- The name of the collection.
- size number
- The size of the collection in bytes.
- source string
- The name of the source index to be used as the source for the collection.
- status string
- The status of the collection.
- timeouts
Collection
Timeouts - vector
Count number - The number of records stored in the collection.
- dimension int
- The dimension of the vectors stored in each record held in the collection.
- environment str
- The environment where the collection is hosted.
- name str
- The name of the collection.
- size int
- The size of the collection in bytes.
- source str
- The name of the source index to be used as the source for the collection.
- status str
- The status of the collection.
- timeouts
Collection
Timeouts Args - vector_
count int - The number of records stored in the collection.
- dimension Number
- The dimension of the vectors stored in each record held in the collection.
- environment String
- The environment where the collection is hosted.
- name String
- The name of the collection.
- size Number
- The size of the collection in bytes.
- source String
- The name of the source index to be used as the source for the collection.
- status String
- The status of the collection.
- timeouts Property Map
- vector
Count Number - The number of records stored in the collection.
Supporting Types
CollectionTimeouts, CollectionTimeoutsArgs
- Create string
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- Timeout defaults to 5 mins. Accepts a string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Package Details
- Repository
- pinecone pinecone-io/pulumi-pinecone
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pineconeTerraform Provider.
