diff --git a/kamelets/aws-cloudwatch-sink.kamelet.yaml b/kamelets/aws-cloudwatch-sink.kamelet.yaml index 5530f7054..0dfef9470 100644 --- a/kamelets/aws-cloudwatch-sink.kamelet.yaml +++ b/kamelets/aws-cloudwatch-sink.kamelet.yaml @@ -33,6 +33,13 @@ spec: description: |- Send messages to AWS CloudWatch metrics. + Access Key/Secret Key are the basic method for authenticating to the AWS CloudWatch Service. These parameters are optional, because the Kamelet provide also the 'useDefaultCredentialsProvider'. + + When using a default Credentials Provider the CloudWatch client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet. + + The Kamelet expects the following headers to be set: + + There are several properties you can set in the headers, such as: `metric-name` / `ce-metricname` for the metric name. @@ -43,8 +50,6 @@ spec: `metric-dimension-value` / `ce-metricdimensionvalue` for the dimension value. required: - cwNamespace - - accessKey - - secretKey - region type: object properties: @@ -73,6 +78,13 @@ spec: description: The AWS region to connect to. type: string example: eu-west-1 + useDefaultCredentialsProvider: + title: Default Credentials Provider + description: Set whether the CloudWatch client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. + type: boolean + x-descriptors: + - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + default: false dependencies: - "camel:aws2-cw" - "camel:kamelet" @@ -155,6 +167,7 @@ spec: - to: uri: "aws2-cw:{{cwNamespace}}" parameters: - secretKey: "{{secretKey}}" - accessKey: "{{accessKey}}" + secretKey: "{{?secretKey}}" + accessKey: "{{?accessKey}}" region: "{{region}}" + useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-cloudwatch-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-cloudwatch-sink.kamelet.yaml index 5530f7054..0dfef9470 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-cloudwatch-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-cloudwatch-sink.kamelet.yaml @@ -33,6 +33,13 @@ spec: description: |- Send messages to AWS CloudWatch metrics. + Access Key/Secret Key are the basic method for authenticating to the AWS CloudWatch Service. These parameters are optional, because the Kamelet provide also the 'useDefaultCredentialsProvider'. + + When using a default Credentials Provider the CloudWatch client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet. + + The Kamelet expects the following headers to be set: + + There are several properties you can set in the headers, such as: `metric-name` / `ce-metricname` for the metric name. @@ -43,8 +50,6 @@ spec: `metric-dimension-value` / `ce-metricdimensionvalue` for the dimension value. required: - cwNamespace - - accessKey - - secretKey - region type: object properties: @@ -73,6 +78,13 @@ spec: description: The AWS region to connect to. type: string example: eu-west-1 + useDefaultCredentialsProvider: + title: Default Credentials Provider + description: Set whether the CloudWatch client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. + type: boolean + x-descriptors: + - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + default: false dependencies: - "camel:aws2-cw" - "camel:kamelet" @@ -155,6 +167,7 @@ spec: - to: uri: "aws2-cw:{{cwNamespace}}" parameters: - secretKey: "{{secretKey}}" - accessKey: "{{accessKey}}" + secretKey: "{{?secretKey}}" + accessKey: "{{?accessKey}}" region: "{{region}}" + useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"