Skip to content

Latest commit

 

History

History
649 lines (415 loc) · 18.7 KB

EnvironmentActionsAPI.md

File metadata and controls

649 lines (415 loc) · 18.7 KB

\EnvironmentActionsAPI

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

Method HTTP request Description
CancelEnvironmentDeployment Post /environment/{environmentId}/cancelDeployment Cancel environment deployment
CloneEnvironment Post /environment/{environmentId}/clone Clone environment
DeleteSelectedServices Post /environment/{environmentId}/service/delete Delete services
DeployAllServices Post /environment/{environmentId}/service/deploy Deploy services
DeployEnvironment Post /environment/{environmentId}/deploy Deploy environment
RebootServices Post /environment/{environmentId}/service/restart-service Reboot services
RedeployEnvironment Post /environment/{environmentId}/redeploy Redeploy environment
StopEnvironment Post /environment/{environmentId}/stop Stop environment
StopSelectedServices Post /environment/{environmentId}/service/stop Stop services

CancelEnvironmentDeployment

EnvironmentStatus CancelEnvironmentDeployment(ctx, environmentId).Execute()

Cancel environment deployment

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

EnvironmentStatus

Authorization

ApiKeyAuth, 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]

CloneEnvironment

Environment CloneEnvironment(ctx, environmentId).CloneEnvironmentRequest(cloneEnvironmentRequest).Execute()

Clone environment

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
	cloneEnvironmentRequest := *openapiclient.NewCloneEnvironmentRequest("Name_example") // CloneEnvironmentRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

cloneEnvironmentRequest | CloneEnvironmentRequest | |

Return type

Environment

Authorization

ApiKeyAuth, 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]

DeleteSelectedServices

DeleteSelectedServices(ctx, environmentId).EnvironmentServiceIdsAllRequest(environmentServiceIdsAllRequest).Execute()

Delete services

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
	environmentServiceIdsAllRequest := *openapiclient.NewEnvironmentServiceIdsAllRequest() // EnvironmentServiceIdsAllRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.EnvironmentActionsAPI.DeleteSelectedServices(context.Background(), environmentId).EnvironmentServiceIdsAllRequest(environmentServiceIdsAllRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentActionsAPI.DeleteSelectedServices``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

environmentServiceIdsAllRequest | EnvironmentServiceIdsAllRequest | |

Return type

(empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

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

DeployAllServices

Status DeployAllServices(ctx, environmentId).DeployAllRequest(deployAllRequest).Execute()

Deploy services

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
	deployAllRequest := *openapiclient.NewDeployAllRequest() // DeployAllRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

deployAllRequest | DeployAllRequest | |

Return type

Status

Authorization

ApiKeyAuth, 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]

DeployEnvironment

Status DeployEnvironment(ctx, environmentId).Execute()

Deploy environment

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Status

Authorization

ApiKeyAuth, 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]

RebootServices

Status RebootServices(ctx, environmentId).RebootServicesRequest(rebootServicesRequest).Execute()

Reboot services

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
	rebootServicesRequest := *openapiclient.NewRebootServicesRequest() // RebootServicesRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

rebootServicesRequest | RebootServicesRequest | |

Return type

Status

Authorization

ApiKeyAuth, 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]

RedeployEnvironment

EnvironmentStatus RedeployEnvironment(ctx, environmentId).Execute()

Redeploy environment

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

EnvironmentStatus

Authorization

ApiKeyAuth, 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]

StopEnvironment

EnvironmentStatus StopEnvironment(ctx, environmentId).Execute()

Stop environment

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

EnvironmentStatus

Authorization

ApiKeyAuth, 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]

StopSelectedServices

StopSelectedServices(ctx, environmentId).EnvironmentServiceIdsAllRequest(environmentServiceIdsAllRequest).Execute()

Stop services

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment ID
	environmentServiceIdsAllRequest := *openapiclient.NewEnvironmentServiceIdsAllRequest() // EnvironmentServiceIdsAllRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.EnvironmentActionsAPI.StopSelectedServices(context.Background(), environmentId).EnvironmentServiceIdsAllRequest(environmentServiceIdsAllRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentActionsAPI.StopSelectedServices``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

environmentServiceIdsAllRequest | EnvironmentServiceIdsAllRequest | |

Return type

(empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

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