Skip to content

Commit 2c095e0

Browse files
authored
chore: Microsoft.CleanRoom Update API Version to 2026-03-31-preview (#9727)
* Update API version to 2026-03-31-preview * Help update * Integrate updates with the schema changes * Command changes * Flatten properties * Update the help for update * Update help example add collaborator * Update the example for add collaborator * Update version * Update long parameter length * Update description
1 parent fb5c19f commit 2c095e0

32 files changed

Lines changed: 523 additions & 461 deletions

src/managedcleanroom/HISTORY.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ Release History
1010
1.0.0b2
1111
++++++
1212
* Add frontend commandlets
13-
* Add MSAL device code flow authentication
13+
* Add MSAL device code flow authentication
14+
15+
1.0.0b3
16+
++++++
17+
* Update commands to reflect new API version 2026-03-31-preview

src/managedcleanroom/azext_managedcleanroom/aaz/latest/managedcleanroom/__cmd_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"managedcleanroom",
1616
)
1717
class __CMDGroup(AAZCommandGroup):
18-
"""Manage Clean Room
18+
"""Manage Azure Confidential Clean Room
1919
"""
2020
pass
2121

src/managedcleanroom/azext_managedcleanroom/aaz/latest/managedcleanroom/collaboration/_add_collaborator.py

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@
1818
class AddCollaborator(AAZCommand):
1919
"""Adds a collaborator to a collaboration.
2020
21-
:example: Add Collaborator
22-
az managedcleanroom collaboration add-collaborator --resource-group testrg --collaboration-name ContosoCollaboration --email alice@example.com
21+
:example: Add Collaborator(User)
22+
az managedcleanroom collaboration add-collaborator --resource-group testrg --collaboration-name ContosoCollaboration --user-identifier "alice@contoso.com"
23+
24+
:example: Add Collaborator(Service Principal)
25+
az managedcleanroom collaboration add-collaborator --resource-group testrg --collaboration-name ContosoCollaboration --user-identifier "0d6b305c-85ee-419f-9c87-d3405c24aab6" --tenant-id "72f988bf-86f1-41af-91ab-2d7cd011db47" --object-id "0f8fad5b-d9cb-469f-a165-70867728950e"
2326
"""
2427

2528
_aaz_info = {
26-
"version": "2025-10-31-preview",
29+
"version": "2026-03-31-preview",
2730
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cleanroom/collaborations/{}/addcollaborator", "2025-10-31-preview"],
31+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cleanroom/collaborations/{}/addcollaborator", "2026-03-31-preview"],
2932
]
3033
}
3134

@@ -59,14 +62,23 @@ def _build_arguments_schema(cls, *args, **kwargs):
5962
required=True,
6063
)
6164

62-
# define Arg Group "Body"
65+
# define Arg Group "Collaborator"
6366

6467
_args_schema = cls._args_schema
65-
_args_schema.email = AAZStrArg(
66-
options=["--email"],
67-
arg_group="Body",
68-
help="Email of the collaborator to be added.",
69-
required=True,
68+
_args_schema.object_id = AAZStrArg(
69+
options=["--object-id"],
70+
arg_group="Collaborator",
71+
help="Object ID of the collaborator.",
72+
)
73+
_args_schema.tenant_id = AAZStrArg(
74+
options=["--tenant-id"],
75+
arg_group="Collaborator",
76+
help="Tenant ID of the collaborator.",
77+
)
78+
_args_schema.user_identifier = AAZStrArg(
79+
options=["--user-identifier"],
80+
arg_group="Collaborator",
81+
help="User identifier of the collaborator. This can be specified as an email (no OID/TID should be specified) or an SPN (OID/TID required).",
7082
)
7183
return cls._args_schema
7284

@@ -151,7 +163,7 @@ def url_parameters(self):
151163
def query_parameters(self):
152164
parameters = {
153165
**self.serialize_query_param(
154-
"api-version", "2025-10-31-preview",
166+
"api-version", "2026-03-31-preview",
155167
required=True,
156168
),
157169
}
@@ -176,7 +188,13 @@ def content(self):
176188
typ=AAZObjectType,
177189
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
178190
)
179-
_builder.set_prop("email", AAZStrType, ".email", typ_kwargs={"flags": {"required": True}})
191+
_builder.set_prop("collaborator", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
192+
193+
collaborator = _builder.get(".collaborator")
194+
if collaborator is not None:
195+
collaborator.set_prop("objectId", AAZStrType, ".object_id")
196+
collaborator.set_prop("tenantId", AAZStrType, ".tenant_id")
197+
collaborator.set_prop("userIdentifier", AAZStrType, ".user_identifier")
180198

181199
return self.serialize_content(_content_value)
182200

@@ -225,14 +243,15 @@ def _build_schema_on_200(cls):
225243
serialized_name="clusterEndpoint",
226244
flags={"read_only": True},
227245
)
246+
properties.collaboration_state = AAZStrType(
247+
serialized_name="collaborationState",
248+
flags={"read_only": True},
249+
)
250+
properties.collaborators = AAZListType()
228251
properties.consortium_arm_id = AAZStrType(
229252
serialized_name="consortiumArmId",
230253
flags={"read_only": True},
231254
)
232-
properties.consortium_type = AAZStrType(
233-
serialized_name="consortiumType",
234-
flags={"required": True},
235-
)
236255
properties.health = AAZObjectType(
237256
flags={"read_only": True},
238257
)
@@ -244,14 +263,28 @@ def _build_schema_on_200(cls):
244263
serialized_name="provisioningState",
245264
flags={"read_only": True},
246265
)
247-
properties.user_identity = AAZObjectType(
248-
serialized_name="userIdentity",
249-
flags={"required": True},
250-
)
251266
properties.workloads = AAZListType(
252267
flags={"read_only": True},
253268
)
254269

270+
collaborators = cls._schema_on_200.properties.collaborators
271+
collaborators.Element = AAZObjectType()
272+
273+
_element = cls._schema_on_200.properties.collaborators.Element
274+
_element.is_collaboration_owner = AAZBoolType(
275+
serialized_name="isCollaborationOwner",
276+
flags={"read_only": True},
277+
)
278+
_element.object_id = AAZStrType(
279+
serialized_name="objectId",
280+
)
281+
_element.tenant_id = AAZStrType(
282+
serialized_name="tenantId",
283+
)
284+
_element.user_identifier = AAZStrType(
285+
serialized_name="userIdentifier",
286+
)
287+
255288
health = cls._schema_on_200.properties.health
256289
health.health_issues = AAZListType(
257290
serialized_name="healthIssues",
@@ -283,20 +316,6 @@ def _build_schema_on_200(cls):
283316
_element = cls._schema_on_200.properties.managed_on_behalf_of_configuration.mobo_broker_resources.Element
284317
_element.id = AAZStrType()
285318

286-
user_identity = cls._schema_on_200.properties.user_identity
287-
user_identity.account_type = AAZStrType(
288-
serialized_name="accountType",
289-
flags={"required": True},
290-
)
291-
user_identity.object_id = AAZStrType(
292-
serialized_name="objectId",
293-
flags={"required": True},
294-
)
295-
user_identity.tenant_id = AAZStrType(
296-
serialized_name="tenantId",
297-
flags={"required": True},
298-
)
299-
300319
workloads = cls._schema_on_200.properties.workloads
301320
workloads.Element = AAZObjectType()
302321

src/managedcleanroom/azext_managedcleanroom/aaz/latest/managedcleanroom/collaboration/_create.py

Lines changed: 52 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ class Create(AAZCommand):
1919
"""Create a collaboration.
2020
2121
:example: Create Collaboration
22-
az managedcleanroom collaboration create --resource-group testrg --collaboration-name ContosoCollaboration --location northeurope --consortium-type ConfidentialACI --user-identity "{tenant-id:fd3c3665-1729-4b7b-9a38-238e83b0f98b,object-id:fd3c3665-1729-4b7b-9a38-238e83b0f98b,account-type:microsoft}"
22+
az managedcleanroom collaboration create --resource-group testrg --collaboration-name ContosoCollaboration --location northeurope
2323
"""
2424

2525
_aaz_info = {
26-
"version": "2025-10-31-preview",
26+
"version": "2026-03-31-preview",
2727
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cleanroom/collaborations/{}", "2025-10-31-preview"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cleanroom/collaborations/{}", "2026-03-31-preview"],
2929
]
3030
}
3131

@@ -61,36 +61,27 @@ def _build_arguments_schema(cls, *args, **kwargs):
6161
# define Arg Group "Properties"
6262

6363
_args_schema = cls._args_schema
64-
_args_schema.consortium_type = AAZStrArg(
65-
options=["--consortium-type"],
64+
_args_schema.collaborators = AAZListArg(
65+
options=["--collaborators"],
6666
arg_group="Properties",
67-
help="Gets or sets the consortium type.",
68-
required=True,
69-
enum={"ConfidentialACI": "ConfidentialACI"},
70-
)
71-
_args_schema.user_identity = AAZObjectArg(
72-
options=["--user-identity"],
73-
arg_group="Properties",
74-
help="Gets or sets the user identity.",
75-
required=True,
67+
help="Gets or sets the collaborators.",
7668
)
7769

78-
user_identity = cls._args_schema.user_identity
79-
user_identity.account_type = AAZStrArg(
80-
options=["account-type"],
81-
help="Account type of the user identity.",
82-
required=True,
83-
enum={"microsoft": "microsoft"},
84-
)
85-
user_identity.object_id = AAZStrArg(
70+
collaborators = cls._args_schema.collaborators
71+
collaborators.Element = AAZObjectArg()
72+
73+
_element = cls._args_schema.collaborators.Element
74+
_element.object_id = AAZStrArg(
8675
options=["object-id"],
87-
help="Object ID of the user identity.",
88-
required=True,
76+
help="Object ID of the collaborator.",
8977
)
90-
user_identity.tenant_id = AAZStrArg(
78+
_element.tenant_id = AAZStrArg(
9179
options=["tenant-id"],
92-
help="Tenant ID of the user identity.",
93-
required=True,
80+
help="Tenant ID of the collaborator.",
81+
)
82+
_element.user_identifier = AAZStrArg(
83+
options=["user-identifier"],
84+
help="User identifier of the collaborator. This can be specified as an email (no OID/TID should be specified) or an SPN (OID/TID required).",
9485
)
9586

9687
# define Arg Group "Resource"
@@ -203,7 +194,7 @@ def url_parameters(self):
203194
def query_parameters(self):
204195
parameters = {
205196
**self.serialize_query_param(
206-
"api-version", "2025-10-31-preview",
197+
"api-version", "2026-03-31-preview",
207198
required=True,
208199
),
209200
}
@@ -235,14 +226,17 @@ def content(self):
235226

236227
properties = _builder.get(".properties")
237228
if properties is not None:
238-
properties.set_prop("consortiumType", AAZStrType, ".consortium_type", typ_kwargs={"flags": {"required": True}})
239-
properties.set_prop("userIdentity", AAZObjectType, ".user_identity", typ_kwargs={"flags": {"required": True}})
229+
properties.set_prop("collaborators", AAZListType, ".collaborators")
230+
231+
collaborators = _builder.get(".properties.collaborators")
232+
if collaborators is not None:
233+
collaborators.set_elements(AAZObjectType, ".")
240234

241-
user_identity = _builder.get(".properties.userIdentity")
242-
if user_identity is not None:
243-
user_identity.set_prop("accountType", AAZStrType, ".account_type", typ_kwargs={"flags": {"required": True}})
244-
user_identity.set_prop("objectId", AAZStrType, ".object_id", typ_kwargs={"flags": {"required": True}})
245-
user_identity.set_prop("tenantId", AAZStrType, ".tenant_id", typ_kwargs={"flags": {"required": True}})
235+
_elements = _builder.get(".properties.collaborators[]")
236+
if _elements is not None:
237+
_elements.set_prop("objectId", AAZStrType, ".object_id")
238+
_elements.set_prop("tenantId", AAZStrType, ".tenant_id")
239+
_elements.set_prop("userIdentifier", AAZStrType, ".user_identifier")
246240

247241
tags = _builder.get(".tags")
248242
if tags is not None:
@@ -295,14 +289,15 @@ def _build_schema_on_200_201(cls):
295289
serialized_name="clusterEndpoint",
296290
flags={"read_only": True},
297291
)
292+
properties.collaboration_state = AAZStrType(
293+
serialized_name="collaborationState",
294+
flags={"read_only": True},
295+
)
296+
properties.collaborators = AAZListType()
298297
properties.consortium_arm_id = AAZStrType(
299298
serialized_name="consortiumArmId",
300299
flags={"read_only": True},
301300
)
302-
properties.consortium_type = AAZStrType(
303-
serialized_name="consortiumType",
304-
flags={"required": True},
305-
)
306301
properties.health = AAZObjectType(
307302
flags={"read_only": True},
308303
)
@@ -314,14 +309,28 @@ def _build_schema_on_200_201(cls):
314309
serialized_name="provisioningState",
315310
flags={"read_only": True},
316311
)
317-
properties.user_identity = AAZObjectType(
318-
serialized_name="userIdentity",
319-
flags={"required": True},
320-
)
321312
properties.workloads = AAZListType(
322313
flags={"read_only": True},
323314
)
324315

316+
collaborators = cls._schema_on_200_201.properties.collaborators
317+
collaborators.Element = AAZObjectType()
318+
319+
_element = cls._schema_on_200_201.properties.collaborators.Element
320+
_element.is_collaboration_owner = AAZBoolType(
321+
serialized_name="isCollaborationOwner",
322+
flags={"read_only": True},
323+
)
324+
_element.object_id = AAZStrType(
325+
serialized_name="objectId",
326+
)
327+
_element.tenant_id = AAZStrType(
328+
serialized_name="tenantId",
329+
)
330+
_element.user_identifier = AAZStrType(
331+
serialized_name="userIdentifier",
332+
)
333+
325334
health = cls._schema_on_200_201.properties.health
326335
health.health_issues = AAZListType(
327336
serialized_name="healthIssues",
@@ -353,20 +362,6 @@ def _build_schema_on_200_201(cls):
353362
_element = cls._schema_on_200_201.properties.managed_on_behalf_of_configuration.mobo_broker_resources.Element
354363
_element.id = AAZStrType()
355364

356-
user_identity = cls._schema_on_200_201.properties.user_identity
357-
user_identity.account_type = AAZStrType(
358-
serialized_name="accountType",
359-
flags={"required": True},
360-
)
361-
user_identity.object_id = AAZStrType(
362-
serialized_name="objectId",
363-
flags={"required": True},
364-
)
365-
user_identity.tenant_id = AAZStrType(
366-
serialized_name="tenantId",
367-
flags={"required": True},
368-
)
369-
370365
workloads = cls._schema_on_200_201.properties.workloads
371366
workloads.Element = AAZObjectType()
372367

src/managedcleanroom/azext_managedcleanroom/aaz/latest/managedcleanroom/collaboration/_delete.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class Delete(AAZCommand):
2424
"""
2525

2626
_aaz_info = {
27-
"version": "2025-10-31-preview",
27+
"version": "2026-03-31-preview",
2828
"resources": [
29-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cleanroom/collaborations/{}", "2025-10-31-preview"],
29+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cleanroom/collaborations/{}", "2026-03-31-preview"],
3030
]
3131
}
3232

@@ -147,7 +147,7 @@ def url_parameters(self):
147147
def query_parameters(self):
148148
parameters = {
149149
**self.serialize_query_param(
150-
"api-version", "2025-10-31-preview",
150+
"api-version", "2026-03-31-preview",
151151
required=True,
152152
),
153153
}

0 commit comments

Comments
 (0)