Skip to content

Commit 699c369

Browse files
author
SDKAuto
committed
CodeGen from PR 34442 in Azure/azure-rest-api-specs
Merge c43361bf1df2d440459faf4cfc7e8e825366a8ef into 717a599a86dbcdc1b60d3100aea7ac402dfe3074
1 parent 8bc0fd6 commit 699c369

File tree

71 files changed

+3260
-785
lines changed

Some content is hidden

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

71 files changed

+3260
-785
lines changed

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

+54
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# Release History
22

3+
## 3.1.0b3 (2025-05-12)
4+
5+
### Features Added
6+
7+
- Client `NginxManagementClient` added operation group `waf_policy`
8+
- Client `NginxManagementClient` added operation group `default_waf_policy`
9+
- Model `AnalysisCreate` added property `root_file`
10+
- Model `AnalysisCreate` added property `files`
11+
- Model `AnalysisCreate` added property `protected_files`
12+
- Model `AnalysisCreate` added property `package`
13+
- Model `AnalysisResult` added property `errors`
14+
- Model `AnalysisResult` added property `diagnostics`
15+
- Model `NginxDeploymentApiKeyRequest` added property `system_data`
16+
- Model `NginxDeploymentApiKeyResponse` added property `system_data`
17+
- Model `NginxDeploymentProperties` added property `web_application_firewall_settings`
18+
- Model `NginxDeploymentProperties` added property `web_application_firewall_status`
19+
- Model `NginxDeploymentUpdateProperties` added property `web_application_firewall_settings`
20+
- Model `ScaleProfile` added property `min`
21+
- Model `ScaleProfile` added property `max`
22+
- Model `WebApplicationFirewallStatus` added property `waf_release`
23+
- Added enum `ActionType`
24+
- Added model `NginxDeploymentDefaultWafPolicyListResponse`
25+
- Added model `NginxDeploymentDefaultWafPolicyProperties`
26+
- Added model `NginxDeploymentWafPolicy`
27+
- Added model `NginxDeploymentWafPolicyApplyingStatus`
28+
- Added enum `NginxDeploymentWafPolicyApplyingStatusCode`
29+
- Added model `NginxDeploymentWafPolicyCompilingStatus`
30+
- Added enum `NginxDeploymentWafPolicyCompilingStatusCode`
31+
- Added model `NginxDeploymentWafPolicyListResponse`
32+
- Added model `NginxDeploymentWafPolicyMetadata`
33+
- Added model `NginxDeploymentWafPolicyMetadataProperties`
34+
- Added model `NginxDeploymentWafPolicyProperties`
35+
- Added model `Operation`
36+
- Added model `OperationDisplayAutoGenerated`
37+
- Added enum `Origin`
38+
- Added model `DefaultWafPolicyOperations`
39+
- Added model `WafPolicyOperations`
40+
- Method `WafPolicyOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, deployment_name: str, waf_policy_name: str, body: Optional[NginxDeploymentWafPolicy], content_type: str)`
41+
- Method `WafPolicyOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, deployment_name: str, waf_policy_name: str, body: Optional[IO[bytes]], content_type: str)`
42+
43+
### Breaking Changes
44+
45+
- Model `AnalysisCreate` deleted or renamed its instance variable `config`
46+
- Model `AnalysisResult` deleted or renamed its instance variable `data`
47+
- Model `NginxCertificate` deleted or renamed its instance variable `location`
48+
- Model `NginxDeploymentProperties` deleted or renamed its instance variable `nginx_app_protect`
49+
- Model `NginxDeploymentUpdateProperties` deleted or renamed its instance variable `nginx_app_protect`
50+
- Model `ScaleProfile` deleted or renamed its instance variable `capacity`
51+
- Deleted or renamed model `AnalysisCreateConfig`
52+
- Deleted or renamed model `AnalysisResultData`
53+
- Deleted or renamed model `NginxDeploymentPropertiesNginxAppProtect`
54+
- Deleted or renamed model `NginxDeploymentUpdatePropertiesNginxAppProtect`
55+
- Deleted or renamed model `ScaleProfileCapacity`
56+
357
## 3.1.0b2 (2025-02-23)
458

559
### Features Added

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

+3-3
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 Nginx Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
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.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -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.

sdk/nginx/azure-mgmt-nginx/_meta.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "198ffdb2b788b49be283a388ad9735b0cfad1be1",
2+
"commit": "6d1096f0adac674f2cfd8627e24f0354a4fa4308",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.27.4",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/nginx/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.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/nginx/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/s/azure-sdk-for-python/sdk --use=@autorest/python@6.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/nginx/resource-manager/readme.md"
1111
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class NginxManagementClientConfiguration: # pylint: disable=too-many-instance-a
2727
:type credential: ~azure.core.credentials.TokenCredential
2828
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
2929
:type subscription_id: str
30-
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
30+
:keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding
3131
this default value may result in unsupported behavior.
3232
:paramtype api_version: str
3333
"""
3434

3535
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36-
api_version: str = kwargs.pop("api_version", "2024-11-01-preview")
36+
api_version: str = kwargs.pop("api_version", "2025-03-01-preview")
3737

3838
if credential is None:
3939
raise ValueError("Parameter 'credential' must not be None.")

sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_nginx_management_client.py

+26-12
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,34 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import NginxManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
ApiKeysOperations,
2325
CertificatesOperations,
2426
ConfigurationsOperations,
27+
DefaultWafPolicyOperations,
2528
DeploymentsOperations,
2629
Operations,
30+
WafPolicyOperations,
2731
)
2832

2933
if TYPE_CHECKING:
3034
from azure.core.credentials import TokenCredential
3135

3236

33-
class NginxManagementClient:
37+
class NginxManagementClient: # pylint: disable=too-many-instance-attributes
3438
"""NginxManagementClient.
3539
3640
:ivar api_keys: ApiKeysOperations operations
@@ -41,31 +45,37 @@ class NginxManagementClient:
4145
:vartype configurations: azure.mgmt.nginx.operations.ConfigurationsOperations
4246
:ivar deployments: DeploymentsOperations operations
4347
:vartype deployments: azure.mgmt.nginx.operations.DeploymentsOperations
48+
:ivar waf_policy: WafPolicyOperations operations
49+
:vartype waf_policy: azure.mgmt.nginx.operations.WafPolicyOperations
50+
:ivar default_waf_policy: DefaultWafPolicyOperations operations
51+
:vartype default_waf_policy: azure.mgmt.nginx.operations.DefaultWafPolicyOperations
4452
:ivar operations: Operations operations
4553
:vartype operations: azure.mgmt.nginx.operations.Operations
4654
:param credential: Credential needed for the client to connect to Azure. Required.
4755
:type credential: ~azure.core.credentials.TokenCredential
4856
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4957
:type subscription_id: str
50-
:param base_url: Service URL. Default value is "https://management.azure.com".
58+
:param base_url: Service URL. Default value is None.
5159
:type base_url: str
52-
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
60+
:keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding
5361
this default value may result in unsupported behavior.
5462
:paramtype api_version: str
5563
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
5664
Retry-After header is present.
5765
"""
5866

5967
def __init__(
60-
self,
61-
credential: "TokenCredential",
62-
subscription_id: str,
63-
base_url: str = "https://management.azure.com",
64-
**kwargs: Any
68+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
6569
) -> None:
70+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
71+
_endpoints = get_arm_endpoints(_cloud)
72+
if not base_url:
73+
base_url = _endpoints["resource_manager"]
74+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
6675
self._config = NginxManagementClientConfiguration(
67-
credential=credential, subscription_id=subscription_id, **kwargs
76+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
6877
)
78+
6979
_policies = kwargs.pop("policies", None)
7080
if _policies is None:
7181
_policies = [
@@ -84,7 +94,7 @@ def __init__(
8494
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
8595
self._config.http_logging_policy,
8696
]
87-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
97+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
8898

8999
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
90100
self._serialize = Serializer(client_models)
@@ -94,6 +104,10 @@ def __init__(
94104
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
95105
self.configurations = ConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize)
96106
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
107+
self.waf_policy = WafPolicyOperations(self._client, self._config, self._serialize, self._deserialize)
108+
self.default_waf_policy = DefaultWafPolicyOperations(
109+
self._client, self._config, self._serialize, self._deserialize
110+
)
97111
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
98112

99113
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)