{"id":3130,"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.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","boto3","type hints","mypy","stubs","resourcegroupstaggingapi"],"install":[{"cmd":"pip install mypy-boto3-resourcegroupstaggingapi boto3","lang":"bash","label":"Install standalone stubs and boto3"}],"dependencies":[{"reason":"This package provides type stubs for the boto3 library, which must be installed separately for runtime functionality.","package":"boto3","optional":false},{"reason":"Required for static type checking functionality.","package":"mypy","optional":false},{"reason":"Requires Python 3.9 or newer.","package":"python","optional":false}],"imports":[{"symbol":"ResourceGroupsTaggingAPIClient","correct":"from mypy_boto3_resourcegroupstaggingapi import ResourceGroupsTaggingAPIClient"},{"symbol":"GetResourcesPaginator","correct":"from mypy_boto3_resourcegroupstaggingapi.paginator import GetResourcesPaginator"},{"symbol":"ComplianceDetailsTypeDef","correct":"from mypy_boto3_resourcegroupstaggingapi.type_defs import ComplianceDetailsTypeDef"}],"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."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or a later version. Alternatively, pin `mypy-boto3-builder` to `<8.12.0` if you need to maintain Python 3.8 compatibility, though this is not recommended.","message":"Starting with `mypy-boto3-builder` version 8.12.0, support for Python 3.8 has been removed for all generated packages, including `mypy-boto3-resourcegroupstaggingapi`. Users on Python 3.8 will need to upgrade to Python 3.9 or newer to use versions generated by `builder` 8.12.0+.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0"},{"fix":"Review your code for direct imports or references to `TypeDef` objects. Adjust their names according to the new conventions, typically by simplifying redundant `Request` suffixes or repositioning `Extra`.","message":"Builder version 8.9.0 introduced breaking changes to `TypeDef` naming conventions. Type definitions for packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes are moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`). This may require updates to explicit `TypeDef` imports in your codebase.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0"},{"fix":"Always ensure you have `boto3` installed alongside `mypy-boto3-resourcegroupstaggingapi` (e.g., `pip install boto3 mypy-boto3-resourcegroupstaggingapi`).","message":"This package provides *only* type annotations. You must install the `boto3` library separately for your code to run successfully at runtime. Type checkers will not warn about a missing `boto3` if `mypy-boto3-resourcegroupstaggingapi` is installed.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Verify your type checker's configuration. In most cases, if `mypy-boto3-resourcegroupstaggingapi` is installed in the same environment as your code, type checkers should automatically discover it. Refer to your type checker's documentation for specific setup instructions if issues arise.","message":"Beginning with `mypy-boto3-builder` 8.12.0, packages migrated to follow PEP 561. This change improves compatibility and discovery for type checkers. Ensure your type checker (e.g., mypy, pyright) is configured to correctly find and utilize PEP 561 compliant stub packages.","severity":"gotcha","affected_versions":"mypy-boto3-builder >=8.12.0"},{"fix":"If experiencing performance issues or high CPU usage in your IDE (especially PyCharm), consider switching to `boto3-stubs-lite` and ensure all your `boto3.client()` or `session.client()` calls have explicit type annotations, as shown in the quickstart example.","message":"For IDEs like PyCharm, or in scenarios where memory usage is critical, using `boto3-stubs-lite` (e.g., `pip install 'boto3-stubs-lite[resourcegroupstaggingapi]'`) might be recommended over the full `boto3-stubs` or standalone packages. The lite version is more RAM-friendly but requires explicit type annotations for `session.client`/`resource` calls.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always consult AWS documentation for current service names. If a service you are using becomes deprecated or renamed, update your `boto3` client initialization and `mypy-boto3` imports accordingly.","message":"While not directly affecting `ResourceGroupsTaggingAPI`, a change in `mypy-boto3-builder` 8.11.0 removed support for the `sms-voice` service, advising users to switch to `pinpoint-sms-voice`. This highlights that AWS service deprecations or renaming will propagate to `mypy-boto3` generated stubs, potentially requiring users to update service names in their code.","severity":"deprecated","affected_versions":"mypy-boto3-builder >=8.11.0"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}