Type Stubs for boto3 AIOps Service

1.42.3 · active · verified Sat Apr 11

mypy-boto3-aiops provides comprehensive type annotations for the AWS AIOps service when used with the `boto3` library. As part of the `mypy-boto3` ecosystem, it enables static type checking with tools like `mypy` and enhances IDE autocompletion for `boto3` clients and responses. The library is actively maintained and regularly updated to reflect changes in `boto3` service definitions, with the current version being 1.42.3.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import and use the `AIOPSClient` type for `boto3` operations, enabling static type checking for method calls and responses. It highlights how to instantiate a type-hinted client and call a sample method, illustrating the benefits of `mypy-boto3` for improved code quality and developer experience.

import boto3
from mypy_boto3_aiops.client import AIOPSClient

# Instantiate a boto3 AIOps client with type hint
client: AIOPSClient = boto3.client("aiops")

# Example usage with type-checked parameters and return value
# Note: AWS Account ID and Service Code might need to be valid for actual execution
response = client.describe_service_quota(
    ServiceCode="s3", # Example service code
    QuotaCode="L-F994326F", # Example quota code
    AccountId="123456789012" # Example AWS account ID
)

print(f"Service Quota: {response.get('Quota', {}).get('QuotaName')}")

# To run this, ensure AWS credentials are configured (e.g., via ~/.aws/credentials
# or environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN).
# Also, 'aiops' is a placeholder service for demonstration purposes as AIOps is a broader concept.
# For actual AIOps related services like DevOps Guru, look for specific stubs.

view raw JSON →