From 948f190cd1872e7583fb35f54cab047614af55b5 Mon Sep 17 00:00:00 2001 From: gitea_admin Date: Wed, 11 Mar 2026 14:23:18 +0000 Subject: [PATCH] Add kamelet definition: aws-ec2-sink --- kamelet.yaml | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 kamelet.yaml diff --git a/kamelet.yaml b/kamelet.yaml new file mode 100644 index 0000000..7875088 --- /dev/null +++ b/kamelet.yaml @@ -0,0 +1,110 @@ + +apiVersion: camel.apache.org/v1 +kind: Kamelet +metadata: + name: aws-ec2-sink + annotations: + camel.apache.org/kamelet.support.level: "Stable" + camel.apache.org/catalog.version: "4.10.2" + 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" + camel.apache.org/kamelet.namespace: "AWS" + labels: + camel.apache.org/kamelet.type: sink +spec: + definition: + title: AWS EC2 Sink + description: Check the status of EC2 instances + required: + - region + type: object + properties: + accessKey: + title: Access Key + description: The access key obtained from AWS. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + secretKey: + title: Secret Key + description: The secret key obtained from AWS. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + region: + title: AWS Region + description: The AWS region to access. + type: string + enum: ["ap-south-1", "eu-south-1", "us-gov-east-1", "me-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-northeast-2", "ap-northeast-1", "me-south-1", "sa-east-1", "ap-east-1", "cn-north-1", "us-gov-west-1", "ap-southeast-1", "ap-southeast-2", "us-iso-east-1", "ap-southeast-3", "us-east-1", "us-east-2", "cn-northwest-1", "us-isob-east-1", "aws-global", "aws-cn-global", "aws-us-gov-global", "aws-iso-global", "aws-iso-b-global"] + useDefaultCredentialsProvider: + title: Default Credentials Provider + description: If true, the EC2 client loads credentials through a default credentials provider. If false, it uses the basic authentication method (access key and secret key). + type: boolean + default: false + useProfileCredentialsProvider: + title: Profile Credentials Provider + description: Set whether the EC2 client should expect to load credentials through a profile credentials provider. + type: boolean + default: false + useSessionCredentials: + title: Session Credentials + description: Set whether the EC2 client should expect to use Session Credentials. This is useful in situation in which the user needs to assume a IAM role for doing operations in EC2. + type: boolean + default: false + profileCredentialsName: + title: Profile Credentials Name + description: If using a profile credentials provider this parameter will set the profile name. + type: string + sessionToken: + title: Session Token + description: Amazon AWS Session Token used when the user needs to assume a IAM role. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + uriEndpointOverride: + title: Overwrite Endpoint URI + description: The overriding endpoint URI. To use this option, you must also select the `overrideEndpoint` option. + type: string + overrideEndpoint: + title: Endpoint Overwrite + description: Select this option to override the endpoint URI. To use this option, you must also provide a URI for the `uriEndpointOverride` option. + type: boolean + default: false + dependencies: + - "camel:core" + - "camel:aws2-ec2" + - "camel:kamelet" + template: + from: + uri: kamelet:source + steps: + - choice: + when: + - simple: "${header[instanceIds]}" + steps: + - setHeader: + name: CamelAwsEC2InstancesIds + simple: "${header[instanceIds]}" + - simple: "${header[ce-instanceids]}" + steps: + - setHeader: + name: CamelAwsEC2InstancesIds + simple: "${header[ce-instanceids]}" + - to: + uri: "aws2-ec2:ec2-route" + parameters: + accessKey: "{{?accessKey}}" + secretKey: "{{?secretKey}}" + region: "{{region}}" + operation: "describeInstancesStatus" + useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}" + useProfileCredentialsProvider: "{{useProfileCredentialsProvider}}" + useSessionCredentials: "{{useSessionCredentials}}" + uriEndpointOverride: "{{?uriEndpointOverride}}" + profileCredentialsName: "{{?profileCredentialsName}}" + sessionToken: "{{?sessionToken}}" + overrideEndpoint: "{{overrideEndpoint}}"