Type annotations for boto3 WorkspacesInstances

1.42.31 · active · verified Sat Apr 11

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.

Warnings

Install

Imports

Quickstart

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`.

import boto3
from mypy_boto3_workspaces_instances.client import WorkspacesInstancesClient
from mypy_boto3_workspaces_instances.type_defs import DescribeAccountLinksResultTypeDef

def list_workspaces_instances() -> None:
    # Initialize the Boto3 client with type annotation
    client: WorkspacesInstancesClient = boto3.client('workspaces-instances')

    # Example API call with type-checked parameters and return value
    response: DescribeAccountLinksResultTypeDef = client.describe_account_links(
        LinkStatusFilter=['LINKED']
    )

    print(f"Account links: {response.get('AccountLinks')}")

if __name__ == "__main__":
    list_workspaces_instances()

view raw JSON →