Skip to content
Merged
8 changes: 8 additions & 0 deletions src/managedcleanroom/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Release History
===============

1.0.0b9
+++++++
* Update commands to reflect new API version 2026-09-30-preview
* Added: ``--target-config`` alias for ``az managedcleanroom collaboration create --target-resource-configuration``
* Added: ``az managedcleanroom consortium-view contract wait``
* Added: ``az managedcleanroom frontend collaborator list`` to list collaborators in a collaboration
* Added: ``az managedcleanroom frontend analytics query cancel-run`` to cancel a query run

1.0.0b6
+++++++
* Update commands to reflect new API version 2026-04-30-preview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def load_frontend_command_table(loader, _):
g.custom_show_command(
'show', 'frontend_collaboration_oidc_issuerinfo_show')

# Collaborator commands
with loader.command_group('managedcleanroom frontend collaborator', custom_command_type=frontend_custom) as g:
g.custom_command('list', 'frontend_collaboration_collaborators_list')

# Invitation commands
with loader.command_group('managedcleanroom frontend invitation', custom_command_type=frontend_custom) as g:
g.custom_command('list', 'frontend_collaboration_invitation_list')
Expand All @@ -73,6 +77,7 @@ def load_frontend_command_table(loader, _):
g.custom_show_command('show', 'frontend_collaboration_query_show')
g.custom_command('publish', 'frontend_collaboration_query_publish')
g.custom_command('run', 'frontend_collaboration_query_run')
g.custom_command('cancel-run', 'frontend_collaboration_query_cancel_run')
g.custom_command('vote', 'frontend_collaboration_query_vote')

# Query run history commands
Expand Down
30 changes: 30 additions & 0 deletions src/managedcleanroom/azext_managedcleanroom/_frontend_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ def frontend_collaboration_report_show(cmd, collaboration_id, api_version=None):
return client.collaboration.report_get(collaboration_id)


def frontend_collaboration_collaborators_list(cmd, collaboration_id, api_version=None):
"""List collaborators in a collaboration

:param cmd: CLI command context
:param collaboration_id: Collaboration identifier
:param api_version: API version to use for this request
:return: Collaborators object with array of collaborator details
"""
client = get_frontend_client(cmd, api_version=api_version)
return client.collaboration.collaborators_get(collaboration_id)


# ============================================================================
# Analytics Commands
# ============================================================================
Expand Down Expand Up @@ -850,6 +862,24 @@ def frontend_collaboration_query_runhistory_list(
)


def frontend_collaboration_query_cancel_run(
cmd, collaboration_id, document_id, run_id, api_version=None
):
"""Cancel a query run

:param cmd: CLI command context
:param collaboration_id: Collaboration identifier
:param document_id: Query document identifier
:param run_id: Query run identifier
:param api_version: API version to use for this request
:return: Cancellation result with id and status
"""
client = get_frontend_client(cmd, api_version=api_version)
return client.collaboration.analytics_queries_document_id_runs_run_id_cancel_post(
collaboration_id, document_id, run_id
)


def frontend_collaboration_query_runresult_show(
cmd, collaboration_id, job_id, api_version=None
):
Expand Down
21 changes: 21 additions & 0 deletions src/managedcleanroom/azext_managedcleanroom/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,19 @@
# Invitation Help
# ============================================================================

helps['managedcleanroom frontend collaborator'] = """
type: group
short-summary: View collaborators in a collaboration
"""

helps['managedcleanroom frontend collaborator list'] = """
type: command
short-summary: List collaborators in a collaboration
examples:
- name: List collaborators
text: az managedcleanroom frontend collaborator list -c <collaboration-id>
"""

helps['managedcleanroom frontend invitation'] = """
type: group
short-summary: Manage collaboration invitations
Expand Down Expand Up @@ -710,6 +723,14 @@
text: az managedcleanroom frontend analytics query runhistory list -c <cid> --document-id <document-id>
"""

helps['managedcleanroom frontend analytics query cancel-run'] = """
type: command
short-summary: Cancel a query run
examples:
- name: Cancel a query run
text: az managedcleanroom frontend analytics query cancel-run -c <cid> --document-id <document-id> --run-id <run-id>
"""

helps['managedcleanroom frontend analytics query runresult'] = """
type: group
short-summary: View query run results
Expand Down
14 changes: 14 additions & 0 deletions src/managedcleanroom/azext_managedcleanroom/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ def load_arguments(self, _): # pylint: disable=unused-argument
help='Query job identifier (for run results)'
)

run_id_type = CLIArgumentType(
options_list=['--run-id', '-r'],
help='Query run identifier'
)

consent_action_type = CLIArgumentType(
options_list=['--consent-action', '-a'],
help="Consent action: 'enable' or 'disable'"
Expand Down Expand Up @@ -93,6 +98,10 @@ def load_arguments(self, _): # pylint: disable=unused-argument
with self.argument_context('managedcleanroom frontend oidc keys') as c:
c.argument('collaboration_id', collaboration_id_type)

# Collaborator context
with self.argument_context('managedcleanroom frontend collaborator') as c:
c.argument('collaboration_id', collaboration_id_type)

# Invitation context
with self.argument_context('managedcleanroom frontend invitation') as c:
c.argument('collaboration_id', collaboration_id_type)
Expand Down Expand Up @@ -301,6 +310,11 @@ def load_arguments(self, _): # pylint: disable=unused-argument
with self.argument_context('managedcleanroom frontend analytics query runhistory list') as c:
c.argument('document_id', document_id_type)

with self.argument_context('managedcleanroom frontend analytics query cancel-run') as c:
c.argument('collaboration_id', collaboration_id_type)
c.argument('document_id', document_id_type)
c.argument('run_id', run_id_type)

# Query runresult context
with self.argument_context('managedcleanroom frontend analytics query runresult') as c:
c.argument('collaboration_id', collaboration_id_type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2026-04-30-preview",
"version": "2026-09-30-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cleanroom/collaborations/{}", "2026-04-30-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cleanroom/collaborations/{}", "2026-09-30-preview"],
]
}

Expand Down Expand Up @@ -71,6 +71,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
arg_group="Properties",
help="Gets or sets the resource location for the collaboration.",
)
_args_schema.target_resource_configuration = AAZObjectArg(
options=["--target-resource-configuration", "--target-config"],
arg_group="Properties",
help="Create-time configuration for the Azure resources that host the collaboration.",
)

collaborators = cls._args_schema.collaborators
collaborators.Element = AAZObjectArg()
Expand All @@ -89,6 +94,45 @@ def _build_arguments_schema(cls, *args, **kwargs):
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).",
)

target_resource_configuration = cls._args_schema.target_resource_configuration
target_resource_configuration.aks_sku = AAZStrArg(
options=["aks-sku"],
help="Virtual machine SKU used by the Azure Kubernetes Service node pool for a VN2OnAKS collaboration. The default is Standard_D4ds_v5.",
default="Standard_D4ds_v5",
enum={"Standard_D16ds_v5": "Standard_D16ds_v5", "Standard_D32ds_v5": "Standard_D32ds_v5", "Standard_D4ds_v5": "Standard_D4ds_v5", "Standard_D8ds_v5": "Standard_D8ds_v5"},
)
target_resource_configuration.i_p_tag_configuration = AAZObjectArg(
options=["i-p-tag-configuration"],
help="Tag applied to the target resources.",
)
target_resource_configuration.node_pool_size = AAZIntArg(
options=["node-pool-size"],
help="Number of nodes in the Azure Kubernetes Service node pool for a VN2OnAKS collaboration. The default is 3.",
default=3,
fmt=AAZIntArgFormat(
maximum=10,
minimum=3,
),
)

i_p_tag_configuration = cls._args_schema.target_resource_configuration.i_p_tag_configuration
i_p_tag_configuration.type = AAZStrArg(
options=["type"],
help="Tag type applied to the target resources.",
required=True,
fmt=AAZStrArgFormat(
min_length=1,
),
)
i_p_tag_configuration.value = AAZStrArg(
options=["value"],
help="Tag value applied to the target resources.",
required=True,
fmt=AAZStrArgFormat(
min_length=1,
),
)

# define Arg Group "Resource"

_args_schema = cls._args_schema
Expand Down Expand Up @@ -199,7 +243,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2026-04-30-preview",
"api-version", "2026-09-30-preview",
required=True,
),
}
Expand Down Expand Up @@ -233,6 +277,7 @@ def content(self):
if properties is not None:
properties.set_prop("collaborators", AAZListType, ".collaborators")
properties.set_prop("resourceLocation", AAZStrType, ".resource_location")
properties.set_prop("targetResourceConfiguration", AAZObjectType, ".target_resource_configuration")

collaborators = _builder.get(".properties.collaborators")
if collaborators is not None:
Expand All @@ -244,6 +289,17 @@ def content(self):
_elements.set_prop("tenantId", AAZStrType, ".tenant_id")
_elements.set_prop("userIdentifier", AAZStrType, ".user_identifier")

target_resource_configuration = _builder.get(".properties.targetResourceConfiguration")
if target_resource_configuration is not None:
target_resource_configuration.set_prop("aksSku", AAZStrType, ".aks_sku")
target_resource_configuration.set_prop("iPTagConfiguration", AAZObjectType, ".i_p_tag_configuration")
target_resource_configuration.set_prop("nodePoolSize", AAZIntType, ".node_pool_size")

i_p_tag_configuration = _builder.get(".properties.targetResourceConfiguration.iPTagConfiguration")
if i_p_tag_configuration is not None:
i_p_tag_configuration.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}})
i_p_tag_configuration.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}})

tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
Expand Down Expand Up @@ -318,6 +374,9 @@ def _build_schema_on_200_201(cls):
properties.resource_location = AAZStrType(
serialized_name="resourceLocation",
)
properties.target_resource_configuration = AAZObjectType(
serialized_name="targetResourceConfiguration",
)
properties.workloads = AAZListType(
flags={"read_only": True},
)
Expand Down Expand Up @@ -371,6 +430,25 @@ def _build_schema_on_200_201(cls):
_element = cls._schema_on_200_201.properties.managed_on_behalf_of_configuration.mobo_broker_resources.Element
_element.id = AAZStrType()

target_resource_configuration = cls._schema_on_200_201.properties.target_resource_configuration
target_resource_configuration.aks_sku = AAZStrType(
serialized_name="aksSku",
)
target_resource_configuration.i_p_tag_configuration = AAZObjectType(
serialized_name="iPTagConfiguration",
)
target_resource_configuration.node_pool_size = AAZIntType(
serialized_name="nodePoolSize",
)

i_p_tag_configuration = cls._schema_on_200_201.properties.target_resource_configuration.i_p_tag_configuration
i_p_tag_configuration.type = AAZStrType(
flags={"required": True},
)
i_p_tag_configuration.value = AAZStrType(
flags={"required": True},
)

workloads = cls._schema_on_200_201.properties.workloads
workloads.Element = AAZObjectType()

Expand Down
Loading
Loading