ovh

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigSchema = map[string]*schema.Attribute{
	"application_key": {
		Type: schema.TypeString,
	},
	"application_secret": {
		Type: schema.TypeString,
	},
	"consumer_key": {
		Type: schema.TypeString,
	},
	"endpoint": {
		Type: schema.TypeString,
	},
}

Functions

func ConfigInstance

func ConfigInstance() interface{}

func GetConfig

func GetConfig(connection *plugin.Connection) ovhConfig

GetConfig :: retrieve and cast connection config from query data

func Plugin

func Plugin(ctx context.Context) *plugin.Plugin

Types

type AIApp added in v0.3.0

type AIApp struct {
	ID        string      `json:"id"`
	CreatedAt time.Time   `json:"createdAt"`
	Spec      AIAppSpec   `json:"spec"`
	Status    AIAppStatus `json:"status"`
}

type AIAppSpec added in v0.3.0

type AIAppSpec struct {
	Name   string `json:"name"`
	Image  string `json:"image"`
	Region string `json:"region"`
}

type AIAppStatus added in v0.3.0

type AIAppStatus struct {
	URL               string `json:"url"`
	State             string `json:"state"`
	AvailableReplicas int    `json:"availableReplicas"`
}

type AIJob added in v0.3.0

type AIJob struct {
	ID        string      `json:"id"`
	CreatedAt time.Time   `json:"createdAt"`
	Spec      AIJobSpec   `json:"spec"`
	Status    AIJobStatus `json:"status"`
}

type AIJobSpec added in v0.3.0

type AIJobSpec struct {
	Name   string `json:"name"`
	Image  string `json:"image"`
	Region string `json:"region"`
}

type AIJobStatus added in v0.3.0

type AIJobStatus struct {
	URL   string `json:"url"`
	State string `json:"state"`
}

type AINotebook added in v0.3.0

type AINotebook struct {
	ID        string           `json:"id"`
	CreatedAt time.Time        `json:"createdAt"`
	Spec      AINotebookSpec   `json:"spec"`
	Status    AINotebookStatus `json:"status"`
}

type AINotebookEnv added in v0.3.0

type AINotebookEnv struct {
	FrameworkID      string `json:"frameworkId"`
	FrameworkVersion string `json:"frameworkVersion"`
	EditorID         string `json:"editorId"`
}

type AINotebookSpec added in v0.3.0

type AINotebookSpec struct {
	Name   string        `json:"name"`
	Region string        `json:"region"`
	Env    AINotebookEnv `json:"env"`
}

type AINotebookStatus added in v0.3.0

type AINotebookStatus struct {
	URL   string `json:"url"`
	State string `json:"state"`
}

type Bill added in v0.4.0

type Bill struct {
	ID              string    `json:"billId"`
	Date            time.Time `json:"date"`
	Url             string    `json:"url"`
	PdfUrl          string    `json:"pdfUrl"`
	OrderId         int       `json:"orderId"`
	Category        string    `json:"category"`
	Password        string    `json:"password"`
	PriceWithTax    Price     `json:"priceWithTax"`
	PriceWithoutTax Price     `json:"priceWithoutTax"`
	Tax             Price     `json:"tax"`
}

type BillDetail added in v0.5.0

type BillDetail struct {
	ID          string `json:"id"`
	BillID      string `json:"bill_id"`
	Description string `json:"description"`
	Domain      string `json:"domain"`
	PeriodStart string `json:"periodStart"`
	PeriodEnd   string `json:"periodEnd"`
	Quantity    string `json:"quantity"`
	TotalPrice  Price  `json:"totalPrice"`
	UnitPrice   Price  `json:"unitPrice"`
}

type Component added in v0.8.0

type Component struct {
	Endpoint string `json:"endpoint"`
	Name     string `json:"name"`
	Status   string `json:"status"`
}

type Database added in v0.1.0

type Database struct {
	ID              string     `json:"id"`
	CreatedAt       *time.Time `json:"createdAt"`
	Plan            string     `json:"plan"`
	Engine          string     `json:"engine"`
	Status          string     `json:"status"`
	NodeNumber      int        `json:"nodeNumber"`
	Description     string     `json:"description"`
	Version         string     `json:"version"`
	NetworkType     string     `json:"networkType"`
	Flavor          string     `json:"flavor"`
	BackupTime      string     `json:"backupTime"`
	MaintenanceTime string     `json:"maintenanceTime"`
}

type Flavor

type Flavor struct {
	ID                string    `json:"id"`
	Name              string    `json:"name"`
	Region            string    `json:"region"`
	Ram               int       `json:"ram"`
	Disk              int       `json:"disk"`
	VCPUs             int       `json:"vcpus"`
	Type              string    `json:"type"`
	OSType            string    `json:"osType"`
	InboundBandwidth  int       `json:"inboundBandwidth"`
	OutboundBandwidth int       `json:"outboundBandwidth"`
	Available         bool      `json:"available"`
	Quota             int       `json:"quota"`
	PlanCodes         PlanCodes `json:"planCodes"`
}

type Image

type Image struct {
	ID           string    `json:"id"`
	Name         string    `json:"name"`
	Region       string    `json:"region"`
	Visibility   string    `json:"visibility"`
	Type         string    `json:"type"`
	MinDisk      int       `json:"minDisk"`
	MinRam       int       `json:"minRam"`
	Size         float32   `json:"size"`
	CreationDate time.Time `json:"creationDate"`
	Status       string    `json:"status"`
	User         string    `json:"user"`
	FlavorType   string    `json:"flavorType"`
	Tags         []string  `json:"tags"`
	PlanCode     string    `json:"planCode"`
}

type Instance

type Instance struct {
	ID                          string    `json:"id"`
	Name                        string    `json:"name"`
	FlavorID                    string    `json:"flavorId"`
	Flavor                      Flavor    `json:"flavor"`
	ImageID                     string    `json:"imageId"`
	Image                       Image     `json:"image"`
	SSHKeyID                    string    `json:"sshKeyId"`
	SSHKey                      SshKey    `json:"sshKey"`
	Created                     time.Time `json:"created"`
	Region                      string    `json:"region"`
	Status                      string    `json:"status"`
	PlanCode                    string    `json:"planCode"`
	CurrentMonthOutgoingTraffic *int      `json:"currentMonthOutgoingTraffic,omitempty"`
}

type Job

type Job struct {
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	Region        string    `json:"region"`
	ContainerName string    `json:"containerName"`
	Engine        string    `json:"engine"`
	EngineVersion string    `json:"engineVersion"`
	StartDate     time.Time `json:"startDate"`
	EndDate       time.Time `json:"endDate"`
	CreationDate  time.Time `json:"creationDate"`
	Status        string    `json:"status"`
	TTL           string    `json:"ttl"`
}

type PlanCodes

type PlanCodes struct {
	Monthly string `string:"monthly"`
	Hourly  string `string:"hourly"`
}

type Price added in v0.4.0

type Price struct {
	Value        float64 `json:"value"`
	CurrencyCode string  `json:"currencyCode"`
}

type Project

type Project struct {
	ID           string     `json:"project_id"`
	Name         string     `json:"projectName"`
	Description  string     `json:"description"`
	PlanCode     string     `json:"planCode"`
	Unleash      *bool      `json:"unleash"`
	Expiration   *time.Time `json:"expiration,omitempty"`
	CreationDate time.Time  `json:"creationDate"`
	OrderId      int        `json:"orderId"`
	Access       string     `json:"access"`
	Status       string     `json:"status"`
	ManualQuota  *bool      `json:"manualQuota"`
}

type Refund added in v0.9.0

type Refund struct {
	ID              string    `json:"refundId"`
	Date            time.Time `json:"date"`
	Url             string    `json:"url"`
	PdfUrl          string    `json:"pdfUrl"`
	OrderId         int       `json:"orderId"`
	OriginalBillId  string    `json:"originalBillId"`
	Password        string    `json:"password"`
	PriceWithTax    Price     `json:"priceWithTax"`
	PriceWithoutTax Price     `json:"priceWithoutTax"`
	Tax             Price     `json:"tax"`
}

type RefundDetail added in v0.9.0

type RefundDetail struct {
	ID          string      `json:"refundDetailId"`
	RefundID    string      `json:"refundId"`
	Description string      `json:"description"`
	Domain      string      `json:"domain"`
	Quantity    string      `json:"quantity"`
	TotalPrice  RefundPrice `json:"totalPrice"`
	UnitPrice   RefundPrice `json:"unitPrice"`
}

type RefundPrice added in v0.9.0

type RefundPrice struct {
	Value        float64 `json:"value"`
	CurrencyCode string  `json:"currencyCode"`
}

type Region added in v0.8.0

type Region struct {
	Name               string      `json:"name"`
	ContinentCode      string      `json:"continentCode"`
	DatacenterLocation string      `json:"datacenterLocation"`
	IpCountries        []string    `json:"ipCountries"`
	Services           []Component `json:"services"`
	Status             string      `json:"status"`
	Type               string      `json:"type"`
}

type S3StorageContainer added in v0.8.0

type S3StorageContainer struct {
	Name         string                       `json:"name"`
	VirtualHost  string                       `json:"virtualHost"`
	OwnerID      int                          `json:"ownerId"`
	ObjectsCount int                          `json:"objectsCount"`
	ObjectsSize  int                          `json:"objectsSize"`
	Region       string                       `json:"region"`
	CreatedAt    time.Time                    `json:"createdAt"`
	Encryption   S3StorageContainerEncryption `json:"encryption"`
}

type S3StorageContainerEncryption added in v0.8.0

type S3StorageContainerEncryption struct {
	SSEAlgorithm string `json:"sseAlgorithm"`
}

type SshKey added in v0.0.3

type SshKey struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	PublicKey string `json:"publicKey"`
}

type SwiftStorageContainer added in v0.8.0

type SwiftStorageContainer struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	StoredObjects int    `json:"storedObjects"`
	StoredBytes   int    `json:"storedBytes"`
	Region        string `json:"region"`
}

type Volume

type Volume struct {
	ID           string    `json:"id"`
	Name         string    `json:"name"`
	Region       string    `json:"region"`
	AttachedTo   []string  `json:"attachedTo"`
	CreationDate time.Time `json:"creationDate"`
	Description  string    `json:"description"`
	Size         int       `json:"size"`
	Status       string    `json:"status"`
	Bootable     bool      `json:"bootable"`
	PlanCode     string    `json:"planCode"`
	Type         string    `json:"type"`
}

type VolumeSnapShot added in v0.7.0

type VolumeSnapShot struct {
	ID           string    `json:"id"`
	CreationDate time.Time `json:"creationDate"`
	Name         string    `json:"name"`
	Description  string    `json:"description"`
	Size         int       `json:"size"`
	VolumeId     string    `json:"volumeId"`
	Region       string    `json:"region"`
	Status       string    `json:"status"`
	PlanCode     string    `json:"planCode"`
}

Jump to

Keyboard shortcuts

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