All URIs are relative to https://api.qovery.com
Method | HTTP request | Description |
---|---|---|
CloneDatabase | Post /database/{databaseId}/clone | Clone database |
CreateDatabase | Post /environment/{environmentId}/database | Create a database |
GetEnvironmentDatabaseStatus | Get /environment/{environmentId}/database/status | List all environment databases statuses |
ListDatabase | Get /environment/{environmentId}/database | List environment databases |
ListEnvironmentDatabaseConfig | Get /environment/{environmentId}/databaseConfiguration | List eligible database types, versions and modes for the environment |
Database CloneDatabase(ctx, databaseId).CloneServiceRequest(cloneServiceRequest).Execute()
Clone database
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID
cloneServiceRequest := *openapiclient.NewCloneServiceRequest("Name_example", "EnvironmentId_example") // CloneServiceRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DatabasesAPI.CloneDatabase(context.Background(), databaseId).CloneServiceRequest(cloneServiceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabasesAPI.CloneDatabase``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CloneDatabase`: Database
fmt.Fprintf(os.Stdout, "Response from `DatabasesAPI.CloneDatabase`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
databaseId | string | Database ID |
Other parameters are passed through a pointer to a apiCloneDatabaseRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
cloneServiceRequest | CloneServiceRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Database CreateDatabase(ctx, environmentId).DatabaseRequest(databaseRequest).Execute()
Create a database
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
databaseRequest := *openapiclient.NewDatabaseRequest("Name_example", openapiclient.DatabaseTypeEnum("MONGODB"), "10.1", openapiclient.DatabaseModeEnum("CONTAINER")) // DatabaseRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DatabasesAPI.CreateDatabase(context.Background(), environmentId).DatabaseRequest(databaseRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabasesAPI.CreateDatabase``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateDatabase`: Database
fmt.Fprintf(os.Stdout, "Response from `DatabasesAPI.CreateDatabase`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
environmentId | string | Environment ID |
Other parameters are passed through a pointer to a apiCreateDatabaseRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
databaseRequest | DatabaseRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReferenceObjectStatusResponseList GetEnvironmentDatabaseStatus(ctx, environmentId).Execute()
List all environment databases statuses
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DatabasesAPI.GetEnvironmentDatabaseStatus(context.Background(), environmentId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabasesAPI.GetEnvironmentDatabaseStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEnvironmentDatabaseStatus`: ReferenceObjectStatusResponseList
fmt.Fprintf(os.Stdout, "Response from `DatabasesAPI.GetEnvironmentDatabaseStatus`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
environmentId | string | Environment ID |
Other parameters are passed through a pointer to a apiGetEnvironmentDatabaseStatusRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
ReferenceObjectStatusResponseList
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DatabaseResponseList ListDatabase(ctx, environmentId).Execute()
List environment databases
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DatabasesAPI.ListDatabase(context.Background(), environmentId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabasesAPI.ListDatabase``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDatabase`: DatabaseResponseList
fmt.Fprintf(os.Stdout, "Response from `DatabasesAPI.ListDatabase`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
environmentId | string | Environment ID |
Other parameters are passed through a pointer to a apiListDatabaseRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DatabaseConfigurationResponseList ListEnvironmentDatabaseConfig(ctx, environmentId).Execute()
List eligible database types, versions and modes for the environment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DatabasesAPI.ListEnvironmentDatabaseConfig(context.Background(), environmentId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabasesAPI.ListEnvironmentDatabaseConfig``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListEnvironmentDatabaseConfig`: DatabaseConfigurationResponseList
fmt.Fprintf(os.Stdout, "Response from `DatabasesAPI.ListEnvironmentDatabaseConfig`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
environmentId | string | Environment ID |
Other parameters are passed through a pointer to a apiListEnvironmentDatabaseConfigRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DatabaseConfigurationResponseList
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]