/** * Shared helpers for collecting and grouping resources from CloudFormation templates. */ import type { CloudFormationResource } from '../../../types/analysis.types'; /** * Collect all resources of a given type from the template. */ export declare const collectByType: (resources: Record, type: string) => Array<[string, CloudFormationResource]>; /** * Group EventBridge rules by their DLQ target ARN (resolves Ref/GetAtt). * Returns a map of DLQ logical resource ID → array of rule logical resource IDs. */ export declare const groupEventBridgeRulesByDlqTarget: (resources: Record) => Map; /** * Group EventBridge rules by their event bus name. * Rules without an explicit EventBusName are grouped under "default". */ export declare const groupEventBridgeRulesByBus: (resources: Record) => Map; /** * Find the SQS queue resource that an SQS::QueuePolicy applies to. * Returns the first resolvable queue logical ID. */ export declare const findQueueForPolicy: (policyResource: CloudFormationResource, allResourceIds: Set) => string | null; /** * Collect all ingress rules that apply to a security group, folding together * both the inline `Properties.SecurityGroupIngress` array and any standalone * `AWS::EC2::SecurityGroupIngress` resources whose `GroupId` resolves to the SG. * * This mirrors the resolution used by {@link countSecurityGroupRules} but * returns the rule objects themselves so callers can inspect CidrIp / ports. */ export declare const collectSecurityGroupIngressRules: (sgResourceId: string, sgResource: CloudFormationResource, resources: Record) => Array>; /** * Count inbound and outbound rules for a security group, including * both inline rules and separate SecurityGroupIngress/Egress resources. */ export declare const countSecurityGroupRules: (sgResourceId: string, sgResource: CloudFormationResource, resources: Record) => { inbound: number; outbound: number; };