Skip to content

Examples#

Index > ApplicationCostProfiler > Examples

Auto-generated documentation for ApplicationCostProfiler type annotations stubs module types-boto3-applicationcostprofiler.

Client#

Implicit type annotations#

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

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

# ApplicationCostProfilerClient usage example

from boto3.session import Session


session = Session()

client = session.client("applicationcostprofiler")  # (1)
result = client.delete_report_definition()  # (2)
  1. client: ApplicationCostProfilerClient
  2. result: DeleteReportDefinitionResultTypeDef
# ListReportDefinitionsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("applicationcostprofiler")  # (1)

paginator = client.get_paginator("list_report_definitions")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: ApplicationCostProfilerClient
  2. paginator: ListReportDefinitionsPaginator
  3. item: ListReportDefinitionsResultTypeDef

Explicit type annotations#

With types-boto3-lite[applicationcostprofiler] or a standalone types_boto3_applicationcostprofiler package, you have to explicitly specify client: ApplicationCostProfilerClient 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.

# ApplicationCostProfilerClient usage example with type annotations

from boto3.session import Session

from types_boto3_applicationcostprofiler.client import ApplicationCostProfilerClient
from types_boto3_applicationcostprofiler.type_defs import DeleteReportDefinitionResultTypeDef
from types_boto3_applicationcostprofiler.type_defs import DeleteReportDefinitionRequestRequestTypeDef


session = Session()

client: ApplicationCostProfilerClient = session.client("applicationcostprofiler")

kwargs: DeleteReportDefinitionRequestRequestTypeDef = {...}
result: DeleteReportDefinitionResultTypeDef = client.delete_report_definition(**kwargs)
# ListReportDefinitionsPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_applicationcostprofiler.client import ApplicationCostProfilerClient
from types_boto3_applicationcostprofiler.paginator import ListReportDefinitionsPaginator
from types_boto3_applicationcostprofiler.type_defs import ListReportDefinitionsResultTypeDef


session = Session()
client: ApplicationCostProfilerClient = session.client("applicationcostprofiler")

paginator: ListReportDefinitionsPaginator = client.get_paginator("list_report_definitions")
for item in paginator.paginate(...):
    item: ListReportDefinitionsResultTypeDef
    print(item)