Gets the Interactive Connectivity Establishment (ICE) server configuration information, including URIs, username, and password which can be used to configure the WebRTC connection. The ICE component uses this configuration information to setup the WebRTC connection, including authenticating with the Traversal Using Relays around NAT (TURN) relay server.
TURN is a protocol that is used to improve the connectivity of peer-to-peer applications. By providing a cloud-based relay service, TURN ensures that a connection can be established even when one or more peers are incapable of a direct peer-to-peer connection. For more information, see A REST API For Access To TURN Services.
You can invoke this API to establish a fallback mechanism in case either of the peers is unable to establish a direct peer-to-peer connection over a signaling channel. You must specify either a signaling channel ARN or the client ID in order to invoke this API.
Parameters:
-
channel_arn
(Optional[ResourceARN], default:
None
)
–
The ARN of the signaling channel to be used for the peer-to-peer connection between configured peers.
-
client_id
(Optional[ClientId], default:
None
)
–
Unique identifier for the viewer. Must be unique within the signaling channel.
-
service
(Optional[Service], default:
None
)
–
Specifies the desired service. Currently, TURN is the only valid value.
-
username
(Optional[Username], default:
None
)
–
An optional user ID to be associated with the credentials.
Raises:
Source code in docs_src/capo_kinesis_video_signaling/_services/async_kinesis_video_signaling.py
| async def get_ice_server_config(
self,
*,
config_overrides: Optional[AsyncKinesisVideoSignalingClientConfig] = None,
channel_arn: Optional[
"capo_kinesis_video_signaling.types.resource_arn.ResourceARN"
] = None,
client_id: Optional[
"capo_kinesis_video_signaling.types.client_id.ClientId"
] = None,
service: Optional["capo_kinesis_video_signaling.types.service.Service"] = None,
username: Optional[
"capo_kinesis_video_signaling.types.username.Username"
] = None,
) -> "capo_kinesis_video_signaling.types.get_ice_server_config_response.GetIceServerConfigResponse":
"""<p>Gets the Interactive Connectivity Establishment (ICE) server configuration information, including URIs, username, and password which can be used to configure the WebRTC connection. The ICE component uses this configuration information to setup the WebRTC connection, including authenticating with the Traversal Using Relays around NAT (TURN) relay server. </p> <p>TURN is a protocol that is used to improve the connectivity of peer-to-peer applications. By providing a cloud-based relay service, TURN ensures that a connection can be established even when one or more peers are incapable of a direct peer-to-peer connection. For more information, see <a href="https://tools.ietf.org/html/draft-uberti-rtcweb-turn-rest-00">A REST API For Access To TURN Services</a>.</p> <p> You can invoke this API to establish a fallback mechanism in case either of the peers is unable to establish a direct peer-to-peer connection over a signaling channel. You must specify either a signaling channel ARN or the client ID in order to invoke this API.</p>
Args:
channel_arn: <p>The ARN of the signaling channel to be used for the peer-to-peer connection between configured peers. </p>
client_id: <p>Unique identifier for the viewer. Must be unique within the signaling channel.</p>
service: <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid value.</p>
username: <p>An optional user ID to be associated with the credentials.</p>
Raises:
capo_kinesis_video_signaling.errors.client_limit_exceeded_exception.ClientLimitExceededException: <p>Your request was throttled because you have exceeded the limit of allowed client calls. Try making the call later.</p>
capo_kinesis_video_signaling.errors.invalid_argument_exception.InvalidArgumentException: <p>The value for this input parameter is invalid.</p>
capo_kinesis_video_signaling.errors.invalid_client_exception.InvalidClientException: <p>The specified client is invalid.</p>
capo_kinesis_video_signaling.errors.not_authorized_exception.NotAuthorizedException: <p>The caller is not authorized to perform this operation.</p>
capo_kinesis_video_signaling.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource is not found.</p>
capo_kinesis_video_signaling.errors.session_expired_exception.SessionExpiredException: <p>If the client session is expired. Once the client is connected, the session is valid for 45 minutes. Client should reconnect to the channel to continue sending/receiving messages.</p>
capo_kinesis_video_signaling.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_kinesis_video_signaling.types.get_ice_server_config_request.GetIceServerConfigRequest]",
) -> AsyncOperationResponse[
"capo_kinesis_video_signaling.types.get_ice_server_config_response.GetIceServerConfigResponse"
]:
import capo_kinesis_video_signaling._operations.aws_acuity_signaling_service.get_ice_server_config
(
output,
http_response,
) = await capo_kinesis_video_signaling._operations.aws_acuity_signaling_service.get_ice_server_config.async_get_ice_server_config(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetIceServerConfig")
)
input_: capo_kinesis_video_signaling.types.get_ice_server_config_request.GetIceServerConfigRequest = {}
if channel_arn is not None:
input_["channel_arn"] = channel_arn
if client_id is not None:
input_["client_id"] = client_id
if service is not None:
input_["service"] = service
if username is not None:
input_["username"] = username
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|