Skip to content

Commit ba7d8e9

Browse files
Azure CLI BotSDKAutomsyycRAY-316
authored
[AutoRelease] t2-storageimportexport-2021-05-27-48566(wave4) (Azure#18978)
* CodeGen from PR 14564 in Azure/azure-rest-api-specs Storageimportexport config (Azure#14564) * sql t2 readme config * readme config * Update readme.python.md * conflient resolve * readme.python config Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * version,CHANGELOG * changelog config Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed <601306339@qq.com>
1 parent 440274e commit ba7d8e9

33 files changed

+4742
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Release History
2+
3+
## 1.0.0b1 (2021-05-27)
4+
5+
This is beta preview version.
6+
7+
This version uses a next-generation code generator that introduces important breaking changes, but also important new features (like unified authentication and async programming).
8+
9+
**General breaking changes**
10+
11+
- Credential system has been completly revamped:
12+
13+
- `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/
14+
- `credentials` parameter has been renamed `credential`
15+
16+
- 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
17+
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)
18+
- You can't import a `version` module anymore, use `__version__` instead
19+
- Operations that used to return a `msrest.polling.LROPoller` now returns a `azure.core.polling.LROPoller` and are prefixed with `begin_`.
20+
- Exceptions tree have been simplified and most exceptions are now `azure.core.exceptions.HttpResponseError` (`CloudError` has been removed).
21+
- Most of the operation kwarg have changed. Some of the most noticeable:
22+
23+
- `raw` has been removed. Equivalent feature can be found using `cls`, a callback that will give access to internal HTTP response for advanced user
24+
- For a complete set of
25+
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)
26+
27+
**General new features**
28+
29+
- Type annotations support using `typing`. SDKs are mypy ready.
30+
- This client has now stable and official support for async. Check the `aio` namespace of your package to find the async client.
31+
- 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.
32+
33+
## 0.1.0 (2020-04-11)
34+
35+
* Initial Release
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include _meta.json
2+
recursive-include tests *.py *.yaml
3+
include *.md
4+
include azure/__init__.py
5+
include azure/mgmt/__init__.py
6+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Microsoft Azure SDK for Python
2+
3+
This is the Microsoft Azure Storageimportexport Management Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
6+
7+
8+
# Usage
9+
10+
11+
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
12+
13+
14+
15+
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
16+
Code samples for this package can be found at [Storageimportexport Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
17+
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
18+
19+
20+
# Provide Feedback
21+
22+
If you encounter any bugs or have suggestions, please file an issue in the
23+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
24+
section of the project.
25+
26+
27+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-storageimportexport%2FREADME.png)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.2",
3+
"use": [
4+
"@autorest/python@5.8.0",
5+
"@autorest/modelerfour@4.19.2"
6+
],
7+
"commit": "f802623b3e0ea71025e0c04d0478a0258aa3441d",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/storageimportexport/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/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2",
10+
"readme": "specification/storageimportexport/resource-manager/readme.md"
11+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._storage_import_export import StorageImportExport
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
13+
__all__ = ['StorageImportExport']
14+
15+
try:
16+
from ._patch import patch_sdk # type: ignore
17+
patch_sdk()
18+
except ImportError:
19+
pass
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from typing import TYPE_CHECKING
10+
11+
from azure.core.configuration import Configuration
12+
from azure.core.pipeline import policies
13+
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
14+
15+
from ._version import VERSION
16+
17+
if TYPE_CHECKING:
18+
# pylint: disable=unused-import,ungrouped-imports
19+
from typing import Any, Optional
20+
21+
from azure.core.credentials import TokenCredential
22+
23+
24+
class StorageImportExportConfiguration(Configuration):
25+
"""Configuration for StorageImportExport.
26+
27+
Note that all parameters used to create this instance are saved as instance
28+
attributes.
29+
30+
:param credential: Credential needed for the client to connect to Azure.
31+
:type credential: ~azure.core.credentials.TokenCredential
32+
:param subscription_id: The subscription ID for the Azure user.
33+
:type subscription_id: str
34+
:param accept_language: Specifies the preferred language for the response.
35+
:type accept_language: str
36+
"""
37+
38+
def __init__(
39+
self,
40+
credential, # type: "TokenCredential"
41+
subscription_id, # type: str
42+
accept_language=None, # type: Optional[str]
43+
**kwargs # type: Any
44+
):
45+
# type: (...) -> None
46+
if credential is None:
47+
raise ValueError("Parameter 'credential' must not be None.")
48+
if subscription_id is None:
49+
raise ValueError("Parameter 'subscription_id' must not be None.")
50+
super(StorageImportExportConfiguration, self).__init__(**kwargs)
51+
52+
self.credential = credential
53+
self.subscription_id = subscription_id
54+
self.accept_language = accept_language
55+
self.api_version = "2021-01-01"
56+
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
57+
kwargs.setdefault('sdk_moniker', 'mgmt-storageimportexport/{}'.format(VERSION))
58+
self._configure(**kwargs)
59+
60+
def _configure(
61+
self,
62+
**kwargs # type: Any
63+
):
64+
# type: (...) -> None
65+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
66+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
67+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
68+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
69+
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
70+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
71+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
72+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
73+
self.authentication_policy = kwargs.get('authentication_policy')
74+
if self.credential and not self.authentication_policy:
75+
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"chosen_version": "2021-01-01",
3+
"total_api_version_list": ["2021-01-01"],
4+
"client": {
5+
"name": "StorageImportExport",
6+
"filename": "_storage_import_export",
7+
"description": "The Storage Import/Export Resource Provider API.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": false,
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"StorageImportExportConfiguration\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"StorageImportExportConfiguration\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "The subscription ID for the Azure user.",
27+
"docstring_type": "str",
28+
"required": true
29+
},
30+
"accept_language": {
31+
"signature": "accept_language=None, # type: Optional[str]",
32+
"description": "Specifies the preferred language for the response.",
33+
"docstring_type": "str",
34+
"required": false
35+
}
36+
},
37+
"async": {
38+
"credential": {
39+
"signature": "credential: \"AsyncTokenCredential\",",
40+
"description": "Credential needed for the client to connect to Azure.",
41+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
42+
"required": true
43+
},
44+
"subscription_id": {
45+
"signature": "subscription_id: str,",
46+
"description": "The subscription ID for the Azure user.",
47+
"docstring_type": "str",
48+
"required": true
49+
},
50+
"accept_language": {
51+
"signature": "accept_language: Optional[str] = None,",
52+
"description": "Specifies the preferred language for the response.",
53+
"docstring_type": "str",
54+
"required": false
55+
}
56+
},
57+
"constant": {
58+
},
59+
"call": "credential, subscription_id, accept_language",
60+
"service_client_specific": {
61+
"sync": {
62+
"api_version": {
63+
"signature": "api_version=None, # type: Optional[str]",
64+
"description": "API version to use if no profile is provided, or if missing in profile.",
65+
"docstring_type": "str",
66+
"required": false
67+
},
68+
"base_url": {
69+
"signature": "base_url=None, # type: Optional[str]",
70+
"description": "Service URL",
71+
"docstring_type": "str",
72+
"required": false
73+
},
74+
"profile": {
75+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
76+
"description": "A profile definition, from KnownProfiles to dict.",
77+
"docstring_type": "azure.profiles.KnownProfiles",
78+
"required": false
79+
}
80+
},
81+
"async": {
82+
"api_version": {
83+
"signature": "api_version: Optional[str] = None,",
84+
"description": "API version to use if no profile is provided, or if missing in profile.",
85+
"docstring_type": "str",
86+
"required": false
87+
},
88+
"base_url": {
89+
"signature": "base_url: Optional[str] = None,",
90+
"description": "Service URL",
91+
"docstring_type": "str",
92+
"required": false
93+
},
94+
"profile": {
95+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
96+
"description": "A profile definition, from KnownProfiles to dict.",
97+
"docstring_type": "azure.profiles.KnownProfiles",
98+
"required": false
99+
}
100+
}
101+
}
102+
},
103+
"config": {
104+
"credential": true,
105+
"credential_scopes": ["https://management.azure.com/.default"],
106+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
107+
"credential_default_policy_type_has_async_version": true,
108+
"credential_key_header_name": null,
109+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
110+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
111+
},
112+
"operation_groups": {
113+
"locations": "LocationsOperations",
114+
"jobs": "JobsOperations",
115+
"bit_locker_keys": "BitLockerKeysOperations",
116+
"operations": "Operations"
117+
}
118+
}

0 commit comments

Comments
 (0)