Mypy Boto3 AuditManager Stubs

1.42.3 · active · verified Sat Apr 11

mypy-boto3-auditmanager provides PEP 561 compliant type annotations for the AWS Boto3 AuditManager service, ensuring static type checking for your Boto3 clients. It is currently at version 1.42.3 and is actively maintained, with frequent releases tied to the upstream `boto3` library and `mypy-boto3-builder` updates.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import and use the `AuditManagerClient` type for type-hinting a Boto3 client, and how to use specific type definitions for request and response objects for improved static analysis. Ensure 'your-audit-report-id' is replaced with a valid value for a runnable example.

import boto3
from mypy_boto3_auditmanager.client import AuditManagerClient
from mypy_boto3_auditmanager.type_defs import GetChangeLogsRequestRequestTypeDef, GetChangeLogsResponseTypeDef

# Instantiate a Boto3 client with type hints
client: AuditManagerClient = boto3.client("auditmanager")

# Example of using type definitions for request and response
request_params: GetChangeLogsRequestRequestTypeDef = {
    "auditReportId": "your-audit-report-id", # Replace with actual ID
    "nextToken": "",
    "maxResults": 10
}

try:
    # Call a service method, type checkers will validate arguments and return type
    response: GetChangeLogsResponseTypeDef = client.get_change_logs(**request_params)
    print(f"Successfully retrieved {len(response.get('changeLogs', []))} change logs.")
except Exception as e:
    print(f"Error calling AuditManager: {e}")

view raw JSON →