cartography 0.105.0__py3-none-any.whl → 0.106.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cartography might be problematic. Click here for more details.

Files changed (108) hide show
  1. cartography/_version.py +2 -2
  2. cartography/cli.py +78 -2
  3. cartography/client/core/tx.py +62 -0
  4. cartography/config.py +24 -0
  5. cartography/data/indexes.cypher +0 -34
  6. cartography/driftdetect/cli.py +3 -2
  7. cartography/graph/cleanupbuilder.py +47 -0
  8. cartography/graph/job.py +42 -0
  9. cartography/graph/querybuilder.py +136 -2
  10. cartography/graph/statement.py +1 -1
  11. cartography/intel/airbyte/__init__.py +105 -0
  12. cartography/intel/airbyte/connections.py +120 -0
  13. cartography/intel/airbyte/destinations.py +81 -0
  14. cartography/intel/airbyte/organizations.py +59 -0
  15. cartography/intel/airbyte/sources.py +78 -0
  16. cartography/intel/airbyte/tags.py +64 -0
  17. cartography/intel/airbyte/users.py +106 -0
  18. cartography/intel/airbyte/util.py +122 -0
  19. cartography/intel/airbyte/workspaces.py +63 -0
  20. cartography/intel/aws/codebuild.py +132 -0
  21. cartography/intel/aws/ecs.py +228 -380
  22. cartography/intel/aws/efs.py +261 -0
  23. cartography/intel/aws/identitycenter.py +14 -3
  24. cartography/intel/aws/inspector.py +96 -53
  25. cartography/intel/aws/rds.py +2 -1
  26. cartography/intel/aws/resources.py +4 -0
  27. cartography/intel/entra/__init__.py +11 -0
  28. cartography/intel/entra/applications.py +366 -0
  29. cartography/intel/entra/users.py +84 -42
  30. cartography/intel/kubernetes/__init__.py +30 -14
  31. cartography/intel/kubernetes/clusters.py +86 -0
  32. cartography/intel/kubernetes/namespaces.py +59 -57
  33. cartography/intel/kubernetes/pods.py +140 -77
  34. cartography/intel/kubernetes/secrets.py +95 -45
  35. cartography/intel/kubernetes/services.py +131 -67
  36. cartography/intel/kubernetes/util.py +125 -14
  37. cartography/intel/scaleway/__init__.py +127 -0
  38. cartography/intel/scaleway/iam/__init__.py +0 -0
  39. cartography/intel/scaleway/iam/apikeys.py +71 -0
  40. cartography/intel/scaleway/iam/applications.py +71 -0
  41. cartography/intel/scaleway/iam/groups.py +71 -0
  42. cartography/intel/scaleway/iam/users.py +71 -0
  43. cartography/intel/scaleway/instances/__init__.py +0 -0
  44. cartography/intel/scaleway/instances/flexibleips.py +86 -0
  45. cartography/intel/scaleway/instances/instances.py +92 -0
  46. cartography/intel/scaleway/projects.py +79 -0
  47. cartography/intel/scaleway/storage/__init__.py +0 -0
  48. cartography/intel/scaleway/storage/snapshots.py +86 -0
  49. cartography/intel/scaleway/storage/volumes.py +84 -0
  50. cartography/intel/scaleway/utils.py +37 -0
  51. cartography/models/airbyte/__init__.py +0 -0
  52. cartography/models/airbyte/connection.py +138 -0
  53. cartography/models/airbyte/destination.py +75 -0
  54. cartography/models/airbyte/organization.py +19 -0
  55. cartography/models/airbyte/source.py +75 -0
  56. cartography/models/airbyte/stream.py +74 -0
  57. cartography/models/airbyte/tag.py +69 -0
  58. cartography/models/airbyte/user.py +111 -0
  59. cartography/models/airbyte/workspace.py +46 -0
  60. cartography/models/aws/codebuild/__init__.py +0 -0
  61. cartography/models/aws/codebuild/project.py +49 -0
  62. cartography/models/aws/ecs/__init__.py +0 -0
  63. cartography/models/aws/ecs/clusters.py +64 -0
  64. cartography/models/aws/ecs/container_definitions.py +93 -0
  65. cartography/models/aws/ecs/container_instances.py +84 -0
  66. cartography/models/aws/ecs/containers.py +99 -0
  67. cartography/models/aws/ecs/services.py +117 -0
  68. cartography/models/aws/ecs/task_definitions.py +135 -0
  69. cartography/models/aws/ecs/tasks.py +110 -0
  70. cartography/models/aws/efs/__init__.py +0 -0
  71. cartography/models/aws/efs/access_point.py +77 -0
  72. cartography/models/aws/efs/file_system.py +60 -0
  73. cartography/models/aws/efs/mount_target.py +79 -0
  74. cartography/models/core/common.py +1 -0
  75. cartography/models/core/relationships.py +44 -0
  76. cartography/models/entra/app_role_assignment.py +115 -0
  77. cartography/models/entra/application.py +47 -0
  78. cartography/models/entra/user.py +17 -51
  79. cartography/models/kubernetes/__init__.py +0 -0
  80. cartography/models/kubernetes/clusters.py +26 -0
  81. cartography/models/kubernetes/containers.py +108 -0
  82. cartography/models/kubernetes/namespaces.py +51 -0
  83. cartography/models/kubernetes/pods.py +80 -0
  84. cartography/models/kubernetes/secrets.py +79 -0
  85. cartography/models/kubernetes/services.py +108 -0
  86. cartography/models/scaleway/__init__.py +0 -0
  87. cartography/models/scaleway/iam/__init__.py +0 -0
  88. cartography/models/scaleway/iam/apikey.py +96 -0
  89. cartography/models/scaleway/iam/application.py +52 -0
  90. cartography/models/scaleway/iam/group.py +95 -0
  91. cartography/models/scaleway/iam/user.py +60 -0
  92. cartography/models/scaleway/instance/__init__.py +0 -0
  93. cartography/models/scaleway/instance/flexibleip.py +52 -0
  94. cartography/models/scaleway/instance/instance.py +118 -0
  95. cartography/models/scaleway/organization.py +19 -0
  96. cartography/models/scaleway/project.py +48 -0
  97. cartography/models/scaleway/storage/__init__.py +0 -0
  98. cartography/models/scaleway/storage/snapshot.py +78 -0
  99. cartography/models/scaleway/storage/volume.py +51 -0
  100. cartography/sync.py +8 -4
  101. cartography/util.py +15 -10
  102. {cartography-0.105.0.dist-info → cartography-0.106.0.dist-info}/METADATA +5 -2
  103. {cartography-0.105.0.dist-info → cartography-0.106.0.dist-info}/RECORD +107 -35
  104. cartography/data/jobs/cleanup/kubernetes_import_cleanup.json +0 -70
  105. {cartography-0.105.0.dist-info → cartography-0.106.0.dist-info}/WHEEL +0 -0
  106. {cartography-0.105.0.dist-info → cartography-0.106.0.dist-info}/entry_points.txt +0 -0
  107. {cartography-0.105.0.dist-info → cartography-0.106.0.dist-info}/licenses/LICENSE +0 -0
  108. {cartography-0.105.0.dist-info → cartography-0.106.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,138 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+ from cartography.models.core.relationships import CartographyRelProperties
7
+ from cartography.models.core.relationships import CartographyRelSchema
8
+ from cartography.models.core.relationships import LinkDirection
9
+ from cartography.models.core.relationships import make_target_node_matcher
10
+ from cartography.models.core.relationships import OtherRelationships
11
+ from cartography.models.core.relationships import TargetNodeMatcher
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class AirbyteConnectionNodeProperties(CartographyNodeProperties):
16
+ id: PropertyRef = PropertyRef("connectionId")
17
+ name: PropertyRef = PropertyRef("name")
18
+ namespace_format: PropertyRef = PropertyRef("namespaceFormat")
19
+ prefix: PropertyRef = PropertyRef("prefix")
20
+ status: PropertyRef = PropertyRef("status")
21
+ data_residency: PropertyRef = PropertyRef("dataResidency")
22
+ non_breaking_schema_updates_behavior: PropertyRef = PropertyRef(
23
+ "nonBreakingSchemaUpdatesBehavior"
24
+ )
25
+ namespace_definition: PropertyRef = PropertyRef("namespaceDefinition")
26
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
27
+
28
+
29
+ @dataclass(frozen=True)
30
+ class AirbyteConnectionToOrganizationRelProperties(CartographyRelProperties):
31
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
32
+
33
+
34
+ @dataclass(frozen=True)
35
+ # (:AirbyteOrganization)-[:RESOURCE]->(:AirbyteConnection)
36
+ class AirbyteConnectionToOrganizationRel(CartographyRelSchema):
37
+ target_node_label: str = "AirbyteOrganization"
38
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
39
+ {"id": PropertyRef("ORG_ID", set_in_kwargs=True)},
40
+ )
41
+ direction: LinkDirection = LinkDirection.INWARD
42
+ rel_label: str = "RESOURCE"
43
+ properties: AirbyteConnectionToOrganizationRelProperties = (
44
+ AirbyteConnectionToOrganizationRelProperties()
45
+ )
46
+
47
+
48
+ @dataclass(frozen=True)
49
+ class AirbyteConnectionToWorkspaceRelProperties(CartographyRelProperties):
50
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
51
+
52
+
53
+ @dataclass(frozen=True)
54
+ # (:AirbyteWorkspace)-[:CONTAINS]->(:AirbyteConnection)
55
+ class AirbyteConnectionToWorkspaceRel(CartographyRelSchema):
56
+ target_node_label: str = "AirbyteWorkspace"
57
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
58
+ {"id": PropertyRef("workspaceId")},
59
+ )
60
+ direction: LinkDirection = LinkDirection.INWARD
61
+ rel_label: str = "CONTAINS"
62
+ properties: AirbyteConnectionToWorkspaceRelProperties = (
63
+ AirbyteConnectionToWorkspaceRelProperties()
64
+ )
65
+
66
+
67
+ @dataclass(frozen=True)
68
+ class AirbyteConnectionToSourceRelProperties(CartographyRelProperties):
69
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
70
+
71
+
72
+ @dataclass(frozen=True)
73
+ # (:AirbyteSource)<-[:SYNC_FROM]-(:AirbyteConnection)
74
+ class AirbyteConnectionToSourceRel(CartographyRelSchema):
75
+ target_node_label: str = "AirbyteSource"
76
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
77
+ {"id": PropertyRef("sourceId")},
78
+ )
79
+ direction: LinkDirection = LinkDirection.OUTWARD
80
+ rel_label: str = "SYNC_FROM"
81
+ properties: AirbyteConnectionToSourceRelProperties = (
82
+ AirbyteConnectionToSourceRelProperties()
83
+ )
84
+
85
+
86
+ @dataclass(frozen=True)
87
+ class AirbyteConnectionToDestinationRelProperties(CartographyRelProperties):
88
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
89
+
90
+
91
+ @dataclass(frozen=True)
92
+ # (:AirbyteDestination)<-[:SYNC_TO]-(:AirbyteConnection)
93
+ class AirbyteConnectionToDestinationRel(CartographyRelSchema):
94
+ target_node_label: str = "AirbyteDestination"
95
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
96
+ {"id": PropertyRef("destinationId")},
97
+ )
98
+ direction: LinkDirection = LinkDirection.OUTWARD
99
+ rel_label: str = "SYNC_TO"
100
+ properties: AirbyteConnectionToDestinationRelProperties = (
101
+ AirbyteConnectionToDestinationRelProperties()
102
+ )
103
+
104
+
105
+ @dataclass(frozen=True)
106
+ class AirbyteConnectionToTagRelProperties(CartographyRelProperties):
107
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
108
+
109
+
110
+ @dataclass(frozen=True)
111
+ # (:AirbyteTag)<-[:TAGGED]-(:AirbyteConnection)
112
+ class AirbyteConnectionToTagRel(CartographyRelSchema):
113
+ target_node_label: str = "AirbyteTag"
114
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
115
+ {"id": PropertyRef("tags_ids", one_to_many=True)},
116
+ )
117
+ direction: LinkDirection = LinkDirection.OUTWARD
118
+ rel_label: str = "TAGGED"
119
+ properties: AirbyteConnectionToTagRelProperties = (
120
+ AirbyteConnectionToTagRelProperties()
121
+ )
122
+
123
+
124
+ @dataclass(frozen=True)
125
+ class AirbyteConnectionSchema(CartographyNodeSchema):
126
+ label: str = "AirbyteConnection"
127
+ properties: AirbyteConnectionNodeProperties = AirbyteConnectionNodeProperties()
128
+ sub_resource_relationship: AirbyteConnectionToOrganizationRel = (
129
+ AirbyteConnectionToOrganizationRel()
130
+ )
131
+ other_relationships: OtherRelationships = OtherRelationships(
132
+ [
133
+ AirbyteConnectionToWorkspaceRel(),
134
+ AirbyteConnectionToSourceRel(),
135
+ AirbyteConnectionToDestinationRel(),
136
+ AirbyteConnectionToTagRel(),
137
+ ]
138
+ )
@@ -0,0 +1,75 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+ from cartography.models.core.relationships import CartographyRelProperties
7
+ from cartography.models.core.relationships import CartographyRelSchema
8
+ from cartography.models.core.relationships import LinkDirection
9
+ from cartography.models.core.relationships import make_target_node_matcher
10
+ from cartography.models.core.relationships import OtherRelationships
11
+ from cartography.models.core.relationships import TargetNodeMatcher
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class AirbyteDestinationNodeProperties(CartographyNodeProperties):
16
+ id: PropertyRef = PropertyRef("destinationId")
17
+ name: PropertyRef = PropertyRef("name")
18
+ type: PropertyRef = PropertyRef("destinationType")
19
+ config_host: PropertyRef = PropertyRef("configuration.host")
20
+ config_port: PropertyRef = PropertyRef("configuration.port")
21
+ config_name: PropertyRef = PropertyRef("configuration.name")
22
+ config_region: PropertyRef = PropertyRef("configuration.region")
23
+ config_endpoint: PropertyRef = PropertyRef("configuration.endpoint")
24
+ config_account: PropertyRef = PropertyRef("configuration.account")
25
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
26
+
27
+
28
+ @dataclass(frozen=True)
29
+ class AirbyteDestinationToOrganizationRelProperties(CartographyRelProperties):
30
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
31
+
32
+
33
+ @dataclass(frozen=True)
34
+ # (:AirbyteOrganization)-[:RESOURCE]->(:AirbyteDestination)
35
+ class AirbyteDestinationToOrganizationRel(CartographyRelSchema):
36
+ target_node_label: str = "AirbyteOrganization"
37
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
38
+ {"id": PropertyRef("ORG_ID", set_in_kwargs=True)},
39
+ )
40
+ direction: LinkDirection = LinkDirection.INWARD
41
+ rel_label: str = "RESOURCE"
42
+ properties: AirbyteDestinationToOrganizationRelProperties = (
43
+ AirbyteDestinationToOrganizationRelProperties()
44
+ )
45
+
46
+
47
+ @dataclass(frozen=True)
48
+ class AirbyteDestinationToWorkspaceRelProperties(CartographyRelProperties):
49
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
50
+
51
+
52
+ @dataclass(frozen=True)
53
+ # (:AirbyteWorkspace)-[:CONTAINS]->(:AirbyteDestination)
54
+ class AirbyteDestinationToWorkspaceRel(CartographyRelSchema):
55
+ target_node_label: str = "AirbyteWorkspace"
56
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
57
+ {"id": PropertyRef("workspaceId")},
58
+ )
59
+ direction: LinkDirection = LinkDirection.INWARD
60
+ rel_label: str = "CONTAINS"
61
+ properties: AirbyteDestinationToWorkspaceRelProperties = (
62
+ AirbyteDestinationToWorkspaceRelProperties()
63
+ )
64
+
65
+
66
+ @dataclass(frozen=True)
67
+ class AirbyteDestinationSchema(CartographyNodeSchema):
68
+ label: str = "AirbyteDestination"
69
+ properties: AirbyteDestinationNodeProperties = AirbyteDestinationNodeProperties()
70
+ sub_resource_relationship: AirbyteDestinationToOrganizationRel = (
71
+ AirbyteDestinationToOrganizationRel()
72
+ )
73
+ other_relationships: OtherRelationships = OtherRelationships(
74
+ [AirbyteDestinationToWorkspaceRel()]
75
+ )
@@ -0,0 +1,19 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+
7
+
8
+ @dataclass(frozen=True)
9
+ class AirbyteOrganizationNodeProperties(CartographyNodeProperties):
10
+ id: PropertyRef = PropertyRef("organizationId")
11
+ name: PropertyRef = PropertyRef("organizationName")
12
+ email: PropertyRef = PropertyRef("email")
13
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
14
+
15
+
16
+ @dataclass(frozen=True)
17
+ class AirbyteOrganizationSchema(CartographyNodeSchema):
18
+ label: str = "AirbyteOrganization"
19
+ properties: AirbyteOrganizationNodeProperties = AirbyteOrganizationNodeProperties()
@@ -0,0 +1,75 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+ from cartography.models.core.relationships import CartographyRelProperties
7
+ from cartography.models.core.relationships import CartographyRelSchema
8
+ from cartography.models.core.relationships import LinkDirection
9
+ from cartography.models.core.relationships import make_target_node_matcher
10
+ from cartography.models.core.relationships import OtherRelationships
11
+ from cartography.models.core.relationships import TargetNodeMatcher
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class AirbyteSourceNodeProperties(CartographyNodeProperties):
16
+ id: PropertyRef = PropertyRef("sourceId")
17
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
18
+ name: PropertyRef = PropertyRef("name")
19
+ type: PropertyRef = PropertyRef("sourceType")
20
+ config_host: PropertyRef = PropertyRef("configuration.host")
21
+ config_port: PropertyRef = PropertyRef("configuration.port")
22
+ config_name: PropertyRef = PropertyRef("configuration.name")
23
+ config_region: PropertyRef = PropertyRef("configuration.region")
24
+ config_endpoint: PropertyRef = PropertyRef("configuration.endpoint")
25
+ config_account: PropertyRef = PropertyRef("configuration.account")
26
+
27
+
28
+ @dataclass(frozen=True)
29
+ class AirbyteSourceToOrganizationRelProperties(CartographyRelProperties):
30
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
31
+
32
+
33
+ @dataclass(frozen=True)
34
+ # (:AirbyteOrganization)-[:RESOURCE]->(:AirbyteSource)
35
+ class AirbyteSourceToOrganizationRel(CartographyRelSchema):
36
+ target_node_label: str = "AirbyteOrganization"
37
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
38
+ {"id": PropertyRef("ORG_ID", set_in_kwargs=True)},
39
+ )
40
+ direction: LinkDirection = LinkDirection.INWARD
41
+ rel_label: str = "RESOURCE"
42
+ properties: AirbyteSourceToOrganizationRelProperties = (
43
+ AirbyteSourceToOrganizationRelProperties()
44
+ )
45
+
46
+
47
+ @dataclass(frozen=True)
48
+ class AirbyteSourceToWorkspaceRelProperties(CartographyRelProperties):
49
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
50
+
51
+
52
+ @dataclass(frozen=True)
53
+ # (:AirbyteWorkspace)-[:CONTAINS]->(:AirbyteSource)
54
+ class AirbyteSourceToWorkspaceRel(CartographyRelSchema):
55
+ target_node_label: str = "AirbyteWorkspace"
56
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
57
+ {"id": PropertyRef("workspaceId")},
58
+ )
59
+ direction: LinkDirection = LinkDirection.INWARD
60
+ rel_label: str = "CONTAINS"
61
+ properties: AirbyteSourceToWorkspaceRelProperties = (
62
+ AirbyteSourceToWorkspaceRelProperties()
63
+ )
64
+
65
+
66
+ @dataclass(frozen=True)
67
+ class AirbyteSourceSchema(CartographyNodeSchema):
68
+ label: str = "AirbyteSource"
69
+ properties: AirbyteSourceNodeProperties = AirbyteSourceNodeProperties()
70
+ sub_resource_relationship: AirbyteSourceToOrganizationRel = (
71
+ AirbyteSourceToOrganizationRel()
72
+ )
73
+ other_relationships: OtherRelationships = OtherRelationships(
74
+ [AirbyteSourceToWorkspaceRel()]
75
+ )
@@ -0,0 +1,74 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+ from cartography.models.core.relationships import CartographyRelProperties
7
+ from cartography.models.core.relationships import CartographyRelSchema
8
+ from cartography.models.core.relationships import LinkDirection
9
+ from cartography.models.core.relationships import make_target_node_matcher
10
+ from cartography.models.core.relationships import OtherRelationships
11
+ from cartography.models.core.relationships import TargetNodeMatcher
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class AirbyteStreamNodeProperties(CartographyNodeProperties):
16
+ id: PropertyRef = PropertyRef("streamId")
17
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
18
+ name: PropertyRef = PropertyRef("name")
19
+ sync_mode: PropertyRef = PropertyRef("syncMode")
20
+ cursor_field: PropertyRef = PropertyRef("cursorField")
21
+ primary_key: PropertyRef = PropertyRef("primaryKey")
22
+ include_files: PropertyRef = PropertyRef("includeFiles")
23
+ selected_fields: PropertyRef = PropertyRef("selectedFields")
24
+ mappers: PropertyRef = PropertyRef("mappers")
25
+
26
+
27
+ @dataclass(frozen=True)
28
+ class AirbyteStreamToOrganizationRelProperties(CartographyRelProperties):
29
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
30
+
31
+
32
+ @dataclass(frozen=True)
33
+ # (:AirbyteOrganization)-[:RESOURCE]->(:AirbyteStream)
34
+ class AirbyteStreamToOrganizationRel(CartographyRelSchema):
35
+ target_node_label: str = "AirbyteOrganization"
36
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
37
+ {"id": PropertyRef("ORG_ID", set_in_kwargs=True)},
38
+ )
39
+ direction: LinkDirection = LinkDirection.INWARD
40
+ rel_label: str = "RESOURCE"
41
+ properties: AirbyteStreamToOrganizationRelProperties = (
42
+ AirbyteStreamToOrganizationRelProperties()
43
+ )
44
+
45
+
46
+ @dataclass(frozen=True)
47
+ class AirbyteStreamToConnectionRelProperties(CartographyRelProperties):
48
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
49
+
50
+
51
+ @dataclass(frozen=True)
52
+ # (:AirbyteConnection)-[:HAS]->(:AirbyteStream)
53
+ class AirbyteStreamToConnectionRel(CartographyRelSchema):
54
+ target_node_label: str = "AirbyteConnection"
55
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
56
+ {"id": PropertyRef("connectionId")},
57
+ )
58
+ direction: LinkDirection = LinkDirection.INWARD
59
+ rel_label: str = "HAS"
60
+ properties: AirbyteStreamToOrganizationRelProperties = (
61
+ AirbyteStreamToOrganizationRelProperties()
62
+ )
63
+
64
+
65
+ @dataclass(frozen=True)
66
+ class AirbyteStreamSchema(CartographyNodeSchema):
67
+ label: str = "AirbyteStream"
68
+ properties: AirbyteStreamNodeProperties = AirbyteStreamNodeProperties()
69
+ sub_resource_relationship: AirbyteStreamToOrganizationRel = (
70
+ AirbyteStreamToOrganizationRel()
71
+ )
72
+ other_relationships: OtherRelationships = OtherRelationships(
73
+ [AirbyteStreamToConnectionRel()]
74
+ )
@@ -0,0 +1,69 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+ from cartography.models.core.relationships import CartographyRelProperties
7
+ from cartography.models.core.relationships import CartographyRelSchema
8
+ from cartography.models.core.relationships import LinkDirection
9
+ from cartography.models.core.relationships import make_target_node_matcher
10
+ from cartography.models.core.relationships import OtherRelationships
11
+ from cartography.models.core.relationships import TargetNodeMatcher
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class AirbyteTagNodeProperties(CartographyNodeProperties):
16
+ id: PropertyRef = PropertyRef("tagId")
17
+ name: PropertyRef = PropertyRef("name")
18
+ color: PropertyRef = PropertyRef("color")
19
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
20
+
21
+
22
+ @dataclass(frozen=True)
23
+ class AirbyteTagToOrganizationRelProperties(CartographyRelProperties):
24
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
25
+
26
+
27
+ @dataclass(frozen=True)
28
+ # (:AirbyteOrganization)-[:RESOURCE]->(:AirbyteTag)
29
+ class AirbyteTagToOrganizationRel(CartographyRelSchema):
30
+ target_node_label: str = "AirbyteOrganization"
31
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
32
+ {"id": PropertyRef("ORG_ID", set_in_kwargs=True)},
33
+ )
34
+ direction: LinkDirection = LinkDirection.INWARD
35
+ rel_label: str = "RESOURCE"
36
+ properties: AirbyteTagToOrganizationRelProperties = (
37
+ AirbyteTagToOrganizationRelProperties()
38
+ )
39
+
40
+
41
+ @dataclass(frozen=True)
42
+ class AirbyteTagToWorkspaceRelProperties(CartographyRelProperties):
43
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
44
+
45
+
46
+ @dataclass(frozen=True)
47
+ # (:AirbyteWorkspace)-[:CONTAINS]->(:AirbyteTag)
48
+ class AirbyteTagToWorkspaceRel(CartographyRelSchema):
49
+ target_node_label: str = "AirbyteWorkspace"
50
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
51
+ {"id": PropertyRef("workspaceId")},
52
+ )
53
+ direction: LinkDirection = LinkDirection.INWARD
54
+ rel_label: str = "CONTAINS"
55
+ properties: AirbyteTagToWorkspaceRelProperties = (
56
+ AirbyteTagToWorkspaceRelProperties()
57
+ )
58
+
59
+
60
+ @dataclass(frozen=True)
61
+ class AirbyteTagSchema(CartographyNodeSchema):
62
+ label: str = "AirbyteTag"
63
+ properties: AirbyteTagNodeProperties = AirbyteTagNodeProperties()
64
+ sub_resource_relationship: AirbyteTagToOrganizationRel = (
65
+ AirbyteTagToOrganizationRel()
66
+ )
67
+ other_relationships: OtherRelationships = OtherRelationships(
68
+ [AirbyteTagToWorkspaceRel()]
69
+ )
@@ -0,0 +1,111 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+ from cartography.models.core.relationships import CartographyRelProperties
7
+ from cartography.models.core.relationships import CartographyRelSchema
8
+ from cartography.models.core.relationships import LinkDirection
9
+ from cartography.models.core.relationships import make_target_node_matcher
10
+ from cartography.models.core.relationships import OtherRelationships
11
+ from cartography.models.core.relationships import TargetNodeMatcher
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class AirbyteUserNodeProperties(CartographyNodeProperties):
16
+ id: PropertyRef = PropertyRef("id")
17
+ name: PropertyRef = PropertyRef("name")
18
+ email: PropertyRef = PropertyRef("email", extra_index=True)
19
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
20
+
21
+
22
+ @dataclass(frozen=True)
23
+ class AirbyteUserToOrganizationRelProperties(CartographyRelProperties):
24
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
25
+
26
+
27
+ @dataclass(frozen=True)
28
+ # (:AirbyteOrganization)-[:RESOURCE]->(:AirbyteUser)
29
+ class AirbyteUserToOrganizationRel(CartographyRelSchema):
30
+ target_node_label: str = "AirbyteOrganization"
31
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
32
+ {"id": PropertyRef("ORG_ID", set_in_kwargs=True)},
33
+ )
34
+ direction: LinkDirection = LinkDirection.INWARD
35
+ rel_label: str = "RESOURCE"
36
+ properties: AirbyteUserToOrganizationRelProperties = (
37
+ AirbyteUserToOrganizationRelProperties()
38
+ )
39
+
40
+
41
+ @dataclass(frozen=True)
42
+ class AirbyteUserToOrganizationAdminRelProperties(CartographyRelProperties):
43
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
44
+
45
+
46
+ @dataclass(frozen=True)
47
+ # (:AirbyteOrganization)<-[:ADMIN_OF]-(:AirbyteUser)
48
+ class AirbyteUserToOrganizationAdminRel(CartographyRelSchema):
49
+ target_node_label: str = "AirbyteOrganization"
50
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
51
+ {"id": PropertyRef("adminOfOrganization", one_to_many=True)},
52
+ )
53
+ direction: LinkDirection = LinkDirection.OUTWARD
54
+ rel_label: str = "ADMIN_OF"
55
+ properties: AirbyteUserToOrganizationAdminRelProperties = (
56
+ AirbyteUserToOrganizationAdminRelProperties()
57
+ )
58
+
59
+
60
+ @dataclass(frozen=True)
61
+ class AirbyteUserToWorkspaceAdminRelProperties(CartographyRelProperties):
62
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
63
+
64
+
65
+ @dataclass(frozen=True)
66
+ # (:AirbyteWorkspace)<-[:ADMIN_OF]-(:AirbyteUser)
67
+ class AirbyteUserToWorkspaceAdminRel(CartographyRelSchema):
68
+ target_node_label: str = "AirbyteWorkspace"
69
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
70
+ {"id": PropertyRef("adminOfWorkspace", one_to_many=True)},
71
+ )
72
+ direction: LinkDirection = LinkDirection.OUTWARD
73
+ rel_label: str = "ADMIN_OF"
74
+ properties: AirbyteUserToWorkspaceAdminRelProperties = (
75
+ AirbyteUserToWorkspaceAdminRelProperties()
76
+ )
77
+
78
+
79
+ @dataclass(frozen=True)
80
+ class AirbyteUserToWorkspaceMemberRelProperties(CartographyRelProperties):
81
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
82
+
83
+
84
+ @dataclass(frozen=True)
85
+ # (:AirbyteWorkspace)<-[:MEMBER_OF]-(:AirbyteUser)
86
+ class AirbyteUserToWorkspaceMemberRel(CartographyRelSchema):
87
+ target_node_label: str = "AirbyteWorkspace"
88
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
89
+ {"id": PropertyRef("memberOfWorkspace", one_to_many=True)},
90
+ )
91
+ direction: LinkDirection = LinkDirection.OUTWARD
92
+ rel_label: str = "MEMBER_OF"
93
+ properties: AirbyteUserToWorkspaceMemberRelProperties = (
94
+ AirbyteUserToWorkspaceMemberRelProperties()
95
+ )
96
+
97
+
98
+ @dataclass(frozen=True)
99
+ class AirbyteUserSchema(CartographyNodeSchema):
100
+ label: str = "AirbyteUser"
101
+ properties: AirbyteUserNodeProperties = AirbyteUserNodeProperties()
102
+ sub_resource_relationship: AirbyteUserToOrganizationRel = (
103
+ AirbyteUserToOrganizationRel()
104
+ )
105
+ other_relationships: OtherRelationships = OtherRelationships(
106
+ [
107
+ AirbyteUserToOrganizationAdminRel(),
108
+ AirbyteUserToWorkspaceAdminRel(),
109
+ AirbyteUserToWorkspaceMemberRel(),
110
+ ]
111
+ )
@@ -0,0 +1,46 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+ from cartography.models.core.relationships import CartographyRelProperties
7
+ from cartography.models.core.relationships import CartographyRelSchema
8
+ from cartography.models.core.relationships import LinkDirection
9
+ from cartography.models.core.relationships import make_target_node_matcher
10
+ from cartography.models.core.relationships import TargetNodeMatcher
11
+
12
+
13
+ @dataclass(frozen=True)
14
+ class AirbyteWorkspaceNodeProperties(CartographyNodeProperties):
15
+ id: PropertyRef = PropertyRef("workspaceId")
16
+ name: PropertyRef = PropertyRef("name")
17
+ data_residency: PropertyRef = PropertyRef("dataResidency")
18
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
19
+
20
+
21
+ @dataclass(frozen=True)
22
+ class AirbyteWorkspaceToOrganizationRelProperties(CartographyRelProperties):
23
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
24
+
25
+
26
+ @dataclass(frozen=True)
27
+ # (:AirbyteOrganization)-[:RESOURCE]->(:AirbyteWorkspace)
28
+ class AirbyteWorkspaceToOrganizationRel(CartographyRelSchema):
29
+ target_node_label: str = "AirbyteOrganization"
30
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
31
+ {"id": PropertyRef("ORG_ID", set_in_kwargs=True)},
32
+ )
33
+ direction: LinkDirection = LinkDirection.INWARD
34
+ rel_label: str = "RESOURCE"
35
+ properties: AirbyteWorkspaceToOrganizationRelProperties = (
36
+ AirbyteWorkspaceToOrganizationRelProperties()
37
+ )
38
+
39
+
40
+ @dataclass(frozen=True)
41
+ class AirbyteWorkspaceSchema(CartographyNodeSchema):
42
+ label: str = "AirbyteWorkspace"
43
+ properties: AirbyteWorkspaceNodeProperties = AirbyteWorkspaceNodeProperties()
44
+ sub_resource_relationship: AirbyteWorkspaceToOrganizationRel = (
45
+ AirbyteWorkspaceToOrganizationRel()
46
+ )
File without changes
@@ -0,0 +1,49 @@
1
+ from dataclasses import dataclass
2
+
3
+ from cartography.models.core.common import PropertyRef
4
+ from cartography.models.core.nodes import CartographyNodeProperties
5
+ from cartography.models.core.nodes import CartographyNodeSchema
6
+ from cartography.models.core.relationships import CartographyRelProperties
7
+ from cartography.models.core.relationships import CartographyRelSchema
8
+ from cartography.models.core.relationships import LinkDirection
9
+ from cartography.models.core.relationships import make_target_node_matcher
10
+ from cartography.models.core.relationships import TargetNodeMatcher
11
+
12
+
13
+ @dataclass(frozen=True)
14
+ class CodeBuildProjectNodeProperties(CartographyNodeProperties):
15
+ id: PropertyRef = PropertyRef("arn")
16
+ arn: PropertyRef = PropertyRef("arn", extra_index=True)
17
+ region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
18
+ created: PropertyRef = PropertyRef("created")
19
+ environment_variables: PropertyRef = PropertyRef("environmentVariables")
20
+ source_type: PropertyRef = PropertyRef("sourceType")
21
+ source_location: PropertyRef = PropertyRef("sourceLocation")
22
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
23
+
24
+
25
+ @dataclass(frozen=True)
26
+ class CodeBuildProjectToAwsAccountRelProperties(CartographyRelProperties):
27
+ lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
28
+
29
+
30
+ @dataclass(frozen=True)
31
+ class CodeBuildProjectToAWSAccountRel(CartographyRelSchema):
32
+ target_node_label: str = "AWSAccount"
33
+ target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
34
+ {"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
35
+ )
36
+ direction: LinkDirection = LinkDirection.INWARD
37
+ rel_label: str = "RESOURCE"
38
+ properties: CodeBuildProjectToAwsAccountRelProperties = (
39
+ CodeBuildProjectToAwsAccountRelProperties()
40
+ )
41
+
42
+
43
+ @dataclass(frozen=True)
44
+ class CodeBuildProjectSchema(CartographyNodeSchema):
45
+ label: str = "CodeBuildProject"
46
+ properties: CodeBuildProjectNodeProperties = CodeBuildProjectNodeProperties()
47
+ sub_resource_relationship: CodeBuildProjectToAWSAccountRel = (
48
+ CodeBuildProjectToAWSAccountRel()
49
+ )
File without changes