aws-sts-assume-role-action/kamelet.json

300 lines
11 KiB
JSON
Raw Normal View History

{
"apiVersion": "camel.apache.org/v1",
"kind": "Kamelet",
"metadata": {
"name": "aws-sts-assume-role-action",
"annotations": {
"camel.apache.org/kamelet.support.level": "Stable",
"camel.apache.org/catalog.version": "4.22.1",
"camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5MCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIHZpZXdCb3g9IjAgMCAyNTYgNDkwIiB3aWR0aD0iMjU2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGZpbGw9IiMzYzQ5MjkiPjxwYXRoIGQ9Im0yMSAxNjUuNzUtMjEgNi44NTYgMjEuNzUgMi41MTl6Ii8+PHBhdGggZD0ibTE5Ljk1NSAyMDYuODA2IDEwOC4wNDUgNi45MDggMTA4LjA0NS02LjkwOC0xMDguMDQ1LTIxLjA1NnoiLz48cGF0aCBkPSJtMjM0LjUgMTc1LjEyNSAyMS41LTIuNTE5LTIxLjUtNS43MzF6Ii8+PC9nPjxwYXRoIGQ9Im0xNTcuMzg3IDM1Mi45MjkgNTYuNjA2IDEzLjM5Ni01Ni43NTYgMTcuMTE2eiIgZmlsbD0iI2I3Y2E5ZCIvPjxwYXRoIGQ9Im0xOS45NTUgOTIuMjIxdi0zOC4yMDJsMTA4LjA0NS01NC4wMTkuNDgyLjQwNS0uMjQ4IDQ4LjQ5Ni0uMjM0LjEwMi0uNDA1IDEuMTE3LTU5LjA5OCAyMy44NTYtLjU0MiA4NC4wMzcgMzEuNDUyLTUuMjkgMjguNTkzLTUuNzIxdjM0My4wMjhsLTMyLjM2OS0xNi4xNzd2LTQ1Ljc3MWwtMjguMzU0LTExLjMzOHYtMjE0LjY3NWwtNDcuMzIyIDQuNzM3di0zOC4xOTVsLTE5Ljk1NSAzLjk5NXYtNzIuNDA4eiIgZmlsbD0iIzRiNjEyYyIvP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ache.org/kamelet.namespace": "AWS"
},
"labels": {
"camel.apache.org/kamelet.type": "action"
}
},
"spec": {
"definition": {
"title": "AWS STS Assume Role Action",
"description": "Assume a role through STS",
"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": "Set whether the STS client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.",
"type": "boolean",
"default": false
},
"useProfileCredentialsProvider": {
"title": "Profile Credentials Provider",
"description": "Set whether the STS client should expect to load credentials through a profile credentials provider.",
"type": "boolean",
"default": false
},
"useSessionCredentials": {
"title": "Session Credentials",
"description": "Set whether the STS 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 STS.",
"type": "boolean",
"default": false
},
"profileCredentialsName": {
"title": "Profile Credentials Name",
"description": "If using a profile credentials provider this parameter sets 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"
]
}
}
},
"dependencies": [
"camel:kamelet",
"camel:core",
"camel:aws2-sts"
],
"template": {
"from": {
"uri": "kamelet:source",
"steps": [
{
"choice": {
"when": [
{
"simple": "${header[role-arn]}",
"steps": [
{
"setHeader": {
"name": "CamelAwsStsRoleArn",
"simple": "${header[role-arn]}"
}
}
]
},
{
"simple": "${header[ce-role-arn]}",
"steps": [
{
"setHeader": {
"name": "CamelAwsStsRoleArn",
"simple": "${header[ce-role-arn]}"
}
}
]
}
]
}
},
{
"choice": {
"when": [
{
"simple": "${header[role-session-name]}",
"steps": [
{
"setHeader": {
"name": "CamelAwsStsRoleSessionName",
"simple": "${header[role-session-name]}"
}
}
]
},
{
"simple": "${header[ce-role-session-name]}",
"steps": [
{
"setHeader": {
"name": "CamelAwsStsRoleSessionName",
"simple": "${header[ce-role-session-name]}"
}
}
]
}
]
}
},
{
"to": {
"uri": "aws2-sts://default",
"parameters": {
"secretKey": "{{?secretKey}}",
"accessKey": "{{?accessKey}}",
"region": "{{region}}",
"operation": "assumeRole",
"useDefaultCredentialsProvider": "{{useDefaultCredentialsProvider}}",
"useProfileCredentialsProvider": "{{useProfileCredentialsProvider}}",
"useSessionCredentials": "{{useSessionCredentials}}",
"profileCredentialsName": "{{?profileCredentialsName}}",
"sessionToken": "{{?sessionToken}}"
}
}
}
]
}
}
},
"propertiesSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "AWS STS Assume Role Action",
"description": "Assume a role through STS",
"required": [
"region"
],
"properties": {
"accessKey": {
"type": "string",
"title": "Access Key",
"description": "The access key obtained from AWS.",
"format": "password"
},
"secretKey": {
"type": "string",
"title": "Secret Key",
"description": "The secret key obtained from AWS.",
"format": "password"
},
"region": {
"type": "string",
"title": "AWS Region",
"description": "The AWS region to access.",
"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": {
"type": "boolean",
"title": "Default Credentials Provider",
"description": "Set whether the STS client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.",
"default": false
},
"useProfileCredentialsProvider": {
"type": "boolean",
"title": "Profile Credentials Provider",
"description": "Set whether the STS client should expect to load credentials through a profile credentials provider.",
"default": false
},
"useSessionCredentials": {
"type": "boolean",
"title": "Session Credentials",
"description": "Set whether the STS 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 STS.",
"default": false
},
"profileCredentialsName": {
"type": "string",
"title": "Profile Credentials Name",
"description": "If using a profile credentials provider this parameter sets the profile name."
},
"sessionToken": {
"type": "string",
"title": "Session Token",
"description": "Amazon AWS Session Token used when the user needs to assume a IAM role.",
"format": "password"
}
}
}
}