Skip to content

Commit 8e7112a

Browse files
authored
CAMEL-22806 - Camel-AWS components: Avoid duplicated code and add pagination to producer operation where it makes sense - AWS IAM (#20648)
Signed-off-by: Andrea Cosentino <[email protected]>
1 parent ddff01a commit 8e7112a

File tree

6 files changed

+460
-408
lines changed

6 files changed

+460
-408
lines changed

catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-iam.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@
5353
"CamelAwsIAMAccessKeyID": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The accessKey you want to manage", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#ACCESS_KEY_ID" },
5454
"CamelAwsIAMAccessKeyStatus": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Status of the AccessKey you want to set, possible value are active and inactive", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#ACCESS_KEY_STATUS" },
5555
"CamelAwsIAMGroupName": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of an AWS IAM Group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_NAME" },
56-
"CamelAwsIAMGroupPath": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path of an AWS IAM Group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_PATH" }
56+
"CamelAwsIAMGroupPath": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path of an AWS IAM Group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_PATH" },
57+
"CamelAwsIAMMarker": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The marker to use for pagination in list operations", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#MARKER" },
58+
"CamelAwsIAMMaxItems": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of items to return in list operations", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#MAX_ITEMS" },
59+
"CamelAwsIAMIsTruncated": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the list response is truncated (has more results)", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#IS_TRUNCATED" },
60+
"CamelAwsIAMNextMarker": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The marker to use for the next page of results", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#NEXT_MARKER" },
61+
"CamelAwsIAMUserArn": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the created or retrieved user", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#USER_ARN" },
62+
"CamelAwsIAMUserId": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the created or retrieved user", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#USER_ID" },
63+
"CamelAwsIAMGroupArn": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the created or retrieved group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_ARN" },
64+
"CamelAwsIAMGroupId": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the created or retrieved group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_ID" }
5765
},
5866
"properties": {
5967
"label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.iam.IAM2Configuration", "configurationField": "configuration", "description": "Logical name" },

components/camel-aws/camel-aws2-iam/src/generated/resources/META-INF/org/apache/camel/component/aws2/iam/aws2-iam.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@
5353
"CamelAwsIAMAccessKeyID": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The accessKey you want to manage", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#ACCESS_KEY_ID" },
5454
"CamelAwsIAMAccessKeyStatus": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Status of the AccessKey you want to set, possible value are active and inactive", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#ACCESS_KEY_STATUS" },
5555
"CamelAwsIAMGroupName": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of an AWS IAM Group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_NAME" },
56-
"CamelAwsIAMGroupPath": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path of an AWS IAM Group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_PATH" }
56+
"CamelAwsIAMGroupPath": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path of an AWS IAM Group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_PATH" },
57+
"CamelAwsIAMMarker": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The marker to use for pagination in list operations", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#MARKER" },
58+
"CamelAwsIAMMaxItems": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of items to return in list operations", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#MAX_ITEMS" },
59+
"CamelAwsIAMIsTruncated": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the list response is truncated (has more results)", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#IS_TRUNCATED" },
60+
"CamelAwsIAMNextMarker": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The marker to use for the next page of results", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#NEXT_MARKER" },
61+
"CamelAwsIAMUserArn": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the created or retrieved user", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#USER_ARN" },
62+
"CamelAwsIAMUserId": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the created or retrieved user", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#USER_ID" },
63+
"CamelAwsIAMGroupArn": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ARN of the created or retrieved group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_ARN" },
64+
"CamelAwsIAMGroupId": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the created or retrieved group", "constantName": "org.apache.camel.component.aws2.iam.IAM2Constants#GROUP_ID" }
5765
},
5866
"properties": {
5967
"label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.iam.IAM2Configuration", "configurationField": "configuration", "description": "Logical name" },

components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Constants.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,24 @@ public interface IAM2Constants {
3535
String GROUP_NAME = "CamelAwsIAMGroupName";
3636
@Metadata(description = "The path of an AWS IAM Group", javaType = "String")
3737
String GROUP_PATH = "CamelAwsIAMGroupPath";
38+
39+
// Pagination support
40+
@Metadata(description = "The marker to use for pagination in list operations", javaType = "String")
41+
String MARKER = "CamelAwsIAMMarker";
42+
@Metadata(description = "The maximum number of items to return in list operations", javaType = "Integer")
43+
String MAX_ITEMS = "CamelAwsIAMMaxItems";
44+
45+
// Response metadata
46+
@Metadata(description = "Whether the list response is truncated (has more results)", javaType = "Boolean")
47+
String IS_TRUNCATED = "CamelAwsIAMIsTruncated";
48+
@Metadata(description = "The marker to use for the next page of results", javaType = "String")
49+
String NEXT_MARKER = "CamelAwsIAMNextMarker";
50+
@Metadata(description = "The ARN of the created or retrieved user", javaType = "String")
51+
String USER_ARN = "CamelAwsIAMUserArn";
52+
@Metadata(description = "The ID of the created or retrieved user", javaType = "String")
53+
String USER_ID = "CamelAwsIAMUserId";
54+
@Metadata(description = "The ARN of the created or retrieved group", javaType = "String")
55+
String GROUP_ARN = "CamelAwsIAMGroupArn";
56+
@Metadata(description = "The ID of the created or retrieved group", javaType = "String")
57+
String GROUP_ID = "CamelAwsIAMGroupId";
3858
}

0 commit comments

Comments
 (0)