networkinsights_list_analyses
List and describe network insights analyses for specified AWS regions, scope IDs, or analysis IDs to filter and retrieve JSON data for Network Insights Access Scope Analysis.
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 |
|---|---|---|---|
| analysis_ids | No | ||
| aws_region | Yes | ||
| scope_id | No |
Implementation Reference
- server.py:830-856 (handler)The handler function implementing the networkinsights_list_analyses MCP tool. It uses the EC2 boto3 client to describe network insights access scope analyses based on optional filters for scope ID and analysis IDs, returning JSON-formatted results.@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)