All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| DeleteDeployment | Delete /core/marketplace/deployments/{id} | Delete Deployment |
| GetDeployment | Get /core/marketplace/deployments/{id} | Details of Deployment by ID |
| ListDeployments | Get /core/marketplace/deployments | List Deployments |
| StartDeployment | Post /core/marketplace/deployments | Start Deployment |
ResponseModel DeleteDeployment(ctx, id).Execute()
Delete Deployment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeploymentAPI.DeleteDeployment(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeploymentAPI.DeleteDeployment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteDeployment`: ResponseModel
fmt.Fprintf(os.Stdout, "Response from `DeploymentAPI.DeleteDeployment`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiDeleteDeploymentRequest 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]
StartDeployment GetDeployment(ctx, id).Execute()
Details of Deployment by ID
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeploymentAPI.GetDeployment(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeploymentAPI.GetDeployment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeployment`: StartDeployment
fmt.Fprintf(os.Stdout, "Response from `DeploymentAPI.GetDeployment`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiGetDeploymentRequest 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]
Deployments ListDeployments(ctx).Execute()
List Deployments
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeploymentAPI.ListDeployments(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeploymentAPI.ListDeployments``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDeployments`: Deployments
fmt.Fprintf(os.Stdout, "Response from `DeploymentAPI.ListDeployments`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListDeploymentsRequest 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]
StartDeployment StartDeployment(ctx).Payload(payload).Execute()
Start Deployment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)
func main() {
payload := *openapiclient.NewStartDeploymentPayload("Description_example", "Name_example", int32(123)) // StartDeploymentPayload |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeploymentAPI.StartDeployment(context.Background()).Payload(payload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeploymentAPI.StartDeployment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StartDeployment`: StartDeployment
fmt.Fprintf(os.Stdout, "Response from `DeploymentAPI.StartDeployment`: %v\n", resp)
}Other parameters are passed through a pointer to a apiStartDeploymentRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| payload | StartDeploymentPayload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]