-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iot-data api has incorrect prefix, hence does not work #1064
Comments
There are a couple things going on here, I'll break it down one at a time. First, IoT data plane uses an endpoint unique to you, which is the reason that we require you explicitly define an endpoint. Consider the following: # Note that you do not need to explicitly define an endpoint.
iot = Aws::IoT::Client.new(region: "us-east-1")
# Throws an ArgumentError
Aws::IoTDataPlane::Client.new(region: "us-east-1")
# Valid
client = Aws::IoTDataPlane::Client.new(
region: "us-east-1",
endpoint: "https://#{iot.describe_endpoint.endpoint_address}"
) |
The second part is a bug between the server and client that I am currently looking at. To help illustrate, let's expand on that last example: iot = Aws::IoT::Client.new(region: "us-east-1")
client = Aws::IoTDataPlane::Client.new(
region: "us-east-1",
endpoint: "https://#{iot.describe_endpoint.endpoint_address}",
http_wire_trace: true
)
client.publish(topic: "foo") You'll see something like this:
We try to parse the response of |
Even when the API model did not have an explicitly modeled response shape, we would attempt to parse the response body. With this change, we will instead return an empty structure in these cases. Resolves GitHub Issue #1064
We've taken a different approach on this than a customization, but we've confirmed a fix for this. Will go out with the next release. |
The file aws-sdk-core/apis/iot-data/2015-05-28/api-2.json lists the endpoint for the iot-data API as "data.iot", however this is not a correct endpoint. If you then proceed to attempt to access the given API via the ruby aws sdk with something like:
something like this happens:
If I manually edit the api descriptor file and change the endpoint to "iot", I get something like:
Which looks like another bug parsing the response, but is seemingly a successful operation (I get things delivered to the broker).
The text was updated successfully, but these errors were encountered: