Skip to content

Latest commit

 

History

History
359 lines (229 loc) · 9.71 KB

ContainerMainCallsAPI.md

File metadata and controls

359 lines (229 loc) · 9.71 KB

\ContainerMainCallsAPI

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

Method HTTP request Description
DeleteContainer Delete /container/{containerId} Delete container
EditContainer Put /container/{containerId} Edit container
GetContainer Get /container/{containerId} Get container by ID
GetContainerStatus Get /container/{containerId}/status Get container status
ListContainerLinks Get /container/{containerId}/link List all URLs of the container

DeleteContainer

DeleteContainer(ctx, containerId).Execute()

Delete container

Example

package main

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

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

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ContainerMainCallsAPI.DeleteContainer(context.Background(), containerId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContainerMainCallsAPI.DeleteContainer``: %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.
containerId string Container ID

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

EditContainer

ContainerResponse EditContainer(ctx, containerId).ContainerRequest(containerRequest).Execute()

Edit container

Example

package main

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

func main() {
	containerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Container ID
	containerRequest := *openapiclient.NewContainerRequest("Name_example", "RegistryId_example", "ImageName_example", "Tag_example", *openapiclient.NewHealthcheck()) // ContainerRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

containerRequest | ContainerRequest | |

Return type

ContainerResponse

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]

GetContainer

ContainerResponse GetContainer(ctx, containerId).Execute()

Get container by ID

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ContainerResponse

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]

GetContainerStatus

Status GetContainerStatus(ctx, containerId).Execute()

Get container status

Example

package main

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

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

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

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiGetContainerStatusRequest 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]

ListContainerLinks

LinkResponseList ListContainerLinks(ctx, containerId).Execute()

List all URLs of the container

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

LinkResponseList

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]