Skip to content

Commit 734a3f8

Browse files
Merge pull request #243881 from mikehang-msft/patch-2
Update rooms Azure CLI QuickStart
2 parents aba1227 + a1160ee commit 734a3f8

File tree

1 file changed

+43
-48
lines changed

1 file changed

+43
-48
lines changed

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-az-cli.md

Lines changed: 43 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
title: include file
33
description: include file
44
services: azure-communication-services
5-
author: JoannaJiang
6-
manager: ankita
5+
author: mikehang-msft
6+
manager: alexokun
77
ms.service: azure-communication-services
88
ms.subservice: azure-communication-services
9-
ms.date: 12/01/2022
9+
ms.date: 07/01/2023
1010
ms.topic: include
1111
ms.custom: include file, devx-track-azurecli
12-
ms.author: JoannaJiang
12+
ms.author: mikehang-msft
1313
---
1414

1515
## Prerequisites
@@ -73,24 +73,19 @@ After you add the environment variable, run `source ~/.bash_profile` from your c
7373
Use the `rooms create` command to create a room.
7474

7575
```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>"
7777
```
7878

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.
8483

8584
If you've stored the connection string in environment variables as stated above, you won't need to pass them to the command.
8685

8786
```azurecli-interactive
8887
az communication rooms create
8988
```
90-
91-
- Replace `<connectionString>` with your ACS connection string.
92-
93-
9489
### Get the rooms
9590

9691
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.
9994
az communication rooms get --room "<roomId>"
10095
```
10196

102-
- Use `<roomId>` mandatorily to specify the room
103-
97+
- Replace `<roomId>` with your room ID.
10498

105-
### Update the participant of a room
99+
### Update the timeframe of a room
106100

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.
109102

110103
```azurecli-interactive
111-
az communication identity user create
104+
az communication rooms update --valid-from "<valid-from>" --valid-until "<valid-until>" --room "<roomId>"
112105
```
113106

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.
115114

116115
```azurecli-interactive
117-
az communication rooms update --attendee-participant "<participantId>" --room "<roomId>"
116+
az communication rooms list
118117
```
119118

120-
- Replace `<participantId>` with your participant ID.
121-
- Replace `<roomId>` with your room ID.
119+
### Add new participants or update existing participants
122120

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.
123122

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`.
127124

128125
```azurecli-interactive
129-
az communication rooms update --validFrom "<validFrom>" --validUntil "<validUntil>" --room "<roomId>"
126+
az communication identity user create
130127
```
131128

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
140130

141131
```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>"
143133
```
144134

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.
145136
- Replace `<roomId>` with your room ID.
146-
- Use `<joinPolicy>` optionally to specify the type of join policy as either InviteOnly or CommunicationServiceUsers.
147-
148137

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
152145

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`.
154147

155148
```azurecli-interactive
156-
az communication rooms delete --room "<roomId>"
149+
az communication rooms participant remove --room "<roomId>" --participants "<participant1>" "<participant2>" "<participant3>"
157150
```
158151

159152
- Replace `<roomId>` with your room ID.
153+
- Replace `<participant1>`, `<participant2>`, `<participant3>` with your user IDs obtained earlier with running `identity user create`command.
160154

155+
### Delete a room
161156

162-
### Remove a participant from a room
157+
Similar to creating a room, you can also delete a room.
163158

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.
165160

166161
```azurecli-interactive
167-
az communication identity user delete --user "<userId>"
162+
az communication rooms delete --room "<roomId>"
168163
```
169164

170-
- Replace `<userId>` with your user ID obtained earlier with running `identity user create`command.
165+
- Replace `<roomId>` with your room ID.

0 commit comments

Comments
 (0)