Examples#
Auto-generated documentation for Macie2 type annotations stubs module mypy-boto3-macie2.
Client#
Implicit type annotations#
Can be used with boto3-stubs[macie2]
package installed.
Write your Macie2
code as usual,
type checking and code completion should work out of the box.
# Macie2Client usage example
from boto3.session import Session
session = Session()
client = session.client("macie2") # (1)
result = client.batch_get_custom_data_identifiers() # (2)
- client: Macie2Client
- result: BatchGetCustomDataIdentifiersResponseTypeDef
# DescribeBucketsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("macie2") # (1)
paginator = client.get_paginator("describe_buckets") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: Macie2Client
- paginator: DescribeBucketsPaginator
- item: DescribeBucketsResponseTypeDef
# FindingRevealedWaiter usage example
from boto3.session import Session
session = Session()
client = session.client("macie2") # (1)
waiter = client.get_waiter("finding_revealed") # (2)
waiter.wait()
- client: Macie2Client
- waiter: FindingRevealedWaiter
Explicit type annotations#
With boto3-stubs-lite[macie2]
or a standalone mypy_boto3_macie2
package, you have to explicitly specify client: Macie2Client
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your