networkinsights_list_analyses
List and describe network analysis results for AWS access scopes to monitor security configurations and traffic patterns.
Instructions
Describe analyses for one or more scopes.
Parameters:
aws_region (str): The AWS region - use 'us-east-1' if not specified.
scope_id (str): The ID of the access scope to filter by.
analysis_ids (list[str]): List of analysis IDs to filter by.
Returns:
JSON list of NetworkInsightsAccessScopeAnalysis objects.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aws_region | Yes | ||
| scope_id | No | ||
| analysis_ids | No |
Implementation Reference
- server.py:830-855 (handler)The main handler function for the 'networkinsights_list_analyses' MCP tool. It is decorated with @mcp.tool() for registration and implements the logic to list network insights access scope analyses using the AWS EC2 boto3 client, with optional filters by scope_id and analysis_ids.@mcp.tool() async def networkinsights_list_analyses( aws_region: str, scope_id: str = None, analysis_ids: list[str] = None ) -> str: """ Describe analyses for one or more scopes. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. scope_id (str): The ID of the access scope to filter by. analysis_ids (list[str]): List of analysis IDs to filter by. Returns: JSON list of NetworkInsightsAccessScopeAnalysis objects. """ client = boto3.client('ec2', region_name=aws_region) params = {} if scope_id: params['NetworkInsightsAccessScopeId'] = scope_id if analysis_ids: params['NetworkInsightsAccessScopeAnalysisIds'] = analysis_ids resp = client.describe_network_insights_access_scope_analyses(**params) analyses = resp.get('NetworkInsightsAccessScopeAnalyses', []) return json.dumps(analyses, indent=2, cls=DateTimeEncoder)