Skip to content

Latest commit

 

History

History
495 lines (311 loc) · 14.8 KB

File metadata and controls

495 lines (311 loc) · 14.8 KB

\AlertReceiversAPI

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

Method HTTP request Description
CreateAlertReceiver Post /alert-receivers Create alert receiver
DeleteAlertReceiver Delete /alert-receivers/{alertReceiverId} Delete alert receiver
EditAlertReceiver Put /alert-receivers/{alertReceiverId} Update alert receiver
GetAlertReceiver Get /alert-receivers/{alertReceiverId} Get alert receiver
GetAlertReceivers Get /organization/{organizationId}/alert-receivers List alert receivers
ValidateExistingAlertReceiver Post /alert-receivers/{alertReceiverId}/validate Validate Existing Alert Receiver
ValidateNewAlertReceiver Post /alert-receivers/validate Validate New Alert Receiver

CreateAlertReceiver

AlertReceiverResponse CreateAlertReceiver(ctx).AlertReceiverCreationRequest(alertReceiverCreationRequest).Execute()

Create alert receiver

Example

package main

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

func main() {
	alertReceiverCreationRequest := openapiclient.AlertReceiverCreationRequest{EmailAlertReceiverCreationRequest: openapiclient.NewEmailAlertReceiverCreationRequest("OrganizationId_example", "Name_example", "Description_example", openapiclient.AlertReceiverType("SLACK"), false, "To_example", "From_example", "smtp.example.com:587", "AuthPassword_example", false)} // AlertReceiverCreationRequest |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
alertReceiverCreationRequest AlertReceiverCreationRequest

Return type

AlertReceiverResponse

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]

DeleteAlertReceiver

DeleteAlertReceiver(ctx, alertReceiverId).Execute()

Delete alert receiver

Example

package main

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

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

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

Other Parameters

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

EditAlertReceiver

AlertReceiverResponse EditAlertReceiver(ctx, alertReceiverId).AlertReceiverEditRequest(alertReceiverEditRequest).Execute()

Update alert receiver

Example

package main

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

func main() {
	alertReceiverId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Alert Receiver ID
	alertReceiverEditRequest := openapiclient.AlertReceiverEditRequest{EmailAlertReceiverEditRequest: openapiclient.NewEmailAlertReceiverEditRequest("Name_example", "Description_example", openapiclient.AlertReceiverType("SLACK"), false, "To_example", "From_example", "Smarthost_example", false)} // AlertReceiverEditRequest |  (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
alertReceiverId string Alert Receiver ID

Other Parameters

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

Name Type Description Notes

alertReceiverEditRequest | AlertReceiverEditRequest | |

Return type

AlertReceiverResponse

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]

GetAlertReceiver

AlertReceiverResponse GetAlertReceiver(ctx, alertReceiverId).Execute()

Get alert receiver

Example

package main

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

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

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
alertReceiverId string Alert Receiver ID

Other Parameters

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

Name Type Description Notes

Return type

AlertReceiverResponse

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]

GetAlertReceivers

AlertReceiverList GetAlertReceivers(ctx, organizationId).Execute()

List alert receivers

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

AlertReceiverList

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]

ValidateExistingAlertReceiver

ValidateExistingAlertReceiver(ctx, alertReceiverId).AlertReceiverValidationRequest(alertReceiverValidationRequest).Execute()

Validate Existing Alert Receiver

Example

package main

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

func main() {
	alertReceiverId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Alert Receiver ID
	alertReceiverValidationRequest := *openapiclient.NewAlertReceiverValidationRequest() // AlertReceiverValidationRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.AlertReceiversAPI.ValidateExistingAlertReceiver(context.Background(), alertReceiverId).AlertReceiverValidationRequest(alertReceiverValidationRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AlertReceiversAPI.ValidateExistingAlertReceiver``: %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.
alertReceiverId string Alert Receiver ID

Other Parameters

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

Name Type Description Notes

alertReceiverValidationRequest | AlertReceiverValidationRequest | |

Return type

(empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ValidateNewAlertReceiver

ValidateNewAlertReceiver(ctx).AlertReceiverCreationValidationRequest(alertReceiverCreationValidationRequest).Execute()

Validate New Alert Receiver

Example

package main

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

func main() {
	alertReceiverCreationValidationRequest := *openapiclient.NewAlertReceiverCreationValidationRequest(openapiclient.AlertReceiverCreationRequest{EmailAlertReceiverCreationRequest: openapiclient.NewEmailAlertReceiverCreationRequest("OrganizationId_example", "Name_example", "Description_example", openapiclient.AlertReceiverType("SLACK"), false, "To_example", "From_example", "smtp.example.com:587", "AuthPassword_example", false)}) // AlertReceiverCreationValidationRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.AlertReceiversAPI.ValidateNewAlertReceiver(context.Background()).AlertReceiverCreationValidationRequest(alertReceiverCreationValidationRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AlertReceiversAPI.ValidateNewAlertReceiver``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Other Parameters

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

Name Type Description Notes
alertReceiverCreationValidationRequest AlertReceiverCreationValidationRequest

Return type

(empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]