Examples#
Index > DevOpsGuru > Examples
Auto-generated documentation for DevOpsGuru type annotations stubs module types-aiobotocore-devops-guru.
Client#
Implicit type annotations#
Can be used with types-aioboto3[devops-guru]
package installed.
Write your DevOpsGuru
code as usual,
type checking and code completion should work out of the box.
# DevOpsGuruClient usage example
from aioboto3.session import Session
session = Session()
async with session.client("devops-guru") as client: # (1)
result = await client.add_notification_channel() # (2)
- client: DevOpsGuruClient
- result: AddNotificationChannelResponseTypeDef
# DescribeOrganizationResourceCollectionHealthPaginator usage example
from aioboto3.session import Session
session = Session()
async with session.client("devops-guru") as client: # (1)
paginator = client.get_paginator("describe_organization_resource_collection_health") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: DevOpsGuruClient
- paginator: DescribeOrganizationResourceCollectionHealthPaginator
- item: DescribeOrganizationResourceCollectionHealthResponseTypeDef
Explicit type annotations#
With types-aioboto3-lite[devops-guru]
or a standalone types_aiobotocore_devops_guru
package, you have to explicitly specify
client: DevOpsGuruClient
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.
# DevOpsGuruClient usage example with type annotations
from aioboto3.session import Session
from types_aiobotocore_devops_guru.client import DevOpsGuruClient
from types_aiobotocore_devops_guru.type_defs import AddNotificationChannelResponseTypeDef
from types_aiobotocore_devops_guru.type_defs import AddNotificationChannelRequestRequestTypeDef
session = Session()
client: DevOpsGuruClient
async with session.client("devops-guru") as client: # (1)
kwargs: AddNotificationChannelRequestRequestTypeDef = {...} # (2)
result: AddNotificationChannelResponseTypeDef = await client.add_notification_channel(**kwargs) # (3)
- client: DevOpsGuruClient
- kwargs: AddNotificationChannelRequestRequestTypeDef
- result: AddNotificationChannelResponseTypeDef
# DescribeOrganizationResourceCollectionHealthPaginator usage example with type annotations
from aioboto3.session import Session
from types_aiobotocore_devops_guru.client import DevOpsGuruClient
from types_aiobotocore_devops_guru.paginator import DescribeOrganizationResourceCollectionHealthPaginator
from types_aiobotocore_devops_guru.type_defs import DescribeOrganizationResourceCollectionHealthResponseTypeDef
session = Session()
client: DevOpsGuruClient
async with session.client("devops-guru") as client: # (1)
paginator: DescribeOrganizationResourceCollectionHealthPaginator = client.get_paginator("describe_organization_resource_collection_health") # (2)
async for item in paginator.paginate(...):
item: DescribeOrganizationResourceCollectionHealthResponseTypeDef
print(item) # (3)