mypy-boto3-acm-pca

1.42.3 · active · verified Sat Apr 11

mypy-boto3-acm-pca provides type annotations (stubs) for the boto3 ACMPCA service, enabling static type checking with tools like MyPy. It is part of the broader mypy-boto3-builder project, which generates stubs for all AWS services. The current version is 1.42.3 and new versions are released regularly to keep pace with boto3 updates.

Warnings

Install

Imports

Quickstart

Initializes a boto3 ACMPCA client and demonstrates how to use the type annotations for static analysis while maintaining standard boto3 runtime behavior.

import boto3
from typing import TYPE_CHECKING

# The actual boto3 client is used at runtime
session = boto3.Session()
client = session.client("acm-pca")

# For type checking only, use conditional import
if TYPE_CHECKING:
    from mypy_boto3_acm_pca.client import ACMPCAClient

    # Type-hint the client for static analysis
    typed_client: ACMPCAClient = client
    
    # Example usage with type-hinted client
    # These calls will be type-checked by MyPy
    response = typed_client.list_certificate_authorities(
        MaxResults=5,
        Status='ACTIVE' 
    )
    print(response.get('CertificateAuthorities'))
else:
    # Runtime execution will use the untyped client
    response = client.list_certificate_authorities(MaxResults=5)
    print(response.get('CertificateAuthorities'))

view raw JSON →