Documentation
¶
Overview ¶
Package mongodb provides methods and message types of the mongodb v1alpha1 API.
Index ¶
- Constants
- type API
- 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) CreateSnapshot(req *CreateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *API) CreateUser(req *CreateUserRequest, opts ...scw.RequestOption) (*User, 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) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *API) DeleteUser(req *DeleteUserRequest, opts ...scw.RequestOption) error
- func (s *API) FetchLatestEngineVersion() (*Version, 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) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, 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) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)
- func (s *API) ListUsers(req *ListUsersRequest, opts ...scw.RequestOption) (*ListUsersResponse, error)
- func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)
- func (s *API) Regions() []scw.Region
- func (s *API) RestoreSnapshot(req *RestoreSnapshotRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) SetUserRole(req *SetUserRoleRequest, opts ...scw.RequestOption) (*User, 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) WaitForInstance(req *WaitForInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
- func (s *API) WaitForSnapshot(req *WaitForSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- type CreateEndpointRequest
- type CreateInstanceRequest
- type CreateInstanceRequestVolumeDetails
- type CreateSnapshotRequest
- type CreateUserRequest
- type DeleteEndpointRequest
- type DeleteInstanceRequest
- type DeleteSnapshotRequest
- type DeleteUserRequest
- type Endpoint
- type EndpointPrivateNetworkDetails
- type EndpointPublicDetails
- type EndpointSpec
- type EndpointSpecPrivateNetworkDetails
- type EndpointSpecPublicDetails
- type GetInstanceCertificateRequest
- type GetInstanceRequest
- type GetSnapshotRequest
- type Instance
- type InstanceSetting
- type InstanceStatus
- type ListInstancesRequest
- type ListInstancesRequestOrderBy
- type ListInstancesResponse
- type ListNodeTypesRequest
- type ListNodeTypesResponse
- type ListSnapshotsRequest
- type ListSnapshotsRequestOrderBy
- type ListSnapshotsResponse
- type ListUsersRequest
- type ListUsersRequestOrderBy
- type ListUsersResponse
- type ListVersionsRequest
- type ListVersionsResponse
- type NodeType
- type NodeTypeStock
- type NodeTypeVolumeType
- type RestoreSnapshotRequest
- type RestoreSnapshotRequestVolumeDetails
- type SetUserRoleRequest
- type Setting
- type SettingPropertyType
- type Snapshot
- type SnapshotStatus
- type SnapshotVolumeType
- type UpdateInstanceRequest
- type UpdateSnapshotRequest
- type UpdateUserRequest
- type UpgradeInstanceRequest
- type User
- type UserRole
- type UserRoleRole
- type Version
- type Volume
- type VolumeType
- type WaitForInstanceRequest
- type WaitForSnapshotRequest
Constants ¶
const ( InstanceStatusUnknownStatus = InstanceStatus("unknown_status") InstanceStatusReady = InstanceStatus("ready") InstanceStatusProvisioning = InstanceStatus("provisioning") InstanceStatusConfiguring = InstanceStatus("configuring") InstanceStatusDeleting = InstanceStatus("deleting") InstanceStatusError = InstanceStatus("error") InstanceStatusInitializing = InstanceStatus("initializing") InstanceStatusLocked = InstanceStatus("locked") InstanceStatusSnapshotting = InstanceStatus("snapshotting") )
const ( ListInstancesRequestOrderByCreatedAtAsc = ListInstancesRequestOrderBy("created_at_asc") ListInstancesRequestOrderByCreatedAtDesc = ListInstancesRequestOrderBy("created_at_desc") ListInstancesRequestOrderByNameAsc = ListInstancesRequestOrderBy("name_asc") ListInstancesRequestOrderByNameDesc = ListInstancesRequestOrderBy("name_desc") ListInstancesRequestOrderByStatusAsc = ListInstancesRequestOrderBy("status_asc") ListInstancesRequestOrderByStatusDesc = ListInstancesRequestOrderBy("status_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") )
const ( NodeTypeStockUnknownStock = NodeTypeStock("unknown_stock") NodeTypeStockLowStock = NodeTypeStock("low_stock") NodeTypeStockOutOfStock = NodeTypeStock("out_of_stock") NodeTypeStockAvailable = NodeTypeStock("available") )
const ( SettingPropertyTypeBOOLEAN = SettingPropertyType("BOOLEAN") SettingPropertyTypeINT = SettingPropertyType("INT") SettingPropertyTypeSTRING = SettingPropertyType("STRING") SettingPropertyTypeFLOAT = SettingPropertyType("FLOAT") )
const ( SnapshotStatusUnknownStatus = SnapshotStatus("unknown_status") SnapshotStatusCreating = SnapshotStatus("creating") SnapshotStatusReady = SnapshotStatus("ready") SnapshotStatusRestoring = SnapshotStatus("restoring") SnapshotStatusDeleting = SnapshotStatus("deleting") SnapshotStatusError = SnapshotStatus("error") SnapshotStatusLocked = SnapshotStatus("locked") )
const ( UserRoleRoleUnknownRole = UserRoleRole("unknown_role") UserRoleRoleRead = UserRoleRole("read") UserRoleRoleReadWrite = UserRoleRole("read_write") UserRoleRoleDbAdmin = UserRoleRole("db_admin") UserRoleRoleSync = UserRoleRole("sync") )
const ( VolumeTypeUnknownType = VolumeType("unknown_type") VolumeTypeSbs5k = VolumeType("sbs_5k") VolumeTypeSbs15k = VolumeType("sbs_15k") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
This API allows you to manage your Managed Databases for MongoDB®.
func (*API) CreateEndpoint ¶
func (s *API) CreateEndpoint(req *CreateEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)
CreateEndpoint: Create a new endpoint for a MongoDB® Database Instance. You can add `public_network` or `private_network` specifications to the body of the request.
func (*API) CreateInstance ¶
func (s *API) CreateInstance(req *CreateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
CreateInstance: Create a new MongoDB® Database Instance.
func (*API) CreateSnapshot ¶
func (s *API) CreateSnapshot(req *CreateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
CreateSnapshot: Create a new snapshot of a Database Instance. You must define the `name` and `instance_id` parameters in the request.
func (*API) CreateUser ¶
func (s *API) CreateUser(req *CreateUserRequest, opts ...scw.RequestOption) (*User, error)
CreateUser: Create an user on a Database Instance. You must define the `name`, `password` of the user and `instance_id` parameters in the request.
func (*API) DeleteEndpoint ¶
func (s *API) DeleteEndpoint(req *DeleteEndpointRequest, opts ...scw.RequestOption) error
DeleteEndpoint: Delete the endpoint of a Database Instance. You must specify the `endpoint_id` parameter of the endpoint you want to delete. Note that you might need to update any environment configurations that point to the deleted endpoint.
func (*API) DeleteInstance ¶
func (s *API) DeleteInstance(req *DeleteInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
DeleteInstance: Delete a given MongoDB® Database Instance, specified by the `region` and `instance_id` parameters. Deleting a MongoDB® Database Instance is permanent, and cannot be undone. Note that upon deletion all your data will be lost.
func (*API) DeleteSnapshot ¶
func (s *API) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
DeleteSnapshot: Delete a given snapshot of a Database Instance. You must specify, in the endpoint, the `snapshot_id` parameter of the snapshot you want to delete.
func (*API) DeleteUser ¶
func (s *API) DeleteUser(req *DeleteUserRequest, opts ...scw.RequestOption) error
DeleteUser: Delete an existing user on a Database Instance.
func (*API) FetchLatestEngineVersion ¶
func (*API) GetInstance ¶
func (s *API) GetInstance(req *GetInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
GetInstance: Retrieve information about a given MongoDB® Database Instance, specified by the `region` and `instance_id` parameters. Its full details, including name, status, IP address and port, are returned in the response object.
func (*API) GetInstanceCertificate ¶
func (s *API) GetInstanceCertificate(req *GetInstanceCertificateRequest, opts ...scw.RequestOption) (*scw.File, error)
GetInstanceCertificate: Retrieve the certificate of a given Database Instance, specified by the `instance_id` parameter.
func (*API) GetSnapshot ¶
func (s *API) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
GetSnapshot: Retrieve information about a given snapshot of a Database Instance. You must specify, in the endpoint, the `snapshot_id` parameter of the snapshot you want to retrieve.
func (*API) ListInstances ¶
func (s *API) ListInstances(req *ListInstancesRequest, opts ...scw.RequestOption) (*ListInstancesResponse, error)
ListInstances: List all MongoDB® Database Instances in the specified region. By default, the MongoDB® Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags` and `name`. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.
func (*API) ListNodeTypes ¶
func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption) (*ListNodeTypesResponse, error)
ListNodeTypes: List available node types.
func (*API) ListSnapshots ¶
func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)
ListSnapshots: List snapshots. You can include the `instance_id` or `project_id` in your query to get the list of snapshots for specific Database Instances and/or Projects. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
func (*API) ListUsers ¶
func (s *API) ListUsers(req *ListUsersRequest, opts ...scw.RequestOption) (*ListUsersResponse, error)
ListUsers: List all users of a given Database Instance.
func (*API) ListVersions ¶
func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)
ListVersions: List available MongoDB® versions.
func (*API) RestoreSnapshot ¶
func (s *API) RestoreSnapshot(req *RestoreSnapshotRequest, opts ...scw.RequestOption) (*Instance, error)
RestoreSnapshot: Restore a given snapshot of a Database Instance. You must specify, in the endpoint, the `snapshot_id` parameter of the snapshot you want to restore, the `instance_name` of the new Database Instance, `node_type` of the new Database Instance and `node_number` of the new Database Instance.
func (*API) SetUserRole ¶
func (s *API) SetUserRole(req *SetUserRoleRequest, opts ...scw.RequestOption) (*User, error)
SetUserRole:
func (*API) UpdateInstance ¶
func (s *API) UpdateInstance(req *UpdateInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
UpdateInstance: Update the parameters of a MongoDB® Database Instance.
func (*API) UpdateSnapshot ¶
func (s *API) UpdateSnapshot(req *UpdateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
UpdateSnapshot: Update the parameters of a snapshot of a Database Instance. You can update the `name` and `expires_at` parameters.
func (*API) UpdateUser ¶
func (s *API) UpdateUser(req *UpdateUserRequest, opts ...scw.RequestOption) (*User, error)
UpdateUser: Update the parameters of a user on a Database Instance. You can update the `password` parameter, but you cannot change the name of the user.
func (*API) UpgradeInstance ¶
func (s *API) UpgradeInstance(req *UpgradeInstanceRequest, opts ...scw.RequestOption) (*Instance, error)
UpgradeInstance: Upgrade your current Database Instance specifications like volume size.
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 or in another final state.
func (*API) WaitForSnapshot ¶
func (s *API) WaitForSnapshot(req *WaitForSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
WaitForSnapshot waits for the snapshot to reach a "terminal state" before returning.
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 Database Instance.
InstanceID string `json:"instance_id"`
// Endpoint: endpointSpec used to expose your Database Instance.
Endpoint *EndpointSpec `json:"endpoint"`
}
CreateEndpointRequest: create endpoint request.
type CreateInstanceRequest ¶
type CreateInstanceRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// ProjectID: the Project ID on which the Database Instance will be created.
ProjectID string `json:"project_id"`
// Name: name of the Database Instance.
Name string `json:"name"`
// Version: version of the MongoDB® engine.
Version string `json:"version"`
// Tags: tags to apply to the Database Instance.
Tags []string `json:"tags"`
// NodeNumber: number of node to use for the Database Instance.
NodeNumber uint32 `json:"node_number"`
// NodeType: type of node to use for the Database Instance.
NodeType string `json:"node_type"`
// UserName: username created when the Database Instance is created.
UserName string `json:"user_name"`
// Password: password of the initial user.
Password string `json:"password"`
// Volume: instance volume information.
Volume *CreateInstanceRequestVolumeDetails `json:"volume,omitempty"`
// Endpoints: one or multiple EndpointSpec used to expose your Database Instance.
Endpoints []*EndpointSpec `json:"endpoints"`
}
CreateInstanceRequest: create instance request.
type CreateInstanceRequestVolumeDetails ¶
type CreateInstanceRequestVolumeDetails struct {
// VolumeSize: volume size.
VolumeSize scw.Size `json:"volume_size"`
// VolumeType: type of volume where data is stored.
// Default value: unknown_type
VolumeType VolumeType `json:"volume_type"`
}
CreateInstanceRequestVolumeDetails: create instance request volume details.
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 Database Instance to snapshot.
InstanceID string `json:"-"`
// Name: name of the snapshot.
Name string `json:"name"`
// ExpiresAt: expiration date of the snapshot (must follow the ISO 8601 format).
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
CreateSnapshotRequest: create snapshot request.
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 Database Instance the user belongs to.
InstanceID string `json:"-"`
// Name: name of the database user.
Name string `json:"name"`
// Password: password of the database user.
Password string `json:"password"`
}
CreateUserRequest: create user request.
type DeleteEndpointRequest ¶
type DeleteEndpointRequest 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 to delete.
EndpointID string `json:"-"`
}
DeleteEndpointRequest: delete endpoint request.
type DeleteInstanceRequest ¶
type DeleteInstanceRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// InstanceID: UUID of the Database Instance to delete.
InstanceID string `json:"-"`
}
DeleteInstanceRequest: delete instance request.
type DeleteSnapshotRequest ¶
type DeleteSnapshotRequest 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.
SnapshotID string `json:"-"`
}
DeleteSnapshotRequest: delete snapshot request.
type DeleteUserRequest ¶
type DeleteUserRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// InstanceID: UUID of the Database Instance the user belongs to.
InstanceID string `json:"-"`
// Name: name of the database user.
Name string `json:"-"`
}
DeleteUserRequest: delete user request.
type Endpoint ¶
type Endpoint struct {
// ID: UUID of the endpoint.
ID string `json:"id"`
// IPs: list of IPv4 addresses of the endpoint.
IPs []net.IP `json:"ips"`
// DNSRecords: list of DNS records of the endpoint.
DNSRecords []string `json:"dns_records"`
// Port: TCP port of the endpoint.
Port uint32 `json:"port"`
// PrivateNetwork: private Network endpoint details.
// Precisely one of PrivateNetwork, Public must be set.
PrivateNetwork *EndpointPrivateNetworkDetails `json:"private_network,omitempty"`
// Public: public endpoint details.
// Precisely one of PrivateNetwork, Public must be set.
Public *EndpointPublicDetails `json:"public,omitempty"`
}
Endpoint: endpoint.
type EndpointPrivateNetworkDetails ¶
type EndpointPrivateNetworkDetails struct {
// PrivateNetworkID: UUID of the Private Network.
PrivateNetworkID string `json:"private_network_id"`
}
EndpointPrivateNetworkDetails: Private Network details.
type EndpointPublicDetails ¶
type EndpointPublicDetails struct {
}
EndpointPublicDetails: endpoint public details.
type EndpointSpec ¶
type EndpointSpec struct {
// Precisely one of Public, PrivateNetwork must be set.
Public *EndpointSpecPublicDetails `json:"public,omitempty"`
// Precisely one of Public, PrivateNetwork must be set.
PrivateNetwork *EndpointSpecPrivateNetworkDetails `json:"private_network,omitempty"`
}
EndpointSpec: endpoint spec.
type EndpointSpecPrivateNetworkDetails ¶
type EndpointSpecPrivateNetworkDetails struct {
// PrivateNetworkID: UUID of the Private Network.
PrivateNetworkID string `json:"private_network_id"`
}
EndpointSpecPrivateNetworkDetails: endpoint spec private network details.
type EndpointSpecPublicDetails ¶
type EndpointSpecPublicDetails struct {
}
EndpointSpecPublicDetails: endpoint spec public details.
type GetInstanceCertificateRequest ¶
type GetInstanceCertificateRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// InstanceID: UUID of the Database Instance.
InstanceID string `json:"-"`
}
GetInstanceCertificateRequest: get instance certificate request.
type GetInstanceRequest ¶
type GetInstanceRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// InstanceID: UUID of the Database Instance.
InstanceID string `json:"-"`
}
GetInstanceRequest: get instance request.
type GetSnapshotRequest ¶
type GetSnapshotRequest 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.
SnapshotID string `json:"-"`
}
GetSnapshotRequest: get snapshot request.
type Instance ¶
type Instance struct {
// ID: UUID of the Database Instance.
ID string `json:"id"`
// Name: name of the Database Instance.
Name string `json:"name"`
// ProjectID: project ID the Database Instance belongs to.
ProjectID string `json:"project_id"`
// Status: status of the Database Instance.
// Default value: unknown_status
Status InstanceStatus `json:"status"`
// Version: mongoDB® engine version of the Database Instance.
Version string `json:"version"`
// Tags: list of tags applied to the Database Instance.
Tags []string `json:"tags"`
// Settings: advanced settings of the Database Instance.
Settings []*InstanceSetting `json:"settings"`
// NodeNumber: number of node in the Database Instance.
NodeNumber uint32 `json:"node_number"`
// NodeType: node type of the Database Instance.
NodeType string `json:"node_type"`
// Volume: volumes of the Database Instance.
Volume *Volume `json:"volume"`
// Endpoints: list of Database Instance endpoints.
Endpoints []*Endpoint `json:"endpoints"`
// CreatedAt: creation date (must follow the ISO 8601 format).
CreatedAt *time.Time `json:"created_at"`
// Region: region the Database Instance is in.
Region scw.Region `json:"region"`
}
Instance: instance.
type InstanceSetting ¶
type InstanceSetting struct {
// Name: name of the settings.
Name string `json:"name"`
// Value: value of the settings.
Value string `json:"value"`
}
InstanceSetting: instance setting.
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
func (InstanceStatus) Values ¶
func (enum InstanceStatus) Values() []InstanceStatus
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 Database Instances that have a given tag.
Tags []string `json:"-"`
// Name: lists Database Instances that match a name pattern.
Name *string `json:"-"`
// OrderBy: criteria to use when ordering Database Instance listings.
// Default value: created_at_asc
OrderBy ListInstancesRequestOrderBy `json:"-"`
// OrganizationID: organization ID of the Database Instance.
OrganizationID *string `json:"-"`
// ProjectID: project ID.
ProjectID *string `json:"-"`
Page *int32 `json:"-"`
PageSize *uint32 `json:"-"`
}
ListInstancesRequest: list instances request.
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
func (ListInstancesRequestOrderBy) Values ¶
func (enum ListInstancesRequestOrderBy) Values() []ListInstancesRequestOrderBy
type ListInstancesResponse ¶
type ListInstancesResponse struct {
// Instances: list of all Database Instances available in an Organization or Project.
Instances []*Instance `json:"instances"`
// TotalCount: total count of Database Instances available in an Organization or Project.
TotalCount uint64 `json:"total_count"`
}
ListInstancesResponse: list instances response.
func (*ListInstancesResponse) UnsafeAppend ¶
func (r *ListInstancesResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListInstancesResponse) UnsafeGetTotalCount ¶
func (r *ListInstancesResponse) UnsafeGetTotalCount() uint64
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: defines whether or not to include disabled types.
IncludeDisabledTypes *bool `json:"-"`
Page *int32 `json:"-"`
PageSize *uint32 `json:"-"`
}
ListNodeTypesRequest: list node types request.
type ListNodeTypesResponse ¶
type ListNodeTypesResponse struct {
// NodeTypes: types of the node.
NodeTypes []*NodeType `json:"node_types"`
// TotalCount: total count of node-types available.
TotalCount uint64 `json:"total_count"`
}
ListNodeTypesResponse: list node types response.
func (*ListNodeTypesResponse) UnsafeAppend ¶
func (r *ListNodeTypesResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListNodeTypesResponse) UnsafeGetTotalCount ¶
func (r *ListNodeTypesResponse) UnsafeGetTotalCount() uint64
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:"-"`
// InstanceID: instance ID the snapshots belongs to.
InstanceID *string `json:"-"`
// Name: lists database snapshots that match a name pattern.
Name *string `json:"-"`
// OrderBy: criteria to use when ordering snapshot listings.
// Default value: created_at_asc
OrderBy ListSnapshotsRequestOrderBy `json:"-"`
// OrganizationID: organization ID the snapshots belongs to.
OrganizationID *string `json:"-"`
// ProjectID: project ID to list the snapshots of.
ProjectID *string `json:"-"`
Page *int32 `json:"-"`
PageSize *uint32 `json:"-"`
}
ListSnapshotsRequest: list snapshots request.
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
func (ListSnapshotsRequestOrderBy) Values ¶
func (enum ListSnapshotsRequestOrderBy) Values() []ListSnapshotsRequestOrderBy
type ListSnapshotsResponse ¶
type ListSnapshotsResponse struct {
// Snapshots: list of all database snapshots available in an Organization or Project.
Snapshots []*Snapshot `json:"snapshots"`
// TotalCount: total count of database snapshots available in a Organization or Project.
TotalCount uint64 `json:"total_count"`
}
ListSnapshotsResponse: list snapshots response.
func (*ListSnapshotsResponse) UnsafeAppend ¶
func (r *ListSnapshotsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListSnapshotsResponse) UnsafeGetTotalCount ¶
func (r *ListSnapshotsResponse) UnsafeGetTotalCount() uint64
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 Database Instance.
InstanceID string `json:"-"`
// Name: name of the user.
Name *string `json:"-"`
// OrderBy: criteria to use when requesting user listing.
// Default value: name_asc
OrderBy ListUsersRequestOrderBy `json:"-"`
Page *int32 `json:"-"`
PageSize *uint32 `json:"-"`
}
ListUsersRequest: list users request.
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
func (ListUsersRequestOrderBy) Values ¶
func (enum ListUsersRequestOrderBy) Values() []ListUsersRequestOrderBy
type ListUsersResponse ¶
type ListUsersResponse struct {
// Users: list of users in a Database Instance.
Users []*User `json:"users"`
// TotalCount: total count of users present on a Database Instance.
TotalCount uint64 `json:"total_count"`
}
ListUsersResponse: list users response.
func (*ListUsersResponse) UnsafeAppend ¶
func (r *ListUsersResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListUsersResponse) UnsafeGetTotalCount ¶
func (r *ListUsersResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListVersionsRequest ¶
type ListVersionsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
Version *string `json:"-"`
Page *int32 `json:"-"`
PageSize *uint32 `json:"-"`
}
ListVersionsRequest: list versions request.
type ListVersionsResponse ¶
type ListVersionsResponse struct {
// Versions: available MongoDB® engine version.
Versions []*Version `json:"versions"`
// TotalCount: total count of MongoDB® engine version available.
TotalCount uint64 `json:"total_count"`
}
ListVersionsResponse: list versions response.
func (*ListVersionsResponse) UnsafeAppend ¶
func (r *ListVersionsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListVersionsResponse) UnsafeGetTotalCount ¶
func (r *ListVersionsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
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_stock
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"`
// AvailableVolumeTypes: available storage options for the node type.
AvailableVolumeTypes []*NodeTypeVolumeType `json:"available_volume_types"`
// Disabled: the node type is currently disabled.
Disabled bool `json:"disabled"`
// Beta: the node type is currently in beta.
Beta bool `json:"beta"`
// InstanceRange: instance range associated with the node type offer.
InstanceRange string `json:"instance_range"`
}
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
func (NodeTypeStock) Values ¶
func (enum NodeTypeStock) Values() []NodeTypeStock
type NodeTypeVolumeType ¶
type NodeTypeVolumeType struct {
// Type: volume Type.
// Default value: unknown_type
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 RestoreSnapshotRequest ¶
type RestoreSnapshotRequest 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.
SnapshotID string `json:"-"`
// InstanceName: name of the new Database Instance.
InstanceName string `json:"instance_name"`
// NodeType: node type to use for the new Database Instance.
NodeType string `json:"node_type"`
// NodeNumber: number of nodes to use for the new Database Instance.
NodeNumber uint32 `json:"node_number"`
// Volume: instance volume information.
Volume *RestoreSnapshotRequestVolumeDetails `json:"volume"`
}
RestoreSnapshotRequest: restore snapshot request.
type RestoreSnapshotRequestVolumeDetails ¶
type RestoreSnapshotRequestVolumeDetails struct {
// VolumeType: type of volume where data is stored.
// Default value: unknown_type
VolumeType VolumeType `json:"volume_type"`
}
RestoreSnapshotRequestVolumeDetails: restore snapshot request volume details.
type SetUserRoleRequest ¶
type SetUserRoleRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// InstanceID: UUID of the Database Instance the user belongs to.
InstanceID string `json:"-"`
// UserName: name of the database user.
UserName string `json:"user_name"`
// Roles: list of roles assigned to the user, along with the corresponding database where each role is granted.
Roles []*UserRole `json:"roles"`
}
SetUserRoleRequest: set user role request.
type Setting ¶
type Setting struct {
// Name: setting name from the 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 SettingPropertyType `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"`
}
Setting: setting.
type SettingPropertyType ¶
type SettingPropertyType string
func (SettingPropertyType) MarshalJSON ¶
func (enum SettingPropertyType) MarshalJSON() ([]byte, error)
func (SettingPropertyType) String ¶
func (enum SettingPropertyType) String() string
func (*SettingPropertyType) UnmarshalJSON ¶
func (enum *SettingPropertyType) UnmarshalJSON(data []byte) error
func (SettingPropertyType) Values ¶
func (enum SettingPropertyType) Values() []SettingPropertyType
type Snapshot ¶
type Snapshot struct {
// ID: UUID of the snapshot.
ID string `json:"id"`
// InstanceID: UUID of the Database Instance.
InstanceID string `json:"instance_id"`
// Name: name of the snapshot.
Name string `json:"name"`
// Status: status of the snapshot.
// Default value: unknown_status
Status SnapshotStatus `json:"status"`
// Size: size of the snapshot.
Size scw.Size `json:"size"`
// ExpiresAt: expiration date (must follow the ISO 8601 format).
ExpiresAt *time.Time `json:"expires_at"`
// CreatedAt: creation date (must follow the ISO 8601 format).
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: updated date (must follow the ISO 8601 format).
UpdatedAt *time.Time `json:"updated_at"`
// InstanceName: name of the Database Instance of the snapshot.
InstanceName string `json:"instance_name"`
// NodeType: source node type.
NodeType string `json:"node_type"`
// VolumeType: type of volume where data is stored - sbs_5k or sbs_15k.
VolumeType *SnapshotVolumeType `json:"volume_type"`
// Region: region of the 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
func (SnapshotStatus) Values ¶
func (enum SnapshotStatus) Values() []SnapshotStatus
type SnapshotVolumeType ¶
type SnapshotVolumeType struct {
// Type: default value: unknown_type
Type VolumeType `json:"type"`
}
SnapshotVolumeType: snapshot volume type.
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 Database Instance to update.
InstanceID string `json:"-"`
// Name: name of the Database Instance.
Name *string `json:"name,omitempty"`
// Tags: tags of a Database Instance.
Tags *[]string `json:"tags,omitempty"`
}
UpdateInstanceRequest: update instance request.
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.
SnapshotID string `json:"-"`
// Name: name of the snapshot.
Name *string `json:"name,omitempty"`
// ExpiresAt: expiration date of the snapshot (must follow the ISO 8601 format).
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
UpdateSnapshotRequest: update snapshot request.
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 Database 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,omitempty"`
}
UpdateUserRequest: update user request.
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 Database Instance you want to upgrade.
InstanceID string `json:"-"`
// VolumeSize: increase your Block Storage volume size.
// Precisely one of VolumeSize must be set.
VolumeSize *scw.Size `json:"volume_size,omitempty"`
}
UpgradeInstanceRequest: upgrade instance request.
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). Only a-zA-Z0-9_$- characters are accepted).
Name string `json:"name"`
// Roles: list of roles assigned to the user, along with the corresponding database where each role is granted.
Roles []*UserRole `json:"roles"`
}
User: user.
type UserRole ¶
type UserRole struct {
// Role: default value: unknown_role
Role UserRoleRole `json:"role"`
// Precisely one of Database, AnyDatabase must be set.
Database *string `json:"database,omitempty"`
// Precisely one of Database, AnyDatabase must be set.
AnyDatabase *bool `json:"any_database,omitempty"`
}
UserRole: user role.
type UserRoleRole ¶
type UserRoleRole string
func (UserRoleRole) MarshalJSON ¶
func (enum UserRoleRole) MarshalJSON() ([]byte, error)
func (UserRoleRole) String ¶
func (enum UserRoleRole) String() string
func (*UserRoleRole) UnmarshalJSON ¶
func (enum *UserRoleRole) UnmarshalJSON(data []byte) error
func (UserRoleRole) Values ¶
func (enum UserRoleRole) Values() []UserRoleRole
type Version ¶
type Version struct {
// Version: mongoDB® engine version.
Version string `json:"version"`
// EndOfLifeAt: date of End of Life.
EndOfLifeAt *time.Time `json:"end_of_life_at"`
// AvailableSettings: instance settings available to be updated.
AvailableSettings []*Setting `json:"available_settings"`
}
Version: version.
type Volume ¶
type Volume struct {
// Type: type of volume where data is stored.
// Default value: unknown_type
Type VolumeType `json:"type"`
// Size: volume size.
Size scw.Size `json:"size"`
}
Volume: volume.
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
func (VolumeType) Values ¶
func (enum VolumeType) Values() []VolumeType