{"id":3383,"library":"mypy-boto3-workspaces-instances","title":"Type annotations for boto3 WorkspacesInstances","description":"mypy-boto3-workspaces-instances provides comprehensive type annotations for the `boto3` WorkspacesInstances service, compatible with mypy, Pyright, VSCode, and other type-checking tools. It enhances developer experience by offering static type checking and auto-completion for `boto3.client('workspaces-instances')` calls. This library is automatically generated by `mypy-boto3-builder` and is currently at version 1.42.31, with frequent updates to align with new `boto3` releases.","status":"active","version":"1.42.31","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","aws","typing","type-stubs","workspaces-instances","workspaces"],"install":[{"cmd":"pip install mypy-boto3-workspaces-instances","lang":"bash","label":"Install standalone package"},{"cmd":"pip install 'boto3-stubs[workspaces]' # or boto3-stubs-lite[workspaces]","lang":"bash","label":"Install as part of boto3-stubs (recommended)"}],"dependencies":[{"reason":"This library provides type stubs for the 'boto3' runtime library, which must be installed separately for actual AWS interaction.","package":"boto3","optional":false}],"imports":[{"note":"Type annotation for the WorkspacesInstances Boto3 client.","symbol":"WorkspacesInstancesClient","correct":"from mypy_boto3_workspaces_instances.client import WorkspacesInstancesClient"},{"note":"Example of importing a service-specific TypedDict for request/response bodies.","symbol":"AcceptAccountLinkInvitationRequestTypeDef","correct":"from mypy_boto3_workspaces_instances.type_defs import AcceptAccountLinkInvitationRequestTypeDef"},{"note":"Example of importing a service-specific Literal type.","symbol":"AGAModeForDirectoryEnumType","correct":"from mypy_boto3_workspaces_instances.literals import AGAModeForDirectoryEnumType"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_workspaces_instances.client import WorkspacesInstancesClient\nfrom mypy_boto3_workspaces_instances.type_defs import DescribeAccountLinksResultTypeDef\n\ndef list_workspaces_instances() -> None:\n    # Initialize the Boto3 client with type annotation\n    client: WorkspacesInstancesClient = boto3.client('workspaces-instances')\n\n    # Example API call with type-checked parameters and return value\n    response: DescribeAccountLinksResultTypeDef = client.describe_account_links(\n        LinkStatusFilter=['LINKED']\n    )\n\n    print(f\"Account links: {response.get('AccountLinks')}\")\n\nif __name__ == \"__main__\":\n    list_workspaces_instances()","lang":"python","description":"This quickstart demonstrates how to initialize a typed `boto3` client for WorkspacesInstances and make a basic API call. Type annotations ensure that arguments and return values are correctly type-checked by tools like `mypy` or `Pyright`."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or later.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. If you are using this version of the stubs, you must use Python 3.9 or newer.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (which generates mypy-boto3-workspaces-instances >=1.42.31)"},{"fix":"Update your code to use the new TypeDef names. Refer to the `mypy-boto3-workspaces-instances.type_defs` module for correct names.","message":"TypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. This includes shorter names for packed method arguments (e.g., `RequestRequestTypeDef` becoming `RequestTypeDef`) and moving `Extra` postfixes.","severity":"breaking","affected_versions":">=8.9.0 of mypy-boto3-builder"},{"fix":"Ensure `pip install boto3` is part of your project dependencies.","message":"This package provides type stubs only; it does not include the `boto3` runtime library itself. `boto3` must be installed separately for your application to function.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consider using `boto3-stubs-lite` (if appropriate for your use case) or disabling PyCharm's internal type checker and relying on external tools like `mypy` or `Pyright`.","message":"PyCharm may experience slow performance or high CPU usage when dealing with `Literal` overloads in `mypy-boto3` due to a known IDE issue (PY-40997).","severity":"gotcha","affected_versions":"All versions with PyCharm"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}