UNPKG

asl-validator

Version:
10 lines (9 loc) 488 B
"use strict"; 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;