Skip to content

Latest commit

 

History

History
450 lines (288 loc) · 12.7 KB

ProjectSecretAPI.md

File metadata and controls

450 lines (288 loc) · 12.7 KB

\ProjectSecretAPI

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

Method HTTP request Description
CreateProjectSecret Post /project/{projectId}/secret Add a secret to the project
CreateProjectSecretAlias Post /project/{projectId}/secret/{secretId}/alias Create a secret alias at the project level
CreateProjectSecretOverride Post /project/{projectId}/secret/{secretId}/override Create a secret override at the project level
DeleteProjectSecret Delete /project/{projectId}/secret/{secretId} Delete a secret from a project
EditProjectSecret Put /project/{projectId}/secret/{secretId} Edit a secret belonging to the project
ListProjectSecrets Get /project/{projectId}/secret List project secrets

CreateProjectSecret

Secret CreateProjectSecret(ctx, projectId).SecretRequest(secretRequest).Execute()

Add a secret to the project

Example

package main

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

func main() {
	projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project ID
	secretRequest := *openapiclient.NewSecretRequest("Key_example") // SecretRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

CreateProjectSecretAlias

Secret CreateProjectSecretAlias(ctx, projectId, secretId).Key(key).Execute()

Create a secret alias at the project level

Example

package main

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

func main() {
	projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project 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.ProjectSecretAPI.CreateProjectSecretAlias(context.Background(), projectId, secretId).Key(key).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ProjectSecretAPI.CreateProjectSecretAlias``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateProjectSecretAlias`: Secret
	fmt.Fprintf(os.Stdout, "Response from `ProjectSecretAPI.CreateProjectSecretAlias`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

CreateProjectSecretOverride

Secret CreateProjectSecretOverride(ctx, projectId, secretId).Value(value).Execute()

Create a secret override at the project level

Example

package main

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

func main() {
	projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project 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.ProjectSecretAPI.CreateProjectSecretOverride(context.Background(), projectId, secretId).Value(value).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ProjectSecretAPI.CreateProjectSecretOverride``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateProjectSecretOverride`: Secret
	fmt.Fprintf(os.Stdout, "Response from `ProjectSecretAPI.CreateProjectSecretOverride`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

DeleteProjectSecret

DeleteProjectSecret(ctx, projectId, secretId).Execute()

Delete a secret from a project

Example

package main

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

func main() {
	projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project ID
	secretId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Secret ID

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

Other Parameters

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

EditProjectSecret

Secret EditProjectSecret(ctx, projectId, secretId).SecretEditRequest(secretEditRequest).Execute()

Edit a secret belonging to the project

Example

package main

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

func main() {
	projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project 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.ProjectSecretAPI.EditProjectSecret(context.Background(), projectId, secretId).SecretEditRequest(secretEditRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ProjectSecretAPI.EditProjectSecret``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EditProjectSecret`: Secret
	fmt.Fprintf(os.Stdout, "Response from `ProjectSecretAPI.EditProjectSecret`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

ListProjectSecrets

SecretResponseList ListProjectSecrets(ctx, projectId).Execute()

List project secrets

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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