All URIs are relative to https://api.qovery.com
| Method | HTTP request | Description |
|---|---|---|
| CreateVariable | Post /variable | Create a variable |
| CreateVariableAlias | Post /variable/{variableId}/alias | Create a variable alias |
| CreateVariableOverride | Post /variable/{variableId}/override | Create a variable override |
| DeleteVariable | Delete /variable/{variableId} | Delete a variable |
| EditVariable | Put /variable/{variableId} | Edit a variable |
| ImportEnvironmentVariables | Post /variable/import | Import variables |
| ListVariables | Get /variable | List variables |
VariableResponse CreateVariable(ctx).VariableRequest(variableRequest).Execute()
Create a variable
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
variableRequest := *openapiclient.NewVariableRequest("Key_example", "Value_example", false, openapiclient.APIVariableScopeEnum("APPLICATION"), "VariableParentId_example") // VariableRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VariableMainCallsAPI.CreateVariable(context.Background()).VariableRequest(variableRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariableMainCallsAPI.CreateVariable``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateVariable`: VariableResponse
fmt.Fprintf(os.Stdout, "Response from `VariableMainCallsAPI.CreateVariable`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateVariableRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| variableRequest | VariableRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableResponse CreateVariableAlias(ctx, variableId).VariableAliasRequest(variableAliasRequest).Execute()
Create a variable alias
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
variableId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Variable ID
variableAliasRequest := *openapiclient.NewVariableAliasRequest("Key_example", openapiclient.APIVariableScopeEnum("APPLICATION"), "AliasParentId_example") // VariableAliasRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VariableMainCallsAPI.CreateVariableAlias(context.Background(), variableId).VariableAliasRequest(variableAliasRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariableMainCallsAPI.CreateVariableAlias``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateVariableAlias`: VariableResponse
fmt.Fprintf(os.Stdout, "Response from `VariableMainCallsAPI.CreateVariableAlias`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| variableId | string | Variable ID |
Other parameters are passed through a pointer to a apiCreateVariableAliasRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
variableAliasRequest | VariableAliasRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableResponse CreateVariableOverride(ctx, variableId).VariableOverrideRequest(variableOverrideRequest).Execute()
Create a variable override
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
variableId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Variable ID
variableOverrideRequest := *openapiclient.NewVariableOverrideRequest("Value_example", openapiclient.APIVariableScopeEnum("APPLICATION"), "OverrideParentId_example") // VariableOverrideRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VariableMainCallsAPI.CreateVariableOverride(context.Background(), variableId).VariableOverrideRequest(variableOverrideRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariableMainCallsAPI.CreateVariableOverride``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateVariableOverride`: VariableResponse
fmt.Fprintf(os.Stdout, "Response from `VariableMainCallsAPI.CreateVariableOverride`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| variableId | string | Variable ID |
Other parameters are passed through a pointer to a apiCreateVariableOverrideRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
variableOverrideRequest | VariableOverrideRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteVariable(ctx, variableId).Execute()
Delete a variable
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
variableId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Variable ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.VariableMainCallsAPI.DeleteVariable(context.Background(), variableId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariableMainCallsAPI.DeleteVariable``: %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. | |
| variableId | string | Variable ID |
Other parameters are passed through a pointer to a apiDeleteVariableRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableResponse EditVariable(ctx, variableId).VariableEditRequest(variableEditRequest).Execute()
Edit a variable
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
variableId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Variable ID
variableEditRequest := *openapiclient.NewVariableEditRequest("Key_example") // VariableEditRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VariableMainCallsAPI.EditVariable(context.Background(), variableId).VariableEditRequest(variableEditRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariableMainCallsAPI.EditVariable``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EditVariable`: VariableResponse
fmt.Fprintf(os.Stdout, "Response from `VariableMainCallsAPI.EditVariable`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| variableId | string | Variable ID |
Other parameters are passed through a pointer to a apiEditVariableRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
variableEditRequest | VariableEditRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableImport ImportEnvironmentVariables(ctx).ServiceId(serviceId).ServiceType(serviceType).VariableImportRequest(variableImportRequest).Execute()
Import variables
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
serviceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | service id
serviceType := openapiclient.ServiceTypeForVariableEnum("APPLICATION") // ServiceTypeForVariableEnum | service type
variableImportRequest := *openapiclient.NewVariableImportRequest(false, []openapiclient.VariableImportRequestVarsInner{*openapiclient.NewVariableImportRequestVarsInner("Name_example", "Value_example", openapiclient.APIVariableScopeEnum("APPLICATION"), false)}) // VariableImportRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VariableMainCallsAPI.ImportEnvironmentVariables(context.Background()).ServiceId(serviceId).ServiceType(serviceType).VariableImportRequest(variableImportRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariableMainCallsAPI.ImportEnvironmentVariables``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImportEnvironmentVariables`: VariableImport
fmt.Fprintf(os.Stdout, "Response from `VariableMainCallsAPI.ImportEnvironmentVariables`: %v\n", resp)
}Other parameters are passed through a pointer to a apiImportEnvironmentVariablesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| serviceId | string | service id | |
| serviceType | ServiceTypeForVariableEnum | service type | |
| variableImportRequest | VariableImportRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableResponseList ListVariables(ctx).ParentId(parentId).Scope(scope).IsSecret(isSecret).Execute()
List variables
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
parentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | it filters the list by returning only the variables accessible by the selected parent_id. This field shall contain the id of a project, environment or service depending on the selected scope. Example, if scope = APPLICATION and parent_id=<application_id>, the result will contain any variable accessible by the application. The result will contain also any variable declared at an higher scope.
scope := openapiclient.APIVariableScopeEnum("APPLICATION") // APIVariableScopeEnum | the type of the parent_id (application, project, environment etc..).
isSecret := true // bool | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VariableMainCallsAPI.ListVariables(context.Background()).ParentId(parentId).Scope(scope).IsSecret(isSecret).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariableMainCallsAPI.ListVariables``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListVariables`: VariableResponseList
fmt.Fprintf(os.Stdout, "Response from `VariableMainCallsAPI.ListVariables`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListVariablesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| parentId | string | it filters the list by returning only the variables accessible by the selected parent_id. This field shall contain the id of a project, environment or service depending on the selected scope. Example, if scope = APPLICATION and parent_id=<application_id>, the result will contain any variable accessible by the application. The result will contain also any variable declared at an higher scope. | |
| scope | APIVariableScopeEnum | the type of the parent_id (application, project, environment etc..). | |
| isSecret | bool |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]