Examples#
Index > DevOpsAgentService > Examples
Auto-generated documentation for DevOpsAgentService type annotations stubs module mypy-boto3-devops-agent.
Client#
Implicit type annotations#
Can be used with boto3-stubs[devops-agent] package installed.
Write your DevOpsAgentService code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# DevOpsAgentServiceClient usage example
from boto3.session import Session
session = Session()
client = session.client("devops-agent") # (1)
result = client.allow_vended_log_delivery_for_resource() # (2)
Paginator usage example#
# ListAgentSpacesPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("devops-agent") # (1)
paginator = client.get_paginator("list_agent_spaces") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: DevOpsAgentServiceClient
- paginator: ListAgentSpacesPaginator
- item: ListAgentSpacesOutputTypeDef
Explicit type annotations#
With boto3-stubs-lite[devops-agent]
or a standalone mypy_boto3_devops_agent package, you have to explicitly specify client: DevOpsAgentServiceClient 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#
# DevOpsAgentServiceClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_devops_agent.client import DevOpsAgentServiceClient
from mypy_boto3_devops_agent.type_defs import AllowVendedLogDeliveryForResourceOutputTypeDef
from mypy_boto3_devops_agent.type_defs import AllowVendedLogDeliveryForResourceInputTypeDef
session = Session()
client: DevOpsAgentServiceClient = session.client("devops-agent")
kwargs: AllowVendedLogDeliveryForResourceInputTypeDef = {...}
result: AllowVendedLogDeliveryForResourceOutputTypeDef = client.allow_vended_log_delivery_for_resource(**kwargs)
Paginator usage example#
# ListAgentSpacesPaginator usage example with type annotations
from boto3.session import Session
from mypy_boto3_devops_agent.client import DevOpsAgentServiceClient
from mypy_boto3_devops_agent.paginator import ListAgentSpacesPaginator
from mypy_boto3_devops_agent.type_defs import ListAgentSpacesOutputTypeDef
session = Session()
client: DevOpsAgentServiceClient = session.client("devops-agent")
paginator: ListAgentSpacesPaginator = client.get_paginator("list_agent_spaces")
for item in paginator.paginate(...):
item: ListAgentSpacesOutputTypeDef
print(item)