All URIs are relative to https://api.beget.com
Method | HTTP request | Description |
---|---|---|
SnapshotServiceCreate | Post /v1/vps/snapshot | |
SnapshotServiceCreateCalculator | Post /v1/vps/snapshot/calculator | |
SnapshotServiceEdit | Put /v1/vps/snapshot/{id} | |
SnapshotServiceGetAll | Get /v1/vps/snapshot | |
SnapshotServiceGetAllRestores | Get /v1/vps/snapshot/restore | |
SnapshotServiceRemove | Delete /v1/vps/snapshot/{id} | |
SnapshotServiceRestore | Post /v1/vps/snapshot/{id}/restore |
SnapshotCreateResponse SnapshotServiceCreate(ctx).SnapshotCreateRequest(snapshotCreateRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
snapshotCreateRequest := *openapiclient.NewSnapshotCreateRequest() // SnapshotCreateRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SnapshotServiceApi.SnapshotServiceCreate(context.Background()).SnapshotCreateRequest(snapshotCreateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotServiceApi.SnapshotServiceCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotServiceCreate`: SnapshotCreateResponse
fmt.Fprintf(os.Stdout, "Response from `SnapshotServiceApi.SnapshotServiceCreate`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiSnapshotServiceCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
snapshotCreateRequest | SnapshotCreateRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SnapshotCreateCalculatorResponse SnapshotServiceCreateCalculator(ctx).SnapshotCreateCalculatorRequest(snapshotCreateCalculatorRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
snapshotCreateCalculatorRequest := *openapiclient.NewSnapshotCreateCalculatorRequest() // SnapshotCreateCalculatorRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SnapshotServiceApi.SnapshotServiceCreateCalculator(context.Background()).SnapshotCreateCalculatorRequest(snapshotCreateCalculatorRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotServiceApi.SnapshotServiceCreateCalculator``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotServiceCreateCalculator`: SnapshotCreateCalculatorResponse
fmt.Fprintf(os.Stdout, "Response from `SnapshotServiceApi.SnapshotServiceCreateCalculator`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiSnapshotServiceCreateCalculatorRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
snapshotCreateCalculatorRequest | SnapshotCreateCalculatorRequest |
SnapshotCreateCalculatorResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SnapshotEditResponse SnapshotServiceEdit(ctx, id).SnapshotEditRequest(snapshotEditRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
snapshotEditRequest := *openapiclient.NewSnapshotEditRequest() // SnapshotEditRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SnapshotServiceApi.SnapshotServiceEdit(context.Background(), id).SnapshotEditRequest(snapshotEditRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotServiceApi.SnapshotServiceEdit``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotServiceEdit`: SnapshotEditResponse
fmt.Fprintf(os.Stdout, "Response from `SnapshotServiceApi.SnapshotServiceEdit`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiSnapshotServiceEditRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
snapshotEditRequest | SnapshotEditRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SnapshotGetAllResponse SnapshotServiceGetAll(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SnapshotServiceApi.SnapshotServiceGetAll(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotServiceApi.SnapshotServiceGetAll``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotServiceGetAll`: SnapshotGetAllResponse
fmt.Fprintf(os.Stdout, "Response from `SnapshotServiceApi.SnapshotServiceGetAll`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiSnapshotServiceGetAllRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SnapshotGetAllRestoresResponse SnapshotServiceGetAllRestores(ctx).Id(id).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SnapshotServiceApi.SnapshotServiceGetAllRestores(context.Background()).Id(id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotServiceApi.SnapshotServiceGetAllRestores``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotServiceGetAllRestores`: SnapshotGetAllRestoresResponse
fmt.Fprintf(os.Stdout, "Response from `SnapshotServiceApi.SnapshotServiceGetAllRestores`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiSnapshotServiceGetAllRestoresRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
id | string |
SnapshotGetAllRestoresResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SnapshotRemoveResponse SnapshotServiceRemove(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SnapshotServiceApi.SnapshotServiceRemove(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotServiceApi.SnapshotServiceRemove``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotServiceRemove`: SnapshotRemoveResponse
fmt.Fprintf(os.Stdout, "Response from `SnapshotServiceApi.SnapshotServiceRemove`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiSnapshotServiceRemoveRequest 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]
SnapshotRestoreResponse SnapshotServiceRestore(ctx, id).SnapshotRestoreRequest(snapshotRestoreRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
snapshotRestoreRequest := *openapiclient.NewSnapshotRestoreRequest() // SnapshotRestoreRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SnapshotServiceApi.SnapshotServiceRestore(context.Background(), id).SnapshotRestoreRequest(snapshotRestoreRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotServiceApi.SnapshotServiceRestore``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotServiceRestore`: SnapshotRestoreResponse
fmt.Fprintf(os.Stdout, "Response from `SnapshotServiceApi.SnapshotServiceRestore`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiSnapshotServiceRestoreRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
snapshotRestoreRequest | SnapshotRestoreRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]