Skip to content

Latest commit

 

History

History
450 lines (288 loc) · 13.3 KB

EnvironmentSecretAPI.md

File metadata and controls

450 lines (288 loc) · 13.3 KB

\EnvironmentSecretAPI

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

Method HTTP request Description
CreateEnvironmentSecret Post /environment/{environmentId}/secret Add a secret to the environment
CreateEnvironmentSecretAlias Post /environment/{environmentId}/secret/{secretId}/alias Create a secret alias at the environment level
CreateEnvironmentSecretOverride Post /environment/{environmentId}/secret/{secretId}/override Create a secret override at the environment level
DeleteEnvironmentSecret Delete /environment/{environmentId}/secret/{secretId} Delete a secret from the environment
EditEnvironmentSecret Put /environment/{environmentId}/secret/{secretId} Edit a secret belonging to the environment
ListEnvironmentSecrets Get /environment/{environmentId}/secret List environment secrets

CreateEnvironmentSecret

Secret CreateEnvironmentSecret(ctx, environmentId).SecretRequest(secretRequest).Execute()

Add a secret to the 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
	secretRequest := *openapiclient.NewSecretRequest("Key_example") // SecretRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.EnvironmentSecretAPI.CreateEnvironmentSecret(context.Background(), environmentId).SecretRequest(secretRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentSecretAPI.CreateEnvironmentSecret``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateEnvironmentSecret`: Secret
	fmt.Fprintf(os.Stdout, "Response from `EnvironmentSecretAPI.CreateEnvironmentSecret`: %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 apiCreateEnvironmentSecretRequest struct via the builder pattern

Name Type Description Notes

secretRequest | SecretRequest | |

Return type

Secret

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]

CreateEnvironmentSecretAlias

Secret CreateEnvironmentSecretAlias(ctx, environmentId, secretId).Key(key).Execute()

Create a secret alias at the environment level

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
	secretId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Secret ID
	key := *openapiclient.NewKey("Key_example") // Key |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

key | Key | |

Return type

Secret

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]

CreateEnvironmentSecretOverride

Secret CreateEnvironmentSecretOverride(ctx, environmentId, secretId).Value(value).Execute()

Create a secret override at the environment level

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
	secretId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Secret ID
	value := *openapiclient.NewValue() // Value |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

value | Value | |

Return type

Secret

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]

DeleteEnvironmentSecret

DeleteEnvironmentSecret(ctx, environmentId, secretId).Execute()

Delete a secret from the 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
	secretId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Secret ID

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

Other Parameters

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

EditEnvironmentSecret

Secret EditEnvironmentSecret(ctx, environmentId, secretId).SecretEditRequest(secretEditRequest).Execute()

Edit a secret belonging to the 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
	secretId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Secret ID
	secretEditRequest := *openapiclient.NewSecretEditRequest("Key_example") // SecretEditRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

secretEditRequest | SecretEditRequest | |

Return type

Secret

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]

ListEnvironmentSecrets

SecretResponseList ListEnvironmentSecrets(ctx, environmentId).Execute()

List environment secrets

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.EnvironmentSecretAPI.ListEnvironmentSecrets(context.Background(), environmentId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentSecretAPI.ListEnvironmentSecrets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListEnvironmentSecrets`: SecretResponseList
	fmt.Fprintf(os.Stdout, "Response from `EnvironmentSecretAPI.ListEnvironmentSecrets`: %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 apiListEnvironmentSecretsRequest struct via the builder pattern

Name Type Description Notes

Return type

SecretResponseList

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]