Skip to content

Examples#

Index > CloudWatchApplicationSignals > Examples

Auto-generated documentation for CloudWatchApplicationSignals type annotations stubs module types-boto3-application-signals.

Client#

Implicit type annotations#

Can be used with types-boto3[application-signals] package installed.

Write your CloudWatchApplicationSignals code as usual, type checking and code completion should work out of the box.

# CloudWatchApplicationSignalsClient usage example

from boto3.session import Session


session = Session()

client = session.client("application-signals")  # (1)
result = client.batch_get_service_level_objective_budget_report()  # (2)
  1. client: CloudWatchApplicationSignalsClient
  2. result: BatchGetServiceLevelObjectiveBudgetReportOutputTypeDef
# ListServiceDependenciesPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("application-signals")  # (1)

paginator = client.get_paginator("list_service_dependencies")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: CloudWatchApplicationSignalsClient
  2. paginator: ListServiceDependenciesPaginator
  3. item: ListServiceDependenciesOutputTypeDef

Explicit type annotations#

With types-boto3-lite[application-signals] or a standalone types_boto3_application_signals package, you have to explicitly specify client: CloudWatchApplicationSignalsClient 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.

# CloudWatchApplicationSignalsClient usage example with type annotations

from boto3.session import Session

from types_boto3_application_signals.client import CloudWatchApplicationSignalsClient
from types_boto3_application_signals.type_defs import BatchGetServiceLevelObjectiveBudgetReportOutputTypeDef
from types_boto3_application_signals.type_defs import BatchGetServiceLevelObjectiveBudgetReportInputRequestTypeDef


session = Session()

client: CloudWatchApplicationSignalsClient = session.client("application-signals")

kwargs: BatchGetServiceLevelObjectiveBudgetReportInputRequestTypeDef = {...}
result: BatchGetServiceLevelObjectiveBudgetReportOutputTypeDef = client.batch_get_service_level_objective_budget_report(**kwargs)
# ListServiceDependenciesPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_application_signals.client import CloudWatchApplicationSignalsClient
from types_boto3_application_signals.paginator import ListServiceDependenciesPaginator
from types_boto3_application_signals.type_defs import ListServiceDependenciesOutputTypeDef


session = Session()
client: CloudWatchApplicationSignalsClient = session.client("application-signals")

paginator: ListServiceDependenciesPaginator = client.get_paginator("list_service_dependencies")
for item in paginator.paginate(...):
    item: ListServiceDependenciesOutputTypeDef
    print(item)