Skip to content

Latest commit

 

History

History
452 lines (288 loc) · 13 KB

ContainerSecretAPI.md

File metadata and controls

452 lines (288 loc) · 13 KB

\ContainerSecretAPI

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

Method HTTP request Description
CreateContainerSecret Post /container/{containerId}/secret Add a secret to the container
CreateContainerSecretAlias Post /container/{containerId}/secret/{secretId}/alias Create a secret alias at the container level
CreateContainerSecretOverride Post /container/{containerId}/secret/{secretId}/override Create a secret override at the container level
DeleteContainerSecret Delete /container/{containerId}/secret/{secretId} Delete a secret from an container
EditContainerSecret Put /container/{containerId}/secret/{secretId} Edit a secret belonging to the container
ListContainerSecrets Get /container/{containerId}/secret List container secrets

CreateContainerSecret

Secret CreateContainerSecret(ctx, containerId).SecretRequest(secretRequest).Execute()

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

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ContainerSecretAPI.CreateContainerSecret(context.Background(), containerId).SecretRequest(secretRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContainerSecretAPI.CreateContainerSecret``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateContainerSecret`: Secret
	fmt.Fprintf(os.Stdout, "Response from `ContainerSecretAPI.CreateContainerSecret`: %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 apiCreateContainerSecretRequest 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]

CreateContainerSecretAlias

Secret CreateContainerSecretAlias(ctx, containerId, secretId).Key(key).Execute()

Create a secret alias at the container level

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
	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.ContainerSecretAPI.CreateContainerSecretAlias(context.Background(), containerId, secretId).Key(key).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContainerSecretAPI.CreateContainerSecretAlias``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateContainerSecretAlias`: Secret
	fmt.Fprintf(os.Stdout, "Response from `ContainerSecretAPI.CreateContainerSecretAlias`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

CreateContainerSecretOverride

Secret CreateContainerSecretOverride(ctx, containerId, secretId).Value(value).Execute()

Create a secret override at the container level

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
	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.ContainerSecretAPI.CreateContainerSecretOverride(context.Background(), containerId, secretId).Value(value).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContainerSecretAPI.CreateContainerSecretOverride``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateContainerSecretOverride`: Secret
	fmt.Fprintf(os.Stdout, "Response from `ContainerSecretAPI.CreateContainerSecretOverride`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

DeleteContainerSecret

DeleteContainerSecret(ctx, containerId, secretId).Execute()

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

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

Other Parameters

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

EditContainerSecret

Secret EditContainerSecret(ctx, containerId, secretId).SecretEditRequest(secretEditRequest).Execute()

Edit a secret belonging to 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
	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.ContainerSecretAPI.EditContainerSecret(context.Background(), containerId, secretId).SecretEditRequest(secretEditRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContainerSecretAPI.EditContainerSecret``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EditContainerSecret`: Secret
	fmt.Fprintf(os.Stdout, "Response from `ContainerSecretAPI.EditContainerSecret`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

ListContainerSecrets

SecretResponseList ListContainerSecrets(ctx, containerId).Execute()

List container secrets

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.ContainerSecretAPI.ListContainerSecrets(context.Background(), containerId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContainerSecretAPI.ListContainerSecrets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListContainerSecrets`: SecretResponseList
	fmt.Fprintf(os.Stdout, "Response from `ContainerSecretAPI.ListContainerSecrets`: %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 apiListContainerSecretsRequest 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]