Class: Aws::IoTDataPlane::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::IoTDataPlane::Client
- Includes:
- ClientStubs
- Defined in:
- 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](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
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_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.
-
#publish(params = {}) ⇒ Struct
Publishes an MQTT message.
-
#update_thing_shadow(params = {}) ⇒ Types::UpdateThingShadowResponse
Updates the shadow for the specified thing.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
473 474 475 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 473 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
938 939 940 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 938 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
941 942 943 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 941 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 911 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::IoTDataPlane') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-iotdataplane' context[:gem_version] = '1.85.0' Seahorse::Client::Request.new(handlers, context) end |
#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.
513 514 515 516 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 513 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.
[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [2]: docs.aws.amazon.com/iot/latest/developerguide/API_DeleteThingShadow.html
553 554 555 556 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 553 def delete_thing_shadow(params = {}, = {}) req = build_request(:delete_thing_shadow, 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].
[1]: docs.aws.amazon.com/iot/latest/apireference/API_iotdata_ListRetainedMessages.html [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html [3]: aws.amazon.com/iot-core/pricing/#Messaging
602 603 604 605 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 602 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.
[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [2]: docs.aws.amazon.com/iot/latest/developerguide/API_GetThingShadow.html
642 643 644 645 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 642 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.
688 689 690 691 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 688 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][1
-
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].
[1]: docs.aws.amazon.com/iot/latest/apireference/API_iotdata_GetRetainedMessage.html [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html [3]: aws.amazon.com/iot-core/pricing/#Messaging
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
747 748 749 750 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 747 def (params = {}, = {}) req = build_request(:list_retained_messages, 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].
[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [2]: docs.aws.amazon.com/iot/latest/developerguide/mqtt.html [3]: aws.amazon.com/iot-core/pricing/#Messaging
858 859 860 861 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 858 def publish(params = {}, = {}) req = build_request(:publish, 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.
[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [2]: docs.aws.amazon.com/iot/latest/developerguide/API_UpdateThingShadow.html
902 903 904 905 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 902 def update_thing_shadow(params = {}, = {}) req = build_request(:update_thing_shadow, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
931 932 933 |
# File 'lib/aws-sdk-iotdataplane/client.rb', line 931 def waiter_names [] end |