azure-mgmt-networkfunction 1.0.0b2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. azure_mgmt_networkfunction-1.0.0b2/CHANGELOG.md +33 -0
  2. azure_mgmt_networkfunction-1.0.0b2/LICENSE +21 -0
  3. azure_mgmt_networkfunction-1.0.0b2/MANIFEST.in +7 -0
  4. azure_mgmt_networkfunction-1.0.0b2/PKG-INFO +120 -0
  5. azure_mgmt_networkfunction-1.0.0b2/README.md +61 -0
  6. azure_mgmt_networkfunction-1.0.0b2/azure/__init__.py +1 -0
  7. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/__init__.py +1 -0
  8. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/__init__.py +32 -0
  9. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/_client.py +167 -0
  10. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/_configuration.py +80 -0
  11. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/_patch.py +21 -0
  12. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/_utils/__init__.py +6 -0
  13. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/_utils/model_base.py +1343 -0
  14. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/_utils/serialization.py +2041 -0
  15. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/_version.py +9 -0
  16. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/aio/__init__.py +29 -0
  17. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/aio/_client.py +172 -0
  18. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/aio/_configuration.py +80 -0
  19. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/aio/_patch.py +21 -0
  20. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/aio/operations/__init__.py +33 -0
  21. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/aio/operations/_operations.py +1768 -0
  22. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/aio/operations/_patch.py +21 -0
  23. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/models/__init__.py +74 -0
  24. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/models/_enums.py +64 -0
  25. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/models/_models.py +718 -0
  26. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/models/_patch.py +21 -0
  27. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/operations/__init__.py +33 -0
  28. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/operations/_operations.py +2111 -0
  29. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/operations/_patch.py +21 -0
  30. azure_mgmt_networkfunction-1.0.0b2/azure/mgmt/networkfunction/py.typed +1 -0
  31. azure_mgmt_networkfunction-1.0.0b2/azure_mgmt_networkfunction.egg-info/PKG-INFO +120 -0
  32. azure_mgmt_networkfunction-1.0.0b2/azure_mgmt_networkfunction.egg-info/SOURCES.txt +42 -0
  33. azure_mgmt_networkfunction-1.0.0b2/azure_mgmt_networkfunction.egg-info/dependency_links.txt +1 -0
  34. azure_mgmt_networkfunction-1.0.0b2/azure_mgmt_networkfunction.egg-info/requires.txt +3 -0
  35. azure_mgmt_networkfunction-1.0.0b2/azure_mgmt_networkfunction.egg-info/top_level.txt +1 -0
  36. azure_mgmt_networkfunction-1.0.0b2/pyproject.toml +88 -0
  37. azure_mgmt_networkfunction-1.0.0b2/setup.cfg +4 -0
  38. azure_mgmt_networkfunction-1.0.0b2/tests/conftest.py +39 -0
  39. azure_mgmt_networkfunction-1.0.0b2/tests/test_traffic_collector_mgmt_azure_traffic_collectors_by_resource_group_operations_async_test.py +29 -0
  40. azure_mgmt_networkfunction-1.0.0b2/tests/test_traffic_collector_mgmt_azure_traffic_collectors_by_resource_group_operations_test.py +28 -0
  41. azure_mgmt_networkfunction-1.0.0b2/tests/test_traffic_collector_mgmt_azure_traffic_collectors_by_subscription_operations_async_test.py +27 -0
  42. azure_mgmt_networkfunction-1.0.0b2/tests/test_traffic_collector_mgmt_azure_traffic_collectors_by_subscription_operations_test.py +26 -0
  43. azure_mgmt_networkfunction-1.0.0b2/tests/test_traffic_collector_mgmt_network_function_operations_async_test.py +27 -0
  44. azure_mgmt_networkfunction-1.0.0b2/tests/test_traffic_collector_mgmt_network_function_operations_test.py +26 -0
@@ -0,0 +1,33 @@
1
+ # Release History
2
+
3
+ ## 1.0.0b2 (2026-03-16)
4
+
5
+ ### Features Added
6
+
7
+ - Model `TrafficCollectorMgmtClient` added parameter `cloud_setting` in method `__init__`
8
+ - Client `TrafficCollectorMgmtClient` added method `send_request`
9
+ - Model `AzureTrafficCollector` added property `properties`
10
+ - Model `CollectorPolicy` added property `properties`
11
+ - Model `ProxyResource` added property `system_data`
12
+ - Model `SystemData` added property `last_modified_at`
13
+ - Added model `AzureTrafficCollectorPropertiesFormat`
14
+ - Added model `CloudError`
15
+ - Added model `CollectorPolicyPropertiesFormat`
16
+ - Added model `Resource`
17
+
18
+ ### Breaking Changes
19
+
20
+ - This version introduces new hybrid models which have dual dictionary and model nature. Please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration.
21
+ - For the method breakings, please refer to https://aka.ms/azsdk/python/migrate/operations for migration.
22
+ - Model `AzureTrafficCollector` moved instance variable `collector_policies`, `virtual_hub` and `provisioning_state` under property `properties`
23
+ - Model `CollectorPolicy` moved instance variable `ingestion_policy`, `emission_policies` and `provisioning_state` under property `properties`
24
+ - Method `AzureTrafficCollectorsOperations.begin_create_or_update` moved its parameters `location`/`tags`/`virtual_hub` under property `parameters`
25
+ - Method `CollectorPoliciesOperations.begin_create_or_update` moved its parameters `location`/`tags`/`ingestion_policy`/`emission_policies` under property `parameters`
26
+
27
+ ### Other Changes
28
+
29
+ - Deleted model `ApiVersionParameter`/`TrackedResource`/`TrackedResourceSystemData` which actually were not used by SDK users
30
+
31
+ ## 1.0.0b1 (2022-11-18)
32
+
33
+ * Initial Release
@@ -0,0 +1,21 @@
1
+ Copyright (c) Microsoft Corporation.
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,7 @@
1
+ include *.md
2
+ include LICENSE
3
+ include azure/mgmt/networkfunction/py.typed
4
+ recursive-include tests *.py
5
+ recursive-include samples *.py *.md
6
+ include azure/__init__.py
7
+ include azure/mgmt/__init__.py
@@ -0,0 +1,120 @@
1
+ Metadata-Version: 2.4
2
+ Name: azure-mgmt-networkfunction
3
+ Version: 1.0.0b2
4
+ Summary: Microsoft Azure Networkfunction Management Client Library for Python
5
+ Author-email: Microsoft Corporation <azpysdkhelp@microsoft.com>
6
+ License-Expression: MIT
7
+ Project-URL: repository, https://github.com/Azure/azure-sdk-for-python
8
+ Keywords: azure,azure sdk
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: isodate>=0.6.1
22
+ Requires-Dist: azure-mgmt-core>=1.6.0
23
+ Requires-Dist: typing-extensions>=4.6.0
24
+ Dynamic: license-file
25
+
26
+ # Microsoft Azure SDK for Python
27
+
28
+ This is the Microsoft Azure Networkfunction Management Client Library.
29
+ This package has been tested with Python 3.9+.
30
+ For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
31
+
32
+ ## _Disclaimer_
33
+
34
+ _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_
35
+
36
+ ## Getting started
37
+
38
+ ### Prerequisites
39
+
40
+ - Python 3.9+ is required to use this package.
41
+ - [Azure subscription](https://azure.microsoft.com/free/)
42
+
43
+ ### Install the package
44
+
45
+ ```bash
46
+ pip install azure-mgmt-networkfunction
47
+ pip install azure-identity
48
+ ```
49
+
50
+ ### Authentication
51
+
52
+ By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
53
+
54
+ - `AZURE_CLIENT_ID` for Azure client ID.
55
+ - `AZURE_TENANT_ID` for Azure tenant ID.
56
+ - `AZURE_CLIENT_SECRET` for Azure client secret.
57
+
58
+ In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
59
+
60
+ With above configuration, client can be authenticated by following code:
61
+
62
+ ```python
63
+ from azure.identity import DefaultAzureCredential
64
+ from azure.mgmt.networkfunction import TrafficCollectorMgmtClient
65
+ import os
66
+
67
+ sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
68
+ client = TrafficCollectorMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
69
+ ```
70
+
71
+ ## Examples
72
+
73
+ Code samples for this package can be found at:
74
+ - [Search Networkfunction Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
75
+ - [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
76
+
77
+
78
+ ## Troubleshooting
79
+
80
+ ## Next steps
81
+
82
+ ## Provide Feedback
83
+
84
+ If you encounter any bugs or have suggestions, please file an issue in the
85
+ [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
86
+ section of the project.
87
+
88
+ # Release History
89
+
90
+ ## 1.0.0b2 (2026-03-16)
91
+
92
+ ### Features Added
93
+
94
+ - Model `TrafficCollectorMgmtClient` added parameter `cloud_setting` in method `__init__`
95
+ - Client `TrafficCollectorMgmtClient` added method `send_request`
96
+ - Model `AzureTrafficCollector` added property `properties`
97
+ - Model `CollectorPolicy` added property `properties`
98
+ - Model `ProxyResource` added property `system_data`
99
+ - Model `SystemData` added property `last_modified_at`
100
+ - Added model `AzureTrafficCollectorPropertiesFormat`
101
+ - Added model `CloudError`
102
+ - Added model `CollectorPolicyPropertiesFormat`
103
+ - Added model `Resource`
104
+
105
+ ### Breaking Changes
106
+
107
+ - This version introduces new hybrid models which have dual dictionary and model nature. Please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration.
108
+ - For the method breakings, please refer to https://aka.ms/azsdk/python/migrate/operations for migration.
109
+ - Model `AzureTrafficCollector` moved instance variable `collector_policies`, `virtual_hub` and `provisioning_state` under property `properties`
110
+ - Model `CollectorPolicy` moved instance variable `ingestion_policy`, `emission_policies` and `provisioning_state` under property `properties`
111
+ - Method `AzureTrafficCollectorsOperations.begin_create_or_update` moved its parameters `location`/`tags`/`virtual_hub` under property `parameters`
112
+ - Method `CollectorPoliciesOperations.begin_create_or_update` moved its parameters `location`/`tags`/`ingestion_policy`/`emission_policies` under property `parameters`
113
+
114
+ ### Other Changes
115
+
116
+ - Deleted model `ApiVersionParameter`/`TrackedResource`/`TrackedResourceSystemData` which actually were not used by SDK users
117
+
118
+ ## 1.0.0b1 (2022-11-18)
119
+
120
+ * Initial Release
@@ -0,0 +1,61 @@
1
+ # Microsoft Azure SDK for Python
2
+
3
+ This is the Microsoft Azure Networkfunction Management Client Library.
4
+ This package has been tested with Python 3.9+.
5
+ For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
6
+
7
+ ## _Disclaimer_
8
+
9
+ _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_
10
+
11
+ ## Getting started
12
+
13
+ ### Prerequisites
14
+
15
+ - Python 3.9+ is required to use this package.
16
+ - [Azure subscription](https://azure.microsoft.com/free/)
17
+
18
+ ### Install the package
19
+
20
+ ```bash
21
+ pip install azure-mgmt-networkfunction
22
+ pip install azure-identity
23
+ ```
24
+
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.networkfunction import TrafficCollectorMgmtClient
40
+ import os
41
+
42
+ sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43
+ client = TrafficCollectorMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
44
+ ```
45
+
46
+ ## Examples
47
+
48
+ Code samples for this package can be found at:
49
+ - [Search Networkfunction 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.
@@ -0,0 +1 @@
1
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
@@ -0,0 +1 @@
1
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
@@ -0,0 +1,32 @@
1
+ # coding=utf-8
2
+ # --------------------------------------------------------------------------
3
+ # Copyright (c) Microsoft Corporation. All rights reserved.
4
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+ # pylint: disable=wrong-import-position
9
+
10
+ from typing import TYPE_CHECKING
11
+
12
+ if TYPE_CHECKING:
13
+ from ._patch import * # pylint: disable=unused-wildcard-import
14
+
15
+ from ._client import TrafficCollectorMgmtClient # type: ignore
16
+ from ._version import VERSION
17
+
18
+ __version__ = VERSION
19
+
20
+ try:
21
+ from ._patch import __all__ as _patch_all
22
+ from ._patch import *
23
+ except ImportError:
24
+ _patch_all = []
25
+ from ._patch import patch_sdk as _patch_sdk
26
+
27
+ __all__ = [
28
+ "TrafficCollectorMgmtClient",
29
+ ]
30
+ __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
31
+
32
+ _patch_sdk()
@@ -0,0 +1,167 @@
1
+ # coding=utf-8
2
+ # --------------------------------------------------------------------------
3
+ # Copyright (c) Microsoft Corporation. All rights reserved.
4
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+
9
+ from copy import deepcopy
10
+ from typing import Any, Optional, TYPE_CHECKING, cast
11
+ from typing_extensions import Self
12
+
13
+ from azure.core.pipeline import policies
14
+ from azure.core.rest import HttpRequest, HttpResponse
15
+ from azure.core.settings import settings
16
+ from azure.mgmt.core import ARMPipelineClient
17
+ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18
+ from azure.mgmt.core.tools import get_arm_endpoints
19
+
20
+ from ._configuration import TrafficCollectorMgmtClientConfiguration
21
+ from ._utils.serialization import Deserializer, Serializer
22
+ from .operations import (
23
+ AzureTrafficCollectorsByResourceGroupOperations,
24
+ AzureTrafficCollectorsBySubscriptionOperations,
25
+ AzureTrafficCollectorsOperations,
26
+ CollectorPoliciesOperations,
27
+ NetworkFunctionOperations,
28
+ )
29
+
30
+ if TYPE_CHECKING:
31
+ from azure.core import AzureClouds
32
+ from azure.core.credentials import TokenCredential
33
+
34
+
35
+ class TrafficCollectorMgmtClient:
36
+ """Azure Traffic Collector service.
37
+
38
+ :ivar azure_traffic_collectors: AzureTrafficCollectorsOperations operations
39
+ :vartype azure_traffic_collectors:
40
+ azure.mgmt.networkfunction.operations.AzureTrafficCollectorsOperations
41
+ :ivar collector_policies: CollectorPoliciesOperations operations
42
+ :vartype collector_policies: azure.mgmt.networkfunction.operations.CollectorPoliciesOperations
43
+ :ivar network_function: NetworkFunctionOperations operations
44
+ :vartype network_function: azure.mgmt.networkfunction.operations.NetworkFunctionOperations
45
+ :ivar azure_traffic_collectors_by_resource_group:
46
+ AzureTrafficCollectorsByResourceGroupOperations operations
47
+ :vartype azure_traffic_collectors_by_resource_group:
48
+ azure.mgmt.networkfunction.operations.AzureTrafficCollectorsByResourceGroupOperations
49
+ :ivar azure_traffic_collectors_by_subscription: AzureTrafficCollectorsBySubscriptionOperations
50
+ operations
51
+ :vartype azure_traffic_collectors_by_subscription:
52
+ azure.mgmt.networkfunction.operations.AzureTrafficCollectorsBySubscriptionOperations
53
+ :param credential: Credential used to authenticate requests to the service. Required.
54
+ :type credential: ~azure.core.credentials.TokenCredential
55
+ :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
56
+ :type subscription_id: str
57
+ :param base_url: Service host. Default value is None.
58
+ :type base_url: str
59
+ :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
60
+ None.
61
+ :paramtype cloud_setting: ~azure.core.AzureClouds
62
+ :keyword api_version: The API version to use for this operation. Known values are "2022-11-01"
63
+ and None. Default value is "2022-11-01". Note that overriding this default value may result in
64
+ unsupported behavior.
65
+ :paramtype api_version: str
66
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
67
+ Retry-After header is present.
68
+ """
69
+
70
+ def __init__(
71
+ self,
72
+ credential: "TokenCredential",
73
+ subscription_id: str,
74
+ base_url: Optional[str] = None,
75
+ *,
76
+ cloud_setting: Optional["AzureClouds"] = None,
77
+ **kwargs: Any
78
+ ) -> None:
79
+ _endpoint = "{endpoint}"
80
+ _cloud = cloud_setting or settings.current.azure_cloud # type: ignore
81
+ _endpoints = get_arm_endpoints(_cloud)
82
+ if not base_url:
83
+ base_url = _endpoints["resource_manager"]
84
+ credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
85
+ self._config = TrafficCollectorMgmtClientConfiguration(
86
+ credential=credential,
87
+ subscription_id=subscription_id,
88
+ base_url=cast(str, base_url),
89
+ cloud_setting=cloud_setting,
90
+ credential_scopes=credential_scopes,
91
+ **kwargs
92
+ )
93
+
94
+ _policies = kwargs.pop("policies", None)
95
+ if _policies is None:
96
+ _policies = [
97
+ policies.RequestIdPolicy(**kwargs),
98
+ self._config.headers_policy,
99
+ self._config.user_agent_policy,
100
+ self._config.proxy_policy,
101
+ policies.ContentDecodePolicy(**kwargs),
102
+ ARMAutoResourceProviderRegistrationPolicy(),
103
+ self._config.redirect_policy,
104
+ self._config.retry_policy,
105
+ self._config.authentication_policy,
106
+ self._config.custom_hook_policy,
107
+ self._config.logging_policy,
108
+ policies.DistributedTracingPolicy(**kwargs),
109
+ policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
110
+ self._config.http_logging_policy,
111
+ ]
112
+ self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
113
+
114
+ self._serialize = Serializer()
115
+ self._deserialize = Deserializer()
116
+ self._serialize.client_side_validation = False
117
+ self.azure_traffic_collectors = AzureTrafficCollectorsOperations(
118
+ self._client, self._config, self._serialize, self._deserialize
119
+ )
120
+ self.collector_policies = CollectorPoliciesOperations(
121
+ self._client, self._config, self._serialize, self._deserialize
122
+ )
123
+ self.network_function = NetworkFunctionOperations(
124
+ self._client, self._config, self._serialize, self._deserialize
125
+ )
126
+ self.azure_traffic_collectors_by_resource_group = AzureTrafficCollectorsByResourceGroupOperations(
127
+ self._client, self._config, self._serialize, self._deserialize
128
+ )
129
+ self.azure_traffic_collectors_by_subscription = AzureTrafficCollectorsBySubscriptionOperations(
130
+ self._client, self._config, self._serialize, self._deserialize
131
+ )
132
+
133
+ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
134
+ """Runs the network request through the client's chained policies.
135
+
136
+ >>> from azure.core.rest import HttpRequest
137
+ >>> request = HttpRequest("GET", "https://www.example.org/")
138
+ <HttpRequest [GET], url: 'https://www.example.org/'>
139
+ >>> response = client.send_request(request)
140
+ <HttpResponse: 200 OK>
141
+
142
+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
143
+
144
+ :param request: The network request you want to make. Required.
145
+ :type request: ~azure.core.rest.HttpRequest
146
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
147
+ :return: The response of your network call. Does not do error handling on your response.
148
+ :rtype: ~azure.core.rest.HttpResponse
149
+ """
150
+
151
+ request_copy = deepcopy(request)
152
+ path_format_arguments = {
153
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
154
+ }
155
+
156
+ request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
157
+ return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
158
+
159
+ def close(self) -> None:
160
+ self._client.close()
161
+
162
+ def __enter__(self) -> Self:
163
+ self._client.__enter__()
164
+ return self
165
+
166
+ def __exit__(self, *exc_details: Any) -> None:
167
+ self._client.__exit__(*exc_details)
@@ -0,0 +1,80 @@
1
+ # coding=utf-8
2
+ # --------------------------------------------------------------------------
3
+ # Copyright (c) Microsoft Corporation. All rights reserved.
4
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+
9
+ from typing import Any, Optional, TYPE_CHECKING
10
+
11
+ from azure.core.pipeline import policies
12
+ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
13
+
14
+ from ._version import VERSION
15
+
16
+ if TYPE_CHECKING:
17
+ from azure.core import AzureClouds
18
+ from azure.core.credentials import TokenCredential
19
+
20
+
21
+ class TrafficCollectorMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
22
+ """Configuration for TrafficCollectorMgmtClient.
23
+
24
+ Note that all parameters used to create this instance are saved as instance
25
+ attributes.
26
+
27
+ :param credential: Credential used to authenticate requests to the service. Required.
28
+ :type credential: ~azure.core.credentials.TokenCredential
29
+ :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
30
+ :type subscription_id: str
31
+ :param base_url: Service host. Default value is "https://management.azure.com".
32
+ :type base_url: str
33
+ :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
34
+ None.
35
+ :type cloud_setting: ~azure.core.AzureClouds
36
+ :keyword api_version: The API version to use for this operation. Known values are "2022-11-01"
37
+ and None. Default value is "2022-11-01". Note that overriding this default value may result in
38
+ unsupported behavior.
39
+ :paramtype api_version: str
40
+ """
41
+
42
+ def __init__(
43
+ self,
44
+ credential: "TokenCredential",
45
+ subscription_id: str,
46
+ base_url: str = "https://management.azure.com",
47
+ cloud_setting: Optional["AzureClouds"] = None,
48
+ **kwargs: Any
49
+ ) -> None:
50
+ api_version: str = kwargs.pop("api_version", "2022-11-01")
51
+
52
+ if credential is None:
53
+ raise ValueError("Parameter 'credential' must not be None.")
54
+ if subscription_id is None:
55
+ raise ValueError("Parameter 'subscription_id' must not be None.")
56
+
57
+ self.credential = credential
58
+ self.subscription_id = subscription_id
59
+ self.base_url = base_url
60
+ self.cloud_setting = cloud_setting
61
+ self.api_version = api_version
62
+ self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
63
+ kwargs.setdefault("sdk_moniker", "mgmt-networkfunction/{}".format(VERSION))
64
+ self.polling_interval = kwargs.get("polling_interval", 30)
65
+ self._configure(**kwargs)
66
+
67
+ def _configure(self, **kwargs: Any) -> None:
68
+ self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
69
+ self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
70
+ self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
71
+ self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
72
+ self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
73
+ self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
74
+ self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
75
+ self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
76
+ self.authentication_policy = kwargs.get("authentication_policy")
77
+ if self.credential and not self.authentication_policy:
78
+ self.authentication_policy = ARMChallengeAuthenticationPolicy(
79
+ self.credential, *self.credential_scopes, **kwargs
80
+ )
@@ -0,0 +1,21 @@
1
+ # coding=utf-8
2
+ # --------------------------------------------------------------------------
3
+ # Copyright (c) Microsoft Corporation. All rights reserved.
4
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
+ # --------------------------------------------------------------------------
6
+ """Customize generated code here.
7
+
8
+ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
9
+ """
10
+
11
+
12
+ __all__: list[str] = [] # Add all objects you want publicly available to users at this package level
13
+
14
+
15
+ def patch_sdk():
16
+ """Do not remove from this file.
17
+
18
+ `patch_sdk` is a last resort escape hatch that allows you to do customizations
19
+ you can't accomplish using the techniques described in
20
+ https://aka.ms/azsdk/python/dpcodegen/python/customize
21
+ """
@@ -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) Python Code Generator.
5
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
+ # --------------------------------------------------------------------------