Skip to content

Latest commit

 

History

History
284 lines (184 loc) · 7.42 KB

DatabaseActionsAPI.md

File metadata and controls

284 lines (184 loc) · 7.42 KB

\DatabaseActionsAPI

All URIs are relative to https://api.qovery.com

Method HTTP request Description
DeployDatabase Post /database/{databaseId}/deploy Deploy database
RebootDatabase Post /database/{databaseId}/restart-service Retart database
RedeployDatabase Post /database/{databaseId}/redeploy Redeploy database
StopDatabase Post /database/{databaseId}/stop Stop database

DeployDatabase

Status DeployDatabase(ctx, databaseId).Execute()

Deploy database

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseActionsAPI.DeployDatabase(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseActionsAPI.DeployDatabase``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeployDatabase`: Status
	fmt.Fprintf(os.Stdout, "Response from `DatabaseActionsAPI.DeployDatabase`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiDeployDatabaseRequest struct via the builder pattern

Name Type Description Notes

Return type

Status

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RebootDatabase

Status RebootDatabase(ctx, databaseId).Execute()

Retart database

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseActionsAPI.RebootDatabase(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseActionsAPI.RebootDatabase``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RebootDatabase`: Status
	fmt.Fprintf(os.Stdout, "Response from `DatabaseActionsAPI.RebootDatabase`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiRebootDatabaseRequest struct via the builder pattern

Name Type Description Notes

Return type

Status

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedeployDatabase

Status RedeployDatabase(ctx, databaseId).Execute()

Redeploy database

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseActionsAPI.RedeployDatabase(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseActionsAPI.RedeployDatabase``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedeployDatabase`: Status
	fmt.Fprintf(os.Stdout, "Response from `DatabaseActionsAPI.RedeployDatabase`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiRedeployDatabaseRequest struct via the builder pattern

Name Type Description Notes

Return type

Status

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

StopDatabase

Status StopDatabase(ctx, databaseId).Execute()

Stop database

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatabaseActionsAPI.StopDatabase(context.Background(), databaseId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseActionsAPI.StopDatabase``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `StopDatabase`: Status
	fmt.Fprintf(os.Stdout, "Response from `DatabaseActionsAPI.StopDatabase`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

Other parameters are passed through a pointer to a apiStopDatabaseRequest struct via the builder pattern

Name Type Description Notes

Return type

Status

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]