Skip to content

Examples#

Index > DevOpsAgentService > Examples

Auto-generated documentation for DevOpsAgentService type annotations stubs module types-boto3-devops-agent.

Client#

Implicit type annotations#

Can be used with types-boto3[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)
  1. client: DevOpsAgentServiceClient
  2. result: AllowVendedLogDeliveryForResourceOutputTypeDef

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)
  1. client: DevOpsAgentServiceClient
  2. paginator: ListAgentSpacesPaginator
  3. item: ListAgentSpacesOutputTypeDef

Explicit type annotations#

With types-boto3-lite[devops-agent] or a standalone types_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 types_boto3_devops_agent.client import DevOpsAgentServiceClient
from types_boto3_devops_agent.type_defs import AllowVendedLogDeliveryForResourceOutputTypeDef
from types_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 types_boto3_devops_agent.client import DevOpsAgentServiceClient
from types_boto3_devops_agent.paginator import ListAgentSpacesPaginator
from types_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)