Examples
Index > SSMIncidents > Examples
Auto-generated documentation for SSMIncidents type annotations stubs module mypy-boto3-ssm-incidents.
Client
Implicit type annotations
Can be used with boto3-stubs[ssm-incidents]
package installed.
Write your SSMIncidents
code as usual,
type checking and code completion should work out of the box.
Client usage example
from boto3.session import Session
session = Session()
client = session.client("ssm-incidents") # (1)
result = client.create_replication_set() # (2)
- client: SSMIncidentsClient
- result: CreateReplicationSetOutputTypeDef
Paginator usage example
from boto3.session import Session
session = Session()
client = session.client("ssm-incidents") # (1)
paginator = client.get_paginator("get_resource_policies") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: SSMIncidentsClient
- paginator: GetResourcePoliciesPaginator
- item: GetResourcePoliciesOutputTypeDef
Waiter usage example
from boto3.session import Session
session = Session()
client = session.client("ssm-incidents") # (1)
waiter = client.get_waiter("wait_for_replication_set_active") # (2)
waiter.wait()
- client: SSMIncidentsClient
- waiter: WaitForReplicationSetActiveWaiter
Explicit type annotations
With boto3-stubs-lite[ssm-incidents]
or a standalone mypy_boto3_ssm_incidents
package, you have to explicitly specify client: SSMIncidentsClient
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 usage example
from boto3.session import Session
from mypy_boto3_ssm_incidents.client import SSMIncidentsClient
from mypy_boto3_ssm_incidents.type_defs import CreateReplicationSetOutputTypeDef
from mypy_boto3_ssm_incidents.type_defs import CreateReplicationSetInputRequestTypeDef
session = Session()
client: SSMIncidentsClient = session.client("ssm-incidents")
kwargs: CreateReplicationSetInputRequestTypeDef = {...}
result: CreateReplicationSetOutputTypeDef = client.create_replication_set(**kwargs)
Paginator usage example
from boto3.session import Session
from mypy_boto3_ssm_incidents.client import SSMIncidentsClient
from mypy_boto3_ssm_incidents.paginator import GetResourcePoliciesPaginator
from mypy_boto3_ssm_incidents.type_defs import GetResourcePoliciesOutputTypeDef
session = Session()
client: SSMIncidentsClient = session.client("ssm-incidents")
paginator: GetResourcePoliciesPaginator = client.get_paginator("get_resource_policies")
for item in paginator.paginate(...):
item: GetResourcePoliciesOutputTypeDef
print(item)
Waiter usage example
from boto3.session import Session
from mypy_boto3_ssm_incidents.client import SSMIncidentsClient
from mypy_boto3_ssm_incidents.waiter import WaitForReplicationSetActiveWaiter
session = Session()
client: SSMIncidentsClient = session.client("ssm-incidents")
waiter: WaitForReplicationSetActiveWaiter = client.get_waiter("wait_for_replication_set_active")
waiter.wait()