Skip to content

Latest commit

 

History

History
523 lines (335 loc) · 17.8 KB

ApplicationEnvironmentVariableAPI.md

File metadata and controls

523 lines (335 loc) · 17.8 KB

\ApplicationEnvironmentVariableAPI

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

Method HTTP request Description
CreateApplicationEnvironmentVariable Post /application/{applicationId}/environmentVariable Add an environment variable to the application
CreateApplicationEnvironmentVariableAlias Post /application/{applicationId}/environmentVariable/{environmentVariableId}/alias Create an environment variable alias at the application level
CreateApplicationEnvironmentVariableOverride Post /application/{applicationId}/environmentVariable/{environmentVariableId}/override Create an environment variable override at the application level
DeleteApplicationEnvironmentVariable Delete /application/{applicationId}/environmentVariable/{environmentVariableId} Delete an environment variable from an application
EditApplicationEnvironmentVariable Put /application/{applicationId}/environmentVariable/{environmentVariableId} Edit an environment variable belonging to the application
ImportEnvironmentVariable Post /application/{applicationId}/environmentVariable/import Import variables
ListApplicationEnvironmentVariable Get /application/{applicationId}/environmentVariable List environment variables

CreateApplicationEnvironmentVariable

EnvironmentVariable CreateApplicationEnvironmentVariable(ctx, applicationId).EnvironmentVariableRequest(environmentVariableRequest).Execute()

Add an environment variable to the application

Example

package main

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

func main() {
	applicationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Application ID
	environmentVariableRequest := *openapiclient.NewEnvironmentVariableRequest("Key_example") // EnvironmentVariableRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

environmentVariableRequest | EnvironmentVariableRequest | |

Return type

EnvironmentVariable

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]

CreateApplicationEnvironmentVariableAlias

EnvironmentVariable CreateApplicationEnvironmentVariableAlias(ctx, applicationId, environmentVariableId).Key(key).Execute()

Create an environment variable alias at the application level

Example

package main

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

func main() {
	applicationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Application ID
	environmentVariableId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment Variable ID
	key := *openapiclient.NewKey("Key_example") // Key |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariableAlias(context.Background(), applicationId, environmentVariableId).Key(key).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariableAlias``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateApplicationEnvironmentVariableAlias`: EnvironmentVariable
	fmt.Fprintf(os.Stdout, "Response from `ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariableAlias`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
applicationId string Application ID
environmentVariableId string Environment Variable ID

Other Parameters

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

Name Type Description Notes

key | Key | |

Return type

EnvironmentVariable

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]

CreateApplicationEnvironmentVariableOverride

EnvironmentVariable CreateApplicationEnvironmentVariableOverride(ctx, applicationId, environmentVariableId).Value(value).Execute()

Create an environment variable override at the application level

Example

package main

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

func main() {
	applicationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Application ID
	environmentVariableId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment Variable ID
	value := *openapiclient.NewValue() // Value |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariableOverride(context.Background(), applicationId, environmentVariableId).Value(value).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariableOverride``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateApplicationEnvironmentVariableOverride`: EnvironmentVariable
	fmt.Fprintf(os.Stdout, "Response from `ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariableOverride`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
applicationId string Application ID
environmentVariableId string Environment Variable ID

Other Parameters

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

Name Type Description Notes

value | Value | |

Return type

EnvironmentVariable

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]

DeleteApplicationEnvironmentVariable

DeleteApplicationEnvironmentVariable(ctx, applicationId, environmentVariableId).Execute()

Delete an environment variable from an application

Example

package main

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

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

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ApplicationEnvironmentVariableAPI.DeleteApplicationEnvironmentVariable(context.Background(), applicationId, environmentVariableId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ApplicationEnvironmentVariableAPI.DeleteApplicationEnvironmentVariable``: %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.
applicationId string Application ID
environmentVariableId string Environment Variable ID

Other Parameters

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

EditApplicationEnvironmentVariable

EnvironmentVariable EditApplicationEnvironmentVariable(ctx, applicationId, environmentVariableId).EnvironmentVariableEditRequest(environmentVariableEditRequest).Execute()

Edit an environment variable belonging to the application

Example

package main

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

func main() {
	applicationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Application ID
	environmentVariableId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Environment Variable ID
	environmentVariableEditRequest := *openapiclient.NewEnvironmentVariableEditRequest("Key_example") // EnvironmentVariableEditRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ApplicationEnvironmentVariableAPI.EditApplicationEnvironmentVariable(context.Background(), applicationId, environmentVariableId).EnvironmentVariableEditRequest(environmentVariableEditRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ApplicationEnvironmentVariableAPI.EditApplicationEnvironmentVariable``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EditApplicationEnvironmentVariable`: EnvironmentVariable
	fmt.Fprintf(os.Stdout, "Response from `ApplicationEnvironmentVariableAPI.EditApplicationEnvironmentVariable`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
applicationId string Application ID
environmentVariableId string Environment Variable ID

Other Parameters

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

Name Type Description Notes

environmentVariableEditRequest | EnvironmentVariableEditRequest | |

Return type

EnvironmentVariable

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]

ImportEnvironmentVariable

VariableImport ImportEnvironmentVariable(ctx, applicationId).VariableImportRequest(variableImportRequest).Execute()

Import variables

Example

package main

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

func main() {
	applicationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Application ID
	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.ApplicationEnvironmentVariableAPI.ImportEnvironmentVariable(context.Background(), applicationId).VariableImportRequest(variableImportRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ApplicationEnvironmentVariableAPI.ImportEnvironmentVariable``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ImportEnvironmentVariable`: VariableImport
	fmt.Fprintf(os.Stdout, "Response from `ApplicationEnvironmentVariableAPI.ImportEnvironmentVariable`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

variableImportRequest | VariableImportRequest | |

Return type

VariableImport

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]

ListApplicationEnvironmentVariable

EnvironmentVariableResponseList ListApplicationEnvironmentVariable(ctx, applicationId).Execute()

List environment variables

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

EnvironmentVariableResponseList

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]