Skip to content

Latest commit

 

History

History
452 lines (288 loc) · 13.3 KB

ApplicationSecretAPI.md

File metadata and controls

452 lines (288 loc) · 13.3 KB

\ApplicationSecretAPI

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

Method HTTP request Description
CreateApplicationSecret Post /application/{applicationId}/secret Add a secret to the application
CreateApplicationSecretAlias Post /application/{applicationId}/secret/{secretId}/alias Create a secret alias at the application level
CreateApplicationSecretOverride Post /application/{applicationId}/secret/{secretId}/override Create a secret override at the application level
DeleteApplicationSecret Delete /application/{applicationId}/secret/{secretId} Delete a secret from an application
EditApplicationSecret Put /application/{applicationId}/secret/{secretId} Edit a secret belonging to the application
ListApplicationSecrets Get /application/{applicationId}/secret List application secrets

CreateApplicationSecret

Secret CreateApplicationSecret(ctx, applicationId).SecretRequest(secretRequest).Execute()

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

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

CreateApplicationSecretAlias

Secret CreateApplicationSecretAlias(ctx, applicationId, secretId).Key(key).Execute()

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

Path Parameters

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

Other Parameters

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

CreateApplicationSecretOverride

Secret CreateApplicationSecretOverride(ctx, applicationId, secretId).Value(value).Execute()

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

Path Parameters

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

Other Parameters

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

DeleteApplicationSecret

DeleteApplicationSecret(ctx, applicationId, secretId).Execute()

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

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

Other Parameters

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

EditApplicationSecret

Secret EditApplicationSecret(ctx, applicationId, secretId).SecretEditRequest(secretEditRequest).Execute()

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

Path Parameters

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

Other Parameters

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

ListApplicationSecrets

SecretResponseList ListApplicationSecrets(ctx, applicationId).Execute()

List application secrets

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