Skip to content

Commit

Permalink
feat: example of dumping workflows from s3 (#3034)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matvey-Kuk authored Jan 15, 2025
1 parent b127e1d commit aa6d237
Show file tree
Hide file tree
Showing 8 changed files with 380 additions and 346 deletions.
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"providers/documentation/aks-provider",
"providers/documentation/amazonsqs-provider",
"providers/documentation/appdynamics-provider",
"providers/documentation/s3-provider",
"providers/documentation/argocd-provider",
"providers/documentation/auth0-provider",
"providers/documentation/axiom-provider",
Expand Down
4 changes: 4 additions & 0 deletions docs/providers/documentation/keep-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ description: "Keep provider allows you to query and manage alerts in Keep."
- `query`: str : The query to retrieve alerts based on specific criteria.
- `filter`: dict : Optional filters to narrow down the query results.

### Optional

- `workflow_to_update_yaml`: str : The YAML of a workflow to update in Keep. You may find [functions -> raw_render_without_execution](/workflows/syntax/functions#raw-render-without-execution) useful.

## Outputs

- `alerts`: list : A list of alerts that match the query criteria.
Expand Down
57 changes: 57 additions & 0 deletions docs/providers/documentation/s3-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: "AWS S3"
sidebarTitle: "AWS S3 Provider"
description: "AWS S3 provider to query S3 buckets"
---

## Inputs

- `bucket`: str : The bucket to read the files from.

## Limitations

Querying only yaml, yml, json, xml and csv files.

## Outputs

Files's content as a dict.

## Authentication Parameters

- access_key
- secret_access_key

Please note that during the installation, the provider is performing `list_buckets` to validate the config. Here is an example IAM policy:
```
{
"Version": "2025-01-15",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:GetBucketLocation",
"s3:ListAllMyBuckets"
],
"Resource": "*"
}
]
}
```

## Example of usage


```
steps:
- name: s3-dump
provider:
config: '{{ providers.s3 }}'
type: s3
with:
bucket: "keep-workflows"
```

- [Example workflow](https://github.com/keephq/keep/blob/main/examples/workflows/update_workflows_from_s3.yml)
Loading

0 comments on commit aa6d237

Please sign in to comment.