asl-validator
Version:
Amazon States Language validator
10 lines (9 loc) • 488 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isArnFormatValid = void 0;
// spec is here: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
var arn = /^arn:(?<Partition>aws|aws-cn|aws-us-gov):(?<Service>[^:\n]+):(?<Region>[^:\n]*):(?<AccountID>\d*):(?<Resource>([^:/*]+([:/].*[^:/]+)?))$/iu;
var isArnFormatValid = function (taskResource) {
return arn.test(taskResource);
};
exports.isArnFormatValid = isArnFormatValid;