Skip to content

Latest commit

 

History

History
206 lines (131 loc) · 6.07 KB

PostgresqlBackupServiceApi.md

File metadata and controls

206 lines (131 loc) · 6.07 KB

\PostgresqlBackupServiceApi

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

Method HTTP request Description
PostgresqlBackupServiceGetList Get /v1/cloud/postgresql/backup
PostgresqlBackupServiceGetOrders Get /v1/cloud/postgresql/backup/orders
PostgresqlBackupServiceRestore Post /v1/cloud/postgresql/backup/{copy_id}

PostgresqlBackupServiceGetList

PostgresqlBackupGetListResponse PostgresqlBackupServiceGetList(ctx).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

PostgresqlBackupGetListResponse

Authorization

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]

PostgresqlBackupServiceGetOrders

PostgresqlBackupGetOrdersResponse PostgresqlBackupServiceGetOrders(ctx).Limit(limit).Offset(offset).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    limit := int32(56) // int32 |  (optional)
    offset := int32(56) // int32 |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.PostgresqlBackupServiceApi.PostgresqlBackupServiceGetOrders(context.Background()).Limit(limit).Offset(offset).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PostgresqlBackupServiceApi.PostgresqlBackupServiceGetOrders``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostgresqlBackupServiceGetOrders`: PostgresqlBackupGetOrdersResponse
    fmt.Fprintf(os.Stdout, "Response from `PostgresqlBackupServiceApi.PostgresqlBackupServiceGetOrders`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
limit int32
offset int32

Return type

PostgresqlBackupGetOrdersResponse

Authorization

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]

PostgresqlBackupServiceRestore

PostgresqlBackupRestoreResponse PostgresqlBackupServiceRestore(ctx, copyId).PostgresqlBackupRestoreRequest(postgresqlBackupRestoreRequest).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    copyId := "copyId_example" // string | 
    postgresqlBackupRestoreRequest := *openapiclient.NewPostgresqlBackupRestoreRequest() // PostgresqlBackupRestoreRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

postgresqlBackupRestoreRequest | PostgresqlBackupRestoreRequest | |

Return type

PostgresqlBackupRestoreResponse

Authorization

bearerAuth

HTTP request headers

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

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