-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoRelease] t2-trafficmanager-2021-05-13-40514(wave4) (#18700)
* CodeGen from PR 14166 in Azure/azure-rest-api-specs trafficmanager wave4 (#14166) * trafficmanager wave4 * Update readme.python.md Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <[email protected]> Co-authored-by: msyyc <[email protected]> * version,CHANGELOG * changelog config Co-authored-by: SDKAuto <[email protected]> Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <[email protected]> Co-authored-by: msyyc <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed <[email protected]> Co-authored-by: Zed Lei <[email protected]>
- Loading branch information
1 parent
2c0a7c4
commit 6309469
Showing
36 changed files
with
5,239 additions
and
0 deletions.
There are no files selected for viewing
114 changes: 114 additions & 0 deletions
114
sdk/trafficmanager/azure-mgmt-trafficmanager/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Release History | ||
|
||
## 1.0.0b1 (2021-05-13) | ||
|
||
This is beta preview version. | ||
|
||
This version uses a next-generation code generator that introduces important breaking changes, but also important new features (like unified authentication and async programming). | ||
|
||
**General breaking changes** | ||
|
||
- Credential system has been completly revamped: | ||
|
||
- `azure.common.credentials` or `msrestazure.azure_active_directory` instances are no longer supported, use the `azure-identity` classes instead: https://pypi.org/project/azure-identity/ | ||
- `credentials` parameter has been renamed `credential` | ||
|
||
- The `config` attribute no longer exists on a client, configuration should be passed as kwarg. Example: `MyClient(credential, subscription_id, enable_logging=True)`. For a complete set of | ||
supported options, see the [parameters accept in init documentation of azure-core](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#available-policies) | ||
- You can't import a `version` module anymore, use `__version__` instead | ||
- Operations that used to return a `msrest.polling.LROPoller` now returns a `azure.core.polling.LROPoller` and are prefixed with `begin_`. | ||
- Exceptions tree have been simplified and most exceptions are now `azure.core.exceptions.HttpResponseError` (`CloudError` has been removed). | ||
- Most of the operation kwarg have changed. Some of the most noticeable: | ||
|
||
- `raw` has been removed. Equivalent feature can be found using `cls`, a callback that will give access to internal HTTP response for advanced user | ||
- For a complete set of | ||
supported options, see the [parameters accept in Request documentation of azure-core](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#available-policies) | ||
|
||
**General new features** | ||
|
||
- Type annotations support using `typing`. SDKs are mypy ready. | ||
- This client has now stable and official support for async. Check the `aio` namespace of your package to find the async client. | ||
- This client now support natively tracing library like OpenCensus or OpenTelemetry. See this [tracing quickstart](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/core/azure-core-tracing-opentelemetry) for an overview. | ||
|
||
## 0.51.0 (2019-01-08) | ||
|
||
**Features** | ||
|
||
- Model Endpoint has a new parameter subnets | ||
- Model Profile has a new parameter max_return | ||
- Added operation group TrafficManagerUserMetricsKeysOperations | ||
|
||
## 0.50.0 (2018-05-25) | ||
|
||
**Features** | ||
|
||
- Model Endpoint has a new parameter custom_headers | ||
- Model MonitorConfig has a new parameter custom_headers | ||
- Model MonitorConfig has a new parameter | ||
expected_status_code_ranges | ||
- Model Profile has a new parameter traffic_view_enrollment_status | ||
- Added operation group HeatMapOperations | ||
- Client class can be used as a context manager to keep the underlying | ||
HTTP session open for performance | ||
|
||
**General Breaking changes** | ||
|
||
This version uses a next-generation code generator that *might* | ||
introduce breaking changes. | ||
|
||
- Model signatures now use only keyword-argument syntax. All | ||
positional arguments must be re-written as keyword-arguments. To | ||
keep auto-completion in most cases, models are now generated for | ||
Python 2 and Python 3. Python 3 uses the "\*" syntax for | ||
keyword-only arguments. | ||
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to | ||
improve the behavior when unrecognized enum values are encountered. | ||
While this is not a breaking change, the distinctions are important, | ||
and are documented here: | ||
<https://docs.python.org/3/library/enum.html#others> At a glance: | ||
- "is" should not be used at all. | ||
- "format" will return the string value, where "%s" string | ||
formatting will return `NameOfEnum.stringvalue`. Format syntax | ||
should be prefered. | ||
- New Long Running Operation: | ||
- Return type changes from | ||
`msrestazure.azure_operation.AzureOperationPoller` to | ||
`msrest.polling.LROPoller`. External API is the same. | ||
- Return type is now **always** a `msrest.polling.LROPoller`, | ||
regardless of the optional parameters used. | ||
- The behavior has changed when using `raw=True`. Instead of | ||
returning the initial call result as `ClientRawResponse`, | ||
without polling, now this returns an LROPoller. After polling, | ||
the final resource will be returned as a `ClientRawResponse`. | ||
- New `polling` parameter. The default behavior is | ||
`Polling=True` which will poll using ARM algorithm. When | ||
`Polling=False`, the response of the initial call will be | ||
returned without polling. | ||
- `polling` parameter accepts instances of subclasses of | ||
`msrest.polling.PollingMethod`. | ||
- `add_done_callback` will no longer raise if called after | ||
polling is finished, but will instead execute the callback right | ||
away. | ||
|
||
**Bugfixes** | ||
|
||
- Compatibility of the sdist with wheel 0.31.0 | ||
|
||
## 0.40.0 (2017-07-03) | ||
|
||
**Features** | ||
|
||
- New MonitorConfig settings | ||
- New Api Version 2017-05-01 | ||
|
||
**Breaking changes** | ||
|
||
- Rename "list_by_in_resource_group" to | ||
"list_by_resource_group" | ||
- Rename "list_all" to "list_by_subscription" | ||
|
||
## 0.30.0 (2017-04-20) | ||
|
||
- Initial Release (ApiVersion 2017-03-01) | ||
|
||
This wheel package is built with the azure wheel extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include _meta.json | ||
recursive-include tests *.py *.yaml | ||
include *.md | ||
include azure/__init__.py | ||
include azure/mgmt/__init__.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Microsoft Azure SDK for Python | ||
|
||
This is the Microsoft Azure Trafficmanager Management Client Library. | ||
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. | ||
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). | ||
|
||
|
||
# Usage | ||
|
||
|
||
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) | ||
|
||
|
||
|
||
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) | ||
Code samples for this package can be found at [Trafficmanager Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. | ||
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) | ||
|
||
|
||
# Provide Feedback | ||
|
||
If you encounter any bugs or have suggestions, please file an issue in the | ||
[Issues](https://github.com/Azure/azure-sdk-for-python/issues) | ||
section of the project. | ||
|
||
|
||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-trafficmanager%2FREADME.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"autorest": "3.3.0", | ||
"use": "@autorest/[email protected]", | ||
"commit": "6e765382bb72623e7f5d9a11b53954c586ab8663", | ||
"repository_url": "https://github.com/Azure/azure-rest-api-specs", | ||
"autorest_command": "autorest specification/trafficmanager/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --version=3.3.0", | ||
"readme": "specification/trafficmanager/resource-manager/readme.md" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
1 change: 1 addition & 0 deletions
1
sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
19 changes: 19 additions & 0 deletions
19
sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from ._traffic_manager_management_client import TrafficManagerManagementClient | ||
from ._version import VERSION | ||
|
||
__version__ = VERSION | ||
__all__ = ['TrafficManagerManagementClient'] | ||
|
||
try: | ||
from ._patch import patch_sdk # type: ignore | ||
patch_sdk() | ||
except ImportError: | ||
pass |
71 changes: 71 additions & 0 deletions
71
sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/_configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
from azure.core.configuration import Configuration | ||
from azure.core.pipeline import policies | ||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy | ||
|
||
from ._version import VERSION | ||
|
||
if TYPE_CHECKING: | ||
# pylint: disable=unused-import,ungrouped-imports | ||
from typing import Any | ||
|
||
from azure.core.credentials import TokenCredential | ||
|
||
|
||
class TrafficManagerManagementClientConfiguration(Configuration): | ||
"""Configuration for TrafficManagerManagementClient. | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param credential: Credential needed for the client to connect to Azure. | ||
:type credential: ~azure.core.credentials.TokenCredential | ||
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. | ||
:type subscription_id: str | ||
""" | ||
|
||
def __init__( | ||
self, | ||
credential, # type: "TokenCredential" | ||
subscription_id, # type: str | ||
**kwargs # type: Any | ||
): | ||
# type: (...) -> None | ||
if credential is None: | ||
raise ValueError("Parameter 'credential' must not be None.") | ||
if subscription_id is None: | ||
raise ValueError("Parameter 'subscription_id' must not be None.") | ||
super(TrafficManagerManagementClientConfiguration, self).__init__(**kwargs) | ||
|
||
self.credential = credential | ||
self.subscription_id = subscription_id | ||
self.api_version = "2018-08-01" | ||
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) | ||
kwargs.setdefault('sdk_moniker', 'mgmt-trafficmanager/{}'.format(VERSION)) | ||
self._configure(**kwargs) | ||
|
||
def _configure( | ||
self, | ||
**kwargs # type: Any | ||
): | ||
# type: (...) -> None | ||
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) | ||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) | ||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) | ||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) | ||
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) | ||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) | ||
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) | ||
self.authentication_policy = kwargs.get('authentication_policy') | ||
if self.credential and not self.authentication_policy: | ||
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) |
107 changes: 107 additions & 0 deletions
107
sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/_metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"chosen_version": "2018-08-01", | ||
"total_api_version_list": ["2018-08-01"], | ||
"client": { | ||
"name": "TrafficManagerManagementClient", | ||
"filename": "_traffic_manager_management_client", | ||
"description": "TrafficManagerManagementClient.", | ||
"base_url": "\u0027https://management.azure.com\u0027", | ||
"custom_base_url": null, | ||
"azure_arm": true, | ||
"has_lro_operations": false, | ||
"client_side_validation": false, | ||
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"TrafficManagerManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", | ||
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"TrafficManagerManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" | ||
}, | ||
"global_parameters": { | ||
"sync": { | ||
"credential": { | ||
"signature": "credential, # type: \"TokenCredential\"", | ||
"description": "Credential needed for the client to connect to Azure.", | ||
"docstring_type": "~azure.core.credentials.TokenCredential", | ||
"required": true | ||
}, | ||
"subscription_id": { | ||
"signature": "subscription_id, # type: str", | ||
"description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", | ||
"docstring_type": "str", | ||
"required": true | ||
} | ||
}, | ||
"async": { | ||
"credential": { | ||
"signature": "credential: \"AsyncTokenCredential\",", | ||
"description": "Credential needed for the client to connect to Azure.", | ||
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", | ||
"required": true | ||
}, | ||
"subscription_id": { | ||
"signature": "subscription_id: str,", | ||
"description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", | ||
"docstring_type": "str", | ||
"required": true | ||
} | ||
}, | ||
"constant": { | ||
}, | ||
"call": "credential, subscription_id", | ||
"service_client_specific": { | ||
"sync": { | ||
"api_version": { | ||
"signature": "api_version=None, # type: Optional[str]", | ||
"description": "API version to use if no profile is provided, or if missing in profile.", | ||
"docstring_type": "str", | ||
"required": false | ||
}, | ||
"base_url": { | ||
"signature": "base_url=None, # type: Optional[str]", | ||
"description": "Service URL", | ||
"docstring_type": "str", | ||
"required": false | ||
}, | ||
"profile": { | ||
"signature": "profile=KnownProfiles.default, # type: KnownProfiles", | ||
"description": "A profile definition, from KnownProfiles to dict.", | ||
"docstring_type": "azure.profiles.KnownProfiles", | ||
"required": false | ||
} | ||
}, | ||
"async": { | ||
"api_version": { | ||
"signature": "api_version: Optional[str] = None,", | ||
"description": "API version to use if no profile is provided, or if missing in profile.", | ||
"docstring_type": "str", | ||
"required": false | ||
}, | ||
"base_url": { | ||
"signature": "base_url: Optional[str] = None,", | ||
"description": "Service URL", | ||
"docstring_type": "str", | ||
"required": false | ||
}, | ||
"profile": { | ||
"signature": "profile: KnownProfiles = KnownProfiles.default,", | ||
"description": "A profile definition, from KnownProfiles to dict.", | ||
"docstring_type": "azure.profiles.KnownProfiles", | ||
"required": false | ||
} | ||
} | ||
} | ||
}, | ||
"config": { | ||
"credential": true, | ||
"credential_scopes": ["https://management.azure.com/.default"], | ||
"credential_default_policy_type": "BearerTokenCredentialPolicy", | ||
"credential_default_policy_type_has_async_version": true, | ||
"credential_key_header_name": null, | ||
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", | ||
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" | ||
}, | ||
"operation_groups": { | ||
"endpoints": "EndpointsOperations", | ||
"profiles": "ProfilesOperations", | ||
"geographic_hierarchies": "GeographicHierarchiesOperations", | ||
"heat_map": "HeatMapOperations", | ||
"traffic_manager_user_metrics_keys": "TrafficManagerUserMetricsKeysOperations" | ||
} | ||
} |
Oops, something went wrong.