rdb

package
v1.0.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 12

Documentation

Overview

Package rdb provides methods and message types of the rdb v1 API.

Index

Constants

View Source
const (
	// ACLRuleActionAllow is [insert doc].
	ACLRuleActionAllow = ACLRuleAction("allow")
	// ACLRuleActionDeny is [insert doc].
	ACLRuleActionDeny = ACLRuleAction("deny")
)
View Source
const (
	// ACLRuleDirectionInbound is [insert doc].
	ACLRuleDirectionInbound = ACLRuleDirection("inbound")
	// ACLRuleDirectionOutbound is [insert doc].
	ACLRuleDirectionOutbound = ACLRuleDirection("outbound")
)
View Source
const (
	// ACLRuleProtocolTCP is [insert doc].
	ACLRuleProtocolTCP = ACLRuleProtocol("tcp")
	// ACLRuleProtocolUDP is [insert doc].
	ACLRuleProtocolUDP = ACLRuleProtocol("udp")
	// ACLRuleProtocolIcmp is [insert doc].
	ACLRuleProtocolIcmp = ACLRuleProtocol("icmp")
)
View Source
const (
	// DatabaseBackupStatusUnknown is [insert doc].
	DatabaseBackupStatusUnknown = DatabaseBackupStatus("unknown")
	// DatabaseBackupStatusCreating is [insert doc].
	DatabaseBackupStatusCreating = DatabaseBackupStatus("creating")
	// DatabaseBackupStatusReady is [insert doc].
	DatabaseBackupStatusReady = DatabaseBackupStatus("ready")
	// DatabaseBackupStatusRestoring is [insert doc].
	DatabaseBackupStatusRestoring = DatabaseBackupStatus("restoring")
	// DatabaseBackupStatusDeleting is [insert doc].
	DatabaseBackupStatusDeleting = DatabaseBackupStatus("deleting")
	// DatabaseBackupStatusError is [insert doc].
	DatabaseBackupStatusError = DatabaseBackupStatus("error")
	// DatabaseBackupStatusExporting is [insert doc].
	DatabaseBackupStatusExporting = DatabaseBackupStatus("exporting")
	// DatabaseBackupStatusLocked is [insert doc].
	DatabaseBackupStatusLocked = DatabaseBackupStatus("locked")
)
View Source
const (
	// EngineSettingPropertyTypeBOOLEAN is [insert doc].
	EngineSettingPropertyTypeBOOLEAN = EngineSettingPropertyType("BOOLEAN")
	// EngineSettingPropertyTypeINT is [insert doc].
	EngineSettingPropertyTypeINT = EngineSettingPropertyType("INT")
	// EngineSettingPropertyTypeSTRING is [insert doc].
	EngineSettingPropertyTypeSTRING = EngineSettingPropertyType("STRING")
	// EngineSettingPropertyTypeFLOAT is [insert doc].
	EngineSettingPropertyTypeFLOAT = EngineSettingPropertyType("FLOAT")
)
View Source
const (
	// InstanceLogStatusUnknown is [insert doc].
	InstanceLogStatusUnknown = InstanceLogStatus("unknown")
	// InstanceLogStatusReady is [insert doc].
	InstanceLogStatusReady = InstanceLogStatus("ready")
	// InstanceLogStatusCreating is [insert doc].
	InstanceLogStatusCreating = InstanceLogStatus("creating")
	// InstanceLogStatusError is [insert doc].
	InstanceLogStatusError = InstanceLogStatus("error")
)
View Source
const (
	// InstanceStatusUnknown is [insert doc].
	InstanceStatusUnknown = InstanceStatus("unknown")
	// InstanceStatusReady is [insert doc].
	InstanceStatusReady = InstanceStatus("ready")
	// InstanceStatusProvisioning is [insert doc].
	InstanceStatusProvisioning = InstanceStatus("provisioning")
	// InstanceStatusConfiguring is [insert doc].
	InstanceStatusConfiguring = InstanceStatus("configuring")
	// InstanceStatusDeleting is [insert doc].
	InstanceStatusDeleting = InstanceStatus("deleting")
	// InstanceStatusError is [insert doc].
	InstanceStatusError = InstanceStatus("error")
	// InstanceStatusAutohealing is [insert doc].
	InstanceStatusAutohealing = InstanceStatus("autohealing")
	// InstanceStatusLocked is [insert doc].
	InstanceStatusLocked = InstanceStatus("locked")
	// InstanceStatusInitializing is [insert doc].
	InstanceStatusInitializing = InstanceStatus("initializing")
	// InstanceStatusDiskFull is [insert doc].
	InstanceStatusDiskFull = InstanceStatus("disk_full")
	// InstanceStatusBackuping is [insert doc].
	InstanceStatusBackuping = InstanceStatus("backuping")
	// InstanceStatusSnapshotting is [insert doc].
	InstanceStatusSnapshotting = InstanceStatus("snapshotting")
	// InstanceStatusRestarting is [insert doc].
	InstanceStatusRestarting = InstanceStatus("restarting")
)
View Source
const (
	// ListDatabaseBackupsRequestOrderByCreatedAtAsc is [insert doc].
	ListDatabaseBackupsRequestOrderByCreatedAtAsc = ListDatabaseBackupsRequestOrderBy("created_at_asc")
	// ListDatabaseBackupsRequestOrderByCreatedAtDesc is [insert doc].
	ListDatabaseBackupsRequestOrderByCreatedAtDesc = ListDatabaseBackupsRequestOrderBy("created_at_desc")
	// ListDatabaseBackupsRequestOrderByNameAsc is [insert doc].
	ListDatabaseBackupsRequestOrderByNameAsc = ListDatabaseBackupsRequestOrderBy("name_asc")
	// ListDatabaseBackupsRequestOrderByNameDesc is [insert doc].
	ListDatabaseBackupsRequestOrderByNameDesc = ListDatabaseBackupsRequestOrderBy("name_desc")
	// ListDatabaseBackupsRequestOrderByStatusAsc is [insert doc].
	ListDatabaseBackupsRequestOrderByStatusAsc = ListDatabaseBackupsRequestOrderBy("status_asc")
	// ListDatabaseBackupsRequestOrderByStatusDesc is [insert doc].
	ListDatabaseBackupsRequestOrderByStatusDesc = ListDatabaseBackupsRequestOrderBy("status_desc")
)
View Source
const (
	// ListDatabasesRequestOrderByNameAsc is [insert doc].
	ListDatabasesRequestOrderByNameAsc = ListDatabasesRequestOrderBy("name_asc")
	// ListDatabasesRequestOrderByNameDesc is [insert doc].
	ListDatabasesRequestOrderByNameDesc = ListDatabasesRequestOrderBy("name_desc")
	// ListDatabasesRequestOrderBySizeAsc is [insert doc].
	ListDatabasesRequestOrderBySizeAsc = ListDatabasesRequestOrderBy("size_asc")
	// ListDatabasesRequestOrderBySizeDesc is [insert doc].
	ListDatabasesRequestOrderBySizeDesc = ListDatabasesRequestOrderBy("size_desc")
)
View Source
const (
	// ListInstanceLogsRequestOrderByCreatedAtAsc is [insert doc].
	ListInstanceLogsRequestOrderByCreatedAtAsc = ListInstanceLogsRequestOrderBy("created_at_asc")
	// ListInstanceLogsRequestOrderByCreatedAtDesc is [insert doc].
	ListInstanceLogsRequestOrderByCreatedAtDesc = ListInstanceLogsRequestOrderBy("created_at_desc")
)
View Source
const (
	// ListInstancesRequestOrderByCreatedAtAsc is [insert doc].
	ListInstancesRequestOrderByCreatedAtAsc = ListInstancesRequestOrderBy("created_at_asc")
	// ListInstancesRequestOrderByCreatedAtDesc is [insert doc].
	ListInstancesRequestOrderByCreatedAtDesc = ListInstancesRequestOrderBy("created_at_desc")
	// ListInstancesRequestOrderByNameAsc is [insert doc].
	ListInstancesRequestOrderByNameAsc = ListInstancesRequestOrderBy("name_asc")
	// ListInstancesRequestOrderByNameDesc is [insert doc].
	ListInstancesRequestOrderByNameDesc = ListInstancesRequestOrderBy("name_desc")
	// ListInstancesRequestOrderByRegion is [insert doc].
	ListInstancesRequestOrderByRegion = ListInstancesRequestOrderBy("region")
	// ListInstancesRequestOrderByStatusAsc is [insert doc].
	ListInstancesRequestOrderByStatusAsc = ListInstancesRequestOrderBy("status_asc")
	// ListInstancesRequestOrderByStatusDesc is [insert doc].
	ListInstancesRequestOrderByStatusDesc = ListInstancesRequestOrderBy("status_desc")
)
View Source
const (
	// ListPrivilegesRequestOrderByUserNameAsc is [insert doc].
	ListPrivilegesRequestOrderByUserNameAsc = ListPrivilegesRequestOrderBy("user_name_asc")
	// ListPrivilegesRequestOrderByUserNameDesc is [insert doc].
	ListPrivilegesRequestOrderByUserNameDesc = ListPrivilegesRequestOrderBy("user_name_desc")
	// ListPrivilegesRequestOrderByDatabaseNameAsc is [insert doc].
	ListPrivilegesRequestOrderByDatabaseNameAsc = ListPrivilegesRequestOrderBy("database_name_asc")
	// ListPrivilegesRequestOrderByDatabaseNameDesc is [insert doc].
	ListPrivilegesRequestOrderByDatabaseNameDesc = ListPrivilegesRequestOrderBy("database_name_desc")
)
View Source
const (
	// ListSnapshotsRequestOrderByCreatedAtAsc is [insert doc].
	ListSnapshotsRequestOrderByCreatedAtAsc = ListSnapshotsRequestOrderBy("created_at_asc")
	// ListSnapshotsRequestOrderByCreatedAtDesc is [insert doc].
	ListSnapshotsRequestOrderByCreatedAtDesc = ListSnapshotsRequestOrderBy("created_at_desc")
	// ListSnapshotsRequestOrderByNameAsc is [insert doc].
	ListSnapshotsRequestOrderByNameAsc = ListSnapshotsRequestOrderBy("name_asc")
	// ListSnapshotsRequestOrderByNameDesc is [insert doc].
	ListSnapshotsRequestOrderByNameDesc = ListSnapshotsRequestOrderBy("name_desc")
	// ListSnapshotsRequestOrderByExpiresAtAsc is [insert doc].
	ListSnapshotsRequestOrderByExpiresAtAsc = ListSnapshotsRequestOrderBy("expires_at_asc")
	// ListSnapshotsRequestOrderByExpiresAtDesc is [insert doc].
	ListSnapshotsRequestOrderByExpiresAtDesc = ListSnapshotsRequestOrderBy("expires_at_desc")
)
View Source
const (
	// ListUsersRequestOrderByNameAsc is [insert doc].
	ListUsersRequestOrderByNameAsc = ListUsersRequestOrderBy("name_asc")
	// ListUsersRequestOrderByNameDesc is [insert doc].
	ListUsersRequestOrderByNameDesc = ListUsersRequestOrderBy("name_desc")
	// ListUsersRequestOrderByIsAdminAsc is [insert doc].
	ListUsersRequestOrderByIsAdminAsc = ListUsersRequestOrderBy("is_admin_asc")
	// ListUsersRequestOrderByIsAdminDesc is [insert doc].
	ListUsersRequestOrderByIsAdminDesc = ListUsersRequestOrderBy("is_admin_desc")
)
View Source
const (
	// MaintenanceStatusUnknown is [insert doc].
	MaintenanceStatusUnknown = MaintenanceStatus("unknown")
	// MaintenanceStatusPending is [insert doc].
	MaintenanceStatusPending = MaintenanceStatus("pending")
	// MaintenanceStatusDone is [insert doc].
	MaintenanceStatusDone = MaintenanceStatus("done")
	// MaintenanceStatusCanceled is [insert doc].
	MaintenanceStatusCanceled = MaintenanceStatus("canceled")
)
View Source
const (
	// NodeTypeStockUnknown is [insert doc].
	NodeTypeStockUnknown = NodeTypeStock("unknown")
	// NodeTypeStockLowStock is [insert doc].
	NodeTypeStockLowStock = NodeTypeStock("low_stock")
	// NodeTypeStockOutOfStock is [insert doc].
	NodeTypeStockOutOfStock = NodeTypeStock("out_of_stock")
	// NodeTypeStockAvailable is [insert doc].
	NodeTypeStockAvailable = NodeTypeStock("available")
)
View Source
const (
	// PermissionReadonly is [insert doc].
	PermissionReadonly = Permission("readonly")
	// PermissionReadwrite is [insert doc].
	PermissionReadwrite = Permission("readwrite")
	// PermissionAll is [insert doc].
	PermissionAll = Permission("all")
	// PermissionCustom is [insert doc].
	PermissionCustom = Permission("custom")
	// PermissionNone is [insert doc].
	PermissionNone = Permission("none")
)
View Source
const (
	// SnapshotStatusUnknown is [insert doc].
	SnapshotStatusUnknown = SnapshotStatus("unknown")
	// SnapshotStatusCreating is [insert doc].
	SnapshotStatusCreating = SnapshotStatus("creating")
	// SnapshotStatusReady is [insert doc].
	SnapshotStatusReady = SnapshotStatus("ready")
	// SnapshotStatusRestoring is [insert doc].
	SnapshotStatusRestoring = SnapshotStatus("restoring")
	// SnapshotStatusDeleting is [insert doc].
	SnapshotStatusDeleting = SnapshotStatus("deleting")
	// SnapshotStatusError is [insert doc].
	SnapshotStatusError = SnapshotStatus("error")
	// SnapshotStatusLocked is [insert doc].
	SnapshotStatusLocked = SnapshotStatus("locked")
)
View Source
const (
	// VolumeTypeLssd is [insert doc].
	VolumeTypeLssd = VolumeType("lssd")
	// VolumeTypeBssd is [insert doc].
	VolumeTypeBssd = VolumeType("bssd")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLRule

type ACLRule struct {
	IP scw.IPNet `json:"ip"`

	Port uint32 `json:"port"`
	// Protocol:
	//
	// Default value: tcp
	Protocol ACLRuleProtocol `json:"protocol"`
	// Direction:
	//
	// Default value: inbound
	Direction ACLRuleDirection `json:"direction"`
	// Action:
	//
	// Default value: allow
	Action ACLRuleAction `json:"action"`

	Description string `json:"description"`
}

type ACLRuleAction

type ACLRuleAction string

func (ACLRuleAction) MarshalJSON

func (enum ACLRuleAction) MarshalJSON() ([]byte, error)

func (ACLRuleAction) String

func (enum ACLRuleAction) String() string

func (*ACLRuleAction) UnmarshalJSON

func (enum *ACLRuleAction) UnmarshalJSON(data []byte) error

type ACLRuleDirection

type ACLRuleDirection string

func (ACLRuleDirection) MarshalJSON

func (enum ACLRuleDirection) MarshalJSON() ([]byte, error)

func (ACLRuleDirection) String

func (enum ACLRuleDirection) String() string

func (*ACLRuleDirection) UnmarshalJSON

func (enum *ACLRuleDirection) UnmarshalJSON(data []byte) error

type ACLRuleProtocol

type ACLRuleProtocol string

func (ACLRuleProtocol) MarshalJSON

func (enum ACLRuleProtocol) MarshalJSON() ([]byte, error)

func (ACLRuleProtocol) String

func (enum ACLRuleProtocol) String() string

func (*ACLRuleProtocol) UnmarshalJSON

func (enum *ACLRuleProtocol) UnmarshalJSON(data []byte) error

type ACLRuleRequest

type ACLRuleRequest struct {
	IP scw.IPNet `json:"ip"`

	Description string `json:"description"`
}

type API

type API struct {
	// contains filtered or unexported fields
}

API: database RDB API

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) AddInstanceACLRules

func (s *API) AddInstanceACLRules(req *AddInstanceACLRulesRequest, opts ...scw.RequestOption) (*AddInstanceACLRulesResponse, error)

AddInstanceACLRules: add an ACL instance to a given instance

Add an additional ACL rule to a database instance.

func (*API) AddInstanceSettings

func (s *API) AddInstanceSettings(req *AddInstanceSettingsRequest, opts ...scw.RequestOption) (*AddInstanceSettingsResponse, error)

AddInstanceSettings: add an instance setting

func (*API) CloneInstance

func (s *API) CloneInstance(req *CloneInstanceRequest, opts ...scw.RequestOption) (*Instance, error)

CloneInstance: clone an instance

func (*API) CreateDatabase

func (s *API) CreateDatabase(req *CreateDatabaseRequest, opts ...scw.RequestOption) (*Database, error)

CreateDatabase: create a database in a given instance

func (*API) CreateDatabaseBackup

func (s *API) CreateDatabaseBackup(req *CreateDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)

CreateDatabaseBackup: create a database backup

func (*API) CreateEndpoint

func (s *API) CreateEndpoint(req *CreateEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)

CreateEndpoint: create a new instance endpoint

func (*API) CreateInstance

func (s *API) CreateInstance(req *CreateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)

CreateInstance: create an instance

func (*API) CreateInstanceFromSnapshot

func (s *API) CreateInstanceFromSnapshot(req *CreateInstanceFromSnapshotRequest, opts ...scw.RequestOption) (*Instance, error)

CreateInstanceFromSnapshot: create a new instance from a given snapshot

func (*API) CreateSnapshot

func (s *API) CreateSnapshot(req *CreateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)

CreateSnapshot: create an instance snapshot

func (*API) CreateUser

func (s *API) CreateUser(req *CreateUserRequest, opts ...scw.RequestOption) (*User, error)

CreateUser: create a user on a given instance

func (*API) DeleteDatabase

func (s *API) DeleteDatabase(req *DeleteDatabaseRequest, opts ...scw.RequestOption) error

DeleteDatabase: delete a database in a given instance

func (*API) DeleteDatabaseBackup

func (s *API) DeleteDatabaseBackup(req *DeleteDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)

DeleteDatabaseBackup: delete a database backup

func (*API) DeleteEndpoint

func (s *API) DeleteEndpoint(req *DeleteEndpointRequest, opts ...scw.RequestOption) error

DeleteEndpoint: delete an instance endpoint

func (*API) DeleteInstance

func (s *API) DeleteInstance(req *DeleteInstanceRequest, opts ...scw.RequestOption) (*Instance, error)

DeleteInstance: delete an instance

func (*API) DeleteInstanceACLRules

func (s *API) DeleteInstanceACLRules(req *DeleteInstanceACLRulesRequest, opts ...scw.RequestOption) (*DeleteInstanceACLRulesResponse, error)

DeleteInstanceACLRules: delete ACL rules of a given instance

func (*API) DeleteInstanceSettings

func (s *API) DeleteInstanceSettings(req *DeleteInstanceSettingsRequest, opts ...scw.RequestOption) (*DeleteInstanceSettingsResponse, error)

DeleteInstanceSettings: delete an instance setting

func (*API) DeleteSnapshot

func (s *API) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)

DeleteSnapshot: delete an instance snapshot

func (*API) DeleteUser

func (s *API) DeleteUser(req *DeleteUserRequest, opts ...scw.RequestOption) error

DeleteUser: delete a user on a given instance

func (*API) ExportDatabaseBackup

func (s *API) ExportDatabaseBackup(req *ExportDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)

ExportDatabaseBackup: export a database backup

func (*API) GetDatabaseBackup

func (s *API) GetDatabaseBackup(req *GetDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)

GetDatabaseBackup: get a database backup

func (*API) GetEndpoint

func (s *API) GetEndpoint(req *GetEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)

GetEndpoint: get an instance endpoint

func (*API) GetInstance

func (s *API) GetInstance(req *GetInstanceRequest, opts ...scw.RequestOption) (*Instance, error)

GetInstance: get an instance

func (*API) GetInstanceCertificate

func (s *API) GetInstanceCertificate(req *GetInstanceCertificateRequest, opts ...scw.RequestOption) (*scw.File, error)

GetInstanceCertificate: get the TLS certificate of an instance

func (*API) GetInstanceLog

func (s *API) GetInstanceLog(req *GetInstanceLogRequest, opts ...scw.RequestOption) (*InstanceLog, error)

GetInstanceLog: get specific logs of a given instance

func (*API) GetInstanceMetrics

func (s *API) GetInstanceMetrics(req *GetInstanceMetricsRequest, opts ...scw.RequestOption) (*InstanceMetrics, error)

GetInstanceMetrics: get instance metrics

Get database instance metrics.

func (*API) GetServiceInfo

func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error)

func (*API) GetSnapshot

func (s *API) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)

GetSnapshot: get an instance snapshot

func (*API) ListDatabaseBackups

func (s *API) ListDatabaseBackups(req *ListDatabaseBackupsRequest, opts ...scw.RequestOption) (*ListDatabaseBackupsResponse, error)

ListDatabaseBackups: list database backups

func (*API) ListDatabaseEngines

func (s *API) ListDatabaseEngines(req *ListDatabaseEnginesRequest, opts ...scw.RequestOption) (*ListDatabaseEnginesResponse, error)

ListDatabaseEngines: list available database engines

func (*API) ListDatabases

func (s *API) ListDatabases(req *ListDatabasesRequest, opts ...scw.RequestOption) (*ListDatabasesResponse, error)

ListDatabases: list all database in a given instance

func (*API) ListInstanceACLRules

func (s *API) ListInstanceACLRules(req *ListInstanceACLRulesRequest, opts ...scw.RequestOption) (*ListInstanceACLRulesResponse, error)

ListInstanceACLRules: list ACL rules of a given instance

func (*API) ListInstanceLogs

func (s *API) ListInstanceLogs(req *ListInstanceLogsRequest, opts ...scw.RequestOption) (*ListInstanceLogsResponse, error)

ListInstanceLogs: list available logs of a given instance

func (*API) ListInstanceLogsDetails

func (s *API) ListInstanceLogsDetails(req *ListInstanceLogsDetailsRequest, opts ...scw.RequestOption) (*ListInstanceLogsDetailsResponse, error)

ListInstanceLogsDetails: list remote instances logs details

func (*API) ListInstances

func (s *API) ListInstances(req *ListInstancesRequest, opts ...scw.RequestOption) (*ListInstancesResponse, error)

ListInstances: list instances

func (*API) ListNodeTypes

func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption) (*ListNodeTypesResponse, error)

ListNodeTypes: list available node types

func (*API) ListPrivileges

func (s *API) ListPrivileges(req *ListPrivilegesRequest, opts ...scw.RequestOption) (*ListPrivilegesResponse, error)

ListPrivileges: list privileges of a given user for a given database on a given instance

func (*API) ListSnapshots

func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)

ListSnapshots: list instance snapshots

func (*API) ListUsers

func (s *API) ListUsers(req *ListUsersRequest, opts ...scw.RequestOption) (*ListUsersResponse, error)

ListUsers: list users of a given instance

func (*API) PrepareInstanceLogs

func (s *API) PrepareInstanceLogs(req *PrepareInstanceLogsRequest, opts ...scw.RequestOption) (*PrepareInstanceLogsResponse, error)

PrepareInstanceLogs: prepare logs of a given instance

Prepare your instance logs. Logs will be grouped on a minimum interval of a day.

func (*API) PurgeInstanceLogs

func (s *API) PurgeInstanceLogs(req *PurgeInstanceLogsRequest, opts ...scw.RequestOption) error

PurgeInstanceLogs: purge remote instances logs

func (*API) RenewInstanceCertificate

func (s *API) RenewInstanceCertificate(req *RenewInstanceCertificateRequest, opts ...scw.RequestOption) error

RenewInstanceCertificate: renew the TLS certificate of an instance

func (*API) RestartInstance

func (s *API) RestartInstance(req *RestartInstanceRequest, opts ...scw.RequestOption) (*Instance, error)

RestartInstance: restart an instance

func (*API) RestoreDatabaseBackup

func (s *API) RestoreDatabaseBackup(req *RestoreDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)

RestoreDatabaseBackup: restore a database backup

func (*API) SetInstanceACLRules

func (s *API) SetInstanceACLRules(req *SetInstanceACLRulesRequest, opts ...scw.RequestOption) (*SetInstanceACLRulesResponse, error)

SetInstanceACLRules: set ACL rules for a given instance

Replace all the ACL rules of a database instance.

func (*API) SetInstanceSettings

func (s *API) SetInstanceSettings(req *SetInstanceSettingsRequest, opts ...scw.RequestOption) (*SetInstanceSettingsResponse, error)

SetInstanceSettings: set a given instance setting

func (*API) SetPrivilege

func (s *API) SetPrivilege(req *SetPrivilegeRequest, opts ...scw.RequestOption) (*Privilege, error)

SetPrivilege: set privileges of a given user for a given database on a given instance

func (*API) UpdateDatabaseBackup

func (s *API) UpdateDatabaseBackup(req *UpdateDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)

UpdateDatabaseBackup: update a database backup

func (*API) UpdateInstance

func (s *API) UpdateInstance(req *UpdateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)

UpdateInstance: update an instance

func (*API) UpdateSnapshot

func (s *API) UpdateSnapshot(req *UpdateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)

UpdateSnapshot: update an instance snapshot

func (*API) UpdateUser

func (s *API) UpdateUser(req *UpdateUserRequest, opts ...scw.RequestOption) (*User, error)

UpdateUser: update a user on a given instance

func (*API) UpgradeInstance

func (s *API) UpgradeInstance(req *UpgradeInstanceRequest, opts ...scw.RequestOption) (*Instance, error)

UpgradeInstance: upgrade an instance to an higher instance type

Upgrade your current `node_type` or enable high availability on your standalone database instance.

func (*API) WaitForDatabaseBackup

func (s *API) WaitForDatabaseBackup(req *WaitForDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)

WaitForDatabaseBackup waits for the backup to be in a "terminal state" before returning. This function can be used to wait for a backup to be ready for example.

func (*API) WaitForInstance

func (s *API) WaitForInstance(req *WaitForInstanceRequest, opts ...scw.RequestOption) (*Instance, error)

WaitForInstance waits for the instance to be in a "terminal state" before returning. This function can be used to wait for an instance to be ready for example.

func (*API) WaitForInstanceLog

func (s *API) WaitForInstanceLog(req *WaitForInstanceLogRequest, opts ...scw.RequestOption) (*InstanceLog, error)

WaitForInstanceLog waits for the instance logs to be in a "terminal state" before returning. This function can be used to wait for an instance logs to be ready for example.

type AddInstanceACLRulesRequest

type AddInstanceACLRulesRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want to add acl rules to
	InstanceID string `json:"-"`
	// Rules: aCLs rules to add to the instance
	Rules []*ACLRuleRequest `json:"rules"`
}

type AddInstanceACLRulesResponse

type AddInstanceACLRulesResponse struct {
	// Rules: rules enabled on the instance
	Rules []*ACLRule `json:"rules"`
}

AddInstanceACLRulesResponse: add instance acl rules response

type AddInstanceSettingsRequest

type AddInstanceSettingsRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want to add settings to
	InstanceID string `json:"-"`
	// Settings: settings to add on the instance
	Settings []*InstanceSetting `json:"settings"`
}

type AddInstanceSettingsResponse

type AddInstanceSettingsResponse struct {
	// Settings: settings available on the instance
	Settings []*InstanceSetting `json:"settings"`
}

AddInstanceSettingsResponse: add instance settings response

type BackupSchedule

type BackupSchedule struct {
	Frequency uint32 `json:"frequency"`

	Retention uint32 `json:"retention"`

	Disabled bool `json:"disabled"`
}

type CloneInstanceRequest

type CloneInstanceRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want to clone
	InstanceID string `json:"-"`
	// Name: name of the clone instance
	Name string `json:"name"`
	// NodeType: node type of the clone
	NodeType *string `json:"node_type"`
}

type CreateDatabaseBackupRequest

type CreateDatabaseBackupRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"instance_id"`
	// DatabaseName: name of the database you want to make a backup of
	DatabaseName string `json:"database_name"`
	// Name: name of the backup
	Name string `json:"name"`
	// ExpiresAt: expiration date (Format ISO 8601)
	ExpiresAt *time.Time `json:"expires_at"`
}

type CreateDatabaseRequest

type CreateDatabaseRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance where to create the database
	InstanceID string `json:"-"`
	// Name: name of the database
	Name string `json:"name"`
}

type CreateEndpointRequest

type CreateEndpointRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want to add endpoint to
	InstanceID string `json:"-"`
	// EndpointSpec: specification of the endpoint you want to create
	EndpointSpec *EndpointSpec `json:"endpoint_spec"`
}

type CreateInstanceFromSnapshotRequest

type CreateInstanceFromSnapshotRequest struct {
	Region scw.Region `json:"-"`
	// SnapshotID: block snapshot of the instance
	SnapshotID string `json:"-"`
	// InstanceName: name of the instance created with the snapshot
	InstanceName string `json:"instance_name"`
	// IsHaCluster: whether or not High-Availability is enabled on the new instance
	IsHaCluster *bool `json:"is_ha_cluster"`
	// NodeType: the node type used to restore the snapshot
	NodeType *string `json:"node_type"`
}

type CreateInstanceRequest

type CreateInstanceRequest struct {
	Region scw.Region `json:"-"`
	// Deprecated: OrganizationID: please use `project_id` instead
	// Precisely one of OrganizationID, ProjectID must be set.
	OrganizationID *string `json:"organization_id,omitempty"`
	// ProjectID: the project ID on which to create the instance
	// Precisely one of OrganizationID, ProjectID must be set.
	ProjectID *string `json:"project_id,omitempty"`
	// Name: name of the instance
	Name string `json:"name"`
	// Engine: database engine of the database (PostgreSQL, MySQL, ...)
	Engine string `json:"engine"`
	// UserName: name of the user created when the instance is created
	UserName string `json:"user_name"`
	// Password: password of the user
	Password string `json:"password"`
	// NodeType: type of node to use for the instance
	NodeType string `json:"node_type"`
	// IsHaCluster: whether or not High-Availability is enabled
	IsHaCluster bool `json:"is_ha_cluster"`
	// DisableBackup: whether or not backups are disabled
	DisableBackup bool `json:"disable_backup"`
	// Tags: tags to apply to the instance
	Tags []string `json:"tags"`
	// InitSettings: list of engine settings to be set at database initialisation
	InitSettings []*InstanceSetting `json:"init_settings"`
	// VolumeType: type of volume where data are stored (lssd, bssd, ...)
	//
	// Default value: lssd
	VolumeType VolumeType `json:"volume_type"`
	// VolumeSize: volume size when volume_type is not lssd
	VolumeSize scw.Size `json:"volume_size"`
	// InitEndpoints: one or multiple EndpointSpec used to expose your database instance
	InitEndpoints []*EndpointSpec `json:"init_endpoints"`
	// BackupSameRegion: store logical backups in the same region as the database instance
	BackupSameRegion bool `json:"backup_same_region"`
}

type CreateSnapshotRequest

type CreateSnapshotRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"-"`
	// Name: name of the snapshot
	Name string `json:"name"`
	// ExpiresAt: expiration date (Format ISO 8601)
	ExpiresAt *time.Time `json:"expires_at"`
}

type CreateUserRequest

type CreateUserRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want to create a user in
	InstanceID string `json:"-"`
	// Name: name of the user you want to create
	Name string `json:"name"`
	// Password: password of the user you want to create
	Password string `json:"password"`
	// IsAdmin: whether the user you want to create will have administrative privileges
	IsAdmin bool `json:"is_admin"`
}

type Database

type Database struct {
	// Name: name of the database
	Name string `json:"name"`
	// Owner: name of the owner of the database
	Owner string `json:"owner"`
	// Managed: whether or not the database is managed or not
	Managed bool `json:"managed"`
	// Size: size of the database
	Size scw.Size `json:"size"`
}

Database: database

type DatabaseBackup

type DatabaseBackup struct {
	// ID: UUID of the database backup
	ID string `json:"id"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"instance_id"`
	// DatabaseName: name of the database of this backup
	DatabaseName string `json:"database_name"`
	// Name: name of the backup
	Name string `json:"name"`
	// Status: status of the backup
	//
	// Default value: unknown
	Status DatabaseBackupStatus `json:"status"`
	// Size: size of the database backup
	Size *scw.Size `json:"size"`
	// ExpiresAt: expiration date (Format ISO 8601)
	ExpiresAt *time.Time `json:"expires_at"`
	// CreatedAt: creation date (Format ISO 8601)
	CreatedAt *time.Time `json:"created_at"`
	// UpdatedAt: updated date (Format ISO 8601)
	UpdatedAt *time.Time `json:"updated_at"`
	// InstanceName: name of the instance of the backup
	InstanceName string `json:"instance_name"`
	// DownloadURL: URL you can download the backup from
	DownloadURL *string `json:"download_url"`
	// DownloadURLExpiresAt: expiration date of the download link
	DownloadURLExpiresAt *time.Time `json:"download_url_expires_at"`
	// Region: region of this database backup
	Region scw.Region `json:"region"`
	// SameRegion: store logical backups in the same region as the source database instance
	SameRegion bool `json:"same_region"`
}

DatabaseBackup: database backup

type DatabaseBackupStatus

type DatabaseBackupStatus string

func (DatabaseBackupStatus) MarshalJSON

func (enum DatabaseBackupStatus) MarshalJSON() ([]byte, error)

func (DatabaseBackupStatus) String

func (enum DatabaseBackupStatus) String() string

func (*DatabaseBackupStatus) UnmarshalJSON

func (enum *DatabaseBackupStatus) UnmarshalJSON(data []byte) error

type DatabaseEngine

type DatabaseEngine struct {
	// Name: engine name
	Name string `json:"name"`
	// LogoURL: engine logo URL
	LogoURL string `json:"logo_url"`
	// Versions: available versions
	Versions []*EngineVersion `json:"versions"`
	// Region: region of this database engine
	Region scw.Region `json:"region"`
}

DatabaseEngine: database engine

type DeleteDatabaseBackupRequest

type DeleteDatabaseBackupRequest struct {
	Region scw.Region `json:"-"`
	// DatabaseBackupID: UUID of the database backup to delete
	DatabaseBackupID string `json:"-"`
}

type DeleteDatabaseRequest

type DeleteDatabaseRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance where to delete the database
	InstanceID string `json:"-"`
	// Name: name of the database to delete
	Name string `json:"-"`
}

type DeleteEndpointRequest

type DeleteEndpointRequest struct {
	Region scw.Region `json:"-"`
	// EndpointID: UUID of the endpoint you want to delete
	EndpointID string `json:"-"`
}

type DeleteInstanceACLRulesRequest

type DeleteInstanceACLRulesRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want to delete an ACL rules from
	InstanceID string `json:"-"`
	// ACLRuleIPs: ACL rules IP present on the instance
	ACLRuleIPs []string `json:"acl_rule_ips"`
}

type DeleteInstanceACLRulesResponse

type DeleteInstanceACLRulesResponse struct {
	// Rules: ACL rules present on the instance
	Rules []*ACLRule `json:"rules"`
}

DeleteInstanceACLRulesResponse: delete instance acl rules response

type DeleteInstanceRequest

type DeleteInstanceRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance to delete
	InstanceID string `json:"-"`
}

type DeleteInstanceSettingsRequest

type DeleteInstanceSettingsRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance to delete settings from
	InstanceID string `json:"-"`
	// SettingNames: settings names to delete
	SettingNames []string `json:"setting_names"`
}

type DeleteInstanceSettingsResponse

type DeleteInstanceSettingsResponse struct {
	// Settings: settings names to delete from the instance
	Settings []*InstanceSetting `json:"settings"`
}

DeleteInstanceSettingsResponse: delete instance settings response

type DeleteSnapshotRequest

type DeleteSnapshotRequest struct {
	Region scw.Region `json:"-"`
	// SnapshotID: UUID of the snapshot to delete
	SnapshotID string `json:"-"`
}

type DeleteUserRequest

type DeleteUserRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance to delete a user from
	InstanceID string `json:"-"`
	// Name: name of the user
	Name string `json:"-"`
}

type Endpoint

type Endpoint struct {
	// ID: UUID of the endpoint
	ID string `json:"id"`
	// IP: iPv4 address of the endpoint
	// Precisely one of Hostname, IP must be set.
	IP *net.IP `json:"ip,omitempty"`
	// Port: TCP port of the endpoint
	Port uint32 `json:"port"`
	// Name: name of the endpoint
	Name *string `json:"name"`
	// PrivateNetwork: private network details
	// Precisely one of LoadBalancer, PrivateNetwork must be set.
	PrivateNetwork *EndpointPrivateNetworkDetails `json:"private_network,omitempty"`
	// LoadBalancer: load balancer details
	// Precisely one of LoadBalancer, PrivateNetwork must be set.
	LoadBalancer *EndpointLoadBalancerDetails `json:"load_balancer,omitempty"`
	// Hostname: hostname of the endpoint
	// Precisely one of Hostname, IP must be set.
	Hostname *string `json:"hostname,omitempty"`
}

Endpoint: endpoint

type EndpointLoadBalancerDetails

type EndpointLoadBalancerDetails struct {
}

type EndpointPrivateNetworkDetails

type EndpointPrivateNetworkDetails struct {
	// PrivateNetworkID: UUID of the private network
	PrivateNetworkID string `json:"private_network_id"`
	// ServiceIP: cIDR notation of the endpoint IPv4 address
	ServiceIP scw.IPNet `json:"service_ip"`
	// Zone: private network zone
	Zone scw.Zone `json:"zone"`
}

EndpointPrivateNetworkDetails: endpoint. private network details

type EndpointSpec

type EndpointSpec struct {
	// LoadBalancer: load balancer endpoint specifications
	// Precisely one of LoadBalancer, PrivateNetwork must be set.
	LoadBalancer *EndpointSpecLoadBalancer `json:"load_balancer,omitempty"`
	// PrivateNetwork: private network endpoint specifications
	// Precisely one of LoadBalancer, PrivateNetwork must be set.
	PrivateNetwork *EndpointSpecPrivateNetwork `json:"private_network,omitempty"`
}

EndpointSpec: endpoint spec

type EndpointSpecLoadBalancer

type EndpointSpecLoadBalancer struct {
}

type EndpointSpecPrivateNetwork

type EndpointSpecPrivateNetwork struct {
	// PrivateNetworkID: UUID of the private network to be connected to the database instance
	PrivateNetworkID string `json:"private_network_id"`
	// ServiceIP: endpoint IPv4 adress with a CIDR notation. Check documentation about IP and subnet limitation.
	ServiceIP scw.IPNet `json:"service_ip"`
}

EndpointSpecPrivateNetwork: endpoint spec. private network

type EngineSetting

type EngineSetting struct {
	// Name: setting name from database engine
	Name string `json:"name"`
	// DefaultValue: value set when not specified
	DefaultValue string `json:"default_value"`
	// HotConfigurable: setting can be applied without restarting
	HotConfigurable bool `json:"hot_configurable"`
	// Description: setting description
	Description string `json:"description"`
	// PropertyType: setting type
	//
	// Default value: BOOLEAN
	PropertyType EngineSettingPropertyType `json:"property_type"`
	// Unit: setting base unit
	Unit *string `json:"unit"`
	// StringConstraint: validation regex for string type settings
	StringConstraint *string `json:"string_constraint"`
	// IntMin: minimum value for int types
	IntMin *int32 `json:"int_min"`
	// IntMax: maximum value for int types
	IntMax *int32 `json:"int_max"`
	// FloatMin: minimum value for float types
	FloatMin *float32 `json:"float_min"`
	// FloatMax: maximum value for float types
	FloatMax *float32 `json:"float_max"`
}

EngineSetting: engine setting

type EngineSettingPropertyType

type EngineSettingPropertyType string

func (EngineSettingPropertyType) MarshalJSON

func (enum EngineSettingPropertyType) MarshalJSON() ([]byte, error)

func (EngineSettingPropertyType) String

func (enum EngineSettingPropertyType) String() string

func (*EngineSettingPropertyType) UnmarshalJSON

func (enum *EngineSettingPropertyType) UnmarshalJSON(data []byte) error

type EngineVersion

type EngineVersion struct {
	// Version: database engine version
	Version string `json:"version"`
	// Name: database engine name
	Name string `json:"name"`
	// EndOfLife: end of life date
	EndOfLife *time.Time `json:"end_of_life"`
	// AvailableSettings: engine settings available to be set
	AvailableSettings []*EngineSetting `json:"available_settings"`
	// Disabled: disabled versions cannot be created
	Disabled bool `json:"disabled"`
	// Beta: beta status of engine version
	Beta bool `json:"beta"`
	// AvailableInitSettings: engine settings available to be set at database initialisation
	AvailableInitSettings []*EngineSetting `json:"available_init_settings"`
}

EngineVersion: engine version

type ExportDatabaseBackupRequest

type ExportDatabaseBackupRequest struct {
	Region scw.Region `json:"-"`
	// DatabaseBackupID: UUID of the database backup you want to export
	DatabaseBackupID string `json:"-"`
}

type GetDatabaseBackupRequest

type GetDatabaseBackupRequest struct {
	Region scw.Region `json:"-"`
	// DatabaseBackupID: UUID of the database backup
	DatabaseBackupID string `json:"-"`
}

type GetEndpointRequest

type GetEndpointRequest struct {
	Region scw.Region `json:"-"`
	// EndpointID: UUID of the endpoint you want to get
	EndpointID string `json:"-"`
}

type GetInstanceCertificateRequest

type GetInstanceCertificateRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"-"`
}

type GetInstanceLogRequest

type GetInstanceLogRequest struct {
	Region scw.Region `json:"-"`
	// InstanceLogID: UUID of the instance_log you want
	InstanceLogID string `json:"-"`
}

type GetInstanceMetricsRequest

type GetInstanceMetricsRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"-"`
	// StartDate: start date to gather metrics from
	StartDate *time.Time `json:"-"`
	// EndDate: end date to gather metrics from
	EndDate *time.Time `json:"-"`
	// MetricName: name of the metric to gather
	MetricName *string `json:"-"`
}

type GetInstanceRequest

type GetInstanceRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"-"`
}

type GetServiceInfoRequest

type GetServiceInfoRequest struct {
	Region scw.Region `json:"-"`
}

type GetSnapshotRequest

type GetSnapshotRequest struct {
	Region scw.Region `json:"-"`
	// SnapshotID: UUID of the snapshot
	SnapshotID string `json:"-"`
}

type Instance

type Instance struct {
	// CreatedAt: creation date (Format ISO 8601)
	CreatedAt *time.Time `json:"created_at"`
	// Volume: volumes of the instance
	Volume *Volume `json:"volume"`
	// Region: region the instance is in
	Region scw.Region `json:"region"`
	// ID: UUID of the instance
	ID string `json:"id"`
	// Name: name of the instance
	Name string `json:"name"`
	// OrganizationID: organization ID the instance belongs to
	OrganizationID string `json:"organization_id"`
	// ProjectID: project ID the instance belongs to
	ProjectID string `json:"project_id"`
	// Status: status of the instance
	//
	// Default value: unknown
	Status InstanceStatus `json:"status"`
	// Engine: database engine of the database (PostgreSQL, MySQL, ...)
	Engine string `json:"engine"`
	// Deprecated: Endpoint: endpoint of the instance
	Endpoint *Endpoint `json:"endpoint"`
	// Tags: list of tags applied to the instance
	Tags []string `json:"tags"`
	// Settings: advanced settings of the instance
	Settings []*InstanceSetting `json:"settings"`
	// BackupSchedule: backup schedule of the instance
	BackupSchedule *BackupSchedule `json:"backup_schedule"`
	// IsHaCluster: whether or not High-Availability is enabled
	IsHaCluster bool `json:"is_ha_cluster"`
	// ReadReplicas: read replicas of the instance
	ReadReplicas []*Endpoint `json:"read_replicas"`
	// NodeType: node type of the instance
	NodeType string `json:"node_type"`
	// InitSettings: list of engine settings to be set at database initialisation
	InitSettings []*InstanceSetting `json:"init_settings"`
	// Endpoints: list of instance endpoints
	Endpoints []*Endpoint `json:"endpoints"`
	// LogsPolicy: logs policy of the instance
	LogsPolicy *LogsPolicy `json:"logs_policy"`
	// BackupSameRegion: store logical backups in the same region as the database instance
	BackupSameRegion bool `json:"backup_same_region"`
	// Maintenances: list of instance maintenances
	Maintenances []*Maintenance `json:"maintenances"`
}

Instance: instance

type InstanceLog

type InstanceLog struct {
	// DownloadURL: presigned S3 URL to download your log file
	DownloadURL *string `json:"download_url"`
	// ID: UUID of the instance log
	ID string `json:"id"`
	// Status: status of the logs in a given instance
	//
	// Default value: unknown
	Status InstanceLogStatus `json:"status"`
	// NodeName: name of the undelying node
	NodeName string `json:"node_name"`
	// ExpiresAt: expiration date (Format ISO 8601)
	ExpiresAt *time.Time `json:"expires_at"`
	// CreatedAt: creation date (Format ISO 8601)
	CreatedAt *time.Time `json:"created_at"`
	// Region: region the instance is in
	Region scw.Region `json:"region"`
}

InstanceLog: instance log

type InstanceLogStatus

type InstanceLogStatus string

func (InstanceLogStatus) MarshalJSON

func (enum InstanceLogStatus) MarshalJSON() ([]byte, error)

func (InstanceLogStatus) String

func (enum InstanceLogStatus) String() string

func (*InstanceLogStatus) UnmarshalJSON

func (enum *InstanceLogStatus) UnmarshalJSON(data []byte) error

type InstanceMetrics

type InstanceMetrics struct {
	// Timeseries: time series of metrics of a given instance
	Timeseries []*scw.TimeSeries `json:"timeseries"`
}

InstanceMetrics: instance metrics

type InstanceSetting

type InstanceSetting struct {
	Name string `json:"name"`

	Value string `json:"value"`
}

type InstanceStatus

type InstanceStatus string

func (InstanceStatus) MarshalJSON

func (enum InstanceStatus) MarshalJSON() ([]byte, error)

func (InstanceStatus) String

func (enum InstanceStatus) String() string

func (*InstanceStatus) UnmarshalJSON

func (enum *InstanceStatus) UnmarshalJSON(data []byte) error

type ListDatabaseBackupsRequest

type ListDatabaseBackupsRequest struct {
	Region scw.Region `json:"-"`
	// Name: name of the database backups
	Name *string `json:"-"`
	// OrderBy: criteria to use when ordering database backups listing
	//
	// Default value: created_at_asc
	OrderBy ListDatabaseBackupsRequestOrderBy `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID *string `json:"-"`
	// OrganizationID: organization ID the database backups belongs to
	OrganizationID *string `json:"-"`
	// ProjectID: project ID the database backups belongs to
	ProjectID *string `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

type ListDatabaseBackupsRequestOrderBy

type ListDatabaseBackupsRequestOrderBy string

func (ListDatabaseBackupsRequestOrderBy) MarshalJSON

func (enum ListDatabaseBackupsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListDatabaseBackupsRequestOrderBy) String

func (*ListDatabaseBackupsRequestOrderBy) UnmarshalJSON

func (enum *ListDatabaseBackupsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListDatabaseBackupsResponse

type ListDatabaseBackupsResponse struct {
	// DatabaseBackups: list of database backups
	DatabaseBackups []*DatabaseBackup `json:"database_backups"`
	// TotalCount: total count of database backups available
	TotalCount uint32 `json:"total_count"`
}

ListDatabaseBackupsResponse: list database backups response

func (*ListDatabaseBackupsResponse) UnsafeAppend

func (r *ListDatabaseBackupsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListDatabaseBackupsResponse) UnsafeGetTotalCount

func (r *ListDatabaseBackupsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListDatabaseEnginesRequest

type ListDatabaseEnginesRequest struct {
	Region scw.Region `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

type ListDatabaseEnginesResponse

type ListDatabaseEnginesResponse struct {
	// Engines: list of the available database engines
	Engines []*DatabaseEngine `json:"engines"`
	// TotalCount: total count of database engines available
	TotalCount uint32 `json:"total_count"`
}

ListDatabaseEnginesResponse: list database engines response

func (*ListDatabaseEnginesResponse) UnsafeAppend

func (r *ListDatabaseEnginesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListDatabaseEnginesResponse) UnsafeGetTotalCount

func (r *ListDatabaseEnginesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListDatabasesRequest

type ListDatabasesRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance to list database of
	InstanceID string `json:"-"`
	// Name: name of the database
	Name *string `json:"-"`
	// Managed: whether or not the database is managed
	Managed *bool `json:"-"`
	// Owner: user that owns this database
	Owner *string `json:"-"`
	// OrderBy: criteria to use when ordering database listing
	//
	// Default value: name_asc
	OrderBy ListDatabasesRequestOrderBy `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

type ListDatabasesRequestOrderBy

type ListDatabasesRequestOrderBy string

func (ListDatabasesRequestOrderBy) MarshalJSON

func (enum ListDatabasesRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListDatabasesRequestOrderBy) String

func (enum ListDatabasesRequestOrderBy) String() string

func (*ListDatabasesRequestOrderBy) UnmarshalJSON

func (enum *ListDatabasesRequestOrderBy) UnmarshalJSON(data []byte) error

type ListDatabasesResponse

type ListDatabasesResponse struct {
	// Databases: list of the databases
	Databases []*Database `json:"databases"`
	// TotalCount: total count of databases present on a given instance
	TotalCount uint32 `json:"total_count"`
}

ListDatabasesResponse: list databases response

func (*ListDatabasesResponse) UnsafeAppend

func (r *ListDatabasesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListDatabasesResponse) UnsafeGetTotalCount

func (r *ListDatabasesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListInstanceACLRulesRequest

type ListInstanceACLRulesRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

type ListInstanceACLRulesResponse

type ListInstanceACLRulesResponse struct {
	// Rules: list of the ACL rules present on a given instance
	Rules []*ACLRule `json:"rules"`
	// TotalCount: total count of ACL rules present on a given instance
	TotalCount uint32 `json:"total_count"`
}

ListInstanceACLRulesResponse: list instance acl rules response

func (*ListInstanceACLRulesResponse) UnsafeAppend

func (r *ListInstanceACLRulesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListInstanceACLRulesResponse) UnsafeGetTotalCount

func (r *ListInstanceACLRulesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListInstanceLogsDetailsRequest

type ListInstanceLogsDetailsRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want logs of
	InstanceID string `json:"-"`
}

type ListInstanceLogsDetailsResponse

type ListInstanceLogsDetailsResponse struct {
	// Details: remote instance logs details
	Details []*ListInstanceLogsDetailsResponseInstanceLogDetail `json:"details"`
}

ListInstanceLogsDetailsResponse: list instance logs details response

type ListInstanceLogsDetailsResponseInstanceLogDetail

type ListInstanceLogsDetailsResponseInstanceLogDetail struct {
	LogName string `json:"log_name"`

	Size uint64 `json:"size"`
}

type ListInstanceLogsRequest

type ListInstanceLogsRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want logs of
	InstanceID string `json:"-"`
	// OrderBy: criteria to use when ordering instance logs listing
	//
	// Default value: created_at_asc
	OrderBy ListInstanceLogsRequestOrderBy `json:"-"`
}

type ListInstanceLogsRequestOrderBy

type ListInstanceLogsRequestOrderBy string

func (ListInstanceLogsRequestOrderBy) MarshalJSON

func (enum ListInstanceLogsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListInstanceLogsRequestOrderBy) String

func (enum ListInstanceLogsRequestOrderBy) String() string

func (*ListInstanceLogsRequestOrderBy) UnmarshalJSON

func (enum *ListInstanceLogsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListInstanceLogsResponse

type ListInstanceLogsResponse struct {
	// InstanceLogs: available logs in a given instance
	InstanceLogs []*InstanceLog `json:"instance_logs"`
}

ListInstanceLogsResponse: list instance logs response

type ListInstancesRequest

type ListInstancesRequest struct {
	Region scw.Region `json:"-"`
	// Tags: list instance that have a given tags
	Tags []string `json:"-"`
	// Name: list instance that match a given name pattern
	Name *string `json:"-"`
	// OrderBy: criteria to use when ordering instance listing
	//
	// Default value: created_at_asc
	OrderBy ListInstancesRequestOrderBy `json:"-"`
	// OrganizationID: please use `project_id` instead
	OrganizationID *string `json:"-"`
	// ProjectID: project ID to list the instance of
	ProjectID *string `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

type ListInstancesRequestOrderBy

type ListInstancesRequestOrderBy string

func (ListInstancesRequestOrderBy) MarshalJSON

func (enum ListInstancesRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListInstancesRequestOrderBy) String

func (enum ListInstancesRequestOrderBy) String() string

func (*ListInstancesRequestOrderBy) UnmarshalJSON

func (enum *ListInstancesRequestOrderBy) UnmarshalJSON(data []byte) error

type ListInstancesResponse

type ListInstancesResponse struct {
	// Instances: list all instances available in a given organization/project
	Instances []*Instance `json:"instances"`
	// TotalCount: total count of instances available in a given organization/project
	TotalCount uint32 `json:"total_count"`
}

ListInstancesResponse: list instances response

func (*ListInstancesResponse) UnsafeAppend

func (r *ListInstancesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListInstancesResponse) UnsafeGetTotalCount

func (r *ListInstancesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListNodeTypesRequest

type ListNodeTypesRequest struct {
	Region scw.Region `json:"-"`
	// IncludeDisabledTypes: whether or not to include disabled types
	IncludeDisabledTypes bool `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

type ListNodeTypesResponse

type ListNodeTypesResponse struct {
	// NodeTypes: types of the node
	NodeTypes []*NodeType `json:"node_types"`
	// TotalCount: total count of node-types available
	TotalCount uint32 `json:"total_count"`
}

ListNodeTypesResponse: list node types response

func (*ListNodeTypesResponse) UnsafeAppend

func (r *ListNodeTypesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListNodeTypesResponse) UnsafeGetTotalCount

func (r *ListNodeTypesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListPrivilegesRequest

type ListPrivilegesRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"-"`
	// OrderBy: criteria to use when ordering privileges listing
	//
	// Default value: user_name_asc
	OrderBy ListPrivilegesRequestOrderBy `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
	// DatabaseName: name of the database
	DatabaseName *string `json:"-"`
	// UserName: name of the user
	UserName *string `json:"-"`
}

type ListPrivilegesRequestOrderBy

type ListPrivilegesRequestOrderBy string

func (ListPrivilegesRequestOrderBy) MarshalJSON

func (enum ListPrivilegesRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListPrivilegesRequestOrderBy) String

func (enum ListPrivilegesRequestOrderBy) String() string

func (*ListPrivilegesRequestOrderBy) UnmarshalJSON

func (enum *ListPrivilegesRequestOrderBy) UnmarshalJSON(data []byte) error

type ListPrivilegesResponse

type ListPrivilegesResponse struct {
	// Privileges: privileges of a given user in a given database in a given instance
	Privileges []*Privilege `json:"privileges"`
	// TotalCount: total count of privileges present on a given database
	TotalCount uint32 `json:"total_count"`
}

ListPrivilegesResponse: list privileges response

func (*ListPrivilegesResponse) UnsafeAppend

func (r *ListPrivilegesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListPrivilegesResponse) UnsafeGetTotalCount

func (r *ListPrivilegesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListSnapshotsRequest

type ListSnapshotsRequest struct {
	Region scw.Region `json:"-"`
	// Name: name of the snapshot
	Name *string `json:"-"`
	// OrderBy: criteria to use when ordering snapshot listing
	//
	// Default value: created_at_asc
	OrderBy ListSnapshotsRequestOrderBy `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID *string `json:"-"`
	// OrganizationID: organization ID the snapshots belongs to
	OrganizationID *string `json:"-"`
	// ProjectID: project ID the snapshots belongs to
	ProjectID *string `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

type ListSnapshotsRequestOrderBy

type ListSnapshotsRequestOrderBy string

func (ListSnapshotsRequestOrderBy) MarshalJSON

func (enum ListSnapshotsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListSnapshotsRequestOrderBy) String

func (enum ListSnapshotsRequestOrderBy) String() string

func (*ListSnapshotsRequestOrderBy) UnmarshalJSON

func (enum *ListSnapshotsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListSnapshotsResponse

type ListSnapshotsResponse struct {
	// Snapshots: list of snapshots
	Snapshots []*Snapshot `json:"snapshots"`
	// TotalCount: total count of snapshots available
	TotalCount uint32 `json:"total_count"`
}

ListSnapshotsResponse: list snapshots response

func (*ListSnapshotsResponse) UnsafeAppend

func (r *ListSnapshotsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListSnapshotsResponse) UnsafeGetTotalCount

func (r *ListSnapshotsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListUsersRequest

type ListUsersRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"-"`
	// Name: name of the user
	Name *string `json:"-"`
	// OrderBy: criteria to use when ordering users listing
	//
	// Default value: name_asc
	OrderBy ListUsersRequestOrderBy `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

type ListUsersRequestOrderBy

type ListUsersRequestOrderBy string

func (ListUsersRequestOrderBy) MarshalJSON

func (enum ListUsersRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListUsersRequestOrderBy) String

func (enum ListUsersRequestOrderBy) String() string

func (*ListUsersRequestOrderBy) UnmarshalJSON

func (enum *ListUsersRequestOrderBy) UnmarshalJSON(data []byte) error

type ListUsersResponse

type ListUsersResponse struct {
	// Users: list of users in a given instance
	Users []*User `json:"users"`
	// TotalCount: total count of users present on a given instance
	TotalCount uint32 `json:"total_count"`
}

ListUsersResponse: list users response

func (*ListUsersResponse) UnsafeAppend

func (r *ListUsersResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListUsersResponse) UnsafeGetTotalCount

func (r *ListUsersResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type LogsPolicy

type LogsPolicy struct {
	// MaxAgeRetention: max age (in day) of remote logs to keep on the database instance
	MaxAgeRetention *uint32 `json:"max_age_retention"`
	// TotalDiskRetention: max disk size of remote logs to keep on the database instance
	TotalDiskRetention *scw.Size `json:"total_disk_retention"`
}

LogsPolicy: logs policy

type Maintenance

type Maintenance struct {
	// StartsAt: start date of the maintenance window
	StartsAt *time.Time `json:"starts_at"`
	// StopsAt: end date of the maintenance window
	StopsAt *time.Time `json:"stops_at"`
	// ClosedAt: closed maintenance date
	ClosedAt *time.Time `json:"closed_at"`
	// Reason: maintenance information message
	Reason string `json:"reason"`
	// Status: status of the maintenance
	//
	// Default value: unknown
	Status MaintenanceStatus `json:"status"`
}

Maintenance: maintenance

type MaintenanceStatus

type MaintenanceStatus string

func (MaintenanceStatus) MarshalJSON

func (enum MaintenanceStatus) MarshalJSON() ([]byte, error)

func (MaintenanceStatus) String

func (enum MaintenanceStatus) String() string

func (*MaintenanceStatus) UnmarshalJSON

func (enum *MaintenanceStatus) UnmarshalJSON(data []byte) error

type NodeType

type NodeType struct {
	// Name: node Type name identifier
	Name string `json:"name"`
	// StockStatus: current stock status for the Node Type
	//
	// Default value: unknown
	StockStatus NodeTypeStock `json:"stock_status"`
	// Description: current specs of the offer
	Description string `json:"description"`
	// Vcpus: number of virtual CPUs
	Vcpus uint32 `json:"vcpus"`
	// Memory: quantity of RAM
	Memory scw.Size `json:"memory"`
	// Deprecated: VolumeConstraint: [deprecated] Node Type volume constraints
	VolumeConstraint *NodeTypeVolumeConstraintSizes `json:"volume_constraint"`
	// Deprecated: IsBssdCompatible: the Node Type is compliant with Block Storage
	IsBssdCompatible bool `json:"is_bssd_compatible"`
	// Disabled: the Node Type is currently disabled
	Disabled bool `json:"disabled"`
	// Beta: the Node Type is currently in beta
	Beta bool `json:"beta"`
	// AvailableVolumeTypes: available storage options for the Node Type
	AvailableVolumeTypes []*NodeTypeVolumeType `json:"available_volume_types"`
	// Region: region the Node Type is in
	Region scw.Region `json:"region"`
}

NodeType: node type

type NodeTypeStock

type NodeTypeStock string

func (NodeTypeStock) MarshalJSON

func (enum NodeTypeStock) MarshalJSON() ([]byte, error)

func (NodeTypeStock) String

func (enum NodeTypeStock) String() string

func (*NodeTypeStock) UnmarshalJSON

func (enum *NodeTypeStock) UnmarshalJSON(data []byte) error

type NodeTypeVolumeConstraintSizes

type NodeTypeVolumeConstraintSizes struct {
	// MinSize: [deprecated] Mimimum size required for the Volume
	MinSize scw.Size `json:"min_size"`
	// MaxSize: [deprecated] Maximum size required for the Volume
	MaxSize scw.Size `json:"max_size"`
}

NodeTypeVolumeConstraintSizes: node type. volume constraint sizes

type NodeTypeVolumeType

type NodeTypeVolumeType struct {
	// Type: volume Type
	//
	// Default value: lssd
	Type VolumeType `json:"type"`
	// Description: the description of the Volume
	Description string `json:"description"`
	// MinSize: mimimum size required for the Volume
	MinSize scw.Size `json:"min_size"`
	// MaxSize: maximum size required for the Volume
	MaxSize scw.Size `json:"max_size"`
	// ChunkSize: minimum increment level for a Block Storage volume size
	ChunkSize scw.Size `json:"chunk_size"`
}

NodeTypeVolumeType: node type. volume type

type Permission

type Permission string

func (Permission) MarshalJSON

func (enum Permission) MarshalJSON() ([]byte, error)

func (Permission) String

func (enum Permission) String() string

func (*Permission) UnmarshalJSON

func (enum *Permission) UnmarshalJSON(data []byte) error

type PrepareInstanceLogsRequest

type PrepareInstanceLogsRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want logs of
	InstanceID string `json:"-"`
	// StartDate: start datetime of your log. Format: `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z`
	StartDate *time.Time `json:"start_date"`
	// EndDate: end datetime of your log. Format: `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z`
	EndDate *time.Time `json:"end_date"`
}

type PrepareInstanceLogsResponse

type PrepareInstanceLogsResponse struct {
	// InstanceLogs: instance logs for a given instance between a start and an end date
	InstanceLogs []*InstanceLog `json:"instance_logs"`
}

PrepareInstanceLogsResponse: prepare instance logs response

type Privilege

type Privilege struct {
	// Permission: permission (Read, Read/Write, All, Custom)
	//
	// Default value: readonly
	Permission Permission `json:"permission"`
	// DatabaseName: name of the database
	DatabaseName string `json:"database_name"`
	// UserName: name of the user
	UserName string `json:"user_name"`
}

Privilege: privilege

type PurgeInstanceLogsRequest

type PurgeInstanceLogsRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want logs of
	InstanceID string `json:"-"`
	// LogName: specific log name to purge
	LogName *string `json:"log_name"`
}

type RenewInstanceCertificateRequest

type RenewInstanceCertificateRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want logs of
	InstanceID string `json:"-"`
}

type RestartInstanceRequest

type RestartInstanceRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want to restart
	InstanceID string `json:"-"`
}

type RestoreDatabaseBackupRequest

type RestoreDatabaseBackupRequest struct {
	Region scw.Region `json:"-"`
	// DatabaseBackupID: backup of a logical database
	DatabaseBackupID string `json:"-"`
	// DatabaseName: defines the destination database in order to restore into a specified database, the default destination is set to the origin database of the backup
	DatabaseName *string `json:"database_name"`
	// InstanceID: defines the rdb instance where the backup has to be restored
	InstanceID string `json:"instance_id"`
}

type SetInstanceACLRulesRequest

type SetInstanceACLRulesRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance where the ACL rules has to be set
	InstanceID string `json:"-"`
	// Rules: ACL rules to define for the instance
	Rules []*ACLRuleRequest `json:"rules"`
}

type SetInstanceACLRulesResponse

type SetInstanceACLRulesResponse struct {
	// Rules: aCLs rules configured for an instance
	Rules []*ACLRule `json:"rules"`
}

SetInstanceACLRulesResponse: set instance acl rules response

type SetInstanceSettingsRequest

type SetInstanceSettingsRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance where the settings has to be set
	InstanceID string `json:"-"`
	// Settings: settings to define for the instance
	Settings []*InstanceSetting `json:"settings"`
}

type SetInstanceSettingsResponse

type SetInstanceSettingsResponse struct {
	// Settings: settings configured for a given instance
	Settings []*InstanceSetting `json:"settings"`
}

SetInstanceSettingsResponse: set instance settings response

type SetPrivilegeRequest

type SetPrivilegeRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"-"`
	// DatabaseName: name of the database
	DatabaseName string `json:"database_name"`
	// UserName: name of the user
	UserName string `json:"user_name"`
	// Permission: permission to set (Read, Read/Write, All, Custom)
	//
	// Default value: readonly
	Permission Permission `json:"permission"`
}

type Snapshot

type Snapshot struct {
	// ID: UUID of the snapshot
	ID string `json:"id"`
	// InstanceID: UUID of the instance
	InstanceID string `json:"instance_id"`
	// Name: name of the snapshot
	Name string `json:"name"`
	// Status: status of the snapshot
	//
	// Default value: unknown
	Status SnapshotStatus `json:"status"`
	// Size: size of the snapshot
	Size *scw.Size `json:"size"`
	// ExpiresAt: expiration date (Format ISO 8601)
	ExpiresAt *time.Time `json:"expires_at"`
	// CreatedAt: creation date (Format ISO 8601)
	CreatedAt *time.Time `json:"created_at"`
	// UpdatedAt: updated date (Format ISO 8601)
	UpdatedAt *time.Time `json:"updated_at"`
	// InstanceName: name of the instance of the snapshot
	InstanceName string `json:"instance_name"`
	// NodeType: source node type
	NodeType string `json:"node_type"`
	// Region: region of this snapshot
	Region scw.Region `json:"region"`
}

Snapshot: snapshot

type SnapshotStatus

type SnapshotStatus string

func (SnapshotStatus) MarshalJSON

func (enum SnapshotStatus) MarshalJSON() ([]byte, error)

func (SnapshotStatus) String

func (enum SnapshotStatus) String() string

func (*SnapshotStatus) UnmarshalJSON

func (enum *SnapshotStatus) UnmarshalJSON(data []byte) error

type UpdateDatabaseBackupRequest

type UpdateDatabaseBackupRequest struct {
	Region scw.Region `json:"-"`
	// DatabaseBackupID: UUID of the database backup to update
	DatabaseBackupID string `json:"-"`
	// Name: name of the Database Backup
	Name *string `json:"name"`
	// ExpiresAt: expiration date (Format ISO 8601)
	ExpiresAt *time.Time `json:"expires_at"`
}

type UpdateInstanceRequest

type UpdateInstanceRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance to update
	InstanceID string `json:"-"`
	// BackupScheduleFrequency: in hours
	BackupScheduleFrequency *uint32 `json:"backup_schedule_frequency"`
	// BackupScheduleRetention: in days
	BackupScheduleRetention *uint32 `json:"backup_schedule_retention"`
	// IsBackupScheduleDisabled: whether or not the backup schedule is disabled
	IsBackupScheduleDisabled *bool `json:"is_backup_schedule_disabled"`
	// Name: name of the instance
	Name *string `json:"name"`
	// Tags: tags of a given instance
	Tags *[]string `json:"tags"`
	// LogsPolicy: logs policy of the instance
	LogsPolicy *LogsPolicy `json:"logs_policy"`
	// BackupSameRegion: store logical backups in the same region as the database instance
	BackupSameRegion *bool `json:"backup_same_region"`
}

type UpdateSnapshotRequest

type UpdateSnapshotRequest struct {
	Region scw.Region `json:"-"`
	// SnapshotID: UUID of the snapshot to update
	SnapshotID string `json:"-"`
	// Name: name of the snapshot
	Name *string `json:"name"`
	// ExpiresAt: expiration date (Format ISO 8601)
	ExpiresAt *time.Time `json:"expires_at"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance the user belongs to
	InstanceID string `json:"-"`
	// Name: name of the database user
	Name string `json:"-"`
	// Password: password of the database user
	Password *string `json:"password"`
	// IsAdmin: whether or not this user got administrative privileges
	IsAdmin *bool `json:"is_admin"`
}

type UpgradeInstanceRequest

type UpgradeInstanceRequest struct {
	Region scw.Region `json:"-"`
	// InstanceID: UUID of the instance you want to upgrade
	InstanceID string `json:"-"`
	// NodeType: node type of the instance you want to upgrade to
	// Precisely one of EnableHa, NodeType, VolumeSize, VolumeType must be set.
	NodeType *string `json:"node_type,omitempty"`
	// EnableHa: set to true to enable high availability on your instance
	// Precisely one of EnableHa, NodeType, VolumeSize, VolumeType must be set.
	EnableHa *bool `json:"enable_ha,omitempty"`
	// VolumeSize: increase your block storage volume size
	// Precisely one of EnableHa, NodeType, VolumeSize, VolumeType must be set.
	VolumeSize *uint64 `json:"volume_size,omitempty"`
	// VolumeType: change your instance storage type
	//
	// Default value: lssd
	// Precisely one of EnableHa, NodeType, VolumeSize, VolumeType must be set.
	VolumeType *VolumeType `json:"volume_type,omitempty"`
}

type User

type User struct {
	// Name: name of the user (Length must be between 1 and 63 characters, First character must be an alphabet character (a-zA-Z), Your Username cannot start with '_rdb', Only a-zA-Z0-9_$- characters are accepted)
	Name string `json:"name"`
	// IsAdmin: whether or not a user got administrative privileges on the database instance
	IsAdmin bool `json:"is_admin"`
}

User: user

type Volume

type Volume struct {
	// Type:
	//
	// Default value: lssd
	Type VolumeType `json:"type"`

	Size scw.Size `json:"size"`
}

type VolumeType

type VolumeType string

func (VolumeType) MarshalJSON

func (enum VolumeType) MarshalJSON() ([]byte, error)

func (VolumeType) String

func (enum VolumeType) String() string

func (*VolumeType) UnmarshalJSON

func (enum *VolumeType) UnmarshalJSON(data []byte) error

type WaitForDatabaseBackupRequest

type WaitForDatabaseBackupRequest struct {
	DatabaseBackupID string
	Region           scw.Region
	Timeout          *time.Duration
	RetryInterval    *time.Duration
}

type WaitForInstanceLogRequest

type WaitForInstanceLogRequest struct {
	InstanceLogID string
	Region        scw.Region
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

type WaitForInstanceRequest

type WaitForInstanceRequest struct {
	InstanceID    string
	Region        scw.Region
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForInstanceRequest is used by WaitForInstance method.

Jump to

Keyboard shortcuts

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