Skip to content

Commit 6d00ffa

Browse files
author
SDKAuto
committed
CodeGen from PR 33826 in Azure/azure-rest-api-specs
Merge 1c47be1bc153f508dddc21b495b685f568680967 into 532b1b8f4efdb960efce95c6694164303d79a3fc
1 parent d4c265e commit 6d00ffa

File tree

54 files changed

+939
-366
lines changed

Some content is hidden

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

54 files changed

+939
-366
lines changed

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

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

3+
## 2.1.0b1 (2025-05-07)
4+
5+
### Features Added
6+
7+
- Model `FrontendProperties` added property `security_policy_configurations`
8+
- Model `FrontendUpdate` added property `properties`
9+
- Enum `PolicyType` added member `IP_ACCESS_RULES`
10+
- Model `SecurityPolicyConfigurations` added property `ip_access_rules_security_policy`
11+
- Model `SecurityPolicyProperties` added property `ip_access_rules_policy`
12+
- Model `SecurityPolicyUpdateProperties` added property `ip_access_rules_policy`
13+
- Added model `FrontendUpdateProperties`
14+
- Added model `IpAccessRule`
15+
- Added enum `IpAccessRuleAction`
16+
- Added model `IpAccessRulesPolicy`
17+
- Added model `IpAccessRulesSecurityPolicy`
18+
- Method `AssociationSubnetUpdate.__init__` has a new overload `def __init__(self: None, id: Optional[str])`
19+
- Method `FrontendProperties.__init__` has a new overload `def __init__(self: None, security_policy_configurations: Optional[_models.SecurityPolicyConfigurations])`
20+
- Method `FrontendProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
21+
- Method `FrontendUpdate.__init__` has a new overload `def __init__(self: None, tags: Optional[Dict[str, str]], properties: Optional[_models.FrontendUpdateProperties])`
22+
- Method `SecurityPolicyConfigurations.__init__` has a new overload `def __init__(self: None, waf_security_policy: Optional[_models.WafSecurityPolicy], ip_access_rules_security_policy: Optional[_models.IpAccessRulesSecurityPolicy])`
23+
- Method `SecurityPolicyProperties.__init__` has a new overload `def __init__(self: None, waf_policy: Optional[_models.WafPolicy], ip_access_rules_policy: Optional[_models.IpAccessRulesPolicy])`
24+
- Method `SecurityPolicyUpdateProperties.__init__` has a new overload `def __init__(self: None, waf_policy: Optional[_models.WafPolicy], ip_access_rules_policy: Optional[_models.IpAccessRulesPolicy])`
25+
- Method `FrontendUpdateProperties.__init__` has a new overload `def __init__(self: None, security_policy_configurations: Optional[_models.SecurityPolicyConfigurations])`
26+
- Method `FrontendUpdateProperties.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
27+
- Method `IpAccessRule.__init__` has a new overload `def __init__(self: None, name: str, priority: int, source_address_prefixes: List[str], action: Union[str, _models.IpAccessRuleAction])`
28+
- Method `IpAccessRule.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
29+
- Method `IpAccessRulesPolicy.__init__` has a new overload `def __init__(self: None, rules: Optional[List[_models.IpAccessRule]])`
30+
- Method `IpAccessRulesPolicy.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
31+
- Method `IpAccessRulesSecurityPolicy.__init__` has a new overload `def __init__(self: None, id: str)`
32+
- Method `IpAccessRulesSecurityPolicy.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
33+
334
## 2.0.0 (2025-02-05)
435

536
### Features Added

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

Lines changed: 3 additions & 3 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 Servicenetworking 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.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "16eba0e39fedb21b9a7a3df5bec5524c78c72ba3",
2+
"commit": "447c2f6cd3467cb109c90182c2174ab0c5e7a4f6",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/servicenetworking/ServiceNetworking.Management",
5-
"@azure-tools/typespec-python": "0.38.1"
5+
"@azure-tools/typespec-python": "0.44.1"
66
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.ServiceNetworking",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.servicenetworking.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
5+
"azure.mgmt.servicenetworking.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
6+
"azure.mgmt.servicenetworking.models.Association": "Microsoft.ServiceNetworking.Association",
7+
"azure.mgmt.servicenetworking.models.AssociationProperties": "Microsoft.ServiceNetworking.AssociationProperties",
8+
"azure.mgmt.servicenetworking.models.AssociationSubnet": "Microsoft.ServiceNetworking.AssociationSubnet",
9+
"azure.mgmt.servicenetworking.models.AssociationSubnetUpdate": "Microsoft.ServiceNetworking.AssociationSubnetUpdate",
10+
"azure.mgmt.servicenetworking.models.AssociationUpdate": "Microsoft.ServiceNetworking.AssociationUpdate",
11+
"azure.mgmt.servicenetworking.models.AssociationUpdateProperties": "Microsoft.ServiceNetworking.AssociationUpdateProperties",
12+
"azure.mgmt.servicenetworking.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
13+
"azure.mgmt.servicenetworking.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
14+
"azure.mgmt.servicenetworking.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
15+
"azure.mgmt.servicenetworking.models.Frontend": "Microsoft.ServiceNetworking.Frontend",
16+
"azure.mgmt.servicenetworking.models.FrontendProperties": "Microsoft.ServiceNetworking.FrontendProperties",
17+
"azure.mgmt.servicenetworking.models.FrontendUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
18+
"azure.mgmt.servicenetworking.models.FrontendUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
19+
"azure.mgmt.servicenetworking.models.IpAccessRule": "Microsoft.ServiceNetworking.IpAccessRule",
20+
"azure.mgmt.servicenetworking.models.IpAccessRulesPolicy": "Microsoft.ServiceNetworking.IpAccessRulesPolicy",
21+
"azure.mgmt.servicenetworking.models.IpAccessRulesSecurityPolicy": "Microsoft.ServiceNetworking.IpAccessRulesSecurityPolicy",
22+
"azure.mgmt.servicenetworking.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
23+
"azure.mgmt.servicenetworking.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
24+
"azure.mgmt.servicenetworking.models.ResourceId": "Microsoft.ServiceNetworking.ResourceId",
25+
"azure.mgmt.servicenetworking.models.SecurityPolicy": "Microsoft.ServiceNetworking.SecurityPolicy",
26+
"azure.mgmt.servicenetworking.models.SecurityPolicyConfigurations": "Microsoft.ServiceNetworking.SecurityPolicyConfigurations",
27+
"azure.mgmt.servicenetworking.models.SecurityPolicyProperties": "Microsoft.ServiceNetworking.SecurityPolicyProperties",
28+
"azure.mgmt.servicenetworking.models.SecurityPolicyUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
29+
"azure.mgmt.servicenetworking.models.SecurityPolicyUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
30+
"azure.mgmt.servicenetworking.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
31+
"azure.mgmt.servicenetworking.models.TrafficController": "Microsoft.ServiceNetworking.TrafficController",
32+
"azure.mgmt.servicenetworking.models.TrafficControllerProperties": "Microsoft.ServiceNetworking.TrafficControllerProperties",
33+
"azure.mgmt.servicenetworking.models.TrafficControllerUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
34+
"azure.mgmt.servicenetworking.models.TrafficControllerUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
35+
"azure.mgmt.servicenetworking.models.WafPolicy": "Microsoft.ServiceNetworking.WafPolicy",
36+
"azure.mgmt.servicenetworking.models.WafSecurityPolicy": "Microsoft.ServiceNetworking.WafSecurityPolicy",
37+
"azure.mgmt.servicenetworking.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
38+
"azure.mgmt.servicenetworking.models.AssociationType": "Microsoft.ServiceNetworking.AssociationType",
39+
"azure.mgmt.servicenetworking.models.ProvisioningState": "Microsoft.ServiceNetworking.ProvisioningState",
40+
"azure.mgmt.servicenetworking.models.PolicyType": "Microsoft.ServiceNetworking.PolicyType",
41+
"azure.mgmt.servicenetworking.models.IpAccessRuleAction": "Microsoft.ServiceNetworking.IpAccessRuleAction",
42+
"azure.mgmt.servicenetworking.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
43+
"azure.mgmt.servicenetworking.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
44+
"azure.mgmt.servicenetworking.operations.AssociationsInterfaceOperations.get": "Microsoft.ServiceNetworking.AssociationsInterface.get",
45+
"azure.mgmt.servicenetworking.aio.operations.AssociationsInterfaceOperations.get": "Microsoft.ServiceNetworking.AssociationsInterface.get",
46+
"azure.mgmt.servicenetworking.operations.AssociationsInterfaceOperations.begin_create_or_update": "Microsoft.ServiceNetworking.AssociationsInterface.createOrUpdate",
47+
"azure.mgmt.servicenetworking.aio.operations.AssociationsInterfaceOperations.begin_create_or_update": "Microsoft.ServiceNetworking.AssociationsInterface.createOrUpdate",
48+
"azure.mgmt.servicenetworking.operations.AssociationsInterfaceOperations.update": "Microsoft.ServiceNetworking.AssociationsInterface.update",
49+
"azure.mgmt.servicenetworking.aio.operations.AssociationsInterfaceOperations.update": "Microsoft.ServiceNetworking.AssociationsInterface.update",
50+
"azure.mgmt.servicenetworking.operations.AssociationsInterfaceOperations.begin_delete": "Microsoft.ServiceNetworking.AssociationsInterface.delete",
51+
"azure.mgmt.servicenetworking.aio.operations.AssociationsInterfaceOperations.begin_delete": "Microsoft.ServiceNetworking.AssociationsInterface.delete",
52+
"azure.mgmt.servicenetworking.operations.AssociationsInterfaceOperations.list_by_traffic_controller": "Microsoft.ServiceNetworking.AssociationsInterface.listByTrafficController",
53+
"azure.mgmt.servicenetworking.aio.operations.AssociationsInterfaceOperations.list_by_traffic_controller": "Microsoft.ServiceNetworking.AssociationsInterface.listByTrafficController",
54+
"azure.mgmt.servicenetworking.operations.FrontendsInterfaceOperations.get": "Microsoft.ServiceNetworking.FrontendsInterface.get",
55+
"azure.mgmt.servicenetworking.aio.operations.FrontendsInterfaceOperations.get": "Microsoft.ServiceNetworking.FrontendsInterface.get",
56+
"azure.mgmt.servicenetworking.operations.FrontendsInterfaceOperations.begin_create_or_update": "Microsoft.ServiceNetworking.FrontendsInterface.createOrUpdate",
57+
"azure.mgmt.servicenetworking.aio.operations.FrontendsInterfaceOperations.begin_create_or_update": "Microsoft.ServiceNetworking.FrontendsInterface.createOrUpdate",
58+
"azure.mgmt.servicenetworking.operations.FrontendsInterfaceOperations.update": "Microsoft.ServiceNetworking.FrontendsInterface.update",
59+
"azure.mgmt.servicenetworking.aio.operations.FrontendsInterfaceOperations.update": "Microsoft.ServiceNetworking.FrontendsInterface.update",
60+
"azure.mgmt.servicenetworking.operations.FrontendsInterfaceOperations.begin_delete": "Microsoft.ServiceNetworking.FrontendsInterface.delete",
61+
"azure.mgmt.servicenetworking.aio.operations.FrontendsInterfaceOperations.begin_delete": "Microsoft.ServiceNetworking.FrontendsInterface.delete",
62+
"azure.mgmt.servicenetworking.operations.FrontendsInterfaceOperations.list_by_traffic_controller": "Microsoft.ServiceNetworking.FrontendsInterface.listByTrafficController",
63+
"azure.mgmt.servicenetworking.aio.operations.FrontendsInterfaceOperations.list_by_traffic_controller": "Microsoft.ServiceNetworking.FrontendsInterface.listByTrafficController",
64+
"azure.mgmt.servicenetworking.operations.SecurityPoliciesInterfaceOperations.get": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.get",
65+
"azure.mgmt.servicenetworking.aio.operations.SecurityPoliciesInterfaceOperations.get": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.get",
66+
"azure.mgmt.servicenetworking.operations.SecurityPoliciesInterfaceOperations.begin_create_or_update": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.createOrUpdate",
67+
"azure.mgmt.servicenetworking.aio.operations.SecurityPoliciesInterfaceOperations.begin_create_or_update": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.createOrUpdate",
68+
"azure.mgmt.servicenetworking.operations.SecurityPoliciesInterfaceOperations.update": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.update",
69+
"azure.mgmt.servicenetworking.aio.operations.SecurityPoliciesInterfaceOperations.update": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.update",
70+
"azure.mgmt.servicenetworking.operations.SecurityPoliciesInterfaceOperations.begin_delete": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.delete",
71+
"azure.mgmt.servicenetworking.aio.operations.SecurityPoliciesInterfaceOperations.begin_delete": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.delete",
72+
"azure.mgmt.servicenetworking.operations.SecurityPoliciesInterfaceOperations.list_by_traffic_controller": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.listByTrafficController",
73+
"azure.mgmt.servicenetworking.aio.operations.SecurityPoliciesInterfaceOperations.list_by_traffic_controller": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.listByTrafficController",
74+
"azure.mgmt.servicenetworking.operations.TrafficControllerInterfaceOperations.get": "Microsoft.ServiceNetworking.TrafficControllerInterface.get",
75+
"azure.mgmt.servicenetworking.aio.operations.TrafficControllerInterfaceOperations.get": "Microsoft.ServiceNetworking.TrafficControllerInterface.get",
76+
"azure.mgmt.servicenetworking.operations.TrafficControllerInterfaceOperations.begin_create_or_update": "Microsoft.ServiceNetworking.TrafficControllerInterface.createOrUpdate",
77+
"azure.mgmt.servicenetworking.aio.operations.TrafficControllerInterfaceOperations.begin_create_or_update": "Microsoft.ServiceNetworking.TrafficControllerInterface.createOrUpdate",
78+
"azure.mgmt.servicenetworking.operations.TrafficControllerInterfaceOperations.update": "Microsoft.ServiceNetworking.TrafficControllerInterface.update",
79+
"azure.mgmt.servicenetworking.aio.operations.TrafficControllerInterfaceOperations.update": "Microsoft.ServiceNetworking.TrafficControllerInterface.update",
80+
"azure.mgmt.servicenetworking.operations.TrafficControllerInterfaceOperations.begin_delete": "Microsoft.ServiceNetworking.TrafficControllerInterface.delete",
81+
"azure.mgmt.servicenetworking.aio.operations.TrafficControllerInterfaceOperations.begin_delete": "Microsoft.ServiceNetworking.TrafficControllerInterface.delete",
82+
"azure.mgmt.servicenetworking.operations.TrafficControllerInterfaceOperations.list_by_resource_group": "Microsoft.ServiceNetworking.TrafficControllerInterface.listByResourceGroup",
83+
"azure.mgmt.servicenetworking.aio.operations.TrafficControllerInterfaceOperations.list_by_resource_group": "Microsoft.ServiceNetworking.TrafficControllerInterface.listByResourceGroup",
84+
"azure.mgmt.servicenetworking.operations.TrafficControllerInterfaceOperations.list_by_subscription": "Microsoft.ServiceNetworking.TrafficControllerInterface.listBySubscription",
85+
"azure.mgmt.servicenetworking.aio.operations.TrafficControllerInterfaceOperations.list_by_subscription": "Microsoft.ServiceNetworking.TrafficControllerInterface.listBySubscription",
86+
"azure.mgmt.servicenetworking.operations.Operations.list": "Azure.ResourceManager.Operations.list",
87+
"azure.mgmt.servicenetworking.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list"
88+
}
89+
}

sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/_client.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@
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 ._configuration import ServiceNetworkingMgmtClientConfiguration
19-
from ._serialization import Deserializer, Serializer
21+
from ._utils.serialization import Deserializer, Serializer
2022
from .operations import (
2123
AssociationsInterfaceOperations,
2224
FrontendsInterfaceOperations,
@@ -50,26 +52,33 @@ class ServiceNetworkingMgmtClient:
5052
:type credential: ~azure.core.credentials.TokenCredential
5153
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5254
:type subscription_id: str
53-
:param base_url: Service host. Default value is "https://management.azure.com".
55+
:param base_url: Service host. Default value is None.
5456
:type base_url: str
55-
:keyword api_version: The API version to use for this operation. Default value is "2025-01-01".
56-
Note that overriding this default value may result in unsupported behavior.
57+
:keyword api_version: The API version to use for this operation. Default value is
58+
"2025-03-01-preview". Note that overriding this default value may result in unsupported
59+
behavior.
5760
:paramtype api_version: str
5861
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
5962
Retry-After header is present.
6063
"""
6164

6265
def __init__(
63-
self,
64-
credential: "TokenCredential",
65-
subscription_id: str,
66-
base_url: str = "https://management.azure.com",
67-
**kwargs: Any
66+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
6867
) -> None:
6968
_endpoint = "{endpoint}"
69+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
70+
_endpoints = get_arm_endpoints(_cloud)
71+
if not base_url:
72+
base_url = _endpoints["resource_manager"]
73+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
7074
self._config = ServiceNetworkingMgmtClientConfiguration(
71-
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
75+
credential=credential,
76+
subscription_id=subscription_id,
77+
base_url=cast(str, base_url),
78+
credential_scopes=credential_scopes,
79+
**kwargs
7280
)
81+
7382
_policies = kwargs.pop("policies", None)
7483
if _policies is None:
7584
_policies = [
@@ -88,7 +97,7 @@ def __init__(
8897
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
8998
self._config.http_logging_policy,
9099
]
91-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
100+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
92101

93102
self._serialize = Serializer()
94103
self._deserialize = Deserializer()

0 commit comments

Comments
 (0)