Skip to content

Commit e80e011

Browse files
committed
update loganalytics
1 parent 97763e8 commit e80e011

27 files changed

Lines changed: 4596 additions & 411 deletions

File tree

src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/cluster/_create.py

Lines changed: 114 additions & 61 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/cluster/_delete.py

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

2525
_aaz_info = {
26-
"version": "2022-10-01",
26+
"version": "2025-02-01",
2727
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationalinsights/clusters/{}", "2022-10-01"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationalinsights/clusters/{}", "2025-02-01"],
2929
]
3030
}
3131

@@ -143,7 +143,7 @@ def url_parameters(self):
143143
def query_parameters(self):
144144
parameters = {
145145
**self.serialize_query_param(
146-
"api-version", "2022-10-01",
146+
"api-version", "2025-02-01",
147147
required=True,
148148
),
149149
}

src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/cluster/_list.py

Lines changed: 59 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class List(AAZCommand):
2525
"""
2626

2727
_aaz_info = {
28-
"version": "2022-10-01",
28+
"version": "2025-02-01",
2929
"resources": [
30-
["mgmt-plane", "/subscriptions/{}/providers/microsoft.operationalinsights/clusters", "2022-10-01"],
31-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationalinsights/clusters", "2022-10-01"],
30+
["mgmt-plane", "/subscriptions/{}/providers/microsoft.operationalinsights/clusters", "2025-02-01"],
31+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationalinsights/clusters", "2025-02-01"],
3232
]
3333
}
3434

@@ -54,12 +54,12 @@ def _build_arguments_schema(cls, *args, **kwargs):
5454

5555
def _execute_operations(self):
5656
self.pre_operations()
57-
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
58-
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
57+
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
58+
condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
5959
if condition_0:
60-
self.ClustersListByResourceGroup(ctx=self.ctx)()
61-
if condition_1:
6260
self.ClustersList(ctx=self.ctx)()
61+
if condition_1:
62+
self.ClustersListByResourceGroup(ctx=self.ctx)()
6363
self.post_operations()
6464

6565
@register_callback
@@ -75,7 +75,7 @@ def _output(self, *args, **kwargs):
7575
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
7676
return result, next_link
7777

78-
class ClustersListByResourceGroup(AAZHttpOperation):
78+
class ClustersList(AAZHttpOperation):
7979
CLIENT_TYPE = "MgmtClient"
8080

8181
def __call__(self, *args, **kwargs):
@@ -89,7 +89,7 @@ def __call__(self, *args, **kwargs):
8989
@property
9090
def url(self):
9191
return self.client.format_url(
92-
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters",
92+
"/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters",
9393
**self.url_parameters
9494
)
9595

@@ -104,10 +104,6 @@ def error_format(self):
104104
@property
105105
def url_parameters(self):
106106
parameters = {
107-
**self.serialize_url_param(
108-
"resourceGroupName", self.ctx.args.resource_group,
109-
required=True,
110-
),
111107
**self.serialize_url_param(
112108
"subscriptionId", self.ctx.subscription_id,
113109
required=True,
@@ -119,7 +115,7 @@ def url_parameters(self):
119115
def query_parameters(self):
120116
parameters = {
121117
**self.serialize_query_param(
122-
"api-version", "2022-10-01",
118+
"api-version", "2025-02-01",
123119
required=True,
124120
),
125121
}
@@ -164,7 +160,7 @@ def _build_schema_on_200(cls):
164160
_element.id = AAZStrType(
165161
flags={"read_only": True},
166162
)
167-
_element.identity = AAZObjectType()
163+
_element.identity = AAZIdentityObjectType()
168164
_element.location = AAZStrType(
169165
flags={"required": True},
170166
)
@@ -246,6 +242,7 @@ def _build_schema_on_200(cls):
246242
serialized_name="provisioningState",
247243
flags={"read_only": True},
248244
)
245+
properties.replication = AAZObjectType()
249246

250247
associated_workspaces = cls._schema_on_200.value.Element.properties.associated_workspaces
251248
associated_workspaces.Element = AAZObjectType()
@@ -292,6 +289,25 @@ def _build_schema_on_200(cls):
292289
serialized_name="keyVersion",
293290
)
294291

292+
replication = cls._schema_on_200.value.Element.properties.replication
293+
replication.created_date = AAZStrType(
294+
serialized_name="createdDate",
295+
flags={"read_only": True},
296+
)
297+
replication.enabled = AAZBoolType()
298+
replication.is_availability_zones_enabled = AAZBoolType(
299+
serialized_name="isAvailabilityZonesEnabled",
300+
)
301+
replication.last_modified_date = AAZStrType(
302+
serialized_name="lastModifiedDate",
303+
flags={"read_only": True},
304+
)
305+
replication.location = AAZStrType()
306+
replication.provisioning_state = AAZStrType(
307+
serialized_name="provisioningState",
308+
flags={"read_only": True},
309+
)
310+
295311
sku = cls._schema_on_200.value.Element.sku
296312
sku.capacity = AAZIntType()
297313
sku.name = AAZStrType()
@@ -301,7 +317,7 @@ def _build_schema_on_200(cls):
301317

302318
return cls._schema_on_200
303319

304-
class ClustersList(AAZHttpOperation):
320+
class ClustersListByResourceGroup(AAZHttpOperation):
305321
CLIENT_TYPE = "MgmtClient"
306322

307323
def __call__(self, *args, **kwargs):
@@ -315,7 +331,7 @@ def __call__(self, *args, **kwargs):
315331
@property
316332
def url(self):
317333
return self.client.format_url(
318-
"/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters",
334+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters",
319335
**self.url_parameters
320336
)
321337

@@ -330,6 +346,10 @@ def error_format(self):
330346
@property
331347
def url_parameters(self):
332348
parameters = {
349+
**self.serialize_url_param(
350+
"resourceGroupName", self.ctx.args.resource_group,
351+
required=True,
352+
),
333353
**self.serialize_url_param(
334354
"subscriptionId", self.ctx.subscription_id,
335355
required=True,
@@ -341,7 +361,7 @@ def url_parameters(self):
341361
def query_parameters(self):
342362
parameters = {
343363
**self.serialize_query_param(
344-
"api-version", "2022-10-01",
364+
"api-version", "2025-02-01",
345365
required=True,
346366
),
347367
}
@@ -386,7 +406,7 @@ def _build_schema_on_200(cls):
386406
_element.id = AAZStrType(
387407
flags={"read_only": True},
388408
)
389-
_element.identity = AAZObjectType()
409+
_element.identity = AAZIdentityObjectType()
390410
_element.location = AAZStrType(
391411
flags={"required": True},
392412
)
@@ -468,6 +488,7 @@ def _build_schema_on_200(cls):
468488
serialized_name="provisioningState",
469489
flags={"read_only": True},
470490
)
491+
properties.replication = AAZObjectType()
471492

472493
associated_workspaces = cls._schema_on_200.value.Element.properties.associated_workspaces
473494
associated_workspaces.Element = AAZObjectType()
@@ -514,6 +535,25 @@ def _build_schema_on_200(cls):
514535
serialized_name="keyVersion",
515536
)
516537

538+
replication = cls._schema_on_200.value.Element.properties.replication
539+
replication.created_date = AAZStrType(
540+
serialized_name="createdDate",
541+
flags={"read_only": True},
542+
)
543+
replication.enabled = AAZBoolType()
544+
replication.is_availability_zones_enabled = AAZBoolType(
545+
serialized_name="isAvailabilityZonesEnabled",
546+
)
547+
replication.last_modified_date = AAZStrType(
548+
serialized_name="lastModifiedDate",
549+
flags={"read_only": True},
550+
)
551+
replication.location = AAZStrType()
552+
replication.provisioning_state = AAZStrType(
553+
serialized_name="provisioningState",
554+
flags={"read_only": True},
555+
)
556+
517557
sku = cls._schema_on_200.value.Element.sku
518558
sku.capacity = AAZIntType()
519559
sku.name = AAZStrType()

src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/cluster/_show.py

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Show(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2022-10-01",
25+
"version": "2025-02-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationalinsights/clusters/{}", "2022-10-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationalinsights/clusters/{}", "2025-02-01"],
2828
]
2929
}
3030

@@ -120,7 +120,7 @@ def url_parameters(self):
120120
def query_parameters(self):
121121
parameters = {
122122
**self.serialize_query_param(
123-
"api-version", "2022-10-01",
123+
"api-version", "2025-02-01",
124124
required=True,
125125
),
126126
}
@@ -156,7 +156,7 @@ def _build_schema_on_200(cls):
156156
_schema_on_200.id = AAZStrType(
157157
flags={"read_only": True},
158158
)
159-
_schema_on_200.identity = AAZObjectType()
159+
_schema_on_200.identity = AAZIdentityObjectType()
160160
_schema_on_200.location = AAZStrType(
161161
flags={"required": True},
162162
)
@@ -206,7 +206,6 @@ def _build_schema_on_200(cls):
206206
properties = cls._schema_on_200.properties
207207
properties.associated_workspaces = AAZListType(
208208
serialized_name="associatedWorkspaces",
209-
flags={"read_only": True},
210209
)
211210
properties.billing_type = AAZStrType(
212211
serialized_name="billingType",
@@ -239,6 +238,7 @@ def _build_schema_on_200(cls):
239238
serialized_name="provisioningState",
240239
flags={"read_only": True},
241240
)
241+
properties.replication = AAZObjectType()
242242

243243
associated_workspaces = cls._schema_on_200.properties.associated_workspaces
244244
associated_workspaces.Element = AAZObjectType()
@@ -285,6 +285,25 @@ def _build_schema_on_200(cls):
285285
serialized_name="keyVersion",
286286
)
287287

288+
replication = cls._schema_on_200.properties.replication
289+
replication.created_date = AAZStrType(
290+
serialized_name="createdDate",
291+
flags={"read_only": True},
292+
)
293+
replication.enabled = AAZBoolType()
294+
replication.is_availability_zones_enabled = AAZBoolType(
295+
serialized_name="isAvailabilityZonesEnabled",
296+
)
297+
replication.last_modified_date = AAZStrType(
298+
serialized_name="lastModifiedDate",
299+
flags={"read_only": True},
300+
)
301+
replication.location = AAZStrType()
302+
replication.provisioning_state = AAZStrType(
303+
serialized_name="provisioningState",
304+
flags={"read_only": True},
305+
)
306+
288307
sku = cls._schema_on_200.sku
289308
sku.capacity = AAZIntType()
290309
sku.name = AAZStrType()

0 commit comments

Comments
 (0)