{"id":3090,"library":"mypy-boto3-fms","title":"mypy-boto3-fms Type Annotations for AWS FMS","description":"mypy-boto3-fms provides type annotations for the AWS Firewall Manager (FMS) service client, paginators, and waiters, enhancing static analysis with tools like MyPy. It is part of the `mypy-boto3` family of projects, automatically generated by `mypy-boto3-builder`. The current version is 1.42.3, and it receives frequent updates to stay in sync with boto3 releases and `mypy-boto3-builder` improvements.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","typing","type-hints","mypy","stubs","fms","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-fms","lang":"bash","label":"Install service stubs"},{"cmd":"pip install boto3","lang":"bash","label":"Install runtime library (if not already)"}],"dependencies":[{"reason":"Runtime library for which these stubs provide type hints. This package provides *only* type stubs.","package":"boto3","optional":false}],"imports":[{"symbol":"FMSClient","correct":"from mypy_boto3_fms import FMSClient"},{"note":"Alternative explicit import from client submodule.","symbol":"FMSClient","correct":"from mypy_boto3_fms.client import FMSClient"},{"symbol":"ListPoliciesPaginator","correct":"from mypy_boto3_fms.paginator import ListPoliciesPaginator"},{"symbol":"PolicySummaryTypeDef","correct":"from mypy_boto3_fms.type_defs import PolicySummaryTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_fms import FMSClient\nimport os\n\n# Ensure boto3 is installed: pip install boto3\n\nsession = boto3.Session(\n    region_name=os.environ.get('AWS_REGION', 'us-east-1'),\n    aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'),\n    aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET')\n)\n\n# The client object 'fms_client' will now have full type hints\nfms_client: FMSClient = session.client('fms')\n\ntry:\n    # Example operation: List Admin Accounts\n    response = fms_client.list_admin_accounts()\n    print(f\"FMS Admin Accounts: {response.get('AdminAccounts', [])}\")\n\n    # Example with paginator\n    paginator = fms_client.get_paginator('list_policies')\n    for page in paginator.paginate():\n        for policy in page.get('PolicyList', []):\n            print(f\"Policy: {policy.get('PolicyName')}\")\nexcept Exception as e:\n    print(f\"Error performing FMS operation: {e}\")","lang":"python","description":"This quickstart demonstrates how to obtain a type-hinted FMS client and perform basic operations using `mypy-boto3-fms` alongside `boto3`. It highlights how `FMSClient` annotations provide type safety for client calls and responses, including paginators."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or later.","message":"Python 3.8 support was removed by `mypy-boto3-builder` starting from version 8.12.0. Projects using `mypy-boto3-fms` must now run on Python 3.9 or newer.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (and generated stubs)"},{"fix":"Ensure `boto3` is installed in your environment (`pip install boto3`).","message":"This package provides type stubs for boto3, not a replacement. You must install `boto3` separately for runtime functionality. `mypy-boto3-fms` alone does not provide the AWS SDK.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Update your code to reflect the new, shorter TypeDef names. Refer to the specific service's `type_defs.pyi` for precise names.","message":"`mypy-boto3-builder` version 8.9.0 introduced breaking changes in TypeDef naming conventions, affecting all generated services. TypeDefs for method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`).","severity":"breaking","affected_versions":">=8.9.0 of mypy-boto3-builder (and generated stubs)"},{"fix":"Most users will not need a fix. If issues arise, ensure your type checker (e.g., MyPy) is up-to-date and correctly configured to discover PEP 561 stubs. Avoid manual `MYPYPATH` manipulation if possible.","message":"`mypy-boto3-builder` 8.12.0 migrated all generated packages to PEP 561 compliant distribution. While generally an improvement for type checker discovery, users with highly customized `MYPYPATH` or build systems might need to adjust their configurations.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (and generated stubs)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}