From 86408a8777e623f5f41e260472ed831309b85086 Mon Sep 17 00:00:00 2001 From: Andrew Peacock Date: Mon, 28 Jun 2021 13:37:03 -0700 Subject: [PATCH] Adding 2021-06-21 TURN API version (#14955) --- custom-words.txt | 1 + .../CommunicationTurn.json | 3 + .../2021-06-21-preview/CommunicationTurn.json | 157 ++++++++++++++++++ .../examples/IssueRelayConfiguration.json | 26 +++ .../communication/data-plane/Turn/readme.md | 9 + 5 files changed, 196 insertions(+) create mode 100644 specification/communication/data-plane/Turn/preview/2021-06-21-preview/CommunicationTurn.json create mode 100644 specification/communication/data-plane/Turn/preview/2021-06-21-preview/examples/IssueRelayConfiguration.json diff --git a/custom-words.txt b/custom-words.txt index e5e8d5cd0f60..2e67d269e71c 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1224,6 +1224,7 @@ Netfilter networkruleset networkrulesets networkstatus +networktraversal networkwatcher newpassword newrelapp diff --git a/specification/communication/data-plane/Turn/preview/2021-02-22-preview1/CommunicationTurn.json b/specification/communication/data-plane/Turn/preview/2021-02-22-preview1/CommunicationTurn.json index 80a74723b203..90274733cebf 100644 --- a/specification/communication/data-plane/Turn/preview/2021-02-22-preview1/CommunicationTurn.json +++ b/specification/communication/data-plane/Turn/preview/2021-02-22-preview1/CommunicationTurn.json @@ -106,6 +106,9 @@ "name": "api-version", "description": "Version of API to invoke.", "required": true, + "enum": [ + "2021-02-22-preview1" + ], "type": "string" } }, diff --git a/specification/communication/data-plane/Turn/preview/2021-06-21-preview/CommunicationTurn.json b/specification/communication/data-plane/Turn/preview/2021-06-21-preview/CommunicationTurn.json new file mode 100644 index 000000000000..e80c4cf07de8 --- /dev/null +++ b/specification/communication/data-plane/Turn/preview/2021-06-21-preview/CommunicationTurn.json @@ -0,0 +1,157 @@ +{ + "swagger": "2.0", + "info": { + "title": "CommunicationNetworkingClient", + "description": "Azure Communication Networking Service", + "version": "2021-06-21-preview" + }, + "paths": { + "/networktraversal/:issueRelayConfiguration": { + "post": { + "tags": [ + "Turn" + ], + "summary": "Issue a configuration for an STUN/TURN server for an existing identity.", + "operationId": "CommunicationNetworkTraversal_IssueRelayConfiguration", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CommunicationRelayConfigurationRequest" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/CommunicationRelayConfiguration" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-examples": { + "Issue Relay Configuration": { + "$ref": "./examples/IssueRelayConfiguration.json" + } + } + } + } + }, + "definitions": { + "CommunicationRelayConfigurationRequest": { + "description": "Request for a CommunicationRelayConfiguration.", + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "An existing ACS identity.", + "type": "string" + } + } + }, + "CommunicationIceServer": { + "description": "An instance of a STUN/TURN server with credentials to be used for ICE negotiation.", + "required": [ + "credential", + "urls", + "username" + ], + "type": "object", + "properties": { + "urls": { + "description": "List of STUN/TURN server URLs.", + "type": "array", + "items": { + "type": "string" + } + }, + "username": { + "description": "User account name which uniquely identifies the credentials.", + "type": "string" + }, + "credential": { + "description": "Credential for the server.", + "type": "string" + } + } + }, + "CommunicationRelayConfiguration": { + "description": "A relay configuration containing the STUN/TURN URLs and credentials.", + "required": [ + "expiresOn", + "iceServers" + ], + "type": "object", + "properties": { + "expiresOn": { + "format": "date-time", + "description": "The date for which the username and credentials are not longer valid.", + "type": "string" + }, + "iceServers": { + "description": "An array representing the credentials and the STUN/TURN server URLs for use in ICE negotiations.", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationIceServer" + } + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "in": "query", + "name": "api-version", + "description": "Version of API to invoke.", + "required": true, + "enum": [ + "2021-06-21-preview" + ], + "type": "string" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "description": "The communication resource, for example https://my-resource.communication.azure.com", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + ] + } +} diff --git a/specification/communication/data-plane/Turn/preview/2021-06-21-preview/examples/IssueRelayConfiguration.json b/specification/communication/data-plane/Turn/preview/2021-06-21-preview/examples/IssueRelayConfiguration.json new file mode 100644 index 000000000000..2f9afc180120 --- /dev/null +++ b/specification/communication/data-plane/Turn/preview/2021-06-21-preview/examples/IssueRelayConfiguration.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-06-21-preview", + "content-type": "application/json", + "body": { + "id": "8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "expiresOn": "2020-09-10T21:39:39.3244584+00:00", + "iceServers": [ + { + "urls": [ + "turn:131.107.255.255:3478" + ], + "username": "AgAAJNOeygwB1uVGvuwAVMHV4PLhYDgY66Fg1dUZvQ4AAAAEhXrhc8uJFjOK8lxEsZk3KIpWxc0=", + "credential": "9rl8ablFWj6/aqSuPLgLykLZKqw=" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Turn/readme.md b/specification/communication/data-plane/Turn/readme.md index ef1a1f47ba50..7c074acdd7ff 100644 --- a/specification/communication/data-plane/Turn/readme.md +++ b/specification/communication/data-plane/Turn/readme.md @@ -40,6 +40,15 @@ title: Azure Communication Services ``` +### Tag: package-2021-06-21-preview + +These settings apply only when `--tag=package-2021-06-21-preview` is specified on the command line. + +```yaml $(tag) == 'package-2021-06-21-preview' +input-file: + - preview/2021-06-21-preview/CommunicationTurn.json +``` + --- # Code Generation