Skip to content

Commit

Permalink
Update PR
Browse files Browse the repository at this point in the history
  • Loading branch information
AriZavala2 committed Nov 16, 2021
1 parent ad9f0ca commit 4b18edf
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
as CommunicationNetworkTraversalClientGen
from ._shared.utils import parse_connection_str, get_authentication_policy
from ._version import SDK_MONIKER
from ._generated.models import CommunicationRelayConfiguration

if TYPE_CHECKING:
from azure.core.credentials import TokenCredential
from azure.communication.identity import CommunicationUserIdentifier
from azure.communication.networktraversal import RouteType

class CommunicationRelayClient(object):
"""Azure Communication Services Relay client.
Expand Down Expand Up @@ -84,12 +86,16 @@ def from_connection_string(
@distributed_trace
def get_relay_configuration(
self,
user: 'CommunicationUserIdentifier' = None,
route_type: 'CommunicationRelayConfigurationRequestRouteType' = None,
user=None, # type: CommunicationUserIdentifier
route_type=None, #type: RouteType
**kwargs # type: Any
) -> 'CommunicationRelayConfiguration':
):
# type: (...) -> CommunicationRelayConfiguration
"""get a Communication Relay configuration
:param: CommunicationUserIdentifier user: A user from which we will get an id
:param user: Azure Communication User
:type user: ~azure.communication.identity.CommunicationUserIdentifier
:param route_type: Azure Communication Route Type
:type route_type: ~azure.communication.networktraversal.RouteType
:return: CommunicationRelayConfiguration
:rtype: ~azure.communication.networktraversal.models.CommunicationRelayConfiguration
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ async def get_relay_configuration(
**kwargs # type: Any
) -> 'CommunicationRelayConfiguration':
"""get a Communication Relay configuration.
:param: CommunicationUserIdentifier user: A user from which we will get an id
:param user: Azure Communication User
:type user: ~azure.communication.identity.CommunicationUserIdentifier
:param route_type: Azure Communication Route Type
:type route_type: ~azure.communication.networktraversal.RouteType
:return: CommunicationRelayConfiguration
:rtype: ~azure.communication.networktraversal.models.CommunicationRelayConfiguration
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interactions:
User-Agent:
- azsdk-python-communication-identity/1.1.0b2 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:13 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -32,17 +32,17 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:13 GMT
ms-cv:
- qI09mrYTPUuAtVj/PabBww.0
- rMk10TBNvUqvS4oHz1IS/A.0
request-context:
- appId=
strict-transport-security:
- max-age=2592000
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 23ms
- 22ms
status:
code: 201
message: Created
Expand All @@ -62,7 +62,7 @@ interactions:
User-Agent:
- azsdk-python-communication-networktraversal/1.0.0b1 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:13 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -72,27 +72,27 @@ interactions:
string: '{"iceServers": [{"routeType": "any", "urls": ["turn.skype.com", "turn:world.relay.skype.com:3478"],
"username": "sanitized", "credential": "sanitized"}, {"routeType": "nearest",
"urls": ["stun:13.107.17.41:3478", "turn:13.107.17.41:3478"], "username":
"BQAANnQYA/8B19w2XJI64cWPuSblG0LB/y/+9Z+Xbm4AAAAMARCsgNlqhd5IsZldo6P6NifI1sBqyfp3/I9YO2DhmIV60ZOijWg=",
"credential": "K6OG/tyorha4BEYTKagDZt+cxG8="}], "expiresOn": "2021-11-16T04:40:46.495112+00:00"}'
"BQAANs/yomQB19ynHsyCrY2MbvzaJwv0gMDo0xYRPUkAAAAMARCsgNlqhd5IsZldo6P6NifIRdfvTVWYnnh2/8NGGhXsQ4Rxtr4=",
"credential": "lOKKYLHezJ6nfn9w2XkK4VLnn6w="}], "expiresOn": "2021-11-16T18:12:13.7183673+00:00"}'
headers:
api-supported-versions:
- 2021-02-22-preview1, 2021-06-21-preview, 2021-10-08-preview
content-length:
- '559'
- '560'
content-type:
- application/json; charset=utf-8
date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:13 GMT
ms-cv:
- h9Fh2W/OIUWhTVn9wTM1oQ.0
- a8WXPhWFpEKMOH10HY4JQw.0
request-context:
- appId=
strict-transport-security:
- max-age=2592000
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 80ms
- 21ms
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interactions:
User-Agent:
- azsdk-python-communication-identity/1.1.0b2 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:13 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -32,9 +32,9 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:13 GMT
ms-cv:
- BfDeZYO3AEyM5dy+AnonDw.0
- tMAatS3hakCNEz7IBeVQuw.0
request-context:
- appId=
strict-transport-security:
Expand Down Expand Up @@ -62,15 +62,15 @@ interactions:
User-Agent:
- azsdk-python-communication-networktraversal/1.0.0b1 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:13 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
uri: https://sanitized.communication.azure.com/networktraversal/:issueRelayConfiguration?api-version=2021-10-08-preview
response:
body:
string: '{"iceServers": [{"routeType": "any", "urls": ["turn.skype.com", "turn:world.relay.skype.com:3478"],
"username": "sanitized", "credential": "sanitized"}], "expiresOn": "2021-11-16T04:40:46.7398695+00:00"}'
"username": "sanitized", "credential": "sanitized"}], "expiresOn": "2021-11-16T18:12:14.2059608+00:00"}'
headers:
api-supported-versions:
- 2021-02-22-preview1, 2021-06-21-preview, 2021-10-08-preview
Expand All @@ -79,17 +79,17 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
ms-cv:
- ip6U5Ji77k+Q1DO1+2Gg0w.0
- A7op7aWw7E2ZCoEwl5fAmA.0
request-context:
- appId=
strict-transport-security:
- max-age=2592000
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 22ms
- 251ms
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interactions:
User-Agent:
- azsdk-python-communication-identity/1.1.0b2 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -32,17 +32,17 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
ms-cv:
- gI04zYnvoUy8jBb5Y1wBSQ.0
- CmiBTU1NwEyy87FuhEBK7A.0
request-context:
- appId=
strict-transport-security:
- max-age=2592000
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 25ms
- 27ms
status:
code: 201
message: Created
Expand All @@ -62,7 +62,7 @@ interactions:
User-Agent:
- azsdk-python-communication-networktraversal/1.0.0b1 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -71,7 +71,7 @@ interactions:
body:
string: '{"iceServers": [{"routeType": "nearest", "urls": ["turn.skype.com",
"turn:13.107.17.41:3478"], "username": "sanitized", "credential": "sanitized"}],
"expiresOn": "2021-11-16T04:40:47.0013447+00:00"}'
"expiresOn": "2021-11-16T18:12:14.4601949+00:00"}'
headers:
api-supported-versions:
- 2021-02-22-preview1, 2021-06-21-preview, 2021-10-08-preview
Expand All @@ -80,17 +80,17 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:13 GMT
ms-cv:
- 2x+A1+Jba0WqkXohqm0ICQ.0
- Nb3xPuBb/Uakdw1OPiFXNw.0
request-context:
- appId=
strict-transport-security:
- max-age=2592000
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 23ms
- 21ms
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interactions:
User-Agent:
- azsdk-python-communication-networktraversal/1.0.0b1 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:47 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -25,8 +25,8 @@ interactions:
string: '{"iceServers": [{"routeType": "any", "urls": ["turn.skype.com", "turn:world.relay.skype.com:3478"],
"username": "sanitized", "credential": "sanitized"}, {"routeType": "nearest",
"urls": ["stun:13.107.17.41:3478", "turn:13.107.17.41:3478"], "username":
"BQAANnSBao0B19w2X3qe7o9e7W+6rvySC4FEqP0Jp0QAAAAMARCsgNlqhd5IsZldo6P6NifIf0Y1au0lIjmsCWlNNw3+1jt/4FE=",
"credential": "jcE0W+ai0GTWM29K0Q4nnsVS4UI="}], "expiresOn": "2021-11-16T04:40:47.1711817+00:00"}'
"BQAANtBz/NYB19yn7SY1nkF612kTjgmPttjhkO6JCNwAAAAMARCsgNlqhd5IsZldo6P6NifID2+vKJ0vXLUjx7ZnoagxJH/7578=",
"credential": "HaIJfgMzmK926LaQhAYHwNHmcl8="}], "expiresOn": "2021-11-16T18:12:14.5755767+00:00"}'
headers:
api-supported-versions:
- 2021-02-22-preview1, 2021-06-21-preview, 2021-10-08-preview
Expand All @@ -35,9 +35,9 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 16 Nov 2021 04:40:46 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
ms-cv:
- 7iXw5vjfgkGvhAx8VKBp2Q.0
- tkBLnT2bVEOs+LkVHtAWtA.0
request-context:
- appId=
strict-transport-security:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
User-Agent:
- azsdk-python-communication-identity/1.1.0b2 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:47 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -24,12 +24,12 @@ interactions:
2021-03-31-preview1, 2021-10-31-preview, 2021-11-01
content-length: '101'
content-type: application/json; charset=utf-8
date: Tue, 16 Nov 2021 04:40:46 GMT
ms-cv: 3+1oH5z9t0OADoly/cuolA.0
date: Tue, 16 Nov 2021 18:12:14 GMT
ms-cv: BWgT7mkiqkqAXPurnvmOog.0
request-context: appId=
strict-transport-security: max-age=2592000
x-cache: CONFIG_NOCACHE
x-processing-time: 26ms
x-processing-time: 24ms
status:
code: 201
message: Created
Expand All @@ -46,7 +46,7 @@ interactions:
User-Agent:
- azsdk-python-communication-networktraversal/1.0.0b1 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:47 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -56,18 +56,18 @@ interactions:
string: '{"iceServers": [{"routeType": "any", "urls": ["turn.skype.com", "turn:world.relay.skype.com:3478"],
"username": "sanitized", "credential": "sanitized"}, {"routeType": "nearest",
"urls": ["stun:13.107.17.41:3478", "turn:13.107.17.41:3478"], "username":
"BQAANnSXU4EB19w2aCWTWAJL01t6XoklNPG7HphtE/8AAAAMARCsgNlqhd5IsZldo6P6NifIEHLHZlovGBYG/Um0CEiYowfIPEM=",
"credential": "zQTkxP2TkfXcd37rPKsaK8x47mE="}], "expiresOn": "2021-11-16T04:40:47.3233983+00:00"}'
"BQAANtCRunEB19ynz1zYrstqWuXcDScC9OxMUAmTSGYAAAAMARCsgNlqhd5IsZldo6P6NifIxO0N8PGDcYESPk3DLuFqQUanDuI=",
"credential": "xymBhFWwcyX8FqwGvSK7IiPA2Mo="}], "expiresOn": "2021-11-16T18:12:14.7734624+00:00"}'
headers:
api-supported-versions: 2021-02-22-preview1, 2021-06-21-preview, 2021-10-08-preview
content-length: '560'
content-type: application/json; charset=utf-8
date: Tue, 16 Nov 2021 04:40:46 GMT
ms-cv: adJLtbC3R02Dl6M5sFljLw.0
date: Tue, 16 Nov 2021 18:12:14 GMT
ms-cv: VfNWUpSrr0K5aKqXSx3qTQ.0
request-context: appId=
strict-transport-security: max-age=2592000
x-cache: CONFIG_NOCACHE
x-processing-time: 22ms
x-processing-time: 34ms
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
User-Agent:
- azsdk-python-communication-identity/1.1.0b2 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:47 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -24,12 +24,12 @@ interactions:
2021-03-31-preview1, 2021-10-31-preview, 2021-11-01
content-length: '101'
content-type: application/json; charset=utf-8
date: Tue, 16 Nov 2021 04:40:47 GMT
ms-cv: m/sTsHdtBUSU/ZLS1u+p4w.0
date: Tue, 16 Nov 2021 18:12:14 GMT
ms-cv: LEAkDfI/fEi/OJCg03CiIQ.0
request-context: appId=
strict-transport-security: max-age=2592000
x-cache: CONFIG_NOCACHE
x-processing-time: 23ms
x-processing-time: 28ms
status:
code: 201
message: Created
Expand All @@ -46,21 +46,21 @@ interactions:
User-Agent:
- azsdk-python-communication-networktraversal/1.0.0b1 Python/3.7.4 (Windows-10-10.0.22494-SP0)
x-ms-date:
- Tue, 16 Nov 2021 04:40:47 GMT
- Tue, 16 Nov 2021 18:12:14 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
uri: https://sanitized.communication.azure.com/networktraversal/:issueRelayConfiguration?api-version=2021-10-08-preview
response:
body:
string: '{"iceServers": [{"routeType": "any", "urls": ["turn.skype.com", "turn:world.relay.skype.com:3478"],
"username": "sanitized", "credential": "sanitized"}], "expiresOn": "2021-11-16T04:40:47.511629+00:00"}'
"username": "sanitized", "credential": "sanitized"}], "expiresOn": "2021-11-16T18:12:14.9614738+00:00"}'
headers:
api-supported-versions: 2021-02-22-preview1, 2021-06-21-preview, 2021-10-08-preview
content-length: '318'
content-length: '319'
content-type: application/json; charset=utf-8
date: Tue, 16 Nov 2021 04:40:47 GMT
ms-cv: d49KyvQFC0Cf2j4Au4SALQ.0
date: Tue, 16 Nov 2021 18:12:14 GMT
ms-cv: t/AVmHA780enpqECFu5waw.0
request-context: appId=
strict-transport-security: max-age=2592000
x-cache: CONFIG_NOCACHE
Expand Down
Loading

0 comments on commit 4b18edf

Please sign in to comment.