All URIs are relative to https://localhost/api/v0
Method | HTTP request | Description |
---|---|---|
Command | Post /trigger/{trigger_name}/command | Execute a trigger command |
Get | Get /trigger/{trigger_name} | Get trigger |
List | Get /trigger | List triggers |
TriggerExecutionResponse Command(ctx, triggerName).Request(request).Execute()
Execute a trigger command
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/turbot/flowpipe-sdk-go"
)
func main() {
triggerName := "triggerName_example" // string | The name of the trigger
request := *openapiclient.NewCmdTrigger("Command_example") // CmdTrigger | Trigger command.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TriggerApi.Command(context.Background(), triggerName).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TriggerApi.Command``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Command`: TriggerExecutionResponse
fmt.Fprintf(os.Stdout, "Response from `TriggerApi.Command`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
triggerName | string | The name of the trigger |
Other parameters are passed through a pointer to a apiCommandRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
request | CmdTrigger | Trigger command. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FpTrigger Get(ctx, triggerName).Execute()
Get trigger
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/turbot/flowpipe-sdk-go"
)
func main() {
triggerName := "triggerName_example" // string | The name of the trigger
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TriggerApi.Get(context.Background(), triggerName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TriggerApi.Get``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Get`: FpTrigger
fmt.Fprintf(os.Stdout, "Response from `TriggerApi.Get`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
triggerName | string | The name of the trigger |
Other parameters are passed through a pointer to a apiGetRequest 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]
ListTriggerResponse List(ctx).Limit(limit).NextToken(nextToken).Execute()
List triggers
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/turbot/flowpipe-sdk-go"
)
func main() {
limit := int32(56) // int32 | The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25. (optional) (default to 25)
nextToken := "nextToken_example" // string | When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TriggerApi.List(context.Background()).Limit(limit).NextToken(nextToken).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TriggerApi.List``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `List`: ListTriggerResponse
fmt.Fprintf(os.Stdout, "Response from `TriggerApi.List`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25. | [default to 25] |
nextToken | string | When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]