{"library":"mypy-boto3-resourcegroupstaggingapi","title":"mypy-boto3-resourcegroupstaggingapi type stubs","description":"mypy-boto3-resourcegroupstaggingapi provides type annotations for the boto3 AWS Resource Groups Tagging API service (version 1.42.3). It is automatically generated using mypy-boto3-builder 8.12.0, ensuring up-to-date static type checking for your boto3 code. As part of the wider mypy-boto3 ecosystem, it offers robust type hints for clients, paginators, and service-specific TypeDefs, with new releases frequently aligning with boto3 updates.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install mypy-boto3-resourcegroupstaggingapi boto3"],"cli":null},"imports":["from mypy_boto3_resourcegroupstaggingapi import ResourceGroupsTaggingAPIClient","from mypy_boto3_resourcegroupstaggingapi.paginator import GetResourcesPaginator","from mypy_boto3_resourcegroupstaggingapi.type_defs import ComplianceDetailsTypeDef"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_resourcegroupstaggingapi import ResourceGroupsTaggingAPIClient\n    from mypy_boto3_resourcegroupstaggingapi.type_defs import TagResourcesOutputTypeDef\n\ndef get_resources_with_tags(region_name: str, tags: dict[str, str]) -> TagResourcesOutputTypeDef:\n    # Initialize the boto3 client with type annotation for mypy-boto3\n    client: ResourceGroupsTaggingAPIClient = boto3.client(\n        \"resourcegroupstaggingapi\",\n        region_name=region_name\n    )\n\n    # Prepare tag filters for the GetResources operation\n    tag_filters = [{\n        \"Key\": k,\n        \"Values\": [v]\n    } for k, v in tags.items()]\n\n    # Get resources with specified tags\n    response = client.get_resources(\n        TagFilters=tag_filters\n    )\n\n    print(f\"Found {len(response.get('ResourceTagMappingList', []))} resources.\")\n    for resource_mapping in response.get('ResourceTagMappingList', []):\n        print(f\"  Resource ARN: {resource_mapping.get('ResourceARN')}\")\n        print(f\"  Tags: {resource_mapping.get('Tags')}\")\n    return response\n\n# Example usage:\nif __name__ == \"__main__\":\n    # Replace 'us-east-1' with your desired AWS region\n    # Make sure your AWS credentials are configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION_NAME env vars or ~/.aws/credentials)\n    try:\n        result = get_resources_with_tags(\n            region_name=\"us-east-1\",\n            tags={\n                \"Environment\": \"Production\",\n                \"Project\": \"MyProject\"\n            }\n        )\n    except Exception as e:\n        print(f\"An error occurred: {e}\")","lang":"python","description":"This example demonstrates how to use the ResourceGroupsTaggingAPIClient with type annotations to retrieve AWS resources based on specific tags. It showcases initializing the client and making a basic API call with type-hinted input and output.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.43.0","pypi_latest":"1.43.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":3.8,"avg_import_s":0.59,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.54,"mem_mb":12.7,"disk_size":"51.1M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.54,"mem_mb":12.6,"disk_size":"51.0M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.1,"import_time_s":0.44,"mem_mb":12.7,"disk_size":"52M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.45,"mem_mb":12.6,"disk_size":"51M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.7,"mem_mb":14.4,"disk_size":"54.1M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.82,"mem_mb":14.3,"disk_size":"54.0M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.8,"import_time_s":0.63,"mem_mb":14.4,"disk_size":"55M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.65,"mem_mb":14.3,"disk_size":"54M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.62,"mem_mb":13.7,"disk_size":"45.3M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.71,"mem_mb":13.6,"disk_size":"45.2M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.3,"import_time_s":0.68,"mem_mb":13.7,"disk_size":"46M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.72,"mem_mb":13.6,"disk_size":"46M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.61,"mem_mb":14.7,"disk_size":"45.1M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.66,"mem_mb":14.6,"disk_size":"44.9M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.62,"mem_mb":14.7,"disk_size":"46M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.68,"mem_mb":14.6,"disk_size":"45M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.44,"mem_mb":11.9,"disk_size":"50.5M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.49,"mem_mb":11.9,"disk_size":"50.5M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.8,"import_time_s":0.44,"mem_mb":11.9,"disk_size":"51M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-resourcegroupstaggingapi","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.44,"mem_mb":11.9,"disk_size":"51M"}]}}