Skip to content

Commit 02335c5

Browse files
authored
Regenerate azure-mgmt-policyinsights with latest code generator tool (#46975)
1 parent 74fb2fe commit 02335c5

187 files changed

Lines changed: 1414 additions & 8088 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sdk/policyinsights/azure-mgmt-policyinsights/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.1 (2026-05-19)
4+
5+
### Other Changes
6+
7+
- Regenerated with latest code generator tool
8+
39
## 1.1.0b5 (2025-07-21)
410

511
### Features Added
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
recursive-include tests *.py *.json
2-
recursive-include samples *.py *.md
31
include *.md
4-
include azure/__init__.py
5-
include azure/mgmt/__init__.py
62
include LICENSE
73
include azure/mgmt/policyinsights/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/mgmt/__init__.py

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Policy Insights Client Library.
4-
This package has been tested with Python 3.9+.
4+
This package has been tested with Python 3.10+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.9+ is required to use this package.
15+
- Python 3.10+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "6c548b0bd279f5e233661b1c81fb5b61b19965cd",
2+
"commit": "6ed455a1fb884a0a8d5c8970d44d4ccee288cf30",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.35.0",
6+
"@autorest/python@6.50.0",
77
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/policyinsights/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.35.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/policyinsights/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\azure-sdk-for-python\\sdk --tag=package-2020-07 --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/policyinsights/resource-manager/readme.md"
1111
}

sdk/policyinsights/azure-mgmt-policyinsights/apiview-properties.json

Lines changed: 180 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_configuration.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import Any, TYPE_CHECKING
9+
from typing import Any, Optional, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1313

1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17+
from azure.core import AzureClouds
1718
from azure.core.credentials import TokenCredential
1819

1920

@@ -27,16 +28,26 @@ class PolicyInsightsClientConfiguration: # pylint: disable=too-many-instance-at
2728
:type credential: ~azure.core.credentials.TokenCredential
2829
:param subscription_id: Microsoft Azure subscription ID. Required.
2930
:type subscription_id: str
31+
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
32+
None.
33+
:type cloud_setting: ~azure.core.AzureClouds
3034
"""
3135

32-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36+
def __init__(
37+
self,
38+
credential: "TokenCredential",
39+
subscription_id: str,
40+
cloud_setting: Optional["AzureClouds"] = None,
41+
**kwargs: Any
42+
) -> None:
3343
if credential is None:
3444
raise ValueError("Parameter 'credential' must not be None.")
3545
if subscription_id is None:
3646
raise ValueError("Parameter 'subscription_id' must not be None.")
3747

3848
self.credential = credential
3949
self.subscription_id = subscription_id
50+
self.cloud_setting = cloud_setting
4051
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4152
kwargs.setdefault("sdk_moniker", "mgmt-policyinsights/{}".format(VERSION))
4253
self.polling_interval = kwargs.get("polling_interval", 30)

sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5+
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize

sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_policy_insights_client.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
from ._configuration import PolicyInsightsClientConfiguration
2222
from ._utils.serialization import Deserializer, Serializer
2323
from .operations import (
24-
AttestationsOperations,
25-
ComponentPolicyStatesOperations,
2624
Operations,
2725
PolicyEventsOperations,
2826
PolicyMetadataOperations,
@@ -33,11 +31,12 @@
3331
)
3432

3533
if TYPE_CHECKING:
34+
from azure.core import AzureClouds
3635
from azure.core.credentials import TokenCredential
3736

3837

3938
class PolicyInsightsClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
40-
"""Query component policy states at varying resource scopes for Resource Provider mode policies.
39+
"""PolicyInsightsClient.
4140
4241
:ivar policy_tracked_resources: PolicyTrackedResourcesOperations operations
4342
:vartype policy_tracked_resources:
@@ -48,37 +47,45 @@ class PolicyInsightsClient: # pylint: disable=client-accepts-api-version-keywor
4847
:vartype policy_events: azure.mgmt.policyinsights.operations.PolicyEventsOperations
4948
:ivar policy_states: PolicyStatesOperations operations
5049
:vartype policy_states: azure.mgmt.policyinsights.operations.PolicyStatesOperations
50+
:ivar operations: Operations operations
51+
:vartype operations: azure.mgmt.policyinsights.operations.Operations
5152
:ivar policy_metadata: PolicyMetadataOperations operations
5253
:vartype policy_metadata: azure.mgmt.policyinsights.operations.PolicyMetadataOperations
5354
:ivar policy_restrictions: PolicyRestrictionsOperations operations
5455
:vartype policy_restrictions: azure.mgmt.policyinsights.operations.PolicyRestrictionsOperations
55-
:ivar component_policy_states: ComponentPolicyStatesOperations operations
56-
:vartype component_policy_states:
57-
azure.mgmt.policyinsights.operations.ComponentPolicyStatesOperations
58-
:ivar operations: Operations operations
59-
:vartype operations: azure.mgmt.policyinsights.operations.Operations
60-
:ivar attestations: AttestationsOperations operations
61-
:vartype attestations: azure.mgmt.policyinsights.operations.AttestationsOperations
6256
:param credential: Credential needed for the client to connect to Azure. Required.
6357
:type credential: ~azure.core.credentials.TokenCredential
6458
:param subscription_id: Microsoft Azure subscription ID. Required.
6559
:type subscription_id: str
6660
:param base_url: Service URL. Default value is None.
6761
:type base_url: str
62+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
63+
None.
64+
:paramtype cloud_setting: ~azure.core.AzureClouds
6865
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
6966
Retry-After header is present.
7067
"""
7168

7269
def __init__(
73-
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
70+
self,
71+
credential: "TokenCredential",
72+
subscription_id: str,
73+
base_url: Optional[str] = None,
74+
*,
75+
cloud_setting: Optional["AzureClouds"] = None,
76+
**kwargs: Any
7477
) -> None:
75-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
78+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
7679
_endpoints = get_arm_endpoints(_cloud)
7780
if not base_url:
7881
base_url = _endpoints["resource_manager"]
7982
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
8083
self._config = PolicyInsightsClientConfiguration(
81-
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
84+
credential=credential,
85+
subscription_id=subscription_id,
86+
cloud_setting=cloud_setting,
87+
credential_scopes=credential_scopes,
88+
**kwargs
8289
)
8390

8491
_policies = kwargs.pop("policies", None)
@@ -111,15 +118,11 @@ def __init__(
111118
self.remediations = RemediationsOperations(self._client, self._config, self._serialize, self._deserialize)
112119
self.policy_events = PolicyEventsOperations(self._client, self._config, self._serialize, self._deserialize)
113120
self.policy_states = PolicyStatesOperations(self._client, self._config, self._serialize, self._deserialize)
121+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
114122
self.policy_metadata = PolicyMetadataOperations(self._client, self._config, self._serialize, self._deserialize)
115123
self.policy_restrictions = PolicyRestrictionsOperations(
116124
self._client, self._config, self._serialize, self._deserialize
117125
)
118-
self.component_policy_states = ComponentPolicyStatesOperations(
119-
self._client, self._config, self._serialize, self._deserialize
120-
)
121-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
122-
self.attestations = AttestationsOperations(self._client, self._config, self._serialize, self._deserialize)
123126

124127
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
125128
"""Runs the network request through the client's chained policies.

0 commit comments

Comments
 (0)