config_list_discovered_resources
List AWS Config-discovered resources by type and region to identify and manage cloud assets.
Instructions
List resource identifiers that AWS Config has discovered.
Parameters:
aws_region (str): The AWS region - use 'us-east-1' if not specified.
resource_type (str): e.g. 'AWS::EC2::Instance'.
Returns:
JSON list of resourceIdentifier objects.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aws_region | Yes | ||
| resource_type | Yes |
Implementation Reference
- server.py:703-720 (handler)The main handler function for the 'config_list_discovered_resources' tool. It uses AWS Config client to paginate and list discovered resources of a given type in the specified region, returning JSON.@mcp.tool() async def config_list_discovered_resources(aws_region: str, resource_type: str) -> str: """ List resource identifiers that AWS Config has discovered. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. resource_type (str): e.g. 'AWS::EC2::Instance'. Returns: JSON list of resourceIdentifier objects. """ client = boto3.client('config', region_name=aws_region) paginator = client.get_paginator('list_discovered_resources') all_resources = [] for page in paginator.paginate(resourceType=resource_type): all_resources.extend(page.get('resourceIdentifiers', [])) return json.dumps(all_resources, indent=2)
- server.py:703-703 (registration)The @mcp.tool() decorator registers this function as an MCP tool.@mcp.tool()