boto3-refresh-session 5.1.0__py3-none-any.whl → 5.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- boto3_refresh_session/__init__.py +1 -1
- boto3_refresh_session/methods/iot/x509.py +11 -9
- {boto3_refresh_session-5.1.0.dist-info → boto3_refresh_session-5.1.2.dist-info}/METADATA +17 -1
- {boto3_refresh_session-5.1.0.dist-info → boto3_refresh_session-5.1.2.dist-info}/RECORD +7 -7
- {boto3_refresh_session-5.1.0.dist-info → boto3_refresh_session-5.1.2.dist-info}/LICENSE +0 -0
- {boto3_refresh_session-5.1.0.dist-info → boto3_refresh_session-5.1.2.dist-info}/NOTICE +0 -0
- {boto3_refresh_session-5.1.0.dist-info → boto3_refresh_session-5.1.2.dist-info}/WHEEL +0 -0
@@ -382,6 +382,8 @@ class IOTX509RefreshableSession(
|
|
382
382
|
) -> Connection:
|
383
383
|
"""Establishes an MQTT connection using the specified parameters.
|
384
384
|
|
385
|
+
.. versionadded:: 5.1.0
|
386
|
+
|
385
387
|
Parameters
|
386
388
|
----------
|
387
389
|
endpoint: str
|
@@ -390,30 +392,30 @@ class IOTX509RefreshableSession(
|
|
390
392
|
The client ID to use for the MQTT connection.
|
391
393
|
transport: Transport
|
392
394
|
The transport protocol to use (e.g., "x509" or "ws").
|
393
|
-
certificate: str | bytes | None
|
395
|
+
certificate: str | bytes | None, optional
|
394
396
|
The client certificate to use for the connection. Defaults to the
|
395
397
|
session certificate.
|
396
|
-
private_key: str | bytes | None
|
398
|
+
private_key: str | bytes | None, optional
|
397
399
|
The private key to use for the connection. Defaults to the
|
398
400
|
session private key.
|
399
|
-
ca: str | bytes | None
|
401
|
+
ca: str | bytes | None, optional
|
400
402
|
The CA certificate to use for the connection. Defaults to the
|
401
403
|
session CA certificate.
|
402
|
-
pkcs11: PKCS11 | None
|
404
|
+
pkcs11: PKCS11 | None, optional
|
403
405
|
PKCS#11 configuration for hardware-backed keys. Defaults to the
|
404
406
|
session PKCS#11 configuration.
|
405
|
-
region: str | None
|
407
|
+
region: str | None, optional
|
406
408
|
The AWS region to use for the connection. Defaults to the
|
407
409
|
session region.
|
408
|
-
keep_alive_secs: int
|
410
|
+
keep_alive_secs: int, optional
|
409
411
|
The keep-alive interval for the MQTT connection. Default is 60
|
410
412
|
seconds.
|
411
|
-
clean_start: bool
|
413
|
+
clean_start: bool, optional
|
412
414
|
Whether to start a clean session. Default is True.
|
413
|
-
port: int | None
|
415
|
+
port: int | None, optional
|
414
416
|
The port to use for the MQTT connection. Default is 8883 if not
|
415
417
|
using ALPN, otherwise 443.
|
416
|
-
use_alpn: bool
|
418
|
+
use_alpn: bool, optional
|
417
419
|
Whether to use ALPN for the connection. Default is False.
|
418
420
|
|
419
421
|
Returns
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: boto3-refresh-session
|
3
|
-
Version: 5.1.
|
3
|
+
Version: 5.1.2
|
4
4
|
Summary: A simple Python package for refreshing the temporary security credentials in a boto3.session.Session object automatically.
|
5
5
|
License: MIT
|
6
6
|
Keywords: boto3,botocore,aws,sts,credentials,token,refresh,iot,x509,mqtt
|
@@ -341,6 +341,22 @@ pip install boto3-refresh-session
|
|
341
341
|
)
|
342
342
|
```
|
343
343
|
|
344
|
+
### MQTT
|
345
|
+
|
346
|
+
After initializing a session object, you can can begin making actions with MQTT using the [mqtt method](https://github.com/michaelthomasletts/boto3-refresh-session/blob/deb68222925bf648f26e878ed4bc24b45317c7db/boto3_refresh_session/methods/iot/x509.py#L367)! You can reuse the same certificate, private key, et al as that used to initialize `RefreshableSession`. Or, alternatively, you can provide separate PKCS#11 or certificate information, whether those be file paths or bytes values. Either way, at a minimum, you will need to provide the endpoint and client identifier (i.e. thing name).
|
347
|
+
|
348
|
+
```python
|
349
|
+
from awscrt.mqtt.QoS import AT_LEAST_ONCE
|
350
|
+
conn = session.mqtt(
|
351
|
+
endpoint="<your endpoint>-ats.iot.<region>.amazonaws.com",
|
352
|
+
client_id="<your thing name or client ID>",
|
353
|
+
)
|
354
|
+
conn.connect()
|
355
|
+
conn.connect().result()
|
356
|
+
conn.publish(topic="foo/bar", payload=b"hi", qos=AT_LEAST_ONCE)
|
357
|
+
conn.disconnect().result()
|
358
|
+
```
|
359
|
+
|
344
360
|
</details>
|
345
361
|
|
346
362
|
## ⚠️ Changes
|
@@ -1,17 +1,17 @@
|
|
1
|
-
boto3_refresh_session/__init__.py,sha256=
|
1
|
+
boto3_refresh_session/__init__.py,sha256=ChSYpFrZdY-6bITfZK9jwA8zYhlabF_oy7DTN6b5Kw0,415
|
2
2
|
boto3_refresh_session/exceptions.py,sha256=QS5_xy3hNrfkdT_wKPZWH8WqSbFYCKPcK8DomGYIvcU,1218
|
3
3
|
boto3_refresh_session/methods/__init__.py,sha256=FpwWixSVpy_6pUe1u4fXmjO-_fDH--qTk_xrMnBCHxU,193
|
4
4
|
boto3_refresh_session/methods/custom.py,sha256=MLdUMU9s6NQoJWBKQ5Fsxeyxb_Xrm9V59pVX22M8fyI,4178
|
5
5
|
boto3_refresh_session/methods/iot/__init__.py,sha256=wIYp7HFZ_Q8XEHwWmpKjDNXxBm29C0RisP_9GSVwzZI,147
|
6
6
|
boto3_refresh_session/methods/iot/core.py,sha256=xtvbC23h6fw06lRZWN4r7TlnUEf3t9T7-zSPGCSlSLI,1151
|
7
|
-
boto3_refresh_session/methods/iot/x509.py,sha256=
|
7
|
+
boto3_refresh_session/methods/iot/x509.py,sha256=3j6gbZQAZnznZuNEipMyvOqux2RRDgQ65rxlF6LKVZE,19912
|
8
8
|
boto3_refresh_session/methods/sts.py,sha256=NGqJFJNLjG9Mve7o19tb_i6lvgQW1HoALIqF6lJNV9A,3336
|
9
9
|
boto3_refresh_session/session.py,sha256=UM_dWHSo0Wn8gLN99zg36SRVb-Yy_to1wk8UgZEuQZA,2086
|
10
10
|
boto3_refresh_session/utils/__init__.py,sha256=6F2ErbgBT2ZmZwFF3OzvQEd1Vh4XM3kaL6YGMTrcrkQ,156
|
11
11
|
boto3_refresh_session/utils/internal.py,sha256=HbuIzT0pC8QS4pgNj3M7POGaW-OEz2l3ESfYI1Qouuo,7072
|
12
12
|
boto3_refresh_session/utils/typing.py,sha256=YbnVYPe-ZEr79THp78u74PzF6LOIxpf91yGsvBmhEBM,3532
|
13
|
-
boto3_refresh_session-5.1.
|
14
|
-
boto3_refresh_session-5.1.
|
15
|
-
boto3_refresh_session-5.1.
|
16
|
-
boto3_refresh_session-5.1.
|
17
|
-
boto3_refresh_session-5.1.
|
13
|
+
boto3_refresh_session-5.1.2.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
|
14
|
+
boto3_refresh_session-5.1.2.dist-info/METADATA,sha256=J6ydZAYJeMMUmzaHHPNsqueNepZDLTddo2wnFEI_mbg,15135
|
15
|
+
boto3_refresh_session-5.1.2.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
|
16
|
+
boto3_refresh_session-5.1.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
17
|
+
boto3_refresh_session-5.1.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|