provider

package module
v0.0.0-...-4530520 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Name string = "runpod"
View Source
const URL = "https://api.runpod.io/graphql?api_key="

Variables

View Source
var Version = "v1.2.7"

Version is initialized by the Go linker to contain the semver of this build.

Functions

func Provider

func Provider() p.Provider

func Schema

func Schema(version string) (string, error)

Types

type Config

type Config struct {
	Token string `pulumi:"token"`
}

func (*Config) Annotate

func (c *Config) Annotate(a infer.Annotator)

func (*Config) Configure

func (c *Config) Configure(ctx p.Context) error

type CreateNetworkStorageOutput

type CreateNetworkStorageOutput struct {
	Errors []struct {
		Message string
	}
	Data struct {
		CreateNetworkVolume NetworkStorage
	}
}

type DataCenter

type DataCenter struct {
	Id             string `pulumi:"id"`
	Name           string `pulumi:"name"`
	Location       string `pulumi:"location"`
	StorageSupport bool   `pulumi:"storageSupport"`
}

type Endpoint

type Endpoint struct {
	Id              string `pulumi:"id"`
	Name            string `pulumi:"name"`
	GpuIds          string `pulumi:"gpuIds"`
	IdleTimeout     int    `pulumi:"idleTimeout"`
	Locations       string `pulumi:"locations"`
	NetworkVolumeId string `pulumi:"networkVolumeId"`
	ScalerType      string `pulumi:"scalerType"`
	ScalerValue     int    `pulumi:"scalerValue"`
	WorkersMax      int    `pulumi:"workersMax"`
	WorkersMin      int    `pulumi:"workersMin"`
	TemplateId      string `pulumi:"templateId"`
}

func (*Endpoint) Create

func (*Endpoint) Create(ctx p.Context, name string, input EndpointArgs, preview bool) (string, EndpointState, error)

func (*Endpoint) Delete

func (*Endpoint) Delete(ctx p.Context, id string, props EndpointState) error

func (*Endpoint) Diff

func (*Endpoint) Diff(ctx p.Context, id string, olds EndpointState, news EndpointArgs) (p.DiffResponse, error)

func (*Endpoint) Update

func (*Endpoint) Update(ctx p.Context, id string, olds EndpointState, news EndpointArgs, preview bool) (EndpointState, error)

type EndpointArgs

type EndpointArgs struct {
	Name            string  `pulumi:"name" structs:"name,omitempty"`
	TemplateId      *string `pulumi:"templateId,optional" structs:"templateId,omitempty"`
	GpuIds          string  `pulumi:"gpuIds" structs:"gpuIds"`
	IdleTimeout     int     `pulumi:"idleTimeout,optional" structs:"idleTimeout,omitempty"`
	Locations       string  `pulumi:"locations,optional" structs:"locations,omitempty"`
	NetworkVolumeId string  `pulumi:"networkVolumeId,optional" structs:"networkVolumeId,omitempty"`
	ScalerType      string  `pulumi:"scalerType,optional" structs:"scalerType,omitempty"`
	ScalerValue     int     `pulumi:"scalerValue,optional" structs:"scalerValue,omitempty"`
	WorkersMax      int     `pulumi:"workersMax,optional" structs:"workersMax"`
	WorkersMin      int     `pulumi:"workersMin,optional" structs:"workersMin"`
}

type EndpointState

type EndpointState struct {
	EndpointArgs
	Endpoint Endpoint `pulumi:"endpoint"`
}

type Gpu

type Gpu struct {
	Id    string `pulumi:"id"`
	PodId string `pulumi:"podId"`
}

type GqlInput

type GqlInput struct {
	Query     string                 `json:"query"`
	Variables map[string]interface{} `json:"variables"`
}

type NetworkStorage

type NetworkStorage struct {
	Id           string     `pulumi:"id"`
	Name         string     `pulumi:"name"`
	Size         int        `pulumi:"size"`
	DataCenterId string     `pulumi:"dataCenterId"`
	DataCenter   DataCenter `pulumi:"dataCenter"`
}

func (*NetworkStorage) Create

func (*NetworkStorage) Create(ctx p.Context, name string, input NetworkStorageArgs, preview bool) (string, NetworkStorageState, error)

func (*NetworkStorage) Delete

func (*NetworkStorage) Delete(ctx p.Context, id string, props NetworkStorageState) error

func (*NetworkStorage) Diff

func (*NetworkStorage) Update

type NetworkStorageArgs

type NetworkStorageArgs struct {
	Name         string `pulumi:"name" structs:"name"`
	Size         int    `pulumi:"size" structs:"size"`
	DataCenterId string `pulumi:"dataCenterId" structs:"dataCenterId"`
}

type NetworkStorageState

type NetworkStorageState struct {
	NetworkStorageArgs
	NetworkStorage NetworkStorage `pulumi:"networkStorage"`
}

type OutputDeployEndpoint

type OutputDeployEndpoint struct {
	Errors []struct {
		Message   string
		Locations []struct {
			Line   int
			Column int
		}
	}
	Data struct {
		SaveEndpoint Endpoint
	}
}

type OutputDeployPod

type OutputDeployPod struct {
	Errors []struct {
		Message string
	}
	Data struct {
		PodFindAndDeployOnDemand Pod
	}
}

type OutputDeployTemplate

type OutputDeployTemplate struct {
	Errors []struct {
		Message   string
		Locations []struct {
			Line   int
			Column int
		}
	}
	Data struct {
		SaveTemplate Template
	}
}

type OutputUpdatePod

type OutputUpdatePod struct {
	Errors []struct {
		Message string
	}
	Data struct {
		PodEditJob Pod
	}
}

type Pod

type Pod struct {
	AiApiId                 string      `pulumi:"aiApiId"`
	ApiKey                  string      `pulumi:"apiKey"`
	ConsumerUserId          string      `pulumi:"consumerUserId"`
	ContainerDiskInGb       int         `pulumi:"containerDiskInGb"`
	ContainerRegistryAuthId string      `pulumi:"containerRegistryAuthId"`
	CostMultiplier          float64     `pulumi:"costMultiplier"`
	CostPerHr               float64     `pulumi:"costPerHr"`
	CreatedAt               string      `pulumi:"createdAt"`
	AdjustedCostPerHr       float64     `pulumi:"adjustedCostPerHr"`
	DesiredStatus           string      `pulumi:"desiredStatus"`
	DockerArgs              string      `pulumi:"dockerArgs"`
	DockerId                string      `pulumi:"dockerId"`
	Env                     []string    `pulumi:"env,optional"`
	GpuCount                int         `pulumi:"gpuCount"`
	GpuPowerLimitPercent    int         `pulumi:"gpuPowerLimitPercent"`
	Gpus                    []Gpu       `pulumi:"gpus,optional"`
	Id                      string      `pulumi:"id"`
	ImageName               string      `pulumi:"imageName"`
	LastStatusChange        string      `pulumi:"lastStatusChange"`
	Locked                  bool        `pulumi:"locked"`
	MachineId               string      `pulumi:"machineId"`
	MemoryInGb              float64     `pulumi:"memoryInGb"`
	Name                    string      `pulumi:"name"`
	PodType                 string      `pulumi:"podType"`
	Port                    int         `pulumi:"port"`
	Ports                   string      `pulumi:"ports"`
	Registry                PodRegistry `pulumi:"registry"`
	TemplateId              string      `pulumi:"templateId"`
	UptimeSeconds           int         `pulumi:"uptimeSeconds"`
	VcpuCount               float64     `pulumi:"vcpuCount"`
	Version                 int         `pulumi:"version"`
	VolumeEncrypted         bool        `pulumi:"volumeEncrypted"`
	VolumeInGb              float64     `pulumi:"volumeInGb"`
	VolumeKey               string      `pulumi:"volumeKey"`
	VolumeMountPath         string      `pulumi:"volumeMountPath"`
	LastStartedAt           string      `pulumi:"lastStartedAt"`
}

func (*Pod) Create

func (*Pod) Create(ctx p.Context, name string, input PodArgs, preview bool) (string, PodState, error)

func (*Pod) Delete

func (*Pod) Delete(ctx p.Context, id string, props PodState) error

func (*Pod) Diff

func (*Pod) Diff(ctx p.Context, id string, olds PodState, news PodArgs) (p.DiffResponse, error)

func (*Pod) Update

func (*Pod) Update(ctx p.Context, id string, olds PodState, news PodArgs, preview bool) (PodState, error)

type PodArgs

type PodArgs struct {
	AiApiId           string       `pulumi:"aiApiId,optional" structs:"aiApiId,omitempty"`
	CloudType         PodCloudType `pulumi:"cloudType,optional" structs:"cloudType,omitempty"`
	ContainerDiskInGb int          `pulumi:"containerDiskInGb,optional" structs:"containerDiskInGb,omitempty"`
	// ContainerRegistryAuthId string       `pulumi:"containerRegistryAuthId" structs:"containerRegistryAuthId"`
	CountryCode     string            `pulumi:"countryCode,optional" structs:"countryCode,omitempty"`
	CudaVersion     string            `pulumi:"cudaVersion,optional" structs:"cudaVersion,omitempty"`
	DataCenterId    string            `pulumi:"dataCenterId,optional" structs:"dataCenterId,omitempty"`
	DeployCost      float64           `pulumi:"deployCost,optional" structs:"deployCost,omitempty"`
	DockerArgs      string            `pulumi:"dockerArgs,optional" structs:"dockerArgs,omitempty"`
	Env             []PodEnv          `pulumi:"env,optional" structs:"env,omitempty"`
	GpuCount        int               `pulumi:"gpuCount" structs:"gpuCount,omitempty"`
	GpuTypeId       string            `pulumi:"gpuTypeId" structs:"gpuTypeId,omitempty"`
	GpuTypeIdList   []string          `pulumi:"gpuTypeIdList,optional" structs:"gpuTypeIdList,omitempty"`
	ImageName       string            `pulumi:"imageName" structs:"imageName,omitempty"`
	MinDisk         int               `pulumi:"minDisk,optional" structs:"minDisk,omitempty"`
	MinDownload     int               `pulumi:"minDownload,optional" structs:"minDownload,omitempty"`
	MinMemoryInGb   int               `pulumi:"minMemoryInGb,optional" structs:"minMemoryInGb,omitempty"`
	MinVcpuCount    int               `pulumi:"minVcpuCount,optional" structs:"minVcpuCount,omitempty"`
	MinUpload       int               `pulumi:"minUpload,optional" structs:"minUpload,omitempty"`
	Name            string            `pulumi:"name,optional" structs:"name,omitempty"`
	NetworkVolumeId string            `pulumi:"networkVolumeId,optional" structs:"networkVolumeId,omitempty"`
	Port            int               `pulumi:"port,optional" structs:"port,omitempty"`
	Ports           string            `pulumi:"ports,optional" structs:"ports,omitempty"`
	SavingsPlan     *SavingsPlanInput `pulumi:"savingsPlan,optional" structs:"savingsPlan,omitempty"`
	StartJupyter    bool              `pulumi:"startJupyter,optional" structs:"startJupyter,omitempty"`
	StartSsh        bool              `pulumi:"startSsh,optional" structs:"startSsh,omitempty"`
	StopAfter       string            `pulumi:"stopAfter,optional" structs:"stopAfter,omitempty"`
	SupportPublicIp bool              `pulumi:"supportPublicIp,optional" structs:"supportPublicIp,omitempty"`
	TemplateId      string            `pulumi:"templateId,optional" structs:"templateId,omitempty"`
	TerminateAfter  string            `pulumi:"terminateAfter,optional" structs:"terminateAfter,omitempty"`
	VolumeInGb      int               `pulumi:"volumeInGb,optional" structs:"volumeInGb,omitempty"`
	VolumeKey       string            `pulumi:"volumeKey,optional" structs:"volumeKey,omitempty"`
	VolumeMountPath string            `pulumi:"volumeMountPath,optional" structs:"volumeMountPath,omitempty"`
}

type PodCloudType

type PodCloudType string
const (
	ALL       PodCloudType = "ALL"
	SECURE    PodCloudType = "SECURE"
	COMMUNITY PodCloudType = "COMMUNITY"
)

type PodEnv

type PodEnv struct {
	Key   string `pulumi:"key" structs:"key"`
	Value string `pulumi:"value" structs:"value"`
}

type PodRegistry

type PodRegistry struct {
	Auth     string `pulumi:"auth"`
	Pass     string `pulumi:"pass"`
	Url      string `pulumi:"url"`
	User     string `pulumi:"user"`
	Username string `pulumi:"username"`
}

type PodState

type PodState struct {
	PodArgs
	Pod Pod `pulumi:"pod"`
}

type SavingsPlanInput

type SavingsPlanInput struct {
	PlanLength  string  `pulumi:"planLength" structs:"planLength"`
	UpfrontCost float64 `pulumi:"upfrontCost" structs:"upfrontCost"`
}

type Template

type Template struct {
	AdvancedStart           bool     `pulumi:"advancedStart"`
	ContainerDiskInGb       int      `pulumi:"containerDiskInGb"`
	ContainerRegistryAuthId string   `pulumi:"containerRegistryAuthId"`
	DockerArgs              string   `pulumi:"dockerArgs"`
	Earned                  float64  `pulumi:"earned"`
	Env                     []PodEnv `pulumi:"env,optional"`
	Id                      string   `pulumi:"id"`
	ImageName               string   `pulumi:"imageName"`
	IsPublic                bool     `pulumi:"isPublic"`
	IsRunpod                bool     `pulumi:"isRunpod"`
	IsServerless            bool     `pulumi:"isServerless"`
	BoundEndpointId         string   `pulumi:"boundEndpointId"`
	Name                    string   `pulumi:"name"`
	Ports                   string   `pulumi:"ports"`
	Readme                  string   `pulumi:"readme"`
	RuntimeInMin            int      `pulumi:"runtimeInMin"`
	StartJupyter            bool     `pulumi:"startJupyter"`
	StartScript             string   `pulumi:"startScript"`
	StartSsh                bool     `pulumi:"startSsh"`
	VolumeInGb              int      `pulumi:"volumeInGb"`
	VolumeMountPath         string   `pulumi:"volumeMountPath"`
	// Config                  interface{} `pulumi:"config"`
	Category string `pulumi:"category"`
}

func (*Template) Create

func (*Template) Create(ctx p.Context, name string, input TemplateArgs, preview bool) (string, TemplateState, error)

func (*Template) Delete

func (*Template) Delete(ctx p.Context, id string, props TemplateState) error

func (*Template) Diff

func (*Template) Diff(ctx p.Context, id string, olds TemplateState, news TemplateArgs) (p.DiffResponse, error)

func (*Template) Update

func (*Template) Update(ctx p.Context, id string, olds TemplateState, news TemplateArgs, preview bool) (TemplateState, error)

type TemplateArgs

type TemplateArgs struct {
	ContainerDiskInGb       int      `pulumi:"containerDiskInGb" structs:"containerDiskInGb,omitempty"`
	ContainerRegistryAuthId string   `pulumi:"containerRegistryAuthId,optional" structs:"containerRegistryAuthId,omitempty"`
	DockerArgs              string   `pulumi:"dockerArgs" structs:"dockerArgs,omitempty"`
	Env                     []PodEnv `pulumi:"env" structs:"env,omitempty"`
	ImageName               string   `pulumi:"imageName" structs:"imageName,omitempty"`
	IsPublic                bool     `pulumi:"isPublic,optional" structs:"isPublic,omitempty"`
	IsServerless            bool     `pulumi:"isServerless,optional" structs:"isServerless,omitempty"`
	Name                    string   `pulumi:"name" structs:"name,omitempty"`
	Ports                   string   `pulumi:"ports,optional" structs:"ports,omitempty"`
	Readme                  string   `pulumi:"readme,optional" structs:"readme,omitempty"`
	StartJupyter            bool     `pulumi:"startJupyter,optional" structs:"startJupyter,omitempty"`
	StartSsh                bool     `pulumi:"startSsh,optional" structs:"startSsh,omitempty"`
	VolumeInGb              int      `pulumi:"volumeInGb" structs:"volumeInGb"`
	VolumeMountPath         string   `pulumi:"volumeMountPath,optional" structs:"volumeMountPath,omitempty"`
}

type TemplateState

type TemplateState struct {
	TemplateArgs
	Template Template `pulumi:"template"`
}

type UpdateNetworkStorageOutput

type UpdateNetworkStorageOutput struct {
	Errors []struct {
		Message string
	}
	Data struct {
		UpdateNetworkVolume NetworkStorage
	}
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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