From cdcf3fbefdc9fd804a2ea6d3c643c43c80272c23 Mon Sep 17 00:00:00 2001 From: Chenyang Liu Date: Fri, 9 Jun 2023 10:48:25 +0800 Subject: [PATCH] Add 2023-07-01 --- .../examples/HealthApi_GetServiceStatus.json | 2 +- .../WebPubSub_AddConnectionToGroup.json | 2 +- .../WebPubSub_AddConnectionsToGroups.json | 9 + .../examples/WebPubSub_AddUserToGroup.json | 2 +- .../examples/WebPubSub_CheckPermission.json | 2 +- .../WebPubSub_CloseAllConnections.json | 2 +- .../examples/WebPubSub_CloseConnection.json | 2 +- .../WebPubSub_CloseGroupConnections.json | 2 +- .../WebPubSub_CloseUserConnections.json | 2 +- .../examples/WebPubSub_ConnectionExists.json | 2 +- .../WebPubSub_GenerateClientToken.json | 2 +- .../examples/WebPubSub_GrantPermission.json | 2 +- .../examples/WebPubSub_GroupExists.json | 2 +- .../examples/WebPubSub_GroupInvoke.json | 15 + ...bPubSub_RemoveConnectionFromAllGroups.json | 2 +- .../WebPubSub_RemoveConnectionFromGroup.json | 2 +- ...WebPubSub_RemoveConnectionsFromGroups.json | 9 + .../WebPubSub_RemoveUserFromAllGroups.json | 2 +- .../WebPubSub_RemoveUserFromGroup.json | 2 +- .../examples/WebPubSub_RevokePermission.json | 2 +- .../examples/WebPubSub_SendToAll.json | 3 +- .../examples/WebPubSub_SendToConnection.json | 3 +- .../examples/WebPubSub_SendToGroup.json | 3 +- .../examples/WebPubSub_SendToUser.json | 3 +- .../examples/WebPubSub_UserExists.json | 2 +- .../stable/2023-07-01/webpubsub.json | 312 +++++++++++++++++- specification/webpubsub/data-plane/readme.md | 37 ++- 27 files changed, 391 insertions(+), 39 deletions(-) create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddConnectionsToGroups.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GroupInvoke.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionsFromGroups.json diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/HealthApi_GetServiceStatus.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/HealthApi_GetServiceStatus.json index a3dd73c9ab1b..5d01bd171145 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/HealthApi_GetServiceStatus.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/HealthApi_GetServiceStatus.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01" + "api-version": "2023-07-01" }, "responses": { "200": {} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddConnectionToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddConnectionToGroup.json index 83e293bdaf0a..c8f5a88d113f 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddConnectionToGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddConnectionToGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "group": "group1", "connectionId": "connection1" diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddConnectionsToGroups.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddConnectionsToGroups.json new file mode 100644 index 000000000000..31b180029e47 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddConnectionsToGroups.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hub": "hub1" + }, + "responses": { + "202": {} + } +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddUserToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddUserToGroup.json index 6e9f866f587b..012f55fe4b9d 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddUserToGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_AddUserToGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "group": "group1", "userId": "user1" diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CheckPermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CheckPermission.json index 766641513697..2410bb4c9cc3 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CheckPermission.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CheckPermission.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "permission": "joinLeaveGroup", "connectionId": "connection1", diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseAllConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseAllConnections.json index bfabc81aedf9..d0ced81dd1a8 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseAllConnections.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseAllConnections.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "reason": "Close reason" }, diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseConnection.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseConnection.json index 189d836fc3ed..483f7dfae401 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseConnection.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseConnection.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "connectionId": "connection1", "reason": "Close reason" diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseGroupConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseGroupConnections.json index f8d9981bf22a..fa11c8f8c235 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseGroupConnections.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseGroupConnections.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "group": "group1", "reason": "Close reason" diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseUserConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseUserConnections.json index 3bf5928d83ce..995b3b194cac 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseUserConnections.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_CloseUserConnections.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "userId": "user1", "reason": "Close reason" diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_ConnectionExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_ConnectionExists.json index af2778a44fd8..1b0ea37b08a0 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_ConnectionExists.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_ConnectionExists.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "connectionId": "connection1" }, diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GenerateClientToken.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GenerateClientToken.json index 9c989649ae3b..f19f589041f4 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GenerateClientToken.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GenerateClientToken.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "userId": "user1", "minutesToExpire": 5 diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GrantPermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GrantPermission.json index f8f82fc10903..4414ae64b7ad 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GrantPermission.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GrantPermission.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "permission": "joinLeaveGroup", "connectionId": "connection1", diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GroupExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GroupExists.json index c0b418e392b3..19bfe3a196fa 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GroupExists.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GroupExists.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "group": "group1" }, diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GroupInvoke.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GroupInvoke.json new file mode 100644 index 000000000000..3a661c046f83 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_GroupInvoke.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hub": "hub1", + "group": "group1", + "filter": "startswith(userId, 'listener-')", + "messageTtlSeconds": 15, + "message": "Message to send" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionFromAllGroups.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionFromAllGroups.json index f7e426b06d41..6d09523e774e 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionFromAllGroups.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionFromAllGroups.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "connectionId": "connection1" }, diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionFromGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionFromGroup.json index 5c18ad8cd16a..6c8e239b6ee0 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionFromGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionFromGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "group": "group1", "connectionId": "connection1" diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionsFromGroups.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionsFromGroups.json new file mode 100644 index 000000000000..31b180029e47 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveConnectionsFromGroups.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hub": "hub1" + }, + "responses": { + "202": {} + } +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveUserFromAllGroups.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveUserFromAllGroups.json index 5ac427379c00..928c2bccaf86 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveUserFromAllGroups.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveUserFromAllGroups.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "userId": "user1" }, diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveUserFromGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveUserFromGroup.json index 4925b3d49bc0..786cf0fd2a3c 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveUserFromGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RemoveUserFromGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "group": "group1", "userId": "user1" diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RevokePermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RevokePermission.json index b079d5e01bef..fa567ada5480 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RevokePermission.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_RevokePermission.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "permission": "joinLeaveGroup", "connectionId": "connection1", diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToAll.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToAll.json index a39bf74a9df1..e5ad3a993457 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToAll.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToAll.json @@ -1,8 +1,9 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "filter": "startswith(userId, 'listener-')", + "messageTtlSeconds": 15, "message": "Message to send" }, "responses": { diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToConnection.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToConnection.json index beef27df4967..ab590a886b0d 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToConnection.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToConnection.json @@ -1,8 +1,9 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "connectionId": "connection1", + "messageTtlSeconds": 15, "message": "Message to send" }, "responses": { diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToGroup.json index 5a61521d45b0..c7a2eeeb2a86 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToGroup.json @@ -1,9 +1,10 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "group": "group1", "filter": "startswith(userId, 'listener-')", + "messageTtlSeconds": 15, "message": "Message to send" }, "responses": { diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToUser.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToUser.json index 392369ee6c14..181d2f93c940 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToUser.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_SendToUser.json @@ -1,9 +1,10 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "userId": "user1", "filter": "startswith(userId, 'listener-')", + "messageTtlSeconds": 15, "message": "Message to send" }, "responses": { diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_UserExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_UserExists.json index 98566cf28a92..ba4aa1b5a1c7 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_UserExists.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/examples/WebPubSub_UserExists.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-11-01", + "api-version": "2023-07-01", "hub": "hub1", "userId": "user1" }, diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/webpubsub.json index 0a9543453051..d47dfc34f539 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2023-07-01/webpubsub.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "Azure Web PubSub Service REST API", - "version": "2022-11-01" + "version": "2023-07-01" }, "paths": { "/api/health": { @@ -36,6 +36,72 @@ } } }, + "/api/hubs/{hub}/:addToGroup": { + "post": { + "tags": [ + "webpubsub" + ], + "summary": "Add filtered connections to multiple groups.", + "operationId": "WebPubSub_AddConnectionsToGroups", + "consumes": [ + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "hub", + "description": "Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$" + }, + { + "in": "query", + "name": "api-version", + "description": "The version of the REST APIs.", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "message", + "description": "Target groups and connection filter.", + "schema": { + "$ref": "#/definitions/MultiGroupJoinRequest" + } + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/ErrorDetail" + }, + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "WebPubSub_AddConnectionsToGroups": { + "$ref": "./examples/WebPubSub_AddConnectionsToGroups.json" + } + } + } + }, "/api/hubs/{hub}/:closeConnections": { "post": { "tags": [ @@ -196,6 +262,72 @@ } } }, + "/api/hubs/{hub}/:removeFromGroup": { + "post": { + "tags": [ + "webpubsub" + ], + "summary": "Remove filtered connections from multiple groups.", + "operationId": "WebPubSub_RemoveConnectionsFromGroups", + "consumes": [ + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "hub", + "description": "Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$" + }, + { + "in": "query", + "name": "api-version", + "description": "The version of the REST APIs.", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "message", + "description": "Target groups and connection filter.", + "schema": { + "$ref": "#/definitions/MultiGroupLeaveRequest" + } + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/ErrorDetail" + }, + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "WebPubSub_RemoveConnectionsFromGroups": { + "$ref": "./examples/WebPubSub_RemoveConnectionsFromGroups.json" + } + } + } + }, "/api/hubs/{hub}/:send": { "post": { "tags": [ @@ -252,6 +384,15 @@ "name": "filter", "description": "Following OData filter syntax to filter out the subscribers receiving the messages.", "type": "string" + }, + { + "in": "query", + "name": "messageTtlSeconds", + "description": "The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message never expires. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited.", + "type": "integer", + "format": "int32", + "maximum": 300, + "minimum": 0 } ], "responses": { @@ -448,6 +589,15 @@ "format": "binary", "type": "string" } + }, + { + "in": "query", + "name": "messageTtlSeconds", + "description": "The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message never expires. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited.", + "type": "integer", + "format": "int32", + "maximum": 300, + "minimum": 0 } ], "responses": { @@ -672,6 +822,113 @@ } } }, + "/api/hubs/{hub}/groups/{group}/:invoke": { + "post": { + "tags": [ + "webpubsub" + ], + "summary": "Send content inside request body to a group of connections and wait for acknowledgement.", + "operationId": "WebPubSub_GroupInvoke", + "consumes": [ + "application/octet-stream", + "text/plain", + "application/json" + ], + "produces": [ + "application/json", + "application/octet-stream" + ], + "parameters": [ + { + "in": "path", + "name": "hub", + "description": "Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$" + }, + { + "in": "path", + "name": "group", + "description": "Target group name, which length should be greater than 0 and less than 1025.", + "required": true, + "type": "string", + "maxLength": 1024, + "minLength": 1, + "pattern": "^(?!\\s+$).+$" + }, + { + "in": "query", + "name": "excluded", + "description": "Excluded connection Ids", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "messageTtlSeconds", + "description": "The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message never expires. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited.", + "type": "integer", + "format": "int32", + "maximum": 300, + "minimum": 0 + }, + { + "in": "query", + "name": "api-version", + "description": "The version of the REST APIs.", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "message", + "description": "The payload body.", + "required": true, + "schema": { + "format": "binary", + "type": "string" + } + }, + { + "in": "query", + "name": "filter", + "description": "Following OData filter syntax to filter out the subscribers receiving the messages.", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "format": "binary", + "type": "string" + } + }, + "default": { + "description": "Error response", + "schema": { + "$ref": "#/definitions/ErrorDetail" + }, + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "WebPubSub_GroupInvoke": { + "$ref": "./examples/WebPubSub_GroupInvoke.json" + } + } + } + }, "/api/hubs/{hub}/groups/{group}/:send": { "post": { "tags": [ @@ -738,6 +995,15 @@ "name": "filter", "description": "Following OData filter syntax to filter out the subscribers receiving the messages.", "type": "string" + }, + { + "in": "query", + "name": "messageTtlSeconds", + "description": "The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message never expires. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited.", + "type": "integer", + "format": "int32", + "maximum": 300, + "minimum": 0 } ], "responses": { @@ -1326,6 +1592,15 @@ "name": "filter", "description": "Following OData filter syntax to filter out the subscribers receiving the messages.", "type": "string" + }, + { + "in": "query", + "name": "messageTtlSeconds", + "description": "The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message never expires. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited.", + "type": "integer", + "format": "int32", + "maximum": 300, + "minimum": 0 } ], "responses": { @@ -1602,18 +1877,49 @@ "$ref": "#/definitions/InnerError" } } + }, + "MultiGroupJoinRequest": { + "description": "The request object containing targets groups and connection filter", + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "connectionFilter": { + "type": "string" + } + } + }, + "MultiGroupLeaveRequest": { + "description": "The request object containing targets groups and connection filter", + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "connectionFilter": { + "type": "string" + } + } } }, "x-ms-parameterized-host": { - "hostTemplate": "{Endpoint}", + "hostTemplate": "{endpoint}", "useSchemePrefix": false, "parameters": [ { - "name": "Endpoint", + "name": "endpoint", "description": "HTTP or HTTPS endpoint for the Web PubSub service instance.", "x-ms-parameter-location": "client", "required": true, "type": "string", + "format": "url", "in": "path", "x-ms-skip-url-encoding": true } diff --git a/specification/webpubsub/data-plane/readme.md b/specification/webpubsub/data-plane/readme.md index 993817ba69e1..2af5241e4544 100644 --- a/specification/webpubsub/data-plane/readme.md +++ b/specification/webpubsub/data-plane/readme.md @@ -24,14 +24,14 @@ To see additional help and options, run: These are the global settings for the Web PubSub Service API. -```yaml +``` yaml openapi-type: data-plane -tag: package-2022-11-01 +tag: package-2023-07-01 ``` ### Suppression -```yaml +``` yaml directive: - suppress: LROStatusCodesReturnTypeSchema reason: For this data plane API, it is not a long run operation and the status code indicates the results. @@ -39,11 +39,20 @@ directive: reason: There are a lot of APIs that does not have the example. While it is being worked upon disabling this to ensure that we catch and fix other violations ``` + +### Tag: package-2023-07-01 + +These settings apply only when `--tag=package-2023-07-01` is specified on the command line. + +```yaml $(tag) == 'package-2023-07-01' +input-file: + - WebPubSub/stable/2023-07-01/webpubsub.json +``` ### Tag: package-2022-11-01 These settings apply only when `--tag=package-2022-11-01` is specified on the command line. -```yaml $(tag) == 'package-2022-11-01' +``` yaml $(tag) == 'package-2022-11-01' input-file: - WebPubSub/stable/2022-11-01/webpubsub.json title: AzureMessagingWebPubSubServiceClient @@ -53,7 +62,7 @@ title: AzureMessagingWebPubSubServiceClient These settings apply only when `--tag=package-2021-10-01` is specified on the command line. -```yaml $(tag) == 'package-2021-10-01' +``` yaml $(tag) == 'package-2021-10-01' input-file: - WebPubSub/stable/2021-10-01/webpubsub.json title: AzureMessagingWebPubSubServiceClient @@ -63,7 +72,7 @@ title: AzureMessagingWebPubSubServiceClient These settings apply only when `--tag=package-2021-08-01-preview` is specified on the command line. -```yaml $(tag) == 'package-2021-08-01-preview' +``` yaml $(tag) == 'package-2021-08-01-preview' input-file: - WebPubSub/preview/2021-08-01-preview/webpubsub.json title: AzureMessagingWebPubSubServiceClient @@ -73,7 +82,7 @@ title: AzureMessagingWebPubSubServiceClient These settings apply only when `--tag=package-2021-05-01-preview` is specified on the command line. -```yaml $(tag) == 'package-2021-05-01-preview' +``` yaml $(tag) == 'package-2021-05-01-preview' input-file: - WebPubSub/preview/2021-05-01-preview/webpubsub.json title: AzureMessagingWebPubSubServiceClient @@ -86,7 +95,7 @@ title: AzureMessagingWebPubSubServiceClient This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself. -```yaml $(swagger-to-sdk) +``` yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-net-track2 ``` @@ -96,7 +105,7 @@ swagger-to-sdk: These settings apply only when `--csharp` is specified on the command line. Please also specify `--csharp-sdks-folder=`. -```yaml $(csharp) +``` yaml $(csharp) csharp: # last generated with AutoRest.0.17.3 azure-arm: false @@ -112,7 +121,7 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. -```yaml $(python) +``` yaml $(python) python-mode: create azure-arm: false license-header: MICROSOFT_MIT_NO_VERSION @@ -122,12 +131,12 @@ package-version: 1.0.0b1 clear-output-folder: true ``` -```yaml $(python) && $(python-mode) == 'update' +``` yaml $(python) && $(python-mode) == 'update' no-namespace-folders: true output-folder: $(python-sdks-folder)/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice ``` -```yaml $(python) && $(python-mode) == 'create' +``` yaml $(python) && $(python-mode) == 'create' basic-setup-py: true output-folder: $(python-sdks-folder)/webpubsub/azure-messaging-webpubsubservice ``` @@ -138,7 +147,7 @@ AutoRest V3 generators require the use of `--tag=all-api-versions` to select api This block is updated by an automatic script. Edits may be lost! -```yaml $(tag) == 'all-api-versions' /* autogenerated */ +``` yaml $(tag) == 'all-api-versions' /* autogenerated */ # include the azure profile definitions from the standard location require: $(this-folder)/../../../profiles/readme.md @@ -150,7 +159,7 @@ input-file: If there are files that should not be in the `all-api-versions` set, uncomment the `exclude-file` section below and add the file paths. -```yaml $(tag) == 'all-api-versions' +``` yaml $(tag) == 'all-api-versions' #exclude-file: # - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json ```