cartography 0.102.0rc2__py3-none-any.whl → 0.103.0rc1__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.
- cartography/__main__.py +1 -2
- cartography/_version.py +2 -2
- cartography/cli.py +302 -253
- cartography/client/core/tx.py +39 -18
- cartography/config.py +4 -0
- cartography/driftdetect/__main__.py +1 -2
- cartography/driftdetect/add_shortcut.py +10 -2
- cartography/driftdetect/cli.py +71 -75
- cartography/driftdetect/detect_deviations.py +7 -3
- cartography/driftdetect/get_states.py +20 -8
- cartography/driftdetect/model.py +5 -5
- cartography/driftdetect/serializers.py +8 -6
- cartography/driftdetect/storage.py +2 -2
- cartography/graph/cleanupbuilder.py +35 -15
- cartography/graph/job.py +46 -17
- cartography/graph/querybuilder.py +165 -80
- cartography/graph/statement.py +35 -26
- cartography/intel/analysis.py +4 -1
- cartography/intel/aws/__init__.py +114 -55
- cartography/intel/aws/apigateway.py +134 -63
- cartography/intel/aws/cloudtrail.py +127 -0
- cartography/intel/aws/config.py +56 -20
- cartography/intel/aws/dynamodb.py +108 -40
- cartography/intel/aws/ec2/__init__.py +2 -2
- cartography/intel/aws/ec2/auto_scaling_groups.py +181 -78
- cartography/intel/aws/ec2/elastic_ip_addresses.py +41 -13
- cartography/intel/aws/ec2/images.py +49 -20
- cartography/intel/aws/ec2/instances.py +234 -136
- cartography/intel/aws/ec2/internet_gateways.py +40 -11
- cartography/intel/aws/ec2/key_pairs.py +44 -20
- cartography/intel/aws/ec2/launch_templates.py +101 -59
- cartography/intel/aws/ec2/load_balancer_v2s.py +104 -39
- cartography/intel/aws/ec2/load_balancers.py +82 -42
- cartography/intel/aws/ec2/network_acls.py +89 -65
- cartography/intel/aws/ec2/network_interfaces.py +146 -87
- cartography/intel/aws/ec2/reserved_instances.py +45 -16
- cartography/intel/aws/ec2/route_tables.py +138 -98
- cartography/intel/aws/ec2/security_groups.py +71 -21
- cartography/intel/aws/ec2/snapshots.py +61 -22
- cartography/intel/aws/ec2/subnets.py +54 -18
- cartography/intel/aws/ec2/tgw.py +100 -34
- cartography/intel/aws/ec2/util.py +1 -1
- cartography/intel/aws/ec2/volumes.py +69 -41
- cartography/intel/aws/ec2/vpc.py +37 -12
- cartography/intel/aws/ec2/vpc_peerings.py +83 -24
- cartography/intel/aws/ecr.py +88 -32
- cartography/intel/aws/ecs.py +83 -47
- cartography/intel/aws/eks.py +55 -29
- cartography/intel/aws/elasticache.py +42 -18
- cartography/intel/aws/elasticsearch.py +57 -20
- cartography/intel/aws/emr.py +61 -23
- cartography/intel/aws/iam.py +401 -145
- cartography/intel/aws/iam_instance_profiles.py +22 -22
- cartography/intel/aws/identitycenter.py +71 -37
- cartography/intel/aws/inspector.py +159 -89
- cartography/intel/aws/kms.py +92 -38
- cartography/intel/aws/lambda_function.py +103 -34
- cartography/intel/aws/organizations.py +30 -10
- cartography/intel/aws/permission_relationships.py +133 -51
- cartography/intel/aws/rds.py +249 -85
- cartography/intel/aws/redshift.py +107 -46
- cartography/intel/aws/resourcegroupstaggingapi.py +120 -66
- cartography/intel/aws/resources.py +53 -46
- cartography/intel/aws/route53.py +108 -61
- cartography/intel/aws/s3.py +168 -83
- cartography/intel/aws/s3accountpublicaccessblock.py +157 -0
- cartography/intel/aws/secretsmanager.py +24 -12
- cartography/intel/aws/securityhub.py +20 -9
- cartography/intel/aws/sns.py +166 -0
- cartography/intel/aws/sqs.py +60 -28
- cartography/intel/aws/ssm.py +70 -30
- cartography/intel/aws/util/arns.py +7 -7
- cartography/intel/aws/util/common.py +31 -4
- cartography/intel/azure/__init__.py +78 -19
- cartography/intel/azure/compute.py +101 -27
- cartography/intel/azure/cosmosdb.py +496 -170
- cartography/intel/azure/sql.py +296 -105
- cartography/intel/azure/storage.py +322 -113
- cartography/intel/azure/subscription.py +39 -23
- cartography/intel/azure/tenant.py +13 -4
- cartography/intel/azure/util/credentials.py +95 -55
- cartography/intel/bigfix/__init__.py +2 -2
- cartography/intel/bigfix/computers.py +93 -65
- cartography/intel/create_indexes.py +3 -2
- cartography/intel/crowdstrike/__init__.py +11 -9
- cartography/intel/crowdstrike/endpoints.py +5 -1
- cartography/intel/crowdstrike/spotlight.py +8 -3
- cartography/intel/cve/__init__.py +46 -13
- cartography/intel/cve/feed.py +48 -12
- cartography/intel/digitalocean/__init__.py +22 -13
- cartography/intel/digitalocean/compute.py +75 -108
- cartography/intel/digitalocean/management.py +44 -80
- cartography/intel/digitalocean/platform.py +48 -43
- cartography/intel/dns.py +36 -10
- cartography/intel/duo/__init__.py +21 -16
- cartography/intel/duo/api_host.py +14 -9
- cartography/intel/duo/endpoints.py +50 -45
- cartography/intel/duo/groups.py +18 -14
- cartography/intel/duo/phones.py +37 -34
- cartography/intel/duo/tokens.py +26 -23
- cartography/intel/duo/users.py +54 -50
- cartography/intel/duo/web_authn_credentials.py +30 -25
- cartography/intel/entra/__init__.py +25 -7
- cartography/intel/entra/ou.py +112 -0
- cartography/intel/entra/users.py +69 -63
- cartography/intel/gcp/__init__.py +185 -49
- cartography/intel/gcp/compute.py +418 -231
- cartography/intel/gcp/crm.py +96 -43
- cartography/intel/gcp/dns.py +60 -19
- cartography/intel/gcp/gke.py +72 -38
- cartography/intel/gcp/iam.py +61 -41
- cartography/intel/gcp/storage.py +84 -55
- cartography/intel/github/__init__.py +13 -11
- cartography/intel/github/repos.py +270 -137
- cartography/intel/github/teams.py +170 -88
- cartography/intel/github/users.py +70 -39
- cartography/intel/github/util.py +36 -34
- cartography/intel/gsuite/__init__.py +47 -26
- cartography/intel/gsuite/api.py +73 -30
- cartography/intel/jamf/__init__.py +19 -1
- cartography/intel/jamf/computers.py +30 -7
- cartography/intel/jamf/util.py +7 -2
- cartography/intel/kandji/__init__.py +6 -3
- cartography/intel/kandji/devices.py +14 -8
- cartography/intel/kubernetes/namespaces.py +7 -4
- cartography/intel/kubernetes/pods.py +7 -4
- cartography/intel/kubernetes/services.py +8 -4
- cartography/intel/lastpass/__init__.py +2 -2
- cartography/intel/lastpass/users.py +23 -12
- cartography/intel/oci/__init__.py +44 -11
- cartography/intel/oci/iam.py +134 -38
- cartography/intel/oci/organizations.py +13 -6
- cartography/intel/oci/utils.py +43 -20
- cartography/intel/okta/__init__.py +66 -15
- cartography/intel/okta/applications.py +42 -20
- cartography/intel/okta/awssaml.py +93 -33
- cartography/intel/okta/factors.py +16 -4
- cartography/intel/okta/groups.py +56 -29
- cartography/intel/okta/organization.py +5 -1
- cartography/intel/okta/origins.py +6 -2
- cartography/intel/okta/roles.py +15 -5
- cartography/intel/okta/users.py +20 -8
- cartography/intel/okta/utils.py +6 -4
- cartography/intel/pagerduty/__init__.py +8 -7
- cartography/intel/pagerduty/escalation_policies.py +18 -6
- cartography/intel/pagerduty/schedules.py +12 -4
- cartography/intel/pagerduty/services.py +11 -4
- cartography/intel/pagerduty/teams.py +8 -3
- cartography/intel/pagerduty/users.py +3 -1
- cartography/intel/pagerduty/vendors.py +3 -1
- cartography/intel/semgrep/__init__.py +24 -6
- cartography/intel/semgrep/dependencies.py +50 -28
- cartography/intel/semgrep/deployment.py +3 -1
- cartography/intel/semgrep/findings.py +42 -18
- cartography/intel/snipeit/__init__.py +17 -3
- cartography/intel/snipeit/asset.py +12 -6
- cartography/intel/snipeit/user.py +8 -5
- cartography/intel/snipeit/util.py +9 -4
- cartography/models/aws/apigateway.py +21 -17
- cartography/models/aws/apigatewaycertificate.py +28 -22
- cartography/models/aws/apigatewayresource.py +28 -20
- cartography/models/aws/apigatewaystage.py +33 -25
- cartography/models/aws/cloudtrail/__init__.py +0 -0
- cartography/models/aws/cloudtrail/trail.py +61 -0
- cartography/models/aws/dynamodb/gsi.py +30 -22
- cartography/models/aws/dynamodb/tables.py +25 -17
- cartography/models/aws/ec2/auto_scaling_groups.py +102 -82
- cartography/models/aws/ec2/images.py +36 -34
- cartography/models/aws/ec2/instances.py +51 -45
- cartography/models/aws/ec2/keypair.py +21 -16
- cartography/models/aws/ec2/keypair_instance.py +28 -21
- cartography/models/aws/ec2/launch_configurations.py +30 -26
- cartography/models/aws/ec2/launch_template_versions.py +48 -38
- cartography/models/aws/ec2/launch_templates.py +21 -17
- cartography/models/aws/ec2/load_balancer_listeners.py +27 -23
- cartography/models/aws/ec2/load_balancers.py +47 -37
- cartography/models/aws/ec2/network_acl_rules.py +38 -30
- cartography/models/aws/ec2/network_acls.py +38 -29
- cartography/models/aws/ec2/networkinterface_instance.py +52 -39
- cartography/models/aws/ec2/networkinterfaces.py +53 -37
- cartography/models/aws/ec2/privateip_networkinterface.py +32 -22
- cartography/models/aws/ec2/reservations.py +18 -14
- cartography/models/aws/ec2/route_table_associations.py +44 -34
- cartography/models/aws/ec2/route_tables.py +50 -43
- cartography/models/aws/ec2/routes.py +45 -37
- cartography/models/aws/ec2/securitygroup_instance.py +29 -20
- cartography/models/aws/ec2/securitygroup_networkinterface.py +24 -15
- cartography/models/aws/ec2/subnet_instance.py +24 -19
- cartography/models/aws/ec2/subnet_networkinterface.py +40 -31
- cartography/models/aws/ec2/volumes.py +47 -40
- cartography/models/aws/eks/clusters.py +23 -21
- cartography/models/aws/emr.py +32 -30
- cartography/models/aws/iam/instanceprofile.py +33 -24
- cartography/models/aws/identitycenter/awsidentitycenter.py +18 -14
- cartography/models/aws/identitycenter/awspermissionset.py +37 -29
- cartography/models/aws/identitycenter/awsssouser.py +23 -21
- cartography/models/aws/inspector/findings.py +77 -65
- cartography/models/aws/inspector/packages.py +35 -29
- cartography/models/aws/s3/__init__.py +0 -0
- cartography/models/aws/s3/account_public_access_block.py +51 -0
- cartography/models/aws/sns/__init__.py +0 -0
- cartography/models/aws/sns/topic.py +50 -0
- cartography/models/aws/ssm/instance_information.py +51 -39
- cartography/models/aws/ssm/instance_patch.py +32 -26
- cartography/models/bigfix/bigfix_computer.py +42 -38
- cartography/models/bigfix/bigfix_root.py +3 -3
- cartography/models/core/common.py +12 -10
- cartography/models/core/nodes.py +5 -2
- cartography/models/core/relationships.py +14 -6
- cartography/models/crowdstrike/hosts.py +37 -35
- cartography/models/cve/cve.py +34 -32
- cartography/models/cve/cve_feed.py +6 -6
- cartography/models/digitalocean/__init__.py +0 -0
- cartography/models/digitalocean/account.py +21 -0
- cartography/models/digitalocean/droplet.py +56 -0
- cartography/models/digitalocean/project.py +48 -0
- cartography/models/duo/api_host.py +3 -3
- cartography/models/duo/endpoint.py +43 -41
- cartography/models/duo/group.py +14 -14
- cartography/models/duo/phone.py +27 -27
- cartography/models/duo/token.py +16 -16
- cartography/models/duo/user.py +46 -44
- cartography/models/duo/web_authn_credential.py +27 -19
- cartography/models/entra/ou.py +48 -0
- cartography/models/entra/tenant.py +24 -18
- cartography/models/entra/user.py +64 -48
- cartography/models/gcp/iam.py +23 -23
- cartography/models/github/orgs.py +5 -4
- cartography/models/github/teams.py +37 -31
- cartography/models/github/users.py +34 -23
- cartography/models/kandji/device.py +22 -16
- cartography/models/kandji/tenant.py +6 -4
- cartography/models/lastpass/tenant.py +3 -3
- cartography/models/lastpass/user.py +32 -28
- cartography/models/semgrep/dependencies.py +36 -24
- cartography/models/semgrep/deployment.py +5 -5
- cartography/models/semgrep/findings.py +58 -42
- cartography/models/semgrep/locations.py +27 -21
- cartography/models/snipeit/asset.py +30 -21
- cartography/models/snipeit/tenant.py +6 -4
- cartography/models/snipeit/user.py +19 -12
- cartography/stats.py +3 -3
- cartography/sync.py +107 -31
- cartography/util.py +84 -62
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/METADATA +3 -14
- cartography-0.103.0rc1.dist-info/RECORD +396 -0
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/WHEEL +1 -1
- cartography-0.102.0rc2.dist-info/RECORD +0 -381
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/entry_points.txt +0 -0
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/licenses/LICENSE +0 -0
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
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 CloudTrailTrailNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("TrailARN")
|
|
16
|
+
arn: PropertyRef = PropertyRef("TrailARN")
|
|
17
|
+
name: PropertyRef = PropertyRef("Name")
|
|
18
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
19
|
+
cloudwatch_logs_log_group_arn: PropertyRef = PropertyRef(
|
|
20
|
+
"CloudWatchLogsLogGroupArn"
|
|
21
|
+
)
|
|
22
|
+
cloudwatch_logs_role_arn: PropertyRef = PropertyRef("CloudWatchLogsRoleArn")
|
|
23
|
+
has_custom_event_selectors: PropertyRef = PropertyRef("HasCustomEventSelectors")
|
|
24
|
+
has_insight_selectors: PropertyRef = PropertyRef("HasInsightSelectors")
|
|
25
|
+
home_region: PropertyRef = PropertyRef("HomeRegion")
|
|
26
|
+
include_global_service_events: PropertyRef = PropertyRef(
|
|
27
|
+
"IncludeGlobalServiceEvents"
|
|
28
|
+
)
|
|
29
|
+
is_multi_region_trail: PropertyRef = PropertyRef("IsMultiRegionTrail")
|
|
30
|
+
is_organization_trail: PropertyRef = PropertyRef("IsOrganizationTrail")
|
|
31
|
+
kms_key_id: PropertyRef = PropertyRef("KmsKeyId")
|
|
32
|
+
log_file_validation_enabled: PropertyRef = PropertyRef("LogFileValidationEnabled")
|
|
33
|
+
s3_bucket_name: PropertyRef = PropertyRef("S3BucketName")
|
|
34
|
+
s3_key_prefix: PropertyRef = PropertyRef("S3KeyPrefix")
|
|
35
|
+
sns_topic_arn: PropertyRef = PropertyRef("SnsTopicARN")
|
|
36
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@dataclass(frozen=True)
|
|
40
|
+
class CloudTrailTrailToAwsAccountRelProperties(CartographyRelProperties):
|
|
41
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass(frozen=True)
|
|
45
|
+
class CloudTrailToAWSAccountRel(CartographyRelSchema):
|
|
46
|
+
target_node_label: str = "AWSAccount"
|
|
47
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
48
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
49
|
+
)
|
|
50
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
51
|
+
rel_label: str = "RESOURCE"
|
|
52
|
+
properties: CloudTrailTrailToAwsAccountRelProperties = (
|
|
53
|
+
CloudTrailTrailToAwsAccountRelProperties()
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@dataclass(frozen=True)
|
|
58
|
+
class CloudTrailTrailSchema(CartographyNodeSchema):
|
|
59
|
+
label: str = "CloudTrailTrail"
|
|
60
|
+
properties: CloudTrailTrailNodeProperties = CloudTrailTrailNodeProperties()
|
|
61
|
+
sub_resource_relationship: CloudTrailToAWSAccountRel = CloudTrailToAWSAccountRel()
|
|
@@ -13,56 +13,64 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
13
13
|
|
|
14
14
|
@dataclass(frozen=True)
|
|
15
15
|
class DynamoDBGSINodeProperties(CartographyNodeProperties):
|
|
16
|
-
id: PropertyRef = PropertyRef(
|
|
17
|
-
arn: PropertyRef = PropertyRef(
|
|
18
|
-
name: PropertyRef = PropertyRef(
|
|
19
|
-
region: PropertyRef = PropertyRef(
|
|
20
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
21
|
-
provisioned_throughput_read_capacity_units: PropertyRef = PropertyRef(
|
|
22
|
-
|
|
16
|
+
id: PropertyRef = PropertyRef("Arn")
|
|
17
|
+
arn: PropertyRef = PropertyRef("Arn")
|
|
18
|
+
name: PropertyRef = PropertyRef("GSIName")
|
|
19
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
20
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
21
|
+
provisioned_throughput_read_capacity_units: PropertyRef = PropertyRef(
|
|
22
|
+
"ProvisionedThroughputReadCapacityUnits",
|
|
23
|
+
)
|
|
24
|
+
provisioned_throughput_write_capacity_units: PropertyRef = PropertyRef(
|
|
25
|
+
"ProvisionedThroughputWriteCapacityUnits",
|
|
26
|
+
)
|
|
23
27
|
|
|
24
28
|
|
|
25
29
|
@dataclass(frozen=True)
|
|
26
|
-
class
|
|
27
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
30
|
+
class DynamoDBGSIToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
31
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
28
32
|
|
|
29
33
|
|
|
30
34
|
@dataclass(frozen=True)
|
|
31
35
|
# (:DynamoDBGlobalSecondaryIndex)<-[:RESOURCE]-(:AWSAccount)
|
|
32
|
-
class
|
|
33
|
-
target_node_label: str =
|
|
36
|
+
class DynamoDBGSIToAWSAccountRel(CartographyRelSchema):
|
|
37
|
+
target_node_label: str = "AWSAccount"
|
|
34
38
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
35
|
-
{
|
|
39
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
36
40
|
)
|
|
37
41
|
direction: LinkDirection = LinkDirection.INWARD
|
|
38
42
|
rel_label: str = "RESOURCE"
|
|
39
|
-
properties:
|
|
43
|
+
properties: DynamoDBGSIToAWSAccountRelRelProperties = (
|
|
44
|
+
DynamoDBGSIToAWSAccountRelRelProperties()
|
|
45
|
+
)
|
|
40
46
|
|
|
41
47
|
|
|
42
48
|
@dataclass(frozen=True)
|
|
43
|
-
class
|
|
44
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
49
|
+
class DynamoDBGSIToDynamoDBTableRelRelProperties(CartographyRelProperties):
|
|
50
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
45
51
|
|
|
46
52
|
|
|
47
53
|
@dataclass(frozen=True)
|
|
48
54
|
# (:DynamoDBGlobalSecondaryIndex)<-[:GLOBAL_SECONDARY_INDEX]-(:DynamoDBTable)
|
|
49
|
-
class
|
|
50
|
-
target_node_label: str =
|
|
55
|
+
class DynamoDBGSIToDynamoDBTableRel(CartographyRelSchema):
|
|
56
|
+
target_node_label: str = "DynamoDBTable"
|
|
51
57
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
52
|
-
{
|
|
58
|
+
{"arn": PropertyRef("TableArn")},
|
|
53
59
|
)
|
|
54
60
|
direction: LinkDirection = LinkDirection.INWARD
|
|
55
61
|
rel_label: str = "GLOBAL_SECONDARY_INDEX"
|
|
56
|
-
properties:
|
|
62
|
+
properties: DynamoDBGSIToDynamoDBTableRelRelProperties = (
|
|
63
|
+
DynamoDBGSIToDynamoDBTableRelRelProperties()
|
|
64
|
+
)
|
|
57
65
|
|
|
58
66
|
|
|
59
67
|
@dataclass(frozen=True)
|
|
60
68
|
class DynamoDBGSISchema(CartographyNodeSchema):
|
|
61
|
-
label: str =
|
|
69
|
+
label: str = "DynamoDBGlobalSecondaryIndex"
|
|
62
70
|
properties: DynamoDBGSINodeProperties = DynamoDBGSINodeProperties()
|
|
63
|
-
sub_resource_relationship:
|
|
71
|
+
sub_resource_relationship: DynamoDBGSIToAWSAccountRel = DynamoDBGSIToAWSAccountRel()
|
|
64
72
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
65
73
|
[
|
|
66
|
-
|
|
74
|
+
DynamoDBGSIToDynamoDBTableRel(),
|
|
67
75
|
],
|
|
68
76
|
)
|
|
@@ -12,36 +12,44 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
12
12
|
|
|
13
13
|
@dataclass(frozen=True)
|
|
14
14
|
class DynamoDBTableNodeProperties(CartographyNodeProperties):
|
|
15
|
-
id: PropertyRef = PropertyRef(
|
|
16
|
-
arn: PropertyRef = PropertyRef(
|
|
17
|
-
name: PropertyRef = PropertyRef(
|
|
18
|
-
region: PropertyRef = PropertyRef(
|
|
19
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
20
|
-
rows: PropertyRef = PropertyRef(
|
|
21
|
-
size: PropertyRef = PropertyRef(
|
|
22
|
-
provisioned_throughput_read_capacity_units: PropertyRef = PropertyRef(
|
|
23
|
-
|
|
15
|
+
id: PropertyRef = PropertyRef("Arn")
|
|
16
|
+
arn: PropertyRef = PropertyRef("Arn")
|
|
17
|
+
name: PropertyRef = PropertyRef("TableName")
|
|
18
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
19
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
20
|
+
rows: PropertyRef = PropertyRef("Rows")
|
|
21
|
+
size: PropertyRef = PropertyRef("Size")
|
|
22
|
+
provisioned_throughput_read_capacity_units: PropertyRef = PropertyRef(
|
|
23
|
+
"ProvisionedThroughputReadCapacityUnits",
|
|
24
|
+
)
|
|
25
|
+
provisioned_throughput_write_capacity_units: PropertyRef = PropertyRef(
|
|
26
|
+
"ProvisionedThroughputWriteCapacityUnits",
|
|
27
|
+
)
|
|
24
28
|
|
|
25
29
|
|
|
26
30
|
@dataclass(frozen=True)
|
|
27
|
-
class
|
|
28
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
31
|
+
class DynamoDBTableToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
32
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
29
33
|
|
|
30
34
|
|
|
31
35
|
@dataclass(frozen=True)
|
|
32
36
|
# (:DynamoDBTable)<-[:RESOURCE]-(:AWSAccount)
|
|
33
|
-
class
|
|
34
|
-
target_node_label: str =
|
|
37
|
+
class DynamoDBTableToAWSAccountRel(CartographyRelSchema):
|
|
38
|
+
target_node_label: str = "AWSAccount"
|
|
35
39
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
36
|
-
{
|
|
40
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
37
41
|
)
|
|
38
42
|
direction: LinkDirection = LinkDirection.INWARD
|
|
39
43
|
rel_label: str = "RESOURCE"
|
|
40
|
-
properties:
|
|
44
|
+
properties: DynamoDBTableToAWSAccountRelRelProperties = (
|
|
45
|
+
DynamoDBTableToAWSAccountRelRelProperties()
|
|
46
|
+
)
|
|
41
47
|
|
|
42
48
|
|
|
43
49
|
@dataclass(frozen=True)
|
|
44
50
|
class DynamoDBTableSchema(CartographyNodeSchema):
|
|
45
|
-
label: str =
|
|
51
|
+
label: str = "DynamoDBTable"
|
|
46
52
|
properties: DynamoDBTableNodeProperties = DynamoDBTableNodeProperties()
|
|
47
|
-
sub_resource_relationship:
|
|
53
|
+
sub_resource_relationship: DynamoDBTableToAWSAccountRel = (
|
|
54
|
+
DynamoDBTableToAWSAccountRel()
|
|
55
|
+
)
|
|
@@ -13,192 +13,212 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
13
13
|
|
|
14
14
|
@dataclass(frozen=True)
|
|
15
15
|
class AutoScalingGroupNodeProperties(CartographyNodeProperties):
|
|
16
|
-
id: PropertyRef = PropertyRef(
|
|
17
|
-
arn: PropertyRef = PropertyRef(
|
|
18
|
-
capacityrebalance: PropertyRef = PropertyRef(
|
|
19
|
-
createdtime: PropertyRef = PropertyRef(
|
|
20
|
-
defaultcooldown: PropertyRef = PropertyRef(
|
|
21
|
-
desiredcapacity: PropertyRef = PropertyRef(
|
|
22
|
-
healthcheckgraceperiod: PropertyRef = PropertyRef(
|
|
23
|
-
healthchecktype: PropertyRef = PropertyRef(
|
|
24
|
-
launchconfigurationname: PropertyRef = PropertyRef(
|
|
25
|
-
launchtemplatename: PropertyRef = PropertyRef(
|
|
26
|
-
launchtemplateid: PropertyRef = PropertyRef(
|
|
27
|
-
launchtemplateversion: PropertyRef = PropertyRef(
|
|
28
|
-
maxinstancelifetime: PropertyRef = PropertyRef(
|
|
29
|
-
maxsize: PropertyRef = PropertyRef(
|
|
30
|
-
minsize: PropertyRef = PropertyRef(
|
|
31
|
-
name: PropertyRef = PropertyRef(
|
|
32
|
-
newinstancesprotectedfromscalein: PropertyRef = PropertyRef(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
id: PropertyRef = PropertyRef("AutoScalingGroupARN")
|
|
17
|
+
arn: PropertyRef = PropertyRef("AutoScalingGroupARN")
|
|
18
|
+
capacityrebalance: PropertyRef = PropertyRef("CapacityRebalance")
|
|
19
|
+
createdtime: PropertyRef = PropertyRef("CreatedTime")
|
|
20
|
+
defaultcooldown: PropertyRef = PropertyRef("DefaultCooldown")
|
|
21
|
+
desiredcapacity: PropertyRef = PropertyRef("DesiredCapacity")
|
|
22
|
+
healthcheckgraceperiod: PropertyRef = PropertyRef("HealthCheckGracePeriod")
|
|
23
|
+
healthchecktype: PropertyRef = PropertyRef("HealthCheckType")
|
|
24
|
+
launchconfigurationname: PropertyRef = PropertyRef("LaunchConfigurationName")
|
|
25
|
+
launchtemplatename: PropertyRef = PropertyRef("LaunchTemplateName")
|
|
26
|
+
launchtemplateid: PropertyRef = PropertyRef("LaunchTemplateId")
|
|
27
|
+
launchtemplateversion: PropertyRef = PropertyRef("LaunchTemplateVersion")
|
|
28
|
+
maxinstancelifetime: PropertyRef = PropertyRef("MaxInstanceLifetime")
|
|
29
|
+
maxsize: PropertyRef = PropertyRef("MaxSize")
|
|
30
|
+
minsize: PropertyRef = PropertyRef("MinSize")
|
|
31
|
+
name: PropertyRef = PropertyRef("AutoScalingGroupName")
|
|
32
|
+
newinstancesprotectedfromscalein: PropertyRef = PropertyRef(
|
|
33
|
+
"NewInstancesProtectedFromScaleIn",
|
|
34
|
+
)
|
|
35
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
36
|
+
status: PropertyRef = PropertyRef("Status")
|
|
37
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
36
38
|
|
|
37
39
|
|
|
38
40
|
# EC2 to AutoScalingGroup
|
|
39
41
|
@dataclass(frozen=True)
|
|
40
|
-
class
|
|
41
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
42
|
+
class EC2InstanceToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
43
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
@dataclass(frozen=True)
|
|
45
|
-
class
|
|
46
|
-
target_node_label: str =
|
|
47
|
+
class EC2InstanceToAWSAccountRel(CartographyRelSchema):
|
|
48
|
+
target_node_label: str = "AWSAccount"
|
|
47
49
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
48
|
-
{
|
|
50
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
49
51
|
)
|
|
50
52
|
direction: LinkDirection = LinkDirection.INWARD
|
|
51
53
|
rel_label: str = "RESOURCE"
|
|
52
|
-
properties:
|
|
54
|
+
properties: EC2InstanceToAWSAccountRelRelProperties = (
|
|
55
|
+
EC2InstanceToAWSAccountRelRelProperties()
|
|
56
|
+
)
|
|
53
57
|
|
|
54
58
|
|
|
55
59
|
@dataclass(frozen=True)
|
|
56
|
-
class
|
|
57
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
60
|
+
class EC2InstanceToAutoScalingGroupRelRelProperties(CartographyRelProperties):
|
|
61
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
58
62
|
|
|
59
63
|
|
|
60
64
|
@dataclass(frozen=True)
|
|
61
|
-
class
|
|
62
|
-
target_node_label: str =
|
|
65
|
+
class EC2InstanceToAutoScalingGroupRel(CartographyRelSchema):
|
|
66
|
+
target_node_label: str = "AutoScalingGroup"
|
|
63
67
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
64
|
-
{
|
|
68
|
+
{"id": PropertyRef("AutoScalingGroupARN")},
|
|
65
69
|
)
|
|
66
70
|
direction: LinkDirection = LinkDirection.OUTWARD
|
|
67
71
|
rel_label: str = "MEMBER_AUTO_SCALE_GROUP"
|
|
68
|
-
properties:
|
|
72
|
+
properties: EC2InstanceToAutoScalingGroupRelRelProperties = (
|
|
73
|
+
EC2InstanceToAutoScalingGroupRelRelProperties()
|
|
74
|
+
)
|
|
69
75
|
|
|
70
76
|
|
|
71
77
|
@dataclass(frozen=True)
|
|
72
78
|
class EC2InstanceAutoScalingGroupProperties(CartographyNodeProperties):
|
|
73
|
-
id: PropertyRef = PropertyRef(
|
|
74
|
-
instanceid: PropertyRef = PropertyRef(
|
|
75
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
76
|
-
region: PropertyRef = PropertyRef(
|
|
79
|
+
id: PropertyRef = PropertyRef("InstanceId")
|
|
80
|
+
instanceid: PropertyRef = PropertyRef("InstanceId", extra_index=True)
|
|
81
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
82
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
77
83
|
|
|
78
84
|
|
|
79
85
|
@dataclass(frozen=True)
|
|
80
86
|
class EC2InstanceAutoScalingGroupSchema(CartographyNodeSchema):
|
|
81
|
-
label: str =
|
|
82
|
-
properties: EC2InstanceAutoScalingGroupProperties =
|
|
83
|
-
|
|
87
|
+
label: str = "EC2Instance"
|
|
88
|
+
properties: EC2InstanceAutoScalingGroupProperties = (
|
|
89
|
+
EC2InstanceAutoScalingGroupProperties()
|
|
90
|
+
)
|
|
91
|
+
sub_resource_relationship: EC2InstanceToAWSAccountRel = EC2InstanceToAWSAccountRel()
|
|
84
92
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
85
93
|
[
|
|
86
|
-
|
|
94
|
+
EC2InstanceToAutoScalingGroupRel(),
|
|
87
95
|
],
|
|
88
96
|
)
|
|
89
97
|
|
|
90
98
|
|
|
91
99
|
# EC2Subnet to AutoScalingGroup
|
|
92
100
|
@dataclass(frozen=True)
|
|
93
|
-
class
|
|
94
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
101
|
+
class EC2SubnetToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
102
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
95
103
|
|
|
96
104
|
|
|
97
105
|
@dataclass(frozen=True)
|
|
98
|
-
class
|
|
99
|
-
target_node_label: str =
|
|
106
|
+
class EC2SubnetToAWSAccountRel(CartographyRelSchema):
|
|
107
|
+
target_node_label: str = "AWSAccount"
|
|
100
108
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
101
|
-
{
|
|
109
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
102
110
|
)
|
|
103
111
|
direction: LinkDirection = LinkDirection.INWARD
|
|
104
112
|
rel_label: str = "RESOURCE"
|
|
105
|
-
properties:
|
|
113
|
+
properties: EC2SubnetToAWSAccountRelRelProperties = (
|
|
114
|
+
EC2SubnetToAWSAccountRelRelProperties()
|
|
115
|
+
)
|
|
106
116
|
|
|
107
117
|
|
|
108
118
|
@dataclass(frozen=True)
|
|
109
|
-
class
|
|
110
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
119
|
+
class EC2SubnetToAutoScalingGroupRelRelProperties(CartographyRelProperties):
|
|
120
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
111
121
|
|
|
112
122
|
|
|
113
123
|
@dataclass(frozen=True)
|
|
114
|
-
class
|
|
115
|
-
target_node_label: str =
|
|
124
|
+
class EC2SubnetToAutoScalingGroupRel(CartographyRelSchema):
|
|
125
|
+
target_node_label: str = "AutoScalingGroup"
|
|
116
126
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
117
|
-
{
|
|
127
|
+
{"id": PropertyRef("AutoScalingGroupARN")},
|
|
118
128
|
)
|
|
119
129
|
direction: LinkDirection = LinkDirection.INWARD
|
|
120
130
|
rel_label: str = "VPC_IDENTIFIER"
|
|
121
|
-
properties:
|
|
131
|
+
properties: EC2SubnetToAutoScalingGroupRelRelProperties = (
|
|
132
|
+
EC2SubnetToAutoScalingGroupRelRelProperties()
|
|
133
|
+
)
|
|
122
134
|
|
|
123
135
|
|
|
124
136
|
@dataclass(frozen=True)
|
|
125
137
|
class EC2SubnetAutoScalingGroupNodeProperties(CartographyNodeProperties):
|
|
126
|
-
id: PropertyRef = PropertyRef(
|
|
127
|
-
subnetid: PropertyRef = PropertyRef(
|
|
128
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
138
|
+
id: PropertyRef = PropertyRef("VPCZoneIdentifier")
|
|
139
|
+
subnetid: PropertyRef = PropertyRef("VPCZoneIdentifier", extra_index=True)
|
|
140
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
129
141
|
|
|
130
142
|
|
|
131
143
|
@dataclass(frozen=True)
|
|
132
144
|
class EC2SubnetAutoScalingGroupSchema(CartographyNodeSchema):
|
|
133
|
-
label: str =
|
|
134
|
-
properties: EC2SubnetAutoScalingGroupNodeProperties =
|
|
135
|
-
|
|
145
|
+
label: str = "EC2Subnet"
|
|
146
|
+
properties: EC2SubnetAutoScalingGroupNodeProperties = (
|
|
147
|
+
EC2SubnetAutoScalingGroupNodeProperties()
|
|
148
|
+
)
|
|
149
|
+
sub_resource_relationship: EC2SubnetToAWSAccountRel = EC2SubnetToAWSAccountRel()
|
|
136
150
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
137
151
|
[
|
|
138
|
-
|
|
152
|
+
EC2SubnetToAutoScalingGroupRel(),
|
|
139
153
|
],
|
|
140
154
|
)
|
|
141
155
|
|
|
142
156
|
|
|
143
157
|
# AutoScalingGroup
|
|
144
158
|
@dataclass(frozen=True)
|
|
145
|
-
class
|
|
146
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
159
|
+
class AutoScalingGroupToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
160
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
147
161
|
|
|
148
162
|
|
|
149
163
|
@dataclass(frozen=True)
|
|
150
|
-
class
|
|
151
|
-
target_node_label: str =
|
|
164
|
+
class AutoScalingGroupToAWSAccountRel(CartographyRelSchema):
|
|
165
|
+
target_node_label: str = "AWSAccount"
|
|
152
166
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
153
|
-
{
|
|
167
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
154
168
|
)
|
|
155
169
|
direction: LinkDirection = LinkDirection.INWARD
|
|
156
170
|
rel_label: str = "RESOURCE"
|
|
157
|
-
properties:
|
|
171
|
+
properties: AutoScalingGroupToAWSAccountRelRelProperties = (
|
|
172
|
+
AutoScalingGroupToAWSAccountRelRelProperties()
|
|
173
|
+
)
|
|
158
174
|
|
|
159
175
|
|
|
160
176
|
@dataclass(frozen=True)
|
|
161
|
-
class
|
|
162
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
177
|
+
class AutoScalingGroupToLaunchTemplateRelRelProperties(CartographyRelProperties):
|
|
178
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
163
179
|
|
|
164
180
|
|
|
165
181
|
@dataclass(frozen=True)
|
|
166
|
-
class
|
|
167
|
-
target_node_label: str =
|
|
182
|
+
class AutoScalingGroupToLaunchTemplateRel(CartographyRelSchema):
|
|
183
|
+
target_node_label: str = "LaunchTemplate"
|
|
168
184
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
169
|
-
{
|
|
185
|
+
{"id": PropertyRef("LaunchTemplateId")},
|
|
170
186
|
)
|
|
171
187
|
direction: LinkDirection = LinkDirection.OUTWARD
|
|
172
188
|
rel_label: str = "HAS_LAUNCH_TEMPLATE"
|
|
173
|
-
properties:
|
|
189
|
+
properties: AutoScalingGroupToLaunchTemplateRelRelProperties = (
|
|
190
|
+
AutoScalingGroupToLaunchTemplateRelRelProperties()
|
|
191
|
+
)
|
|
174
192
|
|
|
175
193
|
|
|
176
194
|
@dataclass(frozen=True)
|
|
177
|
-
class
|
|
178
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
195
|
+
class AutoScalingGroupToLaunchConfigurationRelRelProperties(CartographyRelProperties):
|
|
196
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
179
197
|
|
|
180
198
|
|
|
181
199
|
@dataclass(frozen=True)
|
|
182
|
-
class
|
|
183
|
-
target_node_label: str =
|
|
200
|
+
class AutoScalingGroupToLaunchConfigurationRel(CartographyRelSchema):
|
|
201
|
+
target_node_label: str = "LaunchConfiguration"
|
|
184
202
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
185
|
-
{
|
|
203
|
+
{"name": PropertyRef("LaunchConfigurationName")},
|
|
186
204
|
)
|
|
187
205
|
direction: LinkDirection = LinkDirection.OUTWARD
|
|
188
206
|
rel_label: str = "HAS_LAUNCH_CONFIG"
|
|
189
|
-
properties:
|
|
190
|
-
|
|
207
|
+
properties: AutoScalingGroupToLaunchConfigurationRelRelProperties = (
|
|
208
|
+
AutoScalingGroupToLaunchConfigurationRelRelProperties()
|
|
191
209
|
)
|
|
192
210
|
|
|
193
211
|
|
|
194
212
|
@dataclass(frozen=True)
|
|
195
213
|
class AutoScalingGroupSchema(CartographyNodeSchema):
|
|
196
|
-
label: str =
|
|
214
|
+
label: str = "AutoScalingGroup"
|
|
197
215
|
properties: AutoScalingGroupNodeProperties = AutoScalingGroupNodeProperties()
|
|
198
|
-
sub_resource_relationship:
|
|
216
|
+
sub_resource_relationship: AutoScalingGroupToAWSAccountRel = (
|
|
217
|
+
AutoScalingGroupToAWSAccountRel()
|
|
218
|
+
)
|
|
199
219
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
200
220
|
[
|
|
201
|
-
|
|
202
|
-
|
|
221
|
+
AutoScalingGroupToLaunchTemplateRel(),
|
|
222
|
+
AutoScalingGroupToLaunchConfigurationRel(),
|
|
203
223
|
],
|
|
204
224
|
)
|
|
@@ -12,52 +12,54 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
12
12
|
|
|
13
13
|
@dataclass(frozen=True)
|
|
14
14
|
class EC2ImageNodeProperties(CartographyNodeProperties):
|
|
15
|
-
id: PropertyRef = PropertyRef(
|
|
16
|
-
imageid: PropertyRef = PropertyRef(
|
|
17
|
-
name: PropertyRef = PropertyRef(
|
|
18
|
-
creationdate: PropertyRef = PropertyRef(
|
|
19
|
-
architecture: PropertyRef = PropertyRef(
|
|
20
|
-
location: PropertyRef = PropertyRef(
|
|
21
|
-
type: PropertyRef = PropertyRef(
|
|
22
|
-
ispublic: PropertyRef = PropertyRef(
|
|
23
|
-
platform: PropertyRef = PropertyRef(
|
|
24
|
-
platform_details: PropertyRef = PropertyRef(
|
|
25
|
-
usageoperation: PropertyRef = PropertyRef(
|
|
26
|
-
state: PropertyRef = PropertyRef(
|
|
27
|
-
description: PropertyRef = PropertyRef(
|
|
28
|
-
enasupport: PropertyRef = PropertyRef(
|
|
29
|
-
hypervisor: PropertyRef = PropertyRef(
|
|
30
|
-
rootdevicename: PropertyRef = PropertyRef(
|
|
31
|
-
rootdevicetype: PropertyRef = PropertyRef(
|
|
32
|
-
virtualizationtype: PropertyRef = PropertyRef(
|
|
33
|
-
sriov_net_support: PropertyRef = PropertyRef(
|
|
34
|
-
bootmode: PropertyRef = PropertyRef(
|
|
35
|
-
owner: PropertyRef = PropertyRef(
|
|
36
|
-
image_owner_alias: PropertyRef = PropertyRef(
|
|
37
|
-
kernel_id: PropertyRef = PropertyRef(
|
|
38
|
-
ramdisk_id: PropertyRef = PropertyRef(
|
|
39
|
-
region: PropertyRef = PropertyRef(
|
|
40
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
15
|
+
id: PropertyRef = PropertyRef("ID")
|
|
16
|
+
imageid: PropertyRef = PropertyRef("ImageId", extra_index=True)
|
|
17
|
+
name: PropertyRef = PropertyRef("Name", extra_index=True)
|
|
18
|
+
creationdate: PropertyRef = PropertyRef("CreationDate")
|
|
19
|
+
architecture: PropertyRef = PropertyRef("Architecture")
|
|
20
|
+
location: PropertyRef = PropertyRef("ImageLocation")
|
|
21
|
+
type: PropertyRef = PropertyRef("ImageType")
|
|
22
|
+
ispublic: PropertyRef = PropertyRef("Public")
|
|
23
|
+
platform: PropertyRef = PropertyRef("Platform")
|
|
24
|
+
platform_details: PropertyRef = PropertyRef("PlatformDetails")
|
|
25
|
+
usageoperation: PropertyRef = PropertyRef("UsageOperation")
|
|
26
|
+
state: PropertyRef = PropertyRef("State")
|
|
27
|
+
description: PropertyRef = PropertyRef("Description")
|
|
28
|
+
enasupport: PropertyRef = PropertyRef("EnaSupport")
|
|
29
|
+
hypervisor: PropertyRef = PropertyRef("Hypervisor")
|
|
30
|
+
rootdevicename: PropertyRef = PropertyRef("RootDeviceName")
|
|
31
|
+
rootdevicetype: PropertyRef = PropertyRef("RootDeviceType")
|
|
32
|
+
virtualizationtype: PropertyRef = PropertyRef("VirtualizationType")
|
|
33
|
+
sriov_net_support: PropertyRef = PropertyRef("SriovNetSupport")
|
|
34
|
+
bootmode: PropertyRef = PropertyRef("BootMode")
|
|
35
|
+
owner: PropertyRef = PropertyRef("OwnerId")
|
|
36
|
+
image_owner_alias: PropertyRef = PropertyRef("ImageOwnerAlias")
|
|
37
|
+
kernel_id: PropertyRef = PropertyRef("KernelId")
|
|
38
|
+
ramdisk_id: PropertyRef = PropertyRef("RamdiskId")
|
|
39
|
+
region: PropertyRef = PropertyRef("Region")
|
|
40
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
@dataclass(frozen=True)
|
|
44
|
-
class
|
|
45
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
44
|
+
class EC2ImageToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
45
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
@dataclass(frozen=True)
|
|
49
|
-
class
|
|
50
|
-
target_node_label: str =
|
|
49
|
+
class EC2ImageToAWSAccountRel(CartographyRelSchema):
|
|
50
|
+
target_node_label: str = "AWSAccount"
|
|
51
51
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
52
|
-
{
|
|
52
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
53
53
|
)
|
|
54
54
|
direction: LinkDirection = LinkDirection.INWARD
|
|
55
55
|
rel_label: str = "RESOURCE"
|
|
56
|
-
properties:
|
|
56
|
+
properties: EC2ImageToAWSAccountRelRelProperties = (
|
|
57
|
+
EC2ImageToAWSAccountRelRelProperties()
|
|
58
|
+
)
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
@dataclass(frozen=True)
|
|
60
62
|
class EC2ImageSchema(CartographyNodeSchema):
|
|
61
|
-
label: str =
|
|
63
|
+
label: str = "EC2Image"
|
|
62
64
|
properties: EC2ImageNodeProperties = EC2ImageNodeProperties()
|
|
63
|
-
sub_resource_relationship:
|
|
65
|
+
sub_resource_relationship: EC2ImageToAWSAccountRel = EC2ImageToAWSAccountRel()
|