Documentation
¶
Overview ¶
Package rdb provides methods and message types of the rdb v1 API.
Index ¶
- Constants
- type ACLRule
- type ACLRuleAction
- type ACLRuleDirection
- type ACLRuleProtocol
- type ACLRuleRequest
- type API
- func (s *API) AddInstanceACLRules(req *AddInstanceACLRulesRequest, opts ...scw.RequestOption) (*AddInstanceACLRulesResponse, error)
- func (s *API) AddInstanceSettings(req *AddInstanceSettingsRequest, opts ...scw.RequestOption) (*AddInstanceSettingsResponse, error)
- func (s *API) CloneInstance(req *CloneInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) CreateDatabase(req *CreateDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
- func (s *API) CreateDatabaseBackup(req *CreateDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) CreateEndpoint(req *CreateEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)
- func (s *API) CreateInstance(req *CreateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) CreateInstanceFromSnapshot(req *CreateInstanceFromSnapshotRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) CreateReadReplica(req *CreateReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
- func (s *API) CreateReadReplicaEndpoint(req *CreateReadReplicaEndpointRequest, opts ...scw.RequestOption) (*ReadReplica, error)
- func (s *API) CreateSnapshot(req *CreateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *API) CreateUser(req *CreateUserRequest, opts ...scw.RequestOption) (*User, error)
- func (s *API) DeleteDatabase(req *DeleteDatabaseRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteDatabaseBackup(req *DeleteDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) DeleteEndpoint(req *DeleteEndpointRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteInstance(req *DeleteInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) DeleteInstanceACLRules(req *DeleteInstanceACLRulesRequest, opts ...scw.RequestOption) (*DeleteInstanceACLRulesResponse, error)
- func (s *API) DeleteInstanceSettings(req *DeleteInstanceSettingsRequest, opts ...scw.RequestOption) (*DeleteInstanceSettingsResponse, error)
- func (s *API) DeleteReadReplica(req *DeleteReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
- func (s *API) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *API) DeleteUser(req *DeleteUserRequest, opts ...scw.RequestOption) error
- func (s *API) ExportDatabaseBackup(req *ExportDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) GetDatabaseBackup(req *GetDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) GetEndpoint(req *GetEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)
- func (s *API) GetInstance(req *GetInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) GetInstanceCertificate(req *GetInstanceCertificateRequest, opts ...scw.RequestOption) (*scw.File, error)
- func (s *API) GetInstanceLog(req *GetInstanceLogRequest, opts ...scw.RequestOption) (*InstanceLog, error)
- func (s *API) GetInstanceMetrics(req *GetInstanceMetricsRequest, opts ...scw.RequestOption) (*InstanceMetrics, error)
- func (s *API) GetReadReplica(req *GetReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
- func (s *API) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *API) ListDatabaseBackups(req *ListDatabaseBackupsRequest, opts ...scw.RequestOption) (*ListDatabaseBackupsResponse, error)
- func (s *API) ListDatabaseEngines(req *ListDatabaseEnginesRequest, opts ...scw.RequestOption) (*ListDatabaseEnginesResponse, error)
- func (s *API) ListDatabases(req *ListDatabasesRequest, opts ...scw.RequestOption) (*ListDatabasesResponse, error)
- func (s *API) ListInstanceACLRules(req *ListInstanceACLRulesRequest, opts ...scw.RequestOption) (*ListInstanceACLRulesResponse, error)
- func (s *API) ListInstanceLogs(req *ListInstanceLogsRequest, opts ...scw.RequestOption) (*ListInstanceLogsResponse, error)
- func (s *API) ListInstanceLogsDetails(req *ListInstanceLogsDetailsRequest, opts ...scw.RequestOption) (*ListInstanceLogsDetailsResponse, error)
- func (s *API) ListInstances(req *ListInstancesRequest, opts ...scw.RequestOption) (*ListInstancesResponse, error)
- func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption) (*ListNodeTypesResponse, error)
- func (s *API) ListPrivileges(req *ListPrivilegesRequest, opts ...scw.RequestOption) (*ListPrivilegesResponse, error)
- func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)
- func (s *API) ListUsers(req *ListUsersRequest, opts ...scw.RequestOption) (*ListUsersResponse, error)
- func (s *API) MigrateEndpoint(req *MigrateEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)
- func (s *API) PrepareInstanceLogs(req *PrepareInstanceLogsRequest, opts ...scw.RequestOption) (*PrepareInstanceLogsResponse, error)
- func (s *API) PurgeInstanceLogs(req *PurgeInstanceLogsRequest, opts ...scw.RequestOption) error
- func (s *API) Regions() []scw.Region
- func (s *API) RenewInstanceCertificate(req *RenewInstanceCertificateRequest, opts ...scw.RequestOption) error
- func (s *API) ResetReadReplica(req *ResetReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
- func (s *API) RestartInstance(req *RestartInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) RestoreDatabaseBackup(req *RestoreDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) SetInstanceACLRules(req *SetInstanceACLRulesRequest, opts ...scw.RequestOption) (*SetInstanceACLRulesResponse, error)
- func (s *API) SetInstanceSettings(req *SetInstanceSettingsRequest, opts ...scw.RequestOption) (*SetInstanceSettingsResponse, error)
- func (s *API) SetPrivilege(req *SetPrivilegeRequest, opts ...scw.RequestOption) (*Privilege, error)
- func (s *API) UpdateDatabaseBackup(req *UpdateDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) UpdateInstance(req *UpdateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) UpdateSnapshot(req *UpdateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *API) UpdateUser(req *UpdateUserRequest, opts ...scw.RequestOption) (*User, error)
- func (s *API) UpgradeInstance(req *UpgradeInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) WaitForDatabaseBackup(req *WaitForDatabaseBackupRequest, opts ...scw.RequestOption) (*DatabaseBackup, error)
- func (s *API) WaitForInstance(req *WaitForInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) WaitForInstanceLog(req *WaitForInstanceLogRequest, opts ...scw.RequestOption) (*InstanceLog, error)
- func (s *API) WaitForReadReplica(req *WaitForReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
- type AddInstanceACLRulesRequest
- type AddInstanceACLRulesResponse
- type AddInstanceSettingsRequest
- type AddInstanceSettingsResponse
- type BackupSchedule
- type CloneInstanceRequest
- type CreateDatabaseBackupRequest
- type CreateDatabaseRequest
- type CreateEndpointRequest
- type CreateInstanceFromSnapshotRequest
- type CreateInstanceRequest
- type CreateReadReplicaEndpointRequest
- type CreateReadReplicaRequest
- type CreateSnapshotRequest
- type CreateUserRequest
- type Database
- type DatabaseBackup
- type DatabaseBackupStatus
- type DatabaseEngine
- type DeleteDatabaseBackupRequest
- type DeleteDatabaseRequest
- type DeleteEndpointRequest
- type DeleteInstanceACLRulesRequest
- type DeleteInstanceACLRulesResponse
- type DeleteInstanceRequest
- type DeleteInstanceSettingsRequest
- type DeleteInstanceSettingsResponse
- type DeleteReadReplicaRequest
- type DeleteSnapshotRequest
- type DeleteUserRequest
- type Endpoint
- type EndpointDirectAccessDetails
- type EndpointLoadBalancerDetails
- type EndpointPrivateNetworkDetails
- type EndpointSpec
- type EndpointSpecLoadBalancer
- type EndpointSpecPrivateNetwork
- type EndpointSpecPrivateNetworkIpamConfig
- type EngineSetting
- type EngineSettingPropertyType
- type EngineVersion
- type ExportDatabaseBackupRequest
- type GetDatabaseBackupRequest
- type GetEndpointRequest
- type GetInstanceCertificateRequest
- type GetInstanceLogRequest
- type GetInstanceMetricsRequest
- type GetInstanceRequest
- type GetReadReplicaRequest
- type GetSnapshotRequest
- type Instance
- type InstanceLog
- type InstanceLogStatus
- type InstanceMetrics
- type InstanceSetting
- type InstanceStatus
- type ListDatabaseBackupsRequest
- type ListDatabaseBackupsRequestOrderBy
- type ListDatabaseBackupsResponse
- type ListDatabaseEnginesRequest
- type ListDatabaseEnginesResponse
- type ListDatabasesRequest
- type ListDatabasesRequestOrderBy
- type ListDatabasesResponse
- type ListInstanceACLRulesRequest
- type ListInstanceACLRulesResponse
- type ListInstanceLogsDetailsRequest
- type ListInstanceLogsDetailsResponse
- type ListInstanceLogsDetailsResponseInstanceLogDetail
- type ListInstanceLogsRequest
- type ListInstanceLogsRequestOrderBy
- type ListInstanceLogsResponse
- type ListInstancesRequest
- type ListInstancesRequestOrderBy
- type ListInstancesResponse
- type ListNodeTypesRequest
- type ListNodeTypesResponse
- type ListPrivilegesRequest
- type ListPrivilegesRequestOrderBy
- type ListPrivilegesResponse
- type ListSnapshotsRequest
- type ListSnapshotsRequestOrderBy
- type ListSnapshotsResponse
- type ListUsersRequest
- type ListUsersRequestOrderBy
- type ListUsersResponse
- type LogsPolicy
- type Maintenance
- type MaintenanceStatus
- type MigrateEndpointRequest
- type NodeType
- type NodeTypeGeneration
- type NodeTypeStock
- type NodeTypeVolumeConstraintSizes
- type NodeTypeVolumeType
- type Permission
- type PrepareInstanceLogsRequest
- type PrepareInstanceLogsResponse
- type Privilege
- type PurgeInstanceLogsRequest
- type ReadReplica
- type ReadReplicaEndpointSpec
- type ReadReplicaEndpointSpecDirectAccess
- type ReadReplicaEndpointSpecPrivateNetwork
- type ReadReplicaEndpointSpecPrivateNetworkIpamConfig
- type ReadReplicaStatus
- type RenewInstanceCertificateRequest
- type ResetReadReplicaRequest
- type RestartInstanceRequest
- type RestoreDatabaseBackupRequest
- type SetInstanceACLRulesRequest
- type SetInstanceACLRulesResponse
- type SetInstanceSettingsRequest
- type SetInstanceSettingsResponse
- type SetPrivilegeRequest
- type Snapshot
- type SnapshotStatus
- type UpdateDatabaseBackupRequest
- type UpdateInstanceRequest
- type UpdateSnapshotRequest
- type UpdateUserRequest
- type UpgradableVersion
- type UpgradeInstanceRequest
- type User
- type Volume
- type VolumeType
- type WaitForDatabaseBackupRequest
- type WaitForInstanceLogRequest
- type WaitForInstanceRequest
- type WaitForReadReplicaRequest
Constants ¶
const ( ACLRuleActionAllow = ACLRuleAction("allow") ACLRuleActionDeny = ACLRuleAction("deny") )
const ( ACLRuleDirectionInbound = ACLRuleDirection("inbound") ACLRuleDirectionOutbound = ACLRuleDirection("outbound") )
const ( ACLRuleProtocolTCP = ACLRuleProtocol("tcp") ACLRuleProtocolUDP = ACLRuleProtocol("udp") ACLRuleProtocolIcmp = ACLRuleProtocol("icmp") )
const ( DatabaseBackupStatusUnknown = DatabaseBackupStatus("unknown") DatabaseBackupStatusCreating = DatabaseBackupStatus("creating") DatabaseBackupStatusReady = DatabaseBackupStatus("ready") DatabaseBackupStatusRestoring = DatabaseBackupStatus("restoring") DatabaseBackupStatusDeleting = DatabaseBackupStatus("deleting") DatabaseBackupStatusError = DatabaseBackupStatus("error") DatabaseBackupStatusExporting = DatabaseBackupStatus("exporting") DatabaseBackupStatusLocked = DatabaseBackupStatus("locked") )
const ( EngineSettingPropertyTypeBOOLEAN = EngineSettingPropertyType("BOOLEAN") EngineSettingPropertyTypeINT = EngineSettingPropertyType("INT") EngineSettingPropertyTypeSTRING = EngineSettingPropertyType("STRING") EngineSettingPropertyTypeFLOAT = EngineSettingPropertyType("FLOAT") )
const ( InstanceLogStatusUnknown = InstanceLogStatus("unknown") InstanceLogStatusReady = InstanceLogStatus("ready") InstanceLogStatusCreating = InstanceLogStatus("creating") InstanceLogStatusError = InstanceLogStatus("error") )
const ( InstanceStatusUnknown = InstanceStatus("unknown") InstanceStatusReady = InstanceStatus("ready") InstanceStatusProvisioning = InstanceStatus("provisioning") InstanceStatusConfiguring = InstanceStatus("configuring") InstanceStatusDeleting = InstanceStatus("deleting") InstanceStatusError = InstanceStatus("error") InstanceStatusAutohealing = InstanceStatus("autohealing") InstanceStatusLocked = InstanceStatus("locked") InstanceStatusInitializing = InstanceStatus("initializing") InstanceStatusDiskFull = InstanceStatus("disk_full") InstanceStatusBackuping = InstanceStatus("backuping") InstanceStatusSnapshotting = InstanceStatus("snapshotting") InstanceStatusRestarting = InstanceStatus("restarting") )
const ( ListDatabaseBackupsRequestOrderByCreatedAtAsc = ListDatabaseBackupsRequestOrderBy("created_at_asc") ListDatabaseBackupsRequestOrderByCreatedAtDesc = ListDatabaseBackupsRequestOrderBy("created_at_desc") ListDatabaseBackupsRequestOrderByNameAsc = ListDatabaseBackupsRequestOrderBy("name_asc") ListDatabaseBackupsRequestOrderByNameDesc = ListDatabaseBackupsRequestOrderBy("name_desc") ListDatabaseBackupsRequestOrderByStatusAsc = ListDatabaseBackupsRequestOrderBy("status_asc") ListDatabaseBackupsRequestOrderByStatusDesc = ListDatabaseBackupsRequestOrderBy("status_desc") )
const ( ListDatabasesRequestOrderByNameAsc = ListDatabasesRequestOrderBy("name_asc") ListDatabasesRequestOrderByNameDesc = ListDatabasesRequestOrderBy("name_desc") ListDatabasesRequestOrderBySizeAsc = ListDatabasesRequestOrderBy("size_asc") ListDatabasesRequestOrderBySizeDesc = ListDatabasesRequestOrderBy("size_desc") )
const ( ListInstanceLogsRequestOrderByCreatedAtAsc = ListInstanceLogsRequestOrderBy("created_at_asc") ListInstanceLogsRequestOrderByCreatedAtDesc = ListInstanceLogsRequestOrderBy("created_at_desc") )
const ( ListInstancesRequestOrderByCreatedAtAsc = ListInstancesRequestOrderBy("created_at_asc") ListInstancesRequestOrderByCreatedAtDesc = ListInstancesRequestOrderBy("created_at_desc") ListInstancesRequestOrderByNameAsc = ListInstancesRequestOrderBy("name_asc") ListInstancesRequestOrderByNameDesc = ListInstancesRequestOrderBy("name_desc") ListInstancesRequestOrderByRegion = ListInstancesRequestOrderBy("region") ListInstancesRequestOrderByStatusAsc = ListInstancesRequestOrderBy("status_asc") ListInstancesRequestOrderByStatusDesc = ListInstancesRequestOrderBy("status_desc") )
const ( ListPrivilegesRequestOrderByUserNameAsc = ListPrivilegesRequestOrderBy("user_name_asc") ListPrivilegesRequestOrderByUserNameDesc = ListPrivilegesRequestOrderBy("user_name_desc") ListPrivilegesRequestOrderByDatabaseNameAsc = ListPrivilegesRequestOrderBy("database_name_asc") ListPrivilegesRequestOrderByDatabaseNameDesc = ListPrivilegesRequestOrderBy("database_name_desc") )
const ( ListSnapshotsRequestOrderByCreatedAtAsc = ListSnapshotsRequestOrderBy("created_at_asc") ListSnapshotsRequestOrderByCreatedAtDesc = ListSnapshotsRequestOrderBy("created_at_desc") ListSnapshotsRequestOrderByNameAsc = ListSnapshotsRequestOrderBy("name_asc") ListSnapshotsRequestOrderByNameDesc = ListSnapshotsRequestOrderBy("name_desc") ListSnapshotsRequestOrderByExpiresAtAsc = ListSnapshotsRequestOrderBy("expires_at_asc") ListSnapshotsRequestOrderByExpiresAtDesc = ListSnapshotsRequestOrderBy("expires_at_desc") )
const ( ListUsersRequestOrderByNameAsc = ListUsersRequestOrderBy("name_asc") ListUsersRequestOrderByNameDesc = ListUsersRequestOrderBy("name_desc") ListUsersRequestOrderByIsAdminAsc = ListUsersRequestOrderBy("is_admin_asc") ListUsersRequestOrderByIsAdminDesc = ListUsersRequestOrderBy("is_admin_desc") )
const ( MaintenanceStatusUnknown = MaintenanceStatus("unknown") MaintenanceStatusPending = MaintenanceStatus("pending") MaintenanceStatusDone = MaintenanceStatus("done") MaintenanceStatusCanceled = MaintenanceStatus("canceled") )
const ( NodeTypeGenerationUnknownGeneration = NodeTypeGeneration("unknown_generation") NodeTypeGenerationGenerationV1 = NodeTypeGeneration("generation_v1") NodeTypeGenerationGenerationV2 = NodeTypeGeneration("generation_v2") )
const ( NodeTypeStockUnknown = NodeTypeStock("unknown") NodeTypeStockLowStock = NodeTypeStock("low_stock") NodeTypeStockOutOfStock = NodeTypeStock("out_of_stock") NodeTypeStockAvailable = NodeTypeStock("available") )
const ( PermissionReadonly = Permission("readonly") PermissionReadwrite = Permission("readwrite") PermissionAll = Permission("all") PermissionCustom = Permission("custom") PermissionNone = Permission("none") )
const ( ReadReplicaStatusUnknown = ReadReplicaStatus("unknown") ReadReplicaStatusProvisioning = ReadReplicaStatus("provisioning") ReadReplicaStatusInitializing = ReadReplicaStatus("initializing") ReadReplicaStatusReady = ReadReplicaStatus("ready") ReadReplicaStatusDeleting = ReadReplicaStatus("deleting") ReadReplicaStatusError = ReadReplicaStatus("error") ReadReplicaStatusLocked = ReadReplicaStatus("locked") ReadReplicaStatusConfiguring = ReadReplicaStatus("configuring") )
const ( SnapshotStatusUnknown = SnapshotStatus("unknown") SnapshotStatusCreating = SnapshotStatus("creating") SnapshotStatusReady = SnapshotStatus("ready") SnapshotStatusRestoring = SnapshotStatus("restoring") SnapshotStatusDeleting = SnapshotStatus("deleting") SnapshotStatusError = SnapshotStatus("error") SnapshotStatusLocked = SnapshotStatus("locked") )
const ( VolumeTypeLssd = VolumeType("lssd") VolumeTypeBssd = VolumeType("bssd") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLRule ¶
type ACLRule struct { IP scw.IPNet `json:"ip"` // Deprecated Port *uint32 `json:"port,omitempty"` // 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 API ¶
type API struct {
// contains filtered or unexported fields
}
API: database RDB API.
func (*API) AddInstanceACLRules ¶
func (s *API) AddInstanceACLRules(req *AddInstanceACLRulesRequest, opts ...scw.RequestOption) (*AddInstanceACLRulesResponse, error)
AddInstanceACLRules: 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) CreateReadReplica ¶
func (s *API) CreateReadReplica(req *CreateReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
CreateReadReplica: you can only create a maximum of 3 read replicas for one instance.
func (*API) CreateReadReplicaEndpoint ¶
func (s *API) CreateReadReplicaEndpoint(req *CreateReadReplicaEndpointRequest, opts ...scw.RequestOption) (*ReadReplica, error)
CreateReadReplicaEndpoint: a read replica can have at most one direct access and one private network endpoint.
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) DeleteReadReplica ¶
func (s *API) DeleteReadReplica(req *DeleteReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
DeleteReadReplica: delete a read replica.
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 database instance metrics.
func (*API) GetReadReplica ¶
func (s *API) GetReadReplica(req *GetReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
GetReadReplica: get a read replica.
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) MigrateEndpoint ¶
func (s *API) MigrateEndpoint(req *MigrateEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)
MigrateEndpoint: migrate an existing instance endpoint to another instance.
func (*API) PrepareInstanceLogs ¶
func (s *API) PrepareInstanceLogs(req *PrepareInstanceLogsRequest, opts ...scw.RequestOption) (*PrepareInstanceLogsResponse, error)
PrepareInstanceLogs: 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) ResetReadReplica ¶
func (s *API) ResetReadReplica(req *ResetReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
ResetReadReplica: when you resync a read replica, first it is reset, and then its data is resynchronized from the primary node. Your read replica will be unavailable during the resync process. The duration of this process is proportional to your Database Instance size. The configured endpoints will not change.
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: 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 your current instance specifications like node type, high availability, volume, or db engine version.
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.
func (*API) WaitForReadReplica ¶
func (s *API) WaitForReadReplica(req *WaitForReadReplicaRequest, opts ...scw.RequestOption) (*ReadReplica, error)
WaitForReadReplica waits for the read replica to be in a "terminal state" before returning. This function can be used to wait for a read replica to be ready for example.
type AddInstanceACLRulesRequest ¶
type AddInstanceACLRulesRequest struct { // Region: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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 CloneInstanceRequest ¶
type CloneInstanceRequest struct { // Region: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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. A load_balancer public endpoint is systematically created. InitEndpoints []*EndpointSpec `json:"init_endpoints"` // BackupSameRegion: store logical backups in the same region as the database instance. BackupSameRegion bool `json:"backup_same_region"` }
type CreateReadReplicaEndpointRequest ¶
type CreateReadReplicaEndpointRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ReadReplicaID: UUID of the read replica. ReadReplicaID string `json:"-"` // EndpointSpec: specification of the endpoint you want to create. EndpointSpec []*ReadReplicaEndpointSpec `json:"endpoint_spec"` }
type CreateReadReplicaRequest ¶
type CreateReadReplicaRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // InstanceID: UUID of the instance you want a read replica of. InstanceID string `json:"instance_id"` // EndpointSpec: specification of the endpoint you want to create. EndpointSpec []*ReadReplicaEndpointSpec `json:"endpoint_spec"` }
type CreateSnapshotRequest ¶
type CreateSnapshotRequest struct { // Region: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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 DeleteDatabaseRequest ¶
type DeleteDatabaseRequest struct { // Region: region to target. If none is passed will use default region from the config. 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 DeleteInstanceACLRulesRequest ¶
type DeleteInstanceACLRulesRequest struct { // Region: region to target. If none is passed will use default region from the config. 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 DeleteInstanceSettingsRequest ¶
type DeleteInstanceSettingsRequest struct { // Region: region to target. If none is passed will use default region from the config. 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 DeleteUserRequest ¶
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. One at the most per RDB instance or read replica (an RDB instance and its read replica can have different private networks). Cannot be updated (has to be deleted and recreated). // Precisely one of DirectAccess, LoadBalancer, PrivateNetwork must be set. PrivateNetwork *EndpointPrivateNetworkDetails `json:"private_network,omitempty"` // LoadBalancer: load balancer details. Public endpoint for RDB instances which is systematically present. One per RDB instance. // Precisely one of DirectAccess, LoadBalancer, PrivateNetwork must be set. LoadBalancer *EndpointLoadBalancerDetails `json:"load_balancer,omitempty"` // DirectAccess: direct access details. Public endpoint reserved for read replicas. One per read replica. // Precisely one of DirectAccess, LoadBalancer, PrivateNetwork must be set. DirectAccess *EndpointDirectAccessDetails `json:"direct_access,omitempty"` // Hostname: hostname of the endpoint. // Precisely one of Hostname, IP must be set. Hostname *string `json:"hostname,omitempty"` }
Endpoint: endpoint.
type EndpointDirectAccessDetails ¶
type EndpointDirectAccessDetails struct { }
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. Public endpoint for RDB instances which is systematically present. One per RDB instance. // Precisely one of LoadBalancer, PrivateNetwork must be set. LoadBalancer *EndpointSpecLoadBalancer `json:"load_balancer,omitempty"` // PrivateNetwork: private network endpoint specifications. One at the most per RDB instance or read replica (an RDB instance and its read replica can have different private networks). Cannot be updated (has to be deleted and recreated). // 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. // Precisely one of IpamConfig, ServiceIP must be set. ServiceIP *scw.IPNet `json:"service_ip,omitempty"` // IpamConfig: automated configuration of your private network endpoint with Scaleway IPAM service. One at the most per RDB instance or read replica (an RDB instance and its read replica can have different private networks). Cannot be updated (has to be deleted and recreated). // Precisely one of IpamConfig, ServiceIP must be set. IpamConfig *EndpointSpecPrivateNetworkIpamConfig `json:"ipam_config,omitempty"` }
EndpointSpecPrivateNetwork: endpoint spec. private network.
type EndpointSpecPrivateNetworkIpamConfig ¶
type EndpointSpecPrivateNetworkIpamConfig struct { }
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 GetEndpointRequest ¶
type GetInstanceLogRequest ¶
type GetInstanceMetricsRequest ¶
type GetInstanceMetricsRequest struct { // Region: region to target. If none is passed will use default region from the config. 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 GetReadReplicaRequest ¶
type GetSnapshotRequest ¶
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"` // UpgradableVersion: available database engine versions for upgrade. UpgradableVersion []*UpgradableVersion `json:"upgradable_version"` // Deprecated: Endpoint: endpoint of the instance. Endpoint *Endpoint `json:"endpoint,omitempty"` // 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 []*ReadReplica `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 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: region to target. If none is passed will use default region from the config. 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 (enum ListDatabaseBackupsRequestOrderBy) String() 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: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // Name: name of the Database Engine. Name *string `json:"-"` // Version: version of the Database Engine. Version *string `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: region to target. If none is passed will use default region from the config. 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 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 ListInstanceLogsDetailsResponse ¶
type ListInstanceLogsDetailsResponse struct { // Details: remote instance logs details. Details []*ListInstanceLogsDetailsResponseInstanceLogDetail `json:"details"` }
ListInstanceLogsDetailsResponse: list instance logs details response.
type ListInstanceLogsRequest ¶
type ListInstanceLogsRequest struct { // Region: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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 MigrateEndpointRequest ¶
type MigrateEndpointRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // EndpointID: UUID of the endpoint you want to migrate. EndpointID string `json:"-"` // InstanceID: UUID of the instance you want to attach the endpoint to. InstanceID string `json:"instance_id"` }
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,omitempty"` // Deprecated: IsBssdCompatible: the Node Type is compliant with Block Storage. IsBssdCompatible *bool `json:"is_bssd_compatible,omitempty"` // 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"` // IsHaRequired: the Node Type can be used only with high availability option. IsHaRequired bool `json:"is_ha_required"` // Generation: generation associated the NodeType offer. // Default value: unknown_generation Generation NodeTypeGeneration `json:"generation"` // Region: region the Node Type is in. Region scw.Region `json:"region"` }
NodeType: node type.
type NodeTypeGeneration ¶
type NodeTypeGeneration string
func (NodeTypeGeneration) MarshalJSON ¶
func (enum NodeTypeGeneration) MarshalJSON() ([]byte, error)
func (NodeTypeGeneration) String ¶
func (enum NodeTypeGeneration) String() string
func (*NodeTypeGeneration) UnmarshalJSON ¶
func (enum *NodeTypeGeneration) UnmarshalJSON(data []byte) error
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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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 ReadReplica ¶
type ReadReplica struct { // ID: UUID of the read replica. ID string `json:"id"` // Endpoints: display read replica connection information. Endpoints []*Endpoint `json:"endpoints"` // Status: read replica status. // Default value: unknown Status ReadReplicaStatus `json:"status"` // Region: region the read replica is in. Region scw.Region `json:"region"` }
ReadReplica: read replica.
type ReadReplicaEndpointSpec ¶
type ReadReplicaEndpointSpec struct { // DirectAccess: direct access endpoint specifications. Public endpoint reserved for read replicas. One per read replica. // Precisely one of DirectAccess, PrivateNetwork must be set. DirectAccess *ReadReplicaEndpointSpecDirectAccess `json:"direct_access,omitempty"` // PrivateNetwork: private network endpoint specifications. One at the most per read replica. Cannot be updated (has to be deleted and recreated). // Precisely one of DirectAccess, PrivateNetwork must be set. PrivateNetwork *ReadReplicaEndpointSpecPrivateNetwork `json:"private_network,omitempty"` }
ReadReplicaEndpointSpec: read replica endpoint spec.
type ReadReplicaEndpointSpecDirectAccess ¶
type ReadReplicaEndpointSpecDirectAccess struct { }
type ReadReplicaEndpointSpecPrivateNetwork ¶
type ReadReplicaEndpointSpecPrivateNetwork struct { // PrivateNetworkID: UUID of the private network to be connected to the read replica. PrivateNetworkID string `json:"private_network_id"` // ServiceIP: endpoint IPv4 adress with a CIDR notation. Check documentation about IP and subnet limitations. // Precisely one of IpamConfig, ServiceIP must be set. ServiceIP *scw.IPNet `json:"service_ip,omitempty"` // IpamConfig: automated configuration of your private network endpoint with Scaleway IPAM service. One at the most per RDB instance or read replica (an RDB instance and its read replica can have different private networks). Cannot be updated (has to be deleted and recreated). // Precisely one of IpamConfig, ServiceIP must be set. IpamConfig *ReadReplicaEndpointSpecPrivateNetworkIpamConfig `json:"ipam_config,omitempty"` }
ReadReplicaEndpointSpecPrivateNetwork: read replica endpoint spec. private network.
type ReadReplicaEndpointSpecPrivateNetworkIpamConfig ¶
type ReadReplicaEndpointSpecPrivateNetworkIpamConfig struct { }
type ReadReplicaStatus ¶
type ReadReplicaStatus string
func (ReadReplicaStatus) MarshalJSON ¶
func (enum ReadReplicaStatus) MarshalJSON() ([]byte, error)
func (ReadReplicaStatus) String ¶
func (enum ReadReplicaStatus) String() string
func (*ReadReplicaStatus) UnmarshalJSON ¶
func (enum *ReadReplicaStatus) UnmarshalJSON(data []byte) error
type ResetReadReplicaRequest ¶
type RestartInstanceRequest ¶
type RestoreDatabaseBackupRequest ¶
type RestoreDatabaseBackupRequest struct { // Region: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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: region to target. If none is passed will use default region from the config. 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 UpgradableVersion ¶
type UpgradeInstanceRequest ¶
type UpgradeInstanceRequest struct { // Region: region to target. If none is passed will use default region from the config. 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, UpgradableVersionID, 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, UpgradableVersionID, VolumeSize, VolumeType must be set. EnableHa *bool `json:"enable_ha,omitempty"` // VolumeSize: increase your block storage volume size. // Precisely one of EnableHa, NodeType, UpgradableVersionID, 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, UpgradableVersionID, VolumeSize, VolumeType must be set. VolumeType *VolumeType `json:"volume_type,omitempty"` // UpgradableVersionID: this will create a new Database Instance with same instance specification as the current one and perform a Database Engine upgrade. // Precisely one of EnableHa, NodeType, UpgradableVersionID, VolumeSize, VolumeType must be set. UpgradableVersionID *string `json:"upgradable_version_id,omitempty"` }
type User ¶
type User struct { // Name: name of the user (Length must be between 1 and 63 characters, The max Length is 32 for MySQL engines, 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