resource_mapping_schema.json 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {
  2. "$schema": "http://json-schema.org/draft-04/schema",
  3. "type": "object",
  4. "title": "O3DE AWS Resource mapping file schema",
  5. "required": ["AWSResourceMappings", "AccountId", "Region", "Version"],
  6. "properties": {
  7. "AWSResourceMappings": {
  8. "type": "object",
  9. "title": "AWS resource mappings schema",
  10. "patternProperties": {
  11. "^.+$": {
  12. "type": "object",
  13. "title": "AWS resource entry schema",
  14. "required": ["Type", "Name/ID"],
  15. "properties": {
  16. "Type": {
  17. "$ref": "#/NonEmptyString"
  18. },
  19. "Name/ID": {
  20. "$ref": "#/NonEmptyString"
  21. },
  22. "AccountId": {
  23. "$ref": "#/AccountIdString"
  24. },
  25. "Region": {
  26. "$ref": "#/RegionString"
  27. }
  28. }
  29. }
  30. },
  31. "additionalProperties": false
  32. },
  33. "AccountId": {
  34. "$ref": "#/AccountIdString"
  35. },
  36. "Region": {
  37. "$ref": "#/RegionString"
  38. },
  39. "Version": {
  40. "pattern": "^[0-9]{1}.[0-9]{1}.[0-9]{1}$"
  41. }
  42. },
  43. "AccountIdString": {
  44. "type": "string",
  45. "pattern": "^[0-9]{12}$|EMPTY|^$"
  46. },
  47. "NonEmptyString": {
  48. "type": "string",
  49. "minLength": 1
  50. },
  51. "RegionString": {
  52. "type": "string",
  53. "pattern": "^[a-z]{2}-[a-z]{4,9}-[0-9]{1}$"
  54. },
  55. "additionalProperties": false
  56. }