How to use the cartography.util.run_cleanup_job function in cartography

To help you get started, we’ve selected a few cartography examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lyft / cartography / cartography / intel / aws / iam.py View on Github external
def sync_users(neo4j_session, boto3_session, current_aws_account_id, aws_update_tag, common_job_parameters):
    logger.debug("Syncing IAM users for account '%s'.", current_aws_account_id)
    data = get_user_list_data(boto3_session)
    load_users(neo4j_session, data['Users'], current_aws_account_id, aws_update_tag)
    run_cleanup_job('aws_import_users_cleanup.json', neo4j_session, common_job_parameters)
github lyft / cartography / cartography / intel / gcp / compute.py View on Github external
def cleanup_gcp_instances(neo4j_session, common_job_parameters):
    """
    Delete out-of-date GCP instance nodes and relationships
    :param neo4j_session: The Neo4j session
    :param common_job_parameters: dict of other job parameters to pass to Neo4j
    :return: Nothing
    """
    run_cleanup_job('gcp_compute_instance_cleanup.json', neo4j_session, common_job_parameters)
github lyft / cartography / cartography / intel / gcp / crm.py View on Github external
def cleanup_gcp_folders(neo4j_session, common_job_parameters):
    """
    Remove stale GCP folders and their relationships
    :param neo4j_session: The Neo4j session
    :param common_job_parameters: Parameters to carry to the cleanup job
    :return: Nothing
    """
    run_cleanup_job('gcp_crm_folder_cleanup.json', neo4j_session, common_job_parameters)
github lyft / cartography / cartography / intel / aws / rds.py View on Github external
def cleanup_rds_instances_and_db_subnet_groups(neo4j_session, common_job_parameters):
    """
    Remove RDS graph nodes and DBSubnetGroups that were created from other ingestion runs
    """
    run_cleanup_job('aws_import_rds_instances_cleanup.json', neo4j_session, common_job_parameters)
github lyft / cartography / cartography / intel / aws / elasticsearch.py View on Github external
def cleanup(neo4j_session, update_tag, aws_account_id):
    run_cleanup_job(
        'aws_import_es_cleanup.json',
        neo4j_session,
        {'UPDATE_TAG': update_tag, 'AWS_ID': aws_account_id},
    )
github lyft / cartography / cartography / intel / gsuite / api.py View on Github external
def cleanup_gsuite_users(session, common_job_parameters):
    run_cleanup_job(
        'gsuite_ingest_users_cleanup.json',
        session,
        common_job_parameters,
    )
github lyft / cartography / cartography / intel / gcp / compute.py View on Github external
def cleanup_gcp_firewall_rules(neo4j_session, common_job_parameters):
    """
    Delete out of date GCP firewalls and their relationships
    :param neo4j_session: The Neo4j session
    :param common_job_parameters: dict of other job parameters to pass to Neo4j
    :return: Nothing
    """
    run_cleanup_job('gcp_compute_firewall_cleanup.json', neo4j_session, common_job_parameters)
github lyft / cartography / cartography / intel / aws / ec2.py View on Github external
def cleanup_ec2_vpc_peering(neo4j_session, common_job_parameters):
    run_cleanup_job('aws_import_vpc_peering_cleanup.json', neo4j_session, common_job_parameters)
github lyft / cartography / cartography / intel / gcp / compute.py View on Github external
def cleanup_gcp_vpcs(neo4j_session, common_job_parameters):
    """
    Delete out-of-date GCP VPC nodes and relationships
    :param neo4j_session: The Neo4j session
    :param common_job_parameters: dict of other job parameters to pass to Neo4j
    :return: Nothing
    """
    run_cleanup_job('gcp_compute_vpc_cleanup.json', neo4j_session, common_job_parameters)
github lyft / cartography / cartography / intel / gcp / crm.py View on Github external
def cleanup_gcp_projects(neo4j_session, common_job_parameters):
    """
    Remove stale GCP projects and their relationships
    :param neo4j_session: The Neo4j session
    :param common_job_parameters: Parameters to carry to the cleanup job
    :return: Nothing
    """
    run_cleanup_job('gcp_crm_project_cleanup.json', neo4j_session, common_job_parameters)