Skip to content

Commit bc4863f

Browse files
author
SDKAuto
committed
CodeGen from PR 34377 in Azure/azure-rest-api-specs
Merge 78e0498a4342ee4f1afe0a25cca2b241f6cde1cb into 5802c95f18bfba1003be50e545d07f8bb679c857
1 parent 9194780 commit bc4863f

File tree

142 files changed

+5662
-3580
lines changed

Some content is hidden

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

142 files changed

+5662
-3580
lines changed

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

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

3+
## 2.0.0 (2025-05-12)
4+
5+
### Features Added
6+
7+
- Client `PeeringManagementClient` added operation group `cdn_peering_prefixes`
8+
- Client `PeeringManagementClient` added operation group `looking_glass`
9+
- Client `PeeringManagementClient` added operation group `registered_asns`
10+
- Client `PeeringManagementClient` added operation group `registered_prefixes`
11+
- Client `PeeringManagementClient` added operation group `received_routes`
12+
- Client `PeeringManagementClient` added operation group `connection_monitor_tests`
13+
- Client `PeeringManagementClient` added operation group `peering_service_countries`
14+
- Client `PeeringManagementClient` added operation group `rp_unbilled_prefixes`
15+
- Enum `ConnectionState` added member `EXTERNAL_BLOCKER`
16+
- Enum `ConnectionState` added member `TYPE_CHANGE_IN_PROGRESS`
17+
- Enum `ConnectionState` added member `TYPE_CHANGE_REQUESTED`
18+
- Model `DirectConnection` added property `microsoft_tracking_id`
19+
- Model `DirectConnection` added property `migration_work_window_bgp_session_same_device`
20+
- Model `DirectConnection` added property `last_failure_time_utc`
21+
- Model `DirectConnection` added property `error_message`
22+
- Model `DirectConnection` added property `previous_connection_provisioning_state`
23+
- Model `DirectConnection` added property `migration_work_window_tracker`
24+
- Enum `DirectPeeringType` added member `EDGE_ZONE_FOR_OPERATORS`
25+
- Enum `DirectPeeringType` added member `IX`
26+
- Enum `DirectPeeringType` added member `IX_RS`
27+
- Enum `DirectPeeringType` added member `PEER_PROP`
28+
- Enum `DirectPeeringType` added member `VOICE`
29+
- Enum `Enum0` added member `UNAVAILABLE`
30+
- Model `ErrorResponse` added property `error`
31+
- Model `ExchangeConnection` added property `migration_work_window_bgp_session_same_device`
32+
- Model `ExchangeConnection` added property `last_failure_time_utc`
33+
- Model `ExchangeConnection` added property `error_message`
34+
- Model `ExchangeConnection` added property `previous_connection_provisioning_state`
35+
- Model `ExchangeConnection` added property `migration_work_window_tracker`
36+
- Enum `LearnedType` added member `VIA_SERVICE_PROVIDER`
37+
- Model `Operation` added property `service_specification`
38+
- Model `PeerAsn` added property `peer_contact_detail`
39+
- Model `PeerAsn` added property `error_message`
40+
- Model `Peering` added property `connectivity_probes`
41+
- Model `PeeringService` added property `sku`
42+
- Model `PeeringService` added property `provider_primary_peering_location`
43+
- Model `PeeringService` added property `provider_backup_peering_location`
44+
- Model `PeeringService` added property `log_analytics_workspace_properties`
45+
- Model `PeeringServicePrefix` added property `error_message`
46+
- Model `PeeringServicePrefix` added property `events`
47+
- Model `PeeringServicePrefix` added property `peering_service_prefix_key`
48+
- Model `PeeringServiceProvider` added property `peering_locations`
49+
- Enum `PrefixValidationState` added member `WARNING`
50+
- Added model `CdnPeeringPrefix`
51+
- Added model `CdnPeeringPrefixListResult`
52+
- Added enum `Command`
53+
- Added model `ConnectionMonitorTest`
54+
- Added model `ConnectionMonitorTestListResult`
55+
- Added model `ConnectivityProbe`
56+
- Added model `ContactDetail`
57+
- Added enum `Enum11`
58+
- Added enum `Enum13`
59+
- Added model `ErrorDetail`
60+
- Added enum `LegacyPeeringsKind`
61+
- Added model `LogAnalyticsWorkspaceProperties`
62+
- Added enum `LookingGlassCommand`
63+
- Added model `LookingGlassOutput`
64+
- Added enum `LookingGlassSourceType`
65+
- Added model `MetricDimension`
66+
- Added model `MetricSpecification`
67+
- Added enum `PeeringLocationsDirectPeeringType`
68+
- Added enum `PeeringLocationsKind`
69+
- Added model `PeeringReceivedRoute`
70+
- Added model `PeeringReceivedRouteListResult`
71+
- Added model `PeeringRegisteredAsn`
72+
- Added model `PeeringRegisteredAsnListResult`
73+
- Added model `PeeringRegisteredPrefix`
74+
- Added model `PeeringRegisteredPrefixListResult`
75+
- Added model `PeeringServiceCountry`
76+
- Added model `PeeringServiceCountryListResult`
77+
- Added model `PeeringServicePrefixEvent`
78+
- Added model `PeeringServiceSku`
79+
- Added enum `PreviousConnectionProvisioningState`
80+
- Added enum `Protocol`
81+
- Added enum `Role`
82+
- Added model `RpUnbilledPrefix`
83+
- Added model `RpUnbilledPrefixListResult`
84+
- Added model `ServiceSpecification`
85+
- Model `LegacyPeeringsOperations` added parameter `kwargs` in method `__init__`
86+
- Model `Operations` added parameter `kwargs` in method `__init__`
87+
- Model `PeerAsnsOperations` added parameter `kwargs` in method `__init__`
88+
- Model `PeeringLocationsOperations` added parameter `kwargs` in method `__init__`
89+
- Model `PeeringServiceLocationsOperations` added parameter `kwargs` in method `__init__`
90+
- Model `PeeringServiceProvidersOperations` added parameter `kwargs` in method `__init__`
91+
- Model `PeeringServicesOperations` added parameter `kwargs` in method `__init__`
92+
- Model `PeeringServicesOperations` added method `initialize_connection_monitor`
93+
- Model `PeeringsOperations` added parameter `kwargs` in method `__init__`
94+
- Model `PrefixesOperations` added parameter `kwargs` in method `__init__`
95+
- Model `PrefixesOperations` added method `create_or_update`
96+
- Model `PrefixesOperations` added method `delete`
97+
- Added model `CdnPeeringPrefixesOperations`
98+
- Added model `ConnectionMonitorTestsOperations`
99+
- Added model `LookingGlassOperations`
100+
- Added model `PeeringServiceCountriesOperations`
101+
- Added model `ReceivedRoutesOperations`
102+
- Added model `RegisteredAsnsOperations`
103+
- Added model `RegisteredPrefixesOperations`
104+
- Added model `RpUnbilledPrefixesOperations`
105+
- Method `PeeringManagementClient.check_service_provider_availability` has a new overload `def check_service_provider_availability(self: None, check_service_provider_availability_input: CheckServiceProviderAvailabilityInput, content_type: str)`
106+
- Method `PeeringManagementClient.check_service_provider_availability` has a new overload `def check_service_provider_availability(self: None, check_service_provider_availability_input: IO[bytes], content_type: str)`
107+
- Method `PeerAsnsOperations.create_or_update` has a new overload `def create_or_update(self: None, peer_asn_name: str, peer_asn: PeerAsn, content_type: str)`
108+
- Method `PeerAsnsOperations.create_or_update` has a new overload `def create_or_update(self: None, peer_asn_name: str, peer_asn: IO[bytes], content_type: str)`
109+
- Method `PeeringManagementClientOperationsMixin.check_service_provider_availability` has a new overload `def check_service_provider_availability(self: None, check_service_provider_availability_input: CheckServiceProviderAvailabilityInput, content_type: str)`
110+
- Method `PeeringManagementClientOperationsMixin.check_service_provider_availability` has a new overload `def check_service_provider_availability(self: None, check_service_provider_availability_input: IO[bytes], content_type: str)`
111+
- Method `PeeringServicesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_service_name: str, peering_service: PeeringService, content_type: str)`
112+
- Method `PeeringServicesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_service_name: str, peering_service: IO[bytes], content_type: str)`
113+
- Method `PeeringServicesOperations.update` has a new overload `def update(self: None, resource_group_name: str, peering_service_name: str, tags: ResourceTags, content_type: str)`
114+
- Method `PeeringServicesOperations.update` has a new overload `def update(self: None, resource_group_name: str, peering_service_name: str, tags: IO[bytes], content_type: str)`
115+
- Method `PeeringsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_name: str, peering: Peering, content_type: str)`
116+
- Method `PeeringsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_name: str, peering: IO[bytes], content_type: str)`
117+
- Method `PeeringsOperations.update` has a new overload `def update(self: None, resource_group_name: str, peering_name: str, tags: ResourceTags, content_type: str)`
118+
- Method `PeeringsOperations.update` has a new overload `def update(self: None, resource_group_name: str, peering_name: str, tags: IO[bytes], content_type: str)`
119+
- Method `PrefixesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_service_name: str, prefix_name: str, peering_service_prefix: PeeringServicePrefix, content_type: str)`
120+
- Method `PrefixesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_service_name: str, prefix_name: str, peering_service_prefix: IO[bytes], content_type: str)`
121+
- Method `ConnectionMonitorTestsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_service_name: str, connection_monitor_test_name: str, connection_monitor_test: ConnectionMonitorTest, content_type: str)`
122+
- Method `ConnectionMonitorTestsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_service_name: str, connection_monitor_test_name: str, connection_monitor_test: IO[bytes], content_type: str)`
123+
- Method `RegisteredAsnsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_name: str, registered_asn_name: str, registered_asn: PeeringRegisteredAsn, content_type: str)`
124+
- Method `RegisteredAsnsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_name: str, registered_asn_name: str, registered_asn: IO[bytes], content_type: str)`
125+
- Method `RegisteredPrefixesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_name: str, registered_prefix_name: str, registered_prefix: PeeringRegisteredPrefix, content_type: str)`
126+
- Method `RegisteredPrefixesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, peering_name: str, registered_prefix_name: str, registered_prefix: IO[bytes], content_type: str)`
127+
128+
### Breaking Changes
129+
130+
- Deleted or renamed client operation group `PeeringManagementClient.peering_service_prefixes`
131+
- Deleted or renamed enum value `Enum0.UN_AVAILABLE`
132+
- Model `ErrorResponse` deleted or renamed its instance variable `code`
133+
- Model `ErrorResponse` deleted or renamed its instance variable `message`
134+
- Deleted or renamed enum value `LearnedType.VIA_PARTNER`
135+
- Model `PeerAsn` deleted or renamed its instance variable `peer_contact_info`
136+
- Deleted or renamed model `ContactInfo`
137+
- Deleted or renamed model `Enum1`
138+
- Deleted or renamed model `Enum14`
139+
- Deleted or renamed model `Enum15`
140+
- Deleted or renamed model `Name`
141+
- Deleted or renamed model `PeeringServicePrefixesOperations`
142+
3143
## 2.0.0b1 (2022-11-01)
4144

5145
### Features Added
Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,61 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Peering Management Client Library.
4-
This package has been tested with Python 3.7+.
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_
88

99
_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
1010

11-
# Usage
11+
## Getting started
1212

13+
### Prerequisites
1314

14-
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
15-
16-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
17-
Code samples for this package can be found at [Peering Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
18-
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
15+
- Python 3.9+ is required to use this package.
16+
- [Azure subscription](https://azure.microsoft.com/free/)
1917

18+
### Install the package
2019

21-
# Provide Feedback
20+
```bash
21+
pip install azure-mgmt-peering
22+
pip install azure-identity
23+
```
2224

23-
If you encounter any bugs or have suggestions, please file an issue in the
24-
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
25-
section of the project.
25+
### Authentication
26+
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
28+
29+
- `AZURE_CLIENT_ID` for Azure client ID.
30+
- `AZURE_TENANT_ID` for Azure tenant ID.
31+
- `AZURE_CLIENT_SECRET` for Azure client secret.
32+
33+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
34+
35+
With above configuration, client can be authenticated by following code:
36+
37+
```python
38+
from azure.identity import DefaultAzureCredential
39+
from azure.mgmt.peering import PeeringManagementClient
40+
import os
2641

42+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43+
client = PeeringManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
44+
```
2745

46+
## Examples
2847

48+
Code samples for this package can be found at:
49+
- [Search Peering Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
50+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
51+
52+
53+
## Troubleshooting
54+
55+
## Next steps
56+
57+
## Provide Feedback
58+
59+
If you encounter any bugs or have suggestions, please file an issue in the
60+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
61+
section of the project.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "4522e1d3fb6dcb81bc63e3414d11dd7eaf08264b",
2+
"commit": "2271c26de5b7855e1621e7d5d7dc0b6678d3b4a2",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.2.1",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.34.1",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/peering/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.1 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/peering/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/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/peering/resource-manager/readme.md"
1111
}

sdk/peering/azure-mgmt-peering/azure/mgmt/peering/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._peering_management_client import PeeringManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._peering_management_client import PeeringManagementClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"PeeringManagementClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

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

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

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

12-
from azure.core.configuration import Configuration
1311
from azure.core.pipeline import policies
1412
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1513

1614
from ._version import VERSION
1715

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2316
if TYPE_CHECKING:
24-
# pylint: disable=unused-import,ungrouped-imports
2517
from azure.core.credentials import TokenCredential
2618

2719

28-
class PeeringManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
20+
class PeeringManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2921
"""Configuration for PeeringManagementClient.
3022
3123
Note that all parameters used to create this instance are saved as instance
@@ -35,14 +27,13 @@ class PeeringManagementClientConfiguration(Configuration): # pylint: disable=to
3527
:type credential: ~azure.core.credentials.TokenCredential
3628
:param subscription_id: The Azure subscription ID. Required.
3729
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
30+
:keyword api_version: Api Version. Default value is "2025-05-01". Note that overriding this
3931
default value may result in unsupported behavior.
4032
:paramtype api_version: str
4133
"""
4234

4335
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
44-
super(PeeringManagementClientConfiguration, self).__init__(**kwargs)
45-
api_version = kwargs.pop("api_version", "2022-10-01") # type: Literal["2022-10-01"]
36+
api_version: str = kwargs.pop("api_version", "2025-05-01")
4637

4738
if credential is None:
4839
raise ValueError("Parameter 'credential' must not be None.")
@@ -54,20 +45,18 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5445
self.api_version = api_version
5546
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5647
kwargs.setdefault("sdk_moniker", "mgmt-peering/{}".format(VERSION))
48+
self.polling_interval = kwargs.get("polling_interval", 30)
5749
self._configure(**kwargs)
5850

59-
def _configure(
60-
self, **kwargs # type: Any
61-
):
62-
# type: (...) -> None
51+
def _configure(self, **kwargs: Any) -> None:
6352
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
6453
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
6554
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
6655
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
6756
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
68-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6957
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
7058
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
59+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
7160
self.authentication_policy = kwargs.get("authentication_policy")
7261
if self.credential and not self.authentication_policy:
7362
self.authentication_policy = ARMChallengeAuthenticationPolicy(

0 commit comments

Comments
 (0)