This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3b37693ec7b15a97c750b2608afdd9276ea0bbb9 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Wed Aug 5 11:48:07 2020 +0200 Regen docs --- .../modules/ROOT/pages/aws2-sts-component.adoc | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/components/modules/ROOT/pages/aws2-sts-component.adoc b/docs/components/modules/ROOT/pages/aws2-sts-component.adoc index e0b4a2b..9b6d1e7 100644 --- a/docs/components/modules/ROOT/pages/aws2-sts-component.adoc +++ b/docs/components/modules/ROOT/pages/aws2-sts-component.adoc @@ -58,7 +58,7 @@ The AWS 2 Security Token Service (STS) component supports 14 options, which are | *proxyHost* (producer) | To define a proxy host when instantiating the STS client | | String | *proxyPort* (producer) | To define a proxy port when instantiating the STS client | | Integer | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the STS client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol -| *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | | String +| *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | aws-global | String | *stsClient* (producer) | To use a existing configured AWS STS as client | | StsClient | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean @@ -102,7 +102,7 @@ with the following path and query parameters: | *proxyHost* (producer) | To define a proxy host when instantiating the STS client | | String | *proxyPort* (producer) | To define a proxy port when instantiating the STS client | | Integer | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the STS client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol -| *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | | String +| *region* (producer) | The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() | aws-global | String | *stsClient* (producer) | To use a existing configured AWS STS as client | | StsClient | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean @@ -128,12 +128,37 @@ Camel-AWS STS component provides the following operation on the producer side: - assumeRole +== Producer Examples + +- assumeRole: this operation will make an AWS user assume a different role temporary + +[source,java] +-------------------------------------------------------------------------------- +from("direct:createUser") + .setHeader(STS2Constants.ROLE_ARN, constant("arn:123")) + .setHeader(STS2Constants.ROLE_SESSION_NAME, constant("groot")) + .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=assumeRole") +-------------------------------------------------------------------------------- + == Automatic detection of StsClient client in registry The component is capable of detecting the presence of an StsClient bean into the registry. If it's the only instance of that type it will be used as client and you won't have to define it as uri parameter. This may be really useful for smarter configuration of the endpoint. +== Using a POJO as body + +Sometimes build an AWS Request can be complex, because of multiple options. We introduce the possibility to use a POJO as body. +In AWS STS, as example for Assume Role request, you can do something like: + +------------------------------------------------------------------------------------------------------ +from("direct:createUser") + .setBody(AssumeRoleRequest.builder().roleArn("arn:123").roleSessionName("groot").build()) + .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=assumeRole&pojoRequest=true") +------------------------------------------------------------------------------------------------------ + +In this way you'll pass the request directly without the need of passing headers and options specifically related to this operation. + == Dependencies Maven users will need to add the following dependency to their pom.xml.