All URIs are relative to https://gateway.stackpath.com
Method | HTTP request | Description |
---|---|---|
GetWorkloadInstance | Get /workload/v1/stacks/{stack_id}/workloads/{workload_id}/instances/{instance_name} | Get a workload instance |
GetWorkloadInstances | Get /workload/v1/stacks/{stack_id}/workloads/{workload_id}/instances | Get all workload instances |
RestartInstance | Post /workload/v1/stacks/{stack_id}/workloads/{workload_id}/instances/{instance_name}/power/restart | Restart a workload instance |
V1GetWorkloadInstanceResponse GetWorkloadInstance(ctx, stackId, workloadId, instanceName).Execute()
Get a workload instance
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
workloadId := "workloadId_example" // string | An EdgeCompute workload ID
instanceName := "instanceName_example" // string | An EdgeCompute workload instance name
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.InstancesApi.GetWorkloadInstance(context.Background(), stackId, workloadId, instanceName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstancesApi.GetWorkloadInstance``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWorkloadInstance`: V1GetWorkloadInstanceResponse
fmt.Fprintf(os.Stdout, "Response from `InstancesApi.GetWorkloadInstance`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | string | A stack ID or slug | |
workloadId | string | An EdgeCompute workload ID | |
instanceName | string | An EdgeCompute workload instance name |
Other parameters are passed through a pointer to a apiGetWorkloadInstanceRequest 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]
V1GetWorkloadInstancesResponse GetWorkloadInstances(ctx, stackId, workloadId).PageRequestFirst(pageRequestFirst).PageRequestAfter(pageRequestAfter).PageRequestFilter(pageRequestFilter).PageRequestSortBy(pageRequestSortBy).Execute()
Get all workload instances
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
workloadId := "workloadId_example" // string | An EdgeCompute workload ID
pageRequestFirst := "pageRequestFirst_example" // string | The number of items desired. (optional)
pageRequestAfter := "pageRequestAfter_example" // string | The cursor value after which data will be returned. (optional)
pageRequestFilter := "pageRequestFilter_example" // string | SQL-style constraint filters. (optional)
pageRequestSortBy := "pageRequestSortBy_example" // string | Sort the response by the given field. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.InstancesApi.GetWorkloadInstances(context.Background(), stackId, workloadId).PageRequestFirst(pageRequestFirst).PageRequestAfter(pageRequestAfter).PageRequestFilter(pageRequestFilter).PageRequestSortBy(pageRequestSortBy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstancesApi.GetWorkloadInstances``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWorkloadInstances`: V1GetWorkloadInstancesResponse
fmt.Fprintf(os.Stdout, "Response from `InstancesApi.GetWorkloadInstances`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | string | A stack ID or slug | |
workloadId | string | An EdgeCompute workload ID |
Other parameters are passed through a pointer to a apiGetWorkloadInstancesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
pageRequestFirst | string | The number of items desired. | pageRequestAfter | string | The cursor value after which data will be returned. | pageRequestFilter | string | SQL-style constraint filters. | pageRequestSortBy | string | Sort the response by the given field. |
V1GetWorkloadInstancesResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RestartInstance(ctx, stackId, workloadId, instanceName).Execute()
Restart a workload instance
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
stackId := "stackId_example" // string | A stack ID or slug
workloadId := "workloadId_example" // string | An EdgeCompute workload ID
instanceName := "instanceName_example" // string | An EdgeCompute workload instance name
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.InstancesApi.RestartInstance(context.Background(), stackId, workloadId, instanceName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstancesApi.RestartInstance``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | string | A stack ID or slug | |
workloadId | string | An EdgeCompute workload ID | |
instanceName | string | An EdgeCompute workload instance name |
Other parameters are passed through a pointer to a apiRestartInstanceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]