{"id":3598,"library":"mypy-boto3-iotsecuretunneling","title":"Type annotations for boto3 IoTSecureTunneling","description":"mypy-boto3-iotsecuretunneling provides type annotations (type stubs) for the `boto3` client for AWS IoTSecureTunneling service. It enhances static analysis for `boto3` usage, allowing tools like MyPy to catch type-related errors before runtime. The current version is 1.42.3, generated by `mypy-boto3-builder` and generally follows the release cadence of new `boto3` features or builder updates.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","types","mypy","stubs","iotsecuretunneling","type-checking"],"install":[{"cmd":"pip install mypy-boto3-iotsecuretunneling","lang":"bash","label":"Install package"}],"dependencies":[{"reason":"Runtime library it provides type hints for; a matching version is crucial for correctness.","package":"boto3","optional":false}],"imports":[{"symbol":"IoTSecureTunnelingClient","correct":"from mypy_boto3_iotsecuretunneling.client import IoTSecureTunnelingClient"},{"note":"For resource-level type hints, if available for the service.","symbol":"IoTSecureTunnelingServiceResource","correct":"from mypy_boto3_iotsecuretunneling.service_resource import IoTSecureTunnelingServiceResource"},{"note":"Example of importing a generated TypedDict for request/response structures.","symbol":"IoTSecureTunnelingClientTypeDef","correct":"from mypy_boto3_iotsecuretunneling.type_defs import IoTSecureTunnelingClientTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_iotsecuretunneling.client import IoTSecureTunnelingClient\nfrom typing import TYPE_CHECKING\n\n# In a real application, you'd configure AWS credentials\n# e.g., via environment variables, ~/.aws/credentials, etc.\n\n# Using TYPE_CHECKING to ensure the type hint is only active during static analysis\nif TYPE_CHECKING:\n    # This line ensures 'client' gets the correct type for static analysis\n    client: IoTSecureTunnelingClient = boto3.client(\"iotsecuretunneling\")\nelse:\n    # This line runs at runtime, creating the actual boto3 client\n    client = boto3.client(\"iotsecuretunneling\")\n\n# Now, 'client' will have methods and attributes type-hinted by mypy-boto3-iotsecuretunneling\n# For example, calling open_tunnel:\ntry:\n    response = client.open_tunnel(\n        Description=\"MyTestTunnel\",\n        Tags=[\n            {\"key\": \"Project\", \"value\": \"MyApplication\"},\n            {\"key\": \"Environment\", \"value\": \"Development\"}\n        ]\n    )\n    print(f\"Successfully opened tunnel. ARN: {response['tunnelArn']}\")\n    print(f\"Source Access Token: {response['sourceAccessToken']}\")\n    print(f\"Destination Access Token: {response['destinationAccessToken']}\")\n\n    # Example of a type-hinted response structure\n    # if TYPE_CHECKING:\n    #     tunnel_arn: str = response['tunnelArn']\n\nexcept client.exceptions.ResourceNotFoundException as e:\n    print(f\"Error: {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-iotsecuretunneling` to get full type hints for a `boto3` IoTSecureTunneling client. The `TYPE_CHECKING` block ensures that the explicit type hint is only considered by static analysis tools like MyPy, without affecting runtime behavior. This allows for autocompletion and error detection for all client methods and response structures."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Support for Python 3.8 was officially removed with `mypy-boto3-builder` version 8.12.0 (and subsequent `mypy-boto3-*` package releases). If you are using Python 3.8, you must upgrade to Python 3.9 or newer to receive the latest type stubs.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-iotsecuretunneling >= 1.42.x"},{"fix":"Ensure `boto3` and `mypy-boto3-iotsecuretunneling` are updated together, ideally within the same major version range if possible, or by regularly updating both. Check the `mypy-boto3-builder` repository for version compatibility information.","message":"Type stubs are version-locked to the `boto3` library. Mismatched versions between `mypy-boto3-iotsecuretunneling` and `boto3` can lead to incorrect type hints or unresolved attributes, as the AWS API might have changed. Always ensure your `boto3` version broadly aligns with your `mypy-boto3-*` stub version.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install `mypy-boto3-iotsecuretunneling` in your development dependencies (e.g., `requirements-dev.txt`) or using `pip install --only-binary :all: mypy-boto3-iotsecuretunneling` in environments where type checking is performed, but not in your main production `requirements.txt`.","message":"`mypy-boto3-iotsecuretunneling` is a *type stub* package, not a runtime dependency. It should be installed as a development dependency or for type checking environments only. Installing it directly in your production runtime environment unnecessarily increases the package count and has no runtime effect.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}