database

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourceDatabase

func DataSourceDatabase() *schema.Resource

func DeleteDatabase

func DeleteDatabase(c *client.UpstashClient, databaseId string) (err error)

func EnableMultiZone

func EnableMultiZone(c *client.UpstashClient, databaseId string, enabled bool) (err error)

func EnableTLS

func EnableTLS(c *client.UpstashClient, databaseId string) (err error)

func ResourceDatabase

func ResourceDatabase() *schema.Resource

Types

type CreateDatabaseRequest

type CreateDatabaseRequest struct {
	Region       string `json:"region"`
	DatabaseName string `json:"database_name"`
	Tls          bool   `json:"tls"`
	Consistent   bool   `json:"consistent"`
	MultiZone    bool   `json:"multizone"`
}

type Database

type Database struct {
	DatabaseId             string `json:"database_id"`
	DatabaseName           string `json:"database_name"`
	Region                 string `json:"region"`
	Port                   int    `json:"port"`
	CreationTime           int64  `json:"creation_time"`
	Password               string `json:"password,omitempty"`
	Endpoint               string `json:"endpoint"`
	Tls                    bool   `json:"tls"`
	Consistent             bool   `json:"consistent"`
	MultiZone              bool   `json:"multizone"`
	RestToken              string `json:"rest_token,omitempty"`
	ReadOnlyRestToken      string `json:"read_only_rest_token,omitempty"`
	DatabaseType           string `json:"database_type"`
	State                  string `json:"state"`
	UserEmail              string `json:"user_email"`
	DBMaxClients           int    `json:"db_max_clients"`
	DBMaxRequestSize       int64  `json:"db_max_request_size"`
	DBDiskThreshold        int64  `json:"db_disk_threshold"`
	DBMaxEntrySize         int64  `json:"db_max_entry_size"`
	DBMemoryThreshold      int64  `json:"db_memory_threshold"`
	DBDailyBandwidthLimit  int64  `json:"db_daily_bandwidth_limit"`
	DBMaxCommandsPerSecond int64  `json:"db_max_commands_per_second"`
}

func CreateDatabase

func CreateDatabase(c *client.UpstashClient, body CreateDatabaseRequest) (database Database, err error)

func GetDatabase

func GetDatabase(c *client.UpstashClient, databaseId string) (database Database, err error)

Jump to

Keyboard shortcuts

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