@Override
        public Value evaluate(List<Value> arguments) {
            String value = arguments.get(0).expectStringValue().getValue();
            Optional<AwsArn> arnOpt = AwsArn.parse(value);
            if (!arnOpt.isPresent()) {
                return Value.emptyValue();
            }

            AwsArn awsArn = arnOpt.get();
            List<Value> resourceId = new ArrayList<>();
            for (String resourceIdPart : awsArn.getResource()) {
                resourceId.add(Value.stringValue(resourceIdPart));
            }
            return Value.recordValue(MapUtils.of(
                    PARTITION,
                    Value.stringValue(awsArn.getPartition()),
                    SERVICE,
                    Value.stringValue(awsArn.getService()),
                    REGION,
                    Value.stringValue(awsArn.getRegion()),
                    ACCOUNT_ID,
                    Value.stringValue(awsArn.getAccountId()),
                    RESOURCE_ID,
                    Value.arrayValue(resourceId)));
        }
A {@link FunctionDefinition} for the {@link ParseArn} function.
smithy-aws-endpoints/src/main/java/software/amazon/smithy/rulesengine/aws/language/functions/ParseArn.java