Skip to content

IoTDataPlaneClient#

Index > IoTDataPlane > IoTDataPlaneClient

Auto-generated documentation for IoTDataPlane type annotations stubs module types-aiobotocore-iot-data.

IoTDataPlaneClient#

Type annotations and code completion for session.create_client("iot-data") boto3 documentation

IoTDataPlaneClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_iot_data.client import IoTDataPlaneClient

session = get_session()
async with session.create_client("iot-data") as client:
    client: IoTDataPlaneClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("iot-data").exceptions structure.

IoTDataPlaneClient.exceptions usage example

async with session.create_client("iot-data") as client:
    try:
        do_something(client)
    except (
            client.ClientError,
        client.ConflictException,
        client.InternalFailureException,
        client.InvalidRequestException,
        client.MethodNotAllowedException,
        client.RequestEntityTooLargeException,
        client.ResourceNotFoundException,
        client.ServiceUnavailableException,
        client.ThrottlingException,
        client.UnauthorizedException,
        client.UnsupportedDocumentEncodingException,
    ) as e:
        print(e)
IoTDataPlaneClient usage type checking example

from types_aiobotocore_iot_data.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for session.create_client("iot-data").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for session.create_client("iot-data").close method. boto3 documentation

# close method definition

await def close(
    self,
) -> None:
    ...

delete_thing_shadow#

Deletes the shadow for the specified thing.

Type annotations and code completion for session.create_client("iot-data").delete_thing_shadow method. boto3 documentation

# delete_thing_shadow method definition

await def delete_thing_shadow(
    self,
    *,
    thingName: str,
    shadowName: str = ...,
) -> DeleteThingShadowResponseTypeDef:  # (1)
    ...
  1. See DeleteThingShadowResponseTypeDef
# delete_thing_shadow method usage example with argument unpacking

kwargs: DeleteThingShadowRequestRequestTypeDef = {  # (1)
    "thingName": ...,
}

parent.delete_thing_shadow(**kwargs)
  1. See DeleteThingShadowRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.create_client("iot-data").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_retained_message#

Gets the details of a single retained message for the specified topic.

Type annotations and code completion for session.create_client("iot-data").get_retained_message method. boto3 documentation

# get_retained_message method definition

await def get_retained_message(
    self,
    *,
    topic: str,
) -> GetRetainedMessageResponseTypeDef:  # (1)
    ...
  1. See GetRetainedMessageResponseTypeDef
# get_retained_message method usage example with argument unpacking

kwargs: GetRetainedMessageRequestRequestTypeDef = {  # (1)
    "topic": ...,
}

parent.get_retained_message(**kwargs)
  1. See GetRetainedMessageRequestRequestTypeDef

get_thing_shadow#

Gets the shadow for the specified thing.

Type annotations and code completion for session.create_client("iot-data").get_thing_shadow method. boto3 documentation

# get_thing_shadow method definition

await def get_thing_shadow(
    self,
    *,
    thingName: str,
    shadowName: str = ...,
) -> GetThingShadowResponseTypeDef:  # (1)
    ...
  1. See GetThingShadowResponseTypeDef
# get_thing_shadow method usage example with argument unpacking

kwargs: GetThingShadowRequestRequestTypeDef = {  # (1)
    "thingName": ...,
}

parent.get_thing_shadow(**kwargs)
  1. See GetThingShadowRequestRequestTypeDef

list_named_shadows_for_thing#

Lists the shadows for the specified thing.

Type annotations and code completion for session.create_client("iot-data").list_named_shadows_for_thing method. boto3 documentation

# list_named_shadows_for_thing method definition

await def list_named_shadows_for_thing(
    self,
    *,
    thingName: str,
    nextToken: str = ...,
    pageSize: int = ...,
) -> ListNamedShadowsForThingResponseTypeDef:  # (1)
    ...
  1. See ListNamedShadowsForThingResponseTypeDef
# list_named_shadows_for_thing method usage example with argument unpacking

kwargs: ListNamedShadowsForThingRequestRequestTypeDef = {  # (1)
    "thingName": ...,
}

parent.list_named_shadows_for_thing(**kwargs)
  1. See ListNamedShadowsForThingRequestRequestTypeDef

list_retained_messages#

Lists summary information about the retained messages stored for the account.

Type annotations and code completion for session.create_client("iot-data").list_retained_messages method. boto3 documentation

# list_retained_messages method definition

await def list_retained_messages(
    self,
    *,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListRetainedMessagesResponseTypeDef:  # (1)
    ...
  1. See ListRetainedMessagesResponseTypeDef
# list_retained_messages method usage example with argument unpacking

kwargs: ListRetainedMessagesRequestRequestTypeDef = {  # (1)
    "nextToken": ...,
}

parent.list_retained_messages(**kwargs)
  1. See ListRetainedMessagesRequestRequestTypeDef

publish#

Publishes an MQTT message.

Type annotations and code completion for session.create_client("iot-data").publish method. boto3 documentation

# publish method definition

await def publish(
    self,
    *,
    topic: str,
    qos: int = ...,
    retain: bool = ...,
    payload: Union[str, bytes, IO[Any], StreamingBody] = ...,
    userProperties: str = ...,
    payloadFormatIndicator: PayloadFormatIndicatorType = ...,  # (1)
    contentType: str = ...,
    responseTopic: str = ...,
    correlationData: str = ...,
    messageExpiry: int = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See PayloadFormatIndicatorType
  2. See EmptyResponseMetadataTypeDef
# publish method usage example with argument unpacking

kwargs: PublishRequestRequestTypeDef = {  # (1)
    "topic": ...,
}

parent.publish(**kwargs)
  1. See PublishRequestRequestTypeDef

update_thing_shadow#

Updates the shadow for the specified thing.

Type annotations and code completion for session.create_client("iot-data").update_thing_shadow method. boto3 documentation

# update_thing_shadow method definition

await def update_thing_shadow(
    self,
    *,
    thingName: str,
    payload: Union[str, bytes, IO[Any], StreamingBody],
    shadowName: str = ...,
) -> UpdateThingShadowResponseTypeDef:  # (1)
    ...
  1. See UpdateThingShadowResponseTypeDef
# update_thing_shadow method usage example with argument unpacking

kwargs: UpdateThingShadowRequestRequestTypeDef = {  # (1)
    "thingName": ...,
    "payload": ...,
}

parent.update_thing_shadow(**kwargs)
  1. See UpdateThingShadowRequestRequestTypeDef

__aenter__#

Type annotations and code completion for session.create_client("iot-data").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> IoTDataPlaneClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("iot-data").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator#

Type annotations and code completion for session.create_client("iot-data").get_paginator method with overloads.