rds.rb 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # frozen_string_literal: true
  2. require 'neo4j'
  3. # Information on Rds
  4. class Rds
  5. include Neo4j::ActiveNode
  6. property :name, constraint: :unique
  7. property :size
  8. property :engine
  9. property :engine_version
  10. property :multi_az
  11. property :endpoint
  12. property :port
  13. property :allocated_storage
  14. has_one :out, :az, rel_class: :RdsAz
  15. has_one :out, :owner, rel_class: :RdsAccount
  16. end
  17. # Map Rds to Region
  18. class RdsAz
  19. include Neo4j::ActiveRel
  20. from_class :Rds
  21. to_class :Az
  22. type :az
  23. end
  24. class RdsAccount
  25. include Neo4j::ActiveRel
  26. from_class :Rds
  27. to_class :AwsAccount
  28. type :owner
  29. end
  30. class Dynamo
  31. include Neo4j::ActiveNode
  32. property :tableid, constraint: :unique
  33. property :name
  34. property :creation
  35. property :arn
  36. property :itemcount
  37. property :sizebytes
  38. property :status
  39. property :readcap
  40. property :writecap
  41. property :capdecreases
  42. has_one :out, :owner, rel_class: :DynamoAccount
  43. has_one :out, :region, rel_class: :DynamoRegion
  44. end
  45. class DynamoAccount
  46. include Neo4j::ActiveRel
  47. from_class :Dynamo
  48. to_class :AwsAccount
  49. type :owner
  50. end
  51. class DynamoRegion
  52. include Neo4j::ActiveRel
  53. from_class :Dynamo
  54. to_class :Region
  55. type :region
  56. end