Skip to content

Latest commit

 

History

History
300 lines (190 loc) · 9.77 KB

JobDeploymentRestrictionAPI.md

File metadata and controls

300 lines (190 loc) · 9.77 KB

\JobDeploymentRestrictionAPI

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

Method HTTP request Description
CreateJobDeploymentRestriction Post /job/{jobId}/deploymentRestriction Create a job deployment restriction
DeleteJobDeploymentRestriction Delete /job/{jobId}/deploymentRestriction/{deploymentRestrictionId} Delete a job deployment restriction
EditJobDeploymentRestriction Put /job/{jobId}/deploymentRestriction/{deploymentRestrictionId} Edit a job deployment restriction
GetJobDeploymentRestrictions Get /job/{jobId}/deploymentRestriction Get job deployment restrictions

CreateJobDeploymentRestriction

JobDeploymentRestrictionResponse CreateJobDeploymentRestriction(ctx, jobId).JobDeploymentRestrictionRequest(jobDeploymentRestrictionRequest).Execute()

Create a job deployment restriction

Example

package main

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

func main() {
	jobId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Job ID
	jobDeploymentRestrictionRequest := *openapiclient.NewJobDeploymentRestrictionRequest(openapiclient.DeploymentRestrictionModeEnum("EXCLUDE"), openapiclient.DeploymentRestrictionTypeEnum("PATH"), "job1/src/") // JobDeploymentRestrictionRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

jobDeploymentRestrictionRequest | JobDeploymentRestrictionRequest | |

Return type

JobDeploymentRestrictionResponse

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]

DeleteJobDeploymentRestriction

DeleteJobDeploymentRestriction(ctx, jobId, deploymentRestrictionId).Execute()

Delete a job deployment restriction

Example

package main

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

func main() {
	jobId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Job ID
	deploymentRestrictionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Deployment Restriction ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.JobDeploymentRestrictionAPI.DeleteJobDeploymentRestriction(context.Background(), jobId, deploymentRestrictionId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `JobDeploymentRestrictionAPI.DeleteJobDeploymentRestriction``: %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.
jobId string Job ID
deploymentRestrictionId string Deployment Restriction ID

Other Parameters

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

EditJobDeploymentRestriction

JobDeploymentRestrictionResponse EditJobDeploymentRestriction(ctx, jobId, deploymentRestrictionId).JobDeploymentRestrictionRequest(jobDeploymentRestrictionRequest).Execute()

Edit a job deployment restriction

Example

package main

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

func main() {
	jobId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Job ID
	deploymentRestrictionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Deployment Restriction ID
	jobDeploymentRestrictionRequest := *openapiclient.NewJobDeploymentRestrictionRequest(openapiclient.DeploymentRestrictionModeEnum("EXCLUDE"), openapiclient.DeploymentRestrictionTypeEnum("PATH"), "job1/src/") // JobDeploymentRestrictionRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.JobDeploymentRestrictionAPI.EditJobDeploymentRestriction(context.Background(), jobId, deploymentRestrictionId).JobDeploymentRestrictionRequest(jobDeploymentRestrictionRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `JobDeploymentRestrictionAPI.EditJobDeploymentRestriction``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EditJobDeploymentRestriction`: JobDeploymentRestrictionResponse
	fmt.Fprintf(os.Stdout, "Response from `JobDeploymentRestrictionAPI.EditJobDeploymentRestriction`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
jobId string Job ID
deploymentRestrictionId string Deployment Restriction ID

Other Parameters

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

Name Type Description Notes

jobDeploymentRestrictionRequest | JobDeploymentRestrictionRequest | |

Return type

JobDeploymentRestrictionResponse

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]

GetJobDeploymentRestrictions

JobDeploymentRestrictionResponseList GetJobDeploymentRestrictions(ctx, jobId).Execute()

Get job deployment restrictions

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

JobDeploymentRestrictionResponseList

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]