Examples#
Auto-generated documentation for ACM type annotations stubs module mypy-boto3-acm.
Client#
Implicit type annotations#
Can be used with boto3-stubs[acm]
package installed.
Write your ACM
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# ACMClient usage example
from boto3.session import Session
session = Session()
client = session.client("acm") # (1)
result = client.add_tags_to_certificate() # (2)
- client: ACMClient
- result: EmptyResponseMetadataTypeDef
Paginator usage example#
# ListCertificatesPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("acm") # (1)
paginator = client.get_paginator("list_certificates") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: ACMClient
- paginator: ListCertificatesPaginator
- item: ListCertificatesResponseTypeDef
Waiter usage example#
# CertificateValidatedWaiter usage example
from boto3.session import Session
session = Session()
client = session.client("acm") # (1)
waiter = client.get_waiter("certificate_validated") # (2)
waiter.wait(...)
- client: ACMClient
- waiter: CertificateValidatedWaiter
Explicit type annotations#
With boto3-stubs-lite[acm]
or a standalone mypy_boto3_acm
package, you have to explicitly specify client: ACMClient
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.
Client method usage example#
# ACMClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_acm.client import ACMClient
from mypy_boto3_acm.type_defs import EmptyResponseMetadataTypeDef
from mypy_boto3_acm.type_defs import AddTagsToCertificateRequestTypeDef
session = Session()
client: ACMClient = session.client("acm")
kwargs: AddTagsToCertificateRequestTypeDef = {...}
result: EmptyResponseMetadataTypeDef = client.add_tags_to_certificate(**kwargs)
Paginator usage example#
# ListCertificatesPaginator usage example with type annotations
from boto3.session import Session
from mypy_boto3_acm.client import ACMClient
from mypy_boto3_acm.paginator import ListCertificatesPaginator
from mypy_boto3_acm.type_defs import ListCertificatesResponseTypeDef
session = Session()
client: ACMClient = session.client("acm")
paginator: ListCertificatesPaginator = client.get_paginator("list_certificates")
for item in paginator.paginate(...):
item: ListCertificatesResponseTypeDef
print(item)
Waiter usage example#
# CertificateValidatedWaiter usage example with type annotations
from boto3.session import Session
from mypy_boto3_acm.client import ACMClient
from mypy_boto3_acm.waiter import CertificateValidatedWaiter
session = Session()
client: ACMClient = session.client("acm")
waiter: CertificateValidatedWaiter = client.get_waiter("certificate_validated")
waiter.wait(...)