Skip to content

Latest commit

 

History

History
271 lines (175 loc) · 6.74 KB

File metadata and controls

271 lines (175 loc) · 6.74 KB

\DeploymentAPI

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

DeleteDeployment

ResponseModel DeleteDeployment(ctx, id).Execute()

Delete Deployment

Example

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)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ResponseModel

Authorization

apiKey

HTTP request headers

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

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

GetDeployment

StartDeployment GetDeployment(ctx, id).Execute()

Details of Deployment by ID

Example

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)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

StartDeployment

Authorization

apiKey

HTTP request headers

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

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

ListDeployments

Deployments ListDeployments(ctx).Execute()

List Deployments

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

Deployments

Authorization

apiKey

HTTP request headers

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

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

StartDeployment

StartDeployment StartDeployment(ctx).Payload(payload).Execute()

Start Deployment

Example

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)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
payload StartDeploymentPayload

Return type

StartDeployment

Authorization

apiKey

HTTP request headers

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

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