Associates a wireless device with a thing.
Parameters:
-
id
(WirelessDeviceId)
–
The ID of the resource to update.
-
thing_arn
(ThingArn)
–
The ARN of the thing to associate with the wireless device.
Raises:
Source code in docs_src/capo_iot_wireless/_services/io_t_wireless.py
| def associate_wireless_device_with_thing(
self,
id: "capo_iot_wireless.types.wireless_device_id.WirelessDeviceId",
thing_arn: "capo_iot_wireless.types.thing_arn.ThingArn",
*,
config_overrides: Optional[IoTWirelessClientConfig] = None,
) -> "capo_iot_wireless.types.associate_wireless_device_with_thing_response.AssociateWirelessDeviceWithThingResponse":
"""<p>Associates a wireless device with a thing.</p>
Args:
id: <p>The ID of the resource to update.</p>
thing_arn: <p>The ARN of the thing to associate with the wireless device.</p>
Raises:
capo_iot_wireless.errors.access_denied_exception.AccessDeniedException: <p>User does not have permission to perform this action.</p>
capo_iot_wireless.errors.conflict_exception.ConflictException: <p>Adding, updating, or deleting the resource can cause an inconsistent state.</p>
capo_iot_wireless.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request.</p>
capo_iot_wireless.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource does not exist.</p>
capo_iot_wireless.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed API request rate.</p>
capo_iot_wireless.errors.validation_exception.ValidationException: <p>The input did not meet the specified constraints.</p>
capo_iot_wireless.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iot_wireless.types.associate_wireless_device_with_thing_request.AssociateWirelessDeviceWithThingRequest]",
) -> OperationResponse[
"capo_iot_wireless.types.associate_wireless_device_with_thing_response.AssociateWirelessDeviceWithThingResponse"
]:
import capo_iot_wireless._operations.iotwireless.associate_wireless_device_with_thing
output, http_response = (
capo_iot_wireless._operations.iotwireless.associate_wireless_device_with_thing.associate_wireless_device_with_thing(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateWirelessDeviceWithThing")
)
input_: capo_iot_wireless.types.associate_wireless_device_with_thing_request.AssociateWirelessDeviceWithThingRequest = {
"id": id,
"thing_arn": thing_arn,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|