blob: 622178a16c57ace0d9f607415e8d114ef0276f79 [file] [log] [blame]
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
name: aws-ec2-sink
annotations:
camel.apache.org/kamelet.support.level: "Preview"
camel.apache.org/catalog.version: "0.3.x-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjA2NSIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDMxMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTQyLjc1NCAyNDQuNDk1bC0yOS45MTggNi44MjZWNTcuNTY1bDI5LjkxOCA2LjgzOXYxODAuMDkxIiBmaWxsPSIjRjY4NTM2Ii8+PHBhdGggZD0iTTgwLjA4MiAyNTUuOTMxbC0zNy4zMjggMTAuNjA4VjQyLjYxMmwzNy4zMjggMTAuNTk1djIwMi43MjRNMTI3Ljk2NiAyNjcuNjgxbC00Ny44ODQgMTcuNTI0VjIzLjk0Nmw0Ny44ODQgMTcuNTE2djIyNi4yMTlNMjU2IDI0NS4wNzlsLTEyOC4wMzQgNjQuMDE3VjBMMjU2IDY0LjAxN3YxODEuMDYyIiBmaWxsPSIjRjY4NTM2Ii8+PHBhdGggZD0iTTEwMi40NDQgMTIuNzYzTDEyNy45NjYgMHYzMDkuMDk2bC0yNS41MjItMTIuNzU5VjEyLjc2M002MC4zMjUgMzMuODJsMTkuNzU3LTkuODc4djI2MS4yMTJsLTE5Ljc1Ny05Ljg3OFYzMy44Mk0yNy4wMTYgNTAuNDc3bDE1LjczOC03Ljg2OXYyMjMuODhsLTE1LjczOC03Ljg3NFY1MC40NzdNMTIuODM2IDU3LjU2NUwwIDYzLjk4M3YxODEuMTM0bDEyLjgzNiA2LjQxNFY1Ny41NjUiIGZpbGw9IiM5RDUwMjUiLz48L3N2Zz4="
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.group: "AWS EC2"
labels:
camel.apache.org/kamelet.type: sink
spec:
definition:
title: AWS EC2 Sink
description: |-
Check the status of EC2 instances
The Kamelet expects the following headers to be set:
- `instanceIds` / `ce-instanceIds`: as a comma separated list of EC2 instance ids.
required:
- accessKey
- secretKey
- region
type: object
properties:
accessKey:
title: Access Key
description: The access key obtained from AWS
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
secretKey:
title: Secret Key
description: The secret key obtained from AWS
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
region:
title: AWS Region
description: The AWS region to connect to
type: string
example: eu-west-1
dependencies:
- "camel:aws2-ec2"
- "camel:kamelet"
flow:
from:
uri: kamelet:source
steps:
- choice:
when:
- simple: "${header[instanceIds]}"
steps:
- set-header:
name: CamelAwsEC2InstancesIds
simple: "${header[instanceIds]}"
- simple: "${header[ce-instanceIds]}"
steps:
- set-header:
name: CamelAwsEC2InstancesIds
simple: "${header[ce-instanceIds]}"
- to:
uri: "aws2-ec2:ec2-route"
parameters:
accessKey: "{{accessKey}}"
secretKey: "{{secretKey}}"
region: "{{region}}"
operation: "describeInstancesStatus"