Class: Aws::IoTDataPlane::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::IoTDataPlane::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb
Overview
An API client for IoTDataPlane. To construct a client, you need to configure a :region and :credentials.
client = Aws::IoTDataPlane::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#delete_connection(params = {}) ⇒ Struct
Disconnects a connected MQTT client from Amazon Web Services IoT Core.
-
#delete_thing_shadow(params = {}) ⇒ Types::DeleteThingShadowResponse
Deletes the shadow for the specified thing.
-
#get_connection(params = {}) ⇒ Types::GetConnectionResponse
Retrieves connection information for the specified MQTT client.
-
#get_retained_message(params = {}) ⇒ Types::GetRetainedMessageResponse
Gets the details of a single retained message for the specified topic.
-
#get_thing_shadow(params = {}) ⇒ Types::GetThingShadowResponse
Gets the shadow for the specified thing.
-
#list_named_shadows_for_thing(params = {}) ⇒ Types::ListNamedShadowsForThingResponse
Lists the shadows for the specified thing.
-
#list_retained_messages(params = {}) ⇒ Types::ListRetainedMessagesResponse
Lists summary information about the retained messages stored for the account.
-
#list_subscriptions(params = {}) ⇒ Types::ListSubscriptionsResponse
Returns a list of all subscriptions for MQTT clients with active sessions, including offline clients with persistent sessions.
-
#publish(params = {}) ⇒ Struct
Publishes an MQTT message.
-
#send_direct_message(params = {}) ⇒ Types::SendDirectMessageResponse
Sends an MQTT message directly to a specific client identified by its client ID.
-
#update_thing_shadow(params = {}) ⇒ Types::UpdateThingShadowResponse
Updates the shadow for the specified thing.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
478 479 480 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 478 def initialize(*args) super end |
Instance Method Details
#delete_connection(params = {}) ⇒ Struct
Disconnects a connected MQTT client from Amazon Web Services IoT Core. When you disconnect a client, Amazon Web Services IoT Core closes the client's network connection and optionally cleans the session state.
Requires permission to access the DeleteConnection action.
533 534 535 536 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 533 def delete_connection(params = {}, = {}) req = build_request(:delete_connection, params) req.send_request() end |
#delete_thing_shadow(params = {}) ⇒ Types::DeleteThingShadowResponse
Deletes the shadow for the specified thing.
Requires permission to access the DeleteThingShadow action.
For more information, see DeleteThingShadow in the IoT Developer Guide.
573 574 575 576 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 573 def delete_thing_shadow(params = {}, = {}) req = build_request(:delete_thing_shadow, params) req.send_request() end |
#get_connection(params = {}) ⇒ Types::GetConnectionResponse
Retrieves connection information for the specified MQTT client.
Requires permission to access the GetConnection action.
648 649 650 651 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 648 def get_connection(params = {}, = {}) req = build_request(:get_connection, params) req.send_request() end |
#get_retained_message(params = {}) ⇒ Types::GetRetainedMessageResponse
Gets the details of a single retained message for the specified topic.
This action returns the message payload of the retained message, which can incur messaging costs. To list only the topic names of the retained messages, call ListRetainedMessages.
Requires permission to access the GetRetainedMessage action.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
697 698 699 700 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 697 def (params = {}, = {}) req = build_request(:get_retained_message, params) req.send_request() end |
#get_thing_shadow(params = {}) ⇒ Types::GetThingShadowResponse
Gets the shadow for the specified thing.
Requires permission to access the GetThingShadow action.
For more information, see GetThingShadow in the IoT Developer Guide.
737 738 739 740 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 737 def get_thing_shadow(params = {}, = {}) req = build_request(:get_thing_shadow, params) req.send_request() end |
#list_named_shadows_for_thing(params = {}) ⇒ Types::ListNamedShadowsForThingResponse
Lists the shadows for the specified thing.
Requires permission to access the ListNamedShadowsForThing action.
783 784 785 786 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 783 def list_named_shadows_for_thing(params = {}, = {}) req = build_request(:list_named_shadows_for_thing, params) req.send_request() end |
#list_retained_messages(params = {}) ⇒ Types::ListRetainedMessagesResponse
Lists summary information about the retained messages stored for the account.
This action returns only the topic names of the retained messages. It doesn't return any message payloads. Although this action doesn't return a message payload, it can still incur messaging costs.
To get the message payload of a retained message, call GetRetainedMessage with the topic name of the retained message.
Requires permission to access the ListRetainedMessages action.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
842 843 844 845 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 842 def (params = {}, = {}) req = build_request(:list_retained_messages, params) req.send_request() end |
#list_subscriptions(params = {}) ⇒ Types::ListSubscriptionsResponse
Returns a list of all subscriptions for MQTT clients with active sessions, including offline clients with persistent sessions.
Requires permission to access the ListSubscriptions action.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
897 898 899 900 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 897 def list_subscriptions(params = {}, = {}) req = build_request(:list_subscriptions, params) req.send_request() end |
#publish(params = {}) ⇒ Struct
Publishes an MQTT message.
Requires permission to access the Publish action.
For more information about MQTT messages, see MQTT Protocol in the IoT Developer Guide.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
1008 1009 1010 1011 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 1008 def publish(params = {}, = {}) req = build_request(:publish, params) req.send_request() end |
#send_direct_message(params = {}) ⇒ Types::SendDirectMessageResponse
Sends an MQTT message directly to a specific client identified by its client ID.
SendDirectMessage targets a single client ID. The receiving client
does not need to subscribe to the topic, but the receiver's policy
must allow iot:Receive on the specified topic.
Requires permission to access the SendDirectMessage action.
For more information about messaging costs, see Amazon Web Services IoT Core pricing.
1158 1159 1160 1161 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 1158 def (params = {}, = {}) req = build_request(:send_direct_message, params) req.send_request() end |
#update_thing_shadow(params = {}) ⇒ Types::UpdateThingShadowResponse
Updates the shadow for the specified thing.
Requires permission to access the UpdateThingShadow action.
For more information, see UpdateThingShadow in the IoT Developer Guide.
1202 1203 1204 1205 |
# File 'gems/aws-sdk-iotdataplane/lib/aws-sdk-iotdataplane/client.rb', line 1202 def update_thing_shadow(params = {}, = {}) req = build_request(:update_thing_shadow, params) req.send_request() end |