Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/impactreporting/azure-mgmt-impactreporting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 1.0.0b2 (2025-03-26)

### Features Added

- 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])`

## 1.0.0b1 (2025-02-19)

### Other Changes
Expand Down
2 changes: 1 addition & 1 deletion sdk/impactreporting/azure-mgmt-impactreporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pip install azure-identity

### Authentication

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

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down
4 changes: 2 additions & 2 deletions sdk/impactreporting/azure-mgmt-impactreporting/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "2ed1d371e3519553cd527c1f9f2c316f9ed58f47",
"commit": "91b7747c37688b97639a7e73390b554a3d1e562a",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/impact/Impact.Management",
"@azure-tools/typespec-python": "0.38.4"
"@azure-tools/typespec-python": "0.41.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def from_dict(
:param function key_extractors: A key extractor function.
:param str content_type: JSON by default, set application/xml if XML.
:returns: An instance of this model
:raises: DeserializationError if something went wrong
:raises DeserializationError: if something went wrong
:rtype: Self
"""
deserializer = Deserializer(cls._infer_class_models())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"
VERSION = "1.0.0b2"
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def prepare_request(next_link=None):

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

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

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

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

async def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
list_of_elem = _deserialize(List[_models.Connector], deserialized["value"])
list_of_elem = _deserialize(List[_models.Connector], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# pylint: disable=useless-super-delegation

import datetime
from typing import Any, List, Mapping, Optional, TYPE_CHECKING, Union, overload
from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload

from .. import _model_base
from .._model_base import rest_field
Expand Down Expand Up @@ -112,8 +112,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class Resource(_model_base.Model):
"""Common fields that are returned in the response for all Azure Resource Manager resources.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
Expand Down Expand Up @@ -143,8 +141,6 @@ class ProxyResource(Resource):
"""The resource model definition for a Azure Resource Manager proxy resource. It will not have
tags and a location.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
Expand All @@ -163,8 +159,6 @@ class Connector(ProxyResource):
"""A connector is a resource that can be used to proactively report impacts against workloads in
Azure to Microsoft.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
Expand Down Expand Up @@ -206,9 +200,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class ConnectorProperties(_model_base.Model):
"""Details of the Connector.

Readonly variables are only populated by the server, and will be ignored when sending a request.


:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
and "Canceled".
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
Expand Down Expand Up @@ -318,7 +309,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class Content(_model_base.Model):
"""Article details of the insight like title, description etc.


:ivar title: Title of the insight. Required.
:vartype title: str
:ivar description: Description of the insight. Required.
Expand Down Expand Up @@ -352,8 +342,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class ErrorAdditionalInfo(_model_base.Model):
"""The resource management error additional info.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar type: The additional info type.
:vartype type: str
:ivar info: The additional info.
Expand All @@ -369,8 +357,6 @@ class ErrorAdditionalInfo(_model_base.Model):
class ErrorDetail(_model_base.Model):
"""The error detail.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
Expand Down Expand Up @@ -464,7 +450,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class ExpectedValueRange(_model_base.Model):
"""Max and Min Threshold values for the metric.


:ivar min: Min threshold value for the metric. Required.
:vartype min: float
:ivar max: Max threshold value for the metric. Required.
Expand Down Expand Up @@ -498,8 +483,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class ImpactCategory(ProxyResource):
"""ImpactCategory resource.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
Expand Down Expand Up @@ -541,9 +524,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class ImpactCategoryProperties(_model_base.Model):
"""Impact category properties.

Readonly variables are only populated by the server, and will be ignored when sending a request.


:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
and "Canceled".
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
Expand Down Expand Up @@ -600,7 +580,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class ImpactDetails(_model_base.Model):
"""details of of the impact for which insight has been generated.


:ivar impacted_resource_id: List of impacted Azure resources. Required.
:vartype impacted_resource_id: str
:ivar start_time: Time at which impact was started according to reported impact. Required.
Expand Down Expand Up @@ -650,8 +629,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class Insight(ProxyResource):
"""Insight resource.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
Expand Down Expand Up @@ -693,9 +670,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class InsightProperties(_model_base.Model):
"""Impact category properties.

Readonly variables are only populated by the server, and will be ignored when sending a request.


:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
and "Canceled".
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
Expand Down Expand Up @@ -779,8 +753,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class Operation(_model_base.Model):
"""Details of a REST API operation, returned from the Resource Provider Operations API.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
"Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
:vartype name: str
Expand Down Expand Up @@ -838,8 +810,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class OperationDisplay(_model_base.Model):
"""Localized display information for and operation.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft
Monitoring Insights" or "Microsoft Compute".
:vartype provider: str
Expand Down Expand Up @@ -933,7 +903,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class RequiredImpactProperties(_model_base.Model):
"""Required impact properties.


:ivar name: Name of the property. Required.
:vartype name: str
:ivar allowed_values: Allowed values values for the property.
Expand Down Expand Up @@ -1105,8 +1074,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class WorkloadImpact(ProxyResource):
"""Workload Impact properties.

Readonly variables are only populated by the server, and will be ignored when sending a request.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
Expand Down Expand Up @@ -1148,9 +1115,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class WorkloadImpactProperties(_model_base.Model):
"""Workload impact properties.

Readonly variables are only populated by the server, and will be ignored when sending a request.


:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
and "Canceled".
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
Expand Down Expand Up @@ -1181,7 +1145,7 @@ class WorkloadImpactProperties(_model_base.Model):
:vartype connectivity: ~azure.mgmt.impactreporting.models.Connectivity
:ivar additional_properties: Additional fields related to impact, applicable fields per
resource type are list under /impactCategories API.
:vartype additional_properties: any
:vartype additional_properties: dict[str, any]
:ivar error_details: ARM error code and error message associated with the impact.
:vartype error_details: ~azure.mgmt.impactreporting.models.ErrorDetailProperties
:ivar workload: Information about the impacted workload.
Expand Down Expand Up @@ -1238,7 +1202,7 @@ class WorkloadImpactProperties(_model_base.Model):
identified. For example, when a VM is impacted due to a network issue, the impacted resource is
identified as the VM, but the root cause is the network. In such cases, the connectivity field
will have the details about the network issue."""
additional_properties: Optional[Any] = rest_field(
additional_properties: Optional[Dict[str, Any]] = rest_field(
name="additionalProperties", visibility=["read", "create", "update", "delete", "query"]
)
"""Additional fields related to impact, applicable fields per resource type are list under
Expand Down Expand Up @@ -1275,7 +1239,7 @@ def __init__(
arm_correlation_ids: Optional[List[str]] = None,
performance: Optional[List["_models.Performance"]] = None,
connectivity: Optional["_models.Connectivity"] = None,
additional_properties: Optional[Any] = None,
additional_properties: Optional[Dict[str, Any]] = None,
error_details: Optional["_models.ErrorDetailProperties"] = None,
workload: Optional["_models.Workload"] = None,
impact_group_id: Optional[str] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def prepare_request(next_link=None):

def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
list_of_elem = _deserialize(List[_models.Operation], deserialized["value"])
list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
Expand Down Expand Up @@ -968,7 +968,7 @@ def prepare_request(next_link=None):

def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized["value"])
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
Expand Down Expand Up @@ -1140,7 +1140,7 @@ def prepare_request(next_link=None):

def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized["value"])
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
Expand Down Expand Up @@ -1310,7 +1310,7 @@ def prepare_request(next_link=None):

def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
list_of_elem = _deserialize(List[_models.Insight], deserialized["value"])
list_of_elem = _deserialize(List[_models.Insight], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
Expand Down Expand Up @@ -2069,7 +2069,7 @@ def prepare_request(next_link=None):

def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
list_of_elem = _deserialize(List[_models.Connector], deserialized["value"])
list_of_elem = _deserialize(List[_models.Connector], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():
"properties": {
"category": "repair",
"content": {
"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>`',
"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>',
"title": "Impact Has been correlated to an outage",
},
"eventTime": "2023-06-15T04:00:00.009223Z",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/impact/Impact.Management
commit: 2ed1d371e3519553cd527c1f9f2c316f9ed58f47
commit: 91b7747c37688b97639a7e73390b554a3d1e562a
repo: Azure/azure-rest-api-specs
additionalDirectories: