Package de.taimos.pipeline.aws.utils
Class IamRoleUtils
java.lang.Object
de.taimos.pipeline.aws.utils.IamRoleUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringselectPartitionName(String region) Checked against v1 for us-east-1 (aws), cn-north-1 (aws-cn), us-gov-west-1 (aws-us-gov), eu-west-1 (aws) and an unknown region name, which both resolve to aws rather than failing.static booleanvalidRoleArn(String role)
-
Method Details
-
selectPartitionName
Checked against v1 for us-east-1 (aws), cn-north-1 (aws-cn), us-gov-west-1 (aws-us-gov), eu-west-1 (aws) and an unknown region name, which both resolve to aws rather than failing. The blank case needs handling explicitly: withAWS defaults region to the empty string, so withAWS(role: ..., roleAccount: ...) with no region reaches here with "". v1 answered aws for that, while v2's Region.of rejects a blank name outright - which would turn a working pipeline into an IllegalArgumentException before the role was even requested. The trimmed value is what gets resolved, not just what gets tested: Region.of only rejects a blank name, so " cn-north-1 " would otherwise match no partition and fall through to aws, silently building an arn:aws role ARN for a China-partition role. -
validRoleArn
-