Skip to content

Commit 7a917b1

Browse files
AriZavala2jovannikolov-msft
authored andcommitted
Adding new API version that includes Anycast option (RouteType) (Azure#16040)
* Making user identity not required and adding Routype * Make the request and routeType not to be required * Update readme with new tags for API version * Prettier fix for json * Only making the AnyCast change. The non-identity will be a separate change * Update removing identity requirement * Update enum to correct version
1 parent dd7975c commit 7a917b1

File tree

3 files changed

+208
-0
lines changed

3 files changed

+208
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "CommunicationNetworkingClient",
5+
"description": "Azure Communication Networking Service",
6+
"version": "2021-10-08-preview"
7+
},
8+
"paths": {
9+
"/networktraversal/:issueRelayConfiguration": {
10+
"post": {
11+
"tags": [
12+
"Turn"
13+
],
14+
"summary": "Issue a configuration for an STUN/TURN server for an existing identity.",
15+
"operationId": "CommunicationNetworkTraversal_IssueRelayConfiguration",
16+
"consumes": [
17+
"application/json"
18+
],
19+
"produces": [
20+
"application/json"
21+
],
22+
"parameters": [
23+
{
24+
"$ref": "#/parameters/ApiVersionParameter"
25+
},
26+
{
27+
"in": "body",
28+
"name": "body",
29+
"schema": {
30+
"$ref": "#/definitions/CommunicationRelayConfigurationRequest"
31+
}
32+
}
33+
],
34+
"responses": {
35+
"200": {
36+
"description": "Success",
37+
"schema": {
38+
"$ref": "#/definitions/CommunicationRelayConfiguration"
39+
}
40+
},
41+
"default": {
42+
"description": "Error",
43+
"schema": {
44+
"$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse"
45+
}
46+
}
47+
},
48+
"x-ms-examples": {
49+
"Issue Relay Configuration": {
50+
"$ref": "./examples/IssueRelayConfiguration.json"
51+
}
52+
}
53+
}
54+
}
55+
},
56+
"definitions": {
57+
"CommunicationRelayConfigurationRequest": {
58+
"description": "Request for a CommunicationRelayConfiguration.",
59+
"type": "object",
60+
"properties": {
61+
"id": {
62+
"description": "An existing ACS identity.",
63+
"type": "string"
64+
},
65+
"routeType": {
66+
"description": "The routing methodology to where the ICE server will be located from the client.",
67+
"type": "string",
68+
"default": "any",
69+
"enum": [
70+
"any",
71+
"nearest"
72+
]
73+
}
74+
}
75+
},
76+
"CommunicationIceServer": {
77+
"description": "An instance of a STUN/TURN server with credentials to be used for ICE negotiation.",
78+
"required": [
79+
"credential",
80+
"urls",
81+
"username",
82+
"routeType"
83+
],
84+
"type": "object",
85+
"properties": {
86+
"urls": {
87+
"description": "List of STUN/TURN server URLs.",
88+
"type": "array",
89+
"items": {
90+
"type": "string"
91+
}
92+
},
93+
"username": {
94+
"description": "User account name which uniquely identifies the credentials.",
95+
"type": "string"
96+
},
97+
"credential": {
98+
"description": "Credential for the server.",
99+
"type": "string"
100+
},
101+
"routeType": {
102+
"description": "The routing methodology to where the ICE server will be located from the client.",
103+
"type": "string",
104+
"enum": [
105+
"any",
106+
"nearest"
107+
]
108+
}
109+
}
110+
},
111+
"CommunicationRelayConfiguration": {
112+
"description": "A relay configuration containing the STUN/TURN URLs and credentials.",
113+
"required": [
114+
"expiresOn",
115+
"iceServers"
116+
],
117+
"type": "object",
118+
"properties": {
119+
"expiresOn": {
120+
"format": "date-time",
121+
"description": "The date for which the username and credentials are not longer valid.",
122+
"type": "string"
123+
},
124+
"iceServers": {
125+
"description": "An array representing the credentials and the STUN/TURN server URLs for use in ICE negotiations.",
126+
"type": "array",
127+
"items": {
128+
"$ref": "#/definitions/CommunicationIceServer"
129+
}
130+
}
131+
}
132+
}
133+
},
134+
"parameters": {
135+
"ApiVersionParameter": {
136+
"in": "query",
137+
"name": "api-version",
138+
"description": "Version of API to invoke.",
139+
"required": true,
140+
"enum": [
141+
"2021-10-08-preview"
142+
],
143+
"type": "string"
144+
}
145+
},
146+
"securityDefinitions": {
147+
"azure_auth": {
148+
"type": "oauth2",
149+
"flow": "implicit",
150+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
151+
"scopes": {
152+
"user_impersonation": "impersonate your user account"
153+
}
154+
}
155+
},
156+
"x-ms-parameterized-host": {
157+
"hostTemplate": "{endpoint}",
158+
"useSchemePrefix": false,
159+
"parameters": [
160+
{
161+
"name": "endpoint",
162+
"description": "The communication resource, for example https://my-resource.communication.azure.com",
163+
"required": true,
164+
"type": "string",
165+
"in": "path",
166+
"x-ms-skip-url-encoding": true,
167+
"x-ms-parameter-location": "client"
168+
}
169+
]
170+
}
171+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-08-preview",
4+
"content-type": "application/json",
5+
"body": {
6+
"id": "8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081"
7+
},
8+
"endpoint": "https://my-resource.communication.azure.com"
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"expiresOn": "2021-11-10T21:39:39.3244584+00:00",
14+
"iceServers": [
15+
{
16+
"urls": [
17+
"turn:131.107.255.255:3478",
18+
"stun:131.107.255.255:3478"
19+
],
20+
"username": "AgAAJNOeygwB1uVGvuwAVMHV4PLhYDgY66Fg1dUZvQ4AAAAEhXrhc8uJFjOK8lxEsZk3KIpWxc0=",
21+
"credential": "9rl8ablFWj6/aqSuPLgLykLZKqw=",
22+
"routeType": "any"
23+
}
24+
]
25+
}
26+
}
27+
}
28+
}

specification/communication/data-plane/NetworkTraversal/readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ input-file:
4949
- preview/2021-06-21-preview/CommunicationNetworkTraversal.json
5050
```
5151

52+
### Tag: package-2021-10-08-preview
53+
54+
These settings apply only when `--tag=package-2021-10-08-preview` is specified on the command line.
55+
56+
```yaml $(tag) == 'package-2021-10-08-preview'
57+
input-file:
58+
- preview/2021-10-08-preview/CommunicationNetworkTraversal.json
59+
```
60+
5261
---
5362

5463
# Code Generation

0 commit comments

Comments
 (0)