You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-az-cli.md
+43-48Lines changed: 43 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
2
2
title: include file
3
3
description: include file
4
4
services: azure-communication-services
5
-
author: JoannaJiang
6
-
manager: ankita
5
+
author: mikehang-msft
6
+
manager: alexokun
7
7
ms.service: azure-communication-services
8
8
ms.subservice: azure-communication-services
9
-
ms.date: 12/01/2022
9
+
ms.date: 07/01/2023
10
10
ms.topic: include
11
11
ms.custom: include file, devx-track-azurecli
12
-
ms.author: JoannaJiang
12
+
ms.author: mikehang-msft
13
13
---
14
14
15
15
## Prerequisites
@@ -73,24 +73,19 @@ After you add the environment variable, run `source ~/.bash_profile` from your c
73
73
Use the `rooms create` command to create a room.
74
74
75
75
```azurecli-interactive
76
-
az communication rooms create --presenter-participants "<participantId>" --consumer-participants "<participantId>" --attendee-participant "<participantId>" --validFrom "<validFrom>" --validUntil "<validUntil>" --connection-string "<connectionString>"
76
+
az communication rooms create --presenter-participants "<participantId>" --consumer-participants "<participantId>" --attendee-participant "<participantId>" --valid-from "<valid-from>" --valid-until "<valid-until>" --connection-string "<connection-string>"
77
77
```
78
78
79
-
- Use `<participantId>` optionally to specify the type of participant as presenter-participants, consumer-participants, or attendee-participants. If you don't specify a value, the default is empty.
80
-
- Replace `<connectionString>` with your ACS connection string.
81
-
- Use `<joinPolicy>` optionally to specify the join policy type as either `InviteOnly` or `CommunicationServiceUsers`. If you don't specify a value, the default is `InviteOnly`.
82
-
- Use `<validFrom>` optionally to specify the timestamp when the room is open for joining, in ISO8601 format, ex: 2022-07-14T10:21.
83
-
- Use `<validUntil>` optionally to specify the timestamp when the room can no longer be joined, in ISO8601 format, ex: 2022-07-14T10:21.
79
+
- Use `<participantId>` optionally to specify the type of participant as presenter-participants, consumer-participants, or attendee-participants. If you do not specify a value, the default is empty.
80
+
- Replace `<connection-string>` with your ACS connection string.
81
+
- Use `<valid-from>` optionally to specify the timestamp when the room is open for joining, in ISO8601 format, ex: 2022-07-14T10:21.
82
+
- Use `<valid-until>` optionally to specify the timestamp when the room can no longer be joined, in ISO8601 format, ex: 2022-07-14T10:21.
84
83
85
84
If you've stored the connection string in environment variables as stated above, you won't need to pass them to the command.
86
85
87
86
```azurecli-interactive
88
87
az communication rooms create
89
88
```
90
-
91
-
- Replace `<connectionString>` with your ACS connection string.
92
-
93
-
94
89
### Get the rooms
95
90
96
91
The `rooms get` command returns the attributes of an existing room.
@@ -99,72 +94,72 @@ The `rooms get` command returns the attributes of an existing room.
99
94
az communication rooms get --room "<roomId>"
100
95
```
101
96
102
-
- Use `<roomId>` mandatorily to specify the room
103
-
97
+
- Replace `<roomId>` with your room ID.
104
98
105
-
### Update the participant of a room
99
+
### Update the timeframe of a room
106
100
107
-
When you create a room, you can update the room by adding and removing participant from it. Before calling the `room update` command, ensure that you've acquired a new user.
108
-
Use the `identity user create` command to create a new participant, identified by `participantId`.
101
+
You can update the timestamp of a room. Before calling the `room update` command, ensure that you've acquired a new room with a valid timeframe.
109
102
110
103
```azurecli-interactive
111
-
az communication identity user create
104
+
az communication rooms update --valid-from "<valid-from>" --valid-until "<valid-until>" --room "<roomId>"
112
105
```
113
106
114
-
Add a user as a participant to the room
107
+
- Replace `<valid-from>` with the timestamp in ISO8601 format, ex: 2022-07-14T10:21, to specify when the room is open for joining. Should be used together with `--valid-until`.
108
+
- Replace `<valid-until>` with the timestamp in ISO8601 format, ex: 2022-07-14T10:21, to specify when the room can no longer be joined. Should be used together with `--valid-from`.
109
+
- Replace `<roomId>` with your room ID.
110
+
111
+
### List all active rooms
112
+
113
+
The `rooms list` command returns all active rooms belonging to your ACS resource.
115
114
116
115
```azurecli-interactive
117
-
az communication rooms update --attendee-participant "<participantId>" --room "<roomId>"
116
+
az communication rooms list
118
117
```
119
118
120
-
- Replace `<participantId>` with your participant ID.
121
-
- Replace `<roomId>` with your room ID.
119
+
### Add new participants or update existing participants
122
120
121
+
When you create a room, you can update the room by adding new participant or updating an existing participant in it. Before calling the `room participant add-or-update` command, ensure that you've acquired a new user.
123
122
124
-
### Update the timeframe of a room
125
-
126
-
You can update the timestamp of a room. Before calling the `room update` command, ensure that you've acquired a new room with a valid timeframe.
123
+
Use the `identity user create` command to create a new participant, identified by `participantId`.
127
124
128
125
```azurecli-interactive
129
-
az communication rooms update --validFrom "<validFrom>" --validUntil "<validUntil>" --room "<roomId>"
126
+
az communication identity user create
130
127
```
131
128
132
-
- Replace `<validFrom>` with the timestamp in ISO8601 format, ex: 2022-07-14T10:21, to specify when the room is open for joining. Should be used together with `--valid-until`.
133
-
- Replace `<validUntil>` with the timestamp in ISO8601 format, ex: 2022-07-14T10:21, to specify when the room can no longer be joined. Should be used together with `--valid-from`.
134
-
- Replace `<roomId>` with your room ID.
135
-
136
-
137
-
### Update the join policy of a room
138
-
139
-
You can update the join policy of a room. Before calling the `room update` command, ensure that you've acquired a new room.
129
+
Add a user as a participant to the room
140
130
141
131
```azurecli-interactive
142
-
az communication rooms update --join-policy "<joinPolicy>" --room "<roomId>"
132
+
az communication rooms participant add-or-update --attendee-participant "<participantId>" --room "<roomId>"
143
133
```
144
134
135
+
- Replace `<participantId>` with your participant ID. If the <participantId> does not exist in the room, the participant will be added to the room as an attendee role. Otherwise, the participant's role is updated to an attendee role.
145
136
- Replace `<roomId>` with your room ID.
146
-
- Use `<joinPolicy>` optionally to specify the type of join policy as either InviteOnly or CommunicationServiceUsers.
147
-
148
137
149
-
### Delete a room
150
-
151
-
Similar to creating a room, you can also delete a room.
138
+
### Get list of participants in a room
139
+
```azurecli-interactive
140
+
az communication rooms participant get --room "<roomId>"
141
+
```
142
+
- Replace `<roomId>` with your room ID.
143
+
144
+
### Remove a participant from a room
152
145
153
-
Use `room delete` command to delete the existing room.
146
+
You can remove a room participant from a room by using `rooms participant -remove`.
154
147
155
148
```azurecli-interactive
156
-
az communication rooms delete --room "<roomId>"
149
+
az communication rooms participant remove --room "<roomId>" --participants "<participant1>" "<participant2>" "<participant3>"
157
150
```
158
151
159
152
- Replace `<roomId>` with your room ID.
153
+
- Replace `<participant1>`, `<participant2>`, `<participant3>` with your user IDs obtained earlier with running `identity user create`command.
160
154
155
+
### Delete a room
161
156
162
-
### Remove a participant from a room
157
+
Similar to creating a room, you can also delete a room.
163
158
164
-
You can remove a room participant from a room by using `identity user delete`
159
+
Use `room delete` command to delete the existing room.
165
160
166
161
```azurecli-interactive
167
-
az communication identity user delete --user "<userId>"
162
+
az communication rooms delete --room "<roomId>"
168
163
```
169
164
170
-
- Replace `<userId>` with your user ID obtained earlier with running `identity user create`command.
0 commit comments