All URIs are relative to http://localhost:8081
Method | HTTP request | Description |
---|---|---|
CreateLambda | Post /lambda | Create lambda |
DestroyLambda | Post /lambda/{id}/destroy | Destroy lambda |
GetLambda | Get /lambda/{id} | Get lambda |
ListLambdas | Get /lambda | List lambdas |
StartLambda | Post /lambda/{id}/start | Start lambda |
Lambda CreateLambda(ctx).CreateLambda(createLambda).Execute()
Create lambda
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
createLambda := *openapiclient.NewCreateLambda("Archive_example", "Name_example", "Runtime_example", "LambdaType_example") // CreateLambda | Create lambda body
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LambdaAPI.CreateLambda(context.Background()).CreateLambda(createLambda).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LambdaAPI.CreateLambda``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateLambda`: Lambda
fmt.Fprintf(os.Stdout, "Response from `LambdaAPI.CreateLambda`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateLambdaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createLambda | CreateLambda | Create lambda body |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TaskResponse DestroyLambda(ctx, id).Execute()
Destroy lambda
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
id := "id_example" // string | lambda id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LambdaAPI.DestroyLambda(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LambdaAPI.DestroyLambda``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DestroyLambda`: TaskResponse
fmt.Fprintf(os.Stdout, "Response from `LambdaAPI.DestroyLambda`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | lambda id |
Other parameters are passed through a pointer to a apiDestroyLambdaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Lambda GetLambda(ctx, id).Execute()
Get lambda
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
id := "id_example" // string | lambda id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LambdaAPI.GetLambda(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LambdaAPI.GetLambda``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLambda`: Lambda
fmt.Fprintf(os.Stdout, "Response from `LambdaAPI.GetLambda`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | lambda id |
Other parameters are passed through a pointer to a apiGetLambdaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Lambda ListLambdas(ctx).Execute()
List lambdas
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LambdaAPI.ListLambdas(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LambdaAPI.ListLambdas``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListLambdas`: []Lambda
fmt.Fprintf(os.Stdout, "Response from `LambdaAPI.ListLambdas`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListLambdasRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TaskResponse StartLambda(ctx, id).Execute()
Start lambda
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
id := "id_example" // string | lambda id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LambdaAPI.StartLambda(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LambdaAPI.StartLambda``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StartLambda`: TaskResponse
fmt.Fprintf(os.Stdout, "Response from `LambdaAPI.StartLambda`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | lambda id |
Other parameters are passed through a pointer to a apiStartLambdaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]