Skip to content

Commit 9b2fc1d

Browse files
author
SDKAuto
committed
CodeGen from PR 33352 in Azure/azure-rest-api-specs
Merge 749fea97ed033e2c1a3199998406e4e48bf341a8 into 45924e49834c4e01c0713e6b7ca21f94be17e396
1 parent 87c7d9a commit 9b2fc1d

File tree

10 files changed

+27
-57
lines changed

10 files changed

+27
-57
lines changed

sdk/impactreporting/azure-mgmt-impactreporting/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 1.0.0b2 (2025-03-26)
4+
5+
### Features Added
6+
7+
- Method `WorkloadImpactProperties.__init__` has a new overload `def __init__(self: None, start_date_time: datetime, impacted_resource_id: str, impact_category: str, end_date_time: Optional[datetime], impact_description: Optional[str], arm_correlation_ids: Optional[List[str]], performance: Optional[List[_models.Performance]], connectivity: Optional[_models.Connectivity], additional_properties: Optional[Dict[str, Any]], error_details: Optional[_models.ErrorDetailProperties], workload: Optional[_models.Workload], impact_group_id: Optional[str], confidence_level: Optional[Union[str, _models.ConfidenceLevel]], client_incident_details: Optional[_models.ClientIncidentDetails])`
8+
39
## 1.0.0b1 (2025-02-19)
410

511
### Other Changes

sdk/impactreporting/azure-mgmt-impactreporting/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "2ed1d371e3519553cd527c1f9f2c316f9ed58f47",
2+
"commit": "284ee8a145bc4935b10a24d76a5ae618e0e407e2",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/impact/Impact.Management",
5-
"@azure-tools/typespec-python": "0.38.4"
5+
"@azure-tools/typespec-python": "0.41.0"
66
}

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/_serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def from_dict(
411411
:param function key_extractors: A key extractor function.
412412
:param str content_type: JSON by default, set application/xml if XML.
413413
:returns: An instance of this model
414-
:raises: DeserializationError if something went wrong
414+
:raises DeserializationError: if something went wrong
415415
:rtype: Self
416416
"""
417417
deserializer = Deserializer(cls._infer_class_models())

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b1"
9+
VERSION = "1.0.0b2"

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/operations/_operations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def prepare_request(next_link=None):
142142

143143
async def extract_data(pipeline_response):
144144
deserialized = pipeline_response.http_response.json()
145-
list_of_elem = _deserialize(List[_models.Operation], deserialized["value"])
145+
list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", []))
146146
if cls:
147147
list_of_elem = cls(list_of_elem) # type: ignore
148148
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -554,7 +554,7 @@ def prepare_request(next_link=None):
554554

555555
async def extract_data(pipeline_response):
556556
deserialized = pipeline_response.http_response.json()
557-
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized["value"])
557+
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized.get("value", []))
558558
if cls:
559559
list_of_elem = cls(list_of_elem) # type: ignore
560560
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -727,7 +727,7 @@ def prepare_request(next_link=None):
727727

728728
async def extract_data(pipeline_response):
729729
deserialized = pipeline_response.http_response.json()
730-
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized["value"])
730+
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized.get("value", []))
731731
if cls:
732732
list_of_elem = cls(list_of_elem) # type: ignore
733733
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -897,7 +897,7 @@ def prepare_request(next_link=None):
897897

898898
async def extract_data(pipeline_response):
899899
deserialized = pipeline_response.http_response.json()
900-
list_of_elem = _deserialize(List[_models.Insight], deserialized["value"])
900+
list_of_elem = _deserialize(List[_models.Insight], deserialized.get("value", []))
901901
if cls:
902902
list_of_elem = cls(list_of_elem) # type: ignore
903903
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -1654,7 +1654,7 @@ def prepare_request(next_link=None):
16541654

16551655
async def extract_data(pipeline_response):
16561656
deserialized = pipeline_response.http_response.json()
1657-
list_of_elem = _deserialize(List[_models.Connector], deserialized["value"])
1657+
list_of_elem = _deserialize(List[_models.Connector], deserialized.get("value", []))
16581658
if cls:
16591659
list_of_elem = cls(list_of_elem) # type: ignore
16601660
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/models/_models.py

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# pylint: disable=useless-super-delegation
1010

1111
import datetime
12-
from typing import Any, List, Mapping, Optional, TYPE_CHECKING, Union, overload
12+
from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload
1313

1414
from .. import _model_base
1515
from .._model_base import rest_field
@@ -112,8 +112,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
112112
class Resource(_model_base.Model):
113113
"""Common fields that are returned in the response for all Azure Resource Manager resources.
114114
115-
Readonly variables are only populated by the server, and will be ignored when sending a request.
116-
117115
:ivar id: Fully qualified resource ID for the resource. Ex -
118116
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
119117
:vartype id: str
@@ -143,8 +141,6 @@ class ProxyResource(Resource):
143141
"""The resource model definition for a Azure Resource Manager proxy resource. It will not have
144142
tags and a location.
145143
146-
Readonly variables are only populated by the server, and will be ignored when sending a request.
147-
148144
:ivar id: Fully qualified resource ID for the resource. Ex -
149145
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
150146
:vartype id: str
@@ -163,8 +159,6 @@ class Connector(ProxyResource):
163159
"""A connector is a resource that can be used to proactively report impacts against workloads in
164160
Azure to Microsoft.
165161
166-
Readonly variables are only populated by the server, and will be ignored when sending a request.
167-
168162
:ivar id: Fully qualified resource ID for the resource. Ex -
169163
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
170164
:vartype id: str
@@ -206,9 +200,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
206200
class ConnectorProperties(_model_base.Model):
207201
"""Details of the Connector.
208202
209-
Readonly variables are only populated by the server, and will be ignored when sending a request.
210-
211-
212203
:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
213204
and "Canceled".
214205
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
@@ -318,7 +309,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
318309
class Content(_model_base.Model):
319310
"""Article details of the insight like title, description etc.
320311
321-
322312
:ivar title: Title of the insight. Required.
323313
:vartype title: str
324314
:ivar description: Description of the insight. Required.
@@ -352,8 +342,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
352342
class ErrorAdditionalInfo(_model_base.Model):
353343
"""The resource management error additional info.
354344
355-
Readonly variables are only populated by the server, and will be ignored when sending a request.
356-
357345
:ivar type: The additional info type.
358346
:vartype type: str
359347
:ivar info: The additional info.
@@ -369,8 +357,6 @@ class ErrorAdditionalInfo(_model_base.Model):
369357
class ErrorDetail(_model_base.Model):
370358
"""The error detail.
371359
372-
Readonly variables are only populated by the server, and will be ignored when sending a request.
373-
374360
:ivar code: The error code.
375361
:vartype code: str
376362
:ivar message: The error message.
@@ -464,7 +450,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
464450
class ExpectedValueRange(_model_base.Model):
465451
"""Max and Min Threshold values for the metric.
466452
467-
468453
:ivar min: Min threshold value for the metric. Required.
469454
:vartype min: float
470455
:ivar max: Max threshold value for the metric. Required.
@@ -498,8 +483,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
498483
class ImpactCategory(ProxyResource):
499484
"""ImpactCategory resource.
500485
501-
Readonly variables are only populated by the server, and will be ignored when sending a request.
502-
503486
:ivar id: Fully qualified resource ID for the resource. Ex -
504487
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
505488
:vartype id: str
@@ -541,9 +524,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
541524
class ImpactCategoryProperties(_model_base.Model):
542525
"""Impact category properties.
543526
544-
Readonly variables are only populated by the server, and will be ignored when sending a request.
545-
546-
547527
:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
548528
and "Canceled".
549529
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
@@ -600,7 +580,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
600580
class ImpactDetails(_model_base.Model):
601581
"""details of of the impact for which insight has been generated.
602582
603-
604583
:ivar impacted_resource_id: List of impacted Azure resources. Required.
605584
:vartype impacted_resource_id: str
606585
:ivar start_time: Time at which impact was started according to reported impact. Required.
@@ -650,8 +629,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
650629
class Insight(ProxyResource):
651630
"""Insight resource.
652631
653-
Readonly variables are only populated by the server, and will be ignored when sending a request.
654-
655632
:ivar id: Fully qualified resource ID for the resource. Ex -
656633
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
657634
:vartype id: str
@@ -693,9 +670,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
693670
class InsightProperties(_model_base.Model):
694671
"""Impact category properties.
695672
696-
Readonly variables are only populated by the server, and will be ignored when sending a request.
697-
698-
699673
:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
700674
and "Canceled".
701675
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
@@ -779,8 +753,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
779753
class Operation(_model_base.Model):
780754
"""Details of a REST API operation, returned from the Resource Provider Operations API.
781755
782-
Readonly variables are only populated by the server, and will be ignored when sending a request.
783-
784756
:ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
785757
"Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
786758
:vartype name: str
@@ -838,8 +810,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
838810
class OperationDisplay(_model_base.Model):
839811
"""Localized display information for and operation.
840812
841-
Readonly variables are only populated by the server, and will be ignored when sending a request.
842-
843813
:ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft
844814
Monitoring Insights" or "Microsoft Compute".
845815
:vartype provider: str
@@ -933,7 +903,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
933903
class RequiredImpactProperties(_model_base.Model):
934904
"""Required impact properties.
935905
936-
937906
:ivar name: Name of the property. Required.
938907
:vartype name: str
939908
:ivar allowed_values: Allowed values values for the property.
@@ -1105,8 +1074,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
11051074
class WorkloadImpact(ProxyResource):
11061075
"""Workload Impact properties.
11071076
1108-
Readonly variables are only populated by the server, and will be ignored when sending a request.
1109-
11101077
:ivar id: Fully qualified resource ID for the resource. Ex -
11111078
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
11121079
:vartype id: str
@@ -1148,9 +1115,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
11481115
class WorkloadImpactProperties(_model_base.Model):
11491116
"""Workload impact properties.
11501117
1151-
Readonly variables are only populated by the server, and will be ignored when sending a request.
1152-
1153-
11541118
:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
11551119
and "Canceled".
11561120
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
@@ -1181,7 +1145,7 @@ class WorkloadImpactProperties(_model_base.Model):
11811145
:vartype connectivity: ~azure.mgmt.impactreporting.models.Connectivity
11821146
:ivar additional_properties: Additional fields related to impact, applicable fields per
11831147
resource type are list under /impactCategories API.
1184-
:vartype additional_properties: any
1148+
:vartype additional_properties: dict[str, any]
11851149
:ivar error_details: ARM error code and error message associated with the impact.
11861150
:vartype error_details: ~azure.mgmt.impactreporting.models.ErrorDetailProperties
11871151
:ivar workload: Information about the impacted workload.
@@ -1238,7 +1202,7 @@ class WorkloadImpactProperties(_model_base.Model):
12381202
identified. For example, when a VM is impacted due to a network issue, the impacted resource is
12391203
identified as the VM, but the root cause is the network. In such cases, the connectivity field
12401204
will have the details about the network issue."""
1241-
additional_properties: Optional[Any] = rest_field(
1205+
additional_properties: Optional[Dict[str, Any]] = rest_field(
12421206
name="additionalProperties", visibility=["read", "create", "update", "delete", "query"]
12431207
)
12441208
"""Additional fields related to impact, applicable fields per resource type are list under
@@ -1275,7 +1239,7 @@ def __init__(
12751239
arm_correlation_ids: Optional[List[str]] = None,
12761240
performance: Optional[List["_models.Performance"]] = None,
12771241
connectivity: Optional["_models.Connectivity"] = None,
1278-
additional_properties: Optional[Any] = None,
1242+
additional_properties: Optional[Dict[str, Any]] = None,
12791243
error_details: Optional["_models.ErrorDetailProperties"] = None,
12801244
workload: Optional["_models.Workload"] = None,
12811245
impact_group_id: Optional[str] = None,

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/operations/_operations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def prepare_request(next_link=None):
555555

556556
def extract_data(pipeline_response):
557557
deserialized = pipeline_response.http_response.json()
558-
list_of_elem = _deserialize(List[_models.Operation], deserialized["value"])
558+
list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", []))
559559
if cls:
560560
list_of_elem = cls(list_of_elem) # type: ignore
561561
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -968,7 +968,7 @@ def prepare_request(next_link=None):
968968

969969
def extract_data(pipeline_response):
970970
deserialized = pipeline_response.http_response.json()
971-
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized["value"])
971+
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized.get("value", []))
972972
if cls:
973973
list_of_elem = cls(list_of_elem) # type: ignore
974974
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -1140,7 +1140,7 @@ def prepare_request(next_link=None):
11401140

11411141
def extract_data(pipeline_response):
11421142
deserialized = pipeline_response.http_response.json()
1143-
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized["value"])
1143+
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized.get("value", []))
11441144
if cls:
11451145
list_of_elem = cls(list_of_elem) # type: ignore
11461146
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -1310,7 +1310,7 @@ def prepare_request(next_link=None):
13101310

13111311
def extract_data(pipeline_response):
13121312
deserialized = pipeline_response.http_response.json()
1313-
list_of_elem = _deserialize(List[_models.Insight], deserialized["value"])
1313+
list_of_elem = _deserialize(List[_models.Insight], deserialized.get("value", []))
13141314
if cls:
13151315
list_of_elem = cls(list_of_elem) # type: ignore
13161316
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -2069,7 +2069,7 @@ def prepare_request(next_link=None):
20692069

20702070
def extract_data(pipeline_response):
20712071
deserialized = pipeline_response.http_response.json()
2072-
list_of_elem = _deserialize(List[_models.Connector], deserialized["value"])
2072+
list_of_elem = _deserialize(List[_models.Connector], deserialized.get("value", []))
20732073
if cls:
20742074
list_of_elem = cls(list_of_elem) # type: ignore
20752075
return deserialized.get("nextLink") or None, iter(list_of_elem)

sdk/impactreporting/azure-mgmt-impactreporting/generated_samples/insights_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def main():
3838
"properties": {
3939
"category": "repair",
4040
"content": {
41-
"description": 'At 2018-11-08T00:00:00Z UTC, your services dependent on these resources :code:`<link href=”…”>VM1</link>` may have experienced an issue. :code:`<br/>`\\ :code:`<div>`We have identified an outage that affected these resources(s). You can look at outage information on :code:`<link href="https:// portal.azure.com/#view/Microsoft_Azure_Health/AzureHealthBrowseBlade/~/serviceIssues/trackingId/NL2W-VCZ">NL2W-VCZ</link>` link.\\ :code:`<div>`',
41+
"description": 'At 2018-11-08T00:00:00Z UTC, your services dependent on these resources <link href=”…”>VM1</link> may have experienced an issue. <br/><div>We have identified an outage that affected these resources(s). You can look at outage information on <link href="https:// portal.azure.com/#view/Microsoft_Azure_Health/AzureHealthBrowseBlade/~/serviceIssues/trackingId/NL2W-VCZ">NL2W-VCZ</link> link.<div>',
4242
"title": "Impact Has been correlated to an outage",
4343
},
4444
"eventTime": "2023-06-15T04:00:00.009223Z",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
directory: specification/impact/Impact.Management
2-
commit: 2ed1d371e3519553cd527c1f9f2c316f9ed58f47
2+
commit: 284ee8a145bc4935b10a24d76a5ae618e0e407e2
33
repo: Azure/azure-rest-api-specs
44
additionalDirectories:

0 commit comments

Comments
 (0)