AWS ARN Parser
The AWS ARN parser currently supports:
apigateway
ARNsexecute-api
ARNsiam
ARNs
import org.livetribe.aws.arn.ExecuteApiResourceArn;
import static org.livetribe.aws.arn.ArnParser.parseArn;
String token = "arn:aws:execute-api:us-east-1:123456789012:0df34wjxyd/*/GET/mydemoresource/*";
ExecuteApiResourceArn arn = (ExecuteApiResourceArn) parseArn(token);
import org.livetribe.aws.arn.Arn;
import org.livetribe.aws.arn.ExecuteApiResourceArn;
import static org.livetribe.aws.arn.HttpVerb.WILDCARD;
Arn arn = new ExecuteApiResourceArn("us-east-1", "123456789012", "0df34wjxyd",
"test", WILDCARD, "/mydemoresource/*");
Converting the ARN to a String
will provide a correctly formatted AWS ARN.