IoTDataPlaneClient#
Index > IoTDataPlane > IoTDataPlaneClient
Auto-generated documentation for IoTDataPlane type annotations stubs module types-boto3-iot-data.
IoTDataPlaneClient#
Type annotations and code completion for boto3.client("iot-data").
 boto3 documentation
# IoTDataPlaneClient usage example
from boto3.session import Session
from types_boto3_iot_data.client import IoTDataPlaneClient
def get_iot-data_client() -> IoTDataPlaneClient:
    return Session().client("iot-data")Exceptions#
boto3 client exceptions are generated in runtime.
This class provides code completion for boto3.client("iot-data").exceptions structure.
# Exceptions.exceptions usage example
client = boto3.client("iot-data")
try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.ForbiddenException,
    client.exceptions.InternalFailureException,
    client.exceptions.InvalidRequestException,
    client.exceptions.MethodNotAllowedException,
    client.exceptions.RequestEntityTooLargeException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceUnavailableException,
    client.exceptions.ThrottlingException,
    client.exceptions.UnauthorizedException,
    client.exceptions.UnsupportedDocumentEncodingException,
) as e:
    print(e)# Exceptions.exceptions type checking example
from types_boto3_iot_data.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
    ...Methods#
can_paginate#
Type annotations and code completion for boto3.client("iot-data").can_paginate method.
 boto3 documentation
# can_paginate method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...generate_presigned_url#
Type annotations and code completion for boto3.client("iot-data").generate_presigned_url method.
 boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...delete_connection#
Disconnects a connected MQTT client from Amazon Web Services IoT Core.
Type annotations and code completion for boto3.client("iot-data").delete_connection method.
 boto3 documentation
# delete_connection method definition
def delete_connection(
    self,
    *,
    clientId: str,
    cleanSession: bool = ...,
    preventWillMessage: bool = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_connection method usage example with argument unpacking
kwargs: DeleteConnectionRequestTypeDef = {  # (1)
    "clientId": ...,
}
parent.delete_connection(**kwargs)delete_thing_shadow#
Deletes the shadow for the specified thing.
Type annotations and code completion for boto3.client("iot-data").delete_thing_shadow method.
 boto3 documentation
# delete_thing_shadow method definition
def delete_thing_shadow(
    self,
    *,
    thingName: str,
    shadowName: str = ...,
) -> DeleteThingShadowResponseTypeDef:  # (1)
    ...# delete_thing_shadow method usage example with argument unpacking
kwargs: DeleteThingShadowRequestTypeDef = {  # (1)
    "thingName": ...,
}
parent.delete_thing_shadow(**kwargs)get_retained_message#
Gets the details of a single retained message for the specified topic.
Type annotations and code completion for boto3.client("iot-data").get_retained_message method.
 boto3 documentation
# get_retained_message method definition
def get_retained_message(
    self,
    *,
    topic: str,
) -> GetRetainedMessageResponseTypeDef:  # (1)
    ...# get_retained_message method usage example with argument unpacking
kwargs: GetRetainedMessageRequestTypeDef = {  # (1)
    "topic": ...,
}
parent.get_retained_message(**kwargs)get_thing_shadow#
Gets the shadow for the specified thing.
Type annotations and code completion for boto3.client("iot-data").get_thing_shadow method.
 boto3 documentation
# get_thing_shadow method definition
def get_thing_shadow(
    self,
    *,
    thingName: str,
    shadowName: str = ...,
) -> GetThingShadowResponseTypeDef:  # (1)
    ...# get_thing_shadow method usage example with argument unpacking
kwargs: GetThingShadowRequestTypeDef = {  # (1)
    "thingName": ...,
}
parent.get_thing_shadow(**kwargs)list_named_shadows_for_thing#
Lists the shadows for the specified thing.
Type annotations and code completion for boto3.client("iot-data").list_named_shadows_for_thing method.
 boto3 documentation
# list_named_shadows_for_thing method definition
def list_named_shadows_for_thing(
    self,
    *,
    thingName: str,
    nextToken: str = ...,
    pageSize: int = ...,
) -> ListNamedShadowsForThingResponseTypeDef:  # (1)
    ...# list_named_shadows_for_thing method usage example with argument unpacking
kwargs: ListNamedShadowsForThingRequestTypeDef = {  # (1)
    "thingName": ...,
}
parent.list_named_shadows_for_thing(**kwargs)list_retained_messages#
Lists summary information about the retained messages stored for the account.
Type annotations and code completion for boto3.client("iot-data").list_retained_messages method.
 boto3 documentation
# list_retained_messages method definition
def list_retained_messages(
    self,
    *,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListRetainedMessagesResponseTypeDef:  # (1)
    ...# list_retained_messages method usage example with argument unpacking
kwargs: ListRetainedMessagesRequestTypeDef = {  # (1)
    "nextToken": ...,
}
parent.list_retained_messages(**kwargs)publish#
Publishes an MQTT message.
Type annotations and code completion for boto3.client("iot-data").publish method.
 boto3 documentation
# publish method definition
def publish(
    self,
    *,
    topic: str,
    qos: int = ...,
    retain: bool = ...,
    payload: BlobTypeDef = ...,
    userProperties: str = ...,
    payloadFormatIndicator: PayloadFormatIndicatorType = ...,  # (1)
    contentType: str = ...,
    responseTopic: str = ...,
    correlationData: str = ...,
    messageExpiry: int = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...# publish method usage example with argument unpacking
kwargs: PublishRequestTypeDef = {  # (1)
    "topic": ...,
}
parent.publish(**kwargs)update_thing_shadow#
Updates the shadow for the specified thing.
Type annotations and code completion for boto3.client("iot-data").update_thing_shadow method.
 boto3 documentation
# update_thing_shadow method definition
def update_thing_shadow(
    self,
    *,
    thingName: str,
    payload: BlobTypeDef,
    shadowName: str = ...,
) -> UpdateThingShadowResponseTypeDef:  # (1)
    ...# update_thing_shadow method usage example with argument unpacking
kwargs: UpdateThingShadowRequestTypeDef = {  # (1)
    "thingName": ...,
    "payload": ...,
}
parent.update_thing_shadow(**kwargs)get_paginator#
Type annotations and code completion for boto3.client("iot-data").get_paginator method with overloads.
- client.get_paginator("list_retained_messages")-> ListRetainedMessagesPaginator