Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoRelease] t2-resource-2021-04-16-89132 #18097

Merged
merged 5 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions sdk/resources/azure-mgmt-resource/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 16.1.0 (2021-04-16)

**Features**

- Model ManagedServiceIdentity has a new parameter tenant_id

## 16.0.0 (2021-02-26)

**Features**
Expand Down
1 change: 1 addition & 0 deletions sdk/resources/azure-mgmt-resource/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/resources/azure-mgmt-resource/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.3.0",
"use": "@autorest/python@5.6.6",
"commit": "c55d37d10ded9ef904539fe5814df3ea333b66a8",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/resources/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.6.6 --version=3.3.0",
"readme": "specification/resources/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "16.0.0"
VERSION = "16.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from typing import Any
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 DeploymentScriptsClientConfiguration(Configuration):
"""Configuration for DeploymentScriptsClient.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@
# regenerated.
# --------------------------------------------------------------------------

from azure.mgmt.core import ARMPipelineClient
from msrest import Serializer, Deserializer
from typing import TYPE_CHECKING

from azure.mgmt.core import ARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from msrest import Deserializer, Serializer

from ._configuration import DeploymentScriptsClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

class _SDKClient(object):
def __init__(self, *args, **kwargs):
"""This is a fake class to support current implemetation of MultiApiClientMixin."
Expand All @@ -38,16 +47,17 @@ class DeploymentScriptsClient(MultiApiClientMixin, _SDKClient):
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Subscription Id which forms part of the URI for every service call.
:type subscription_id: str
:param str api_version: API version to use if no profile is provided, or if
missing in profile.
:param str base_url: Service URL
:param api_version: API version to use if no profile is provided, or if missing in profile.
:type api_version: str
:param base_url: Service URL
:type base_url: str
:param profile: A profile definition, from KnownProfiles to dict.
:type profile: azure.profiles.KnownProfiles
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

DEFAULT_API_VERSION = '2020-10-01'
_PROFILE_TAG = "azure.mgmt.resource.DeploymentScriptsClient"
_PROFILE_TAG = "azure.mgmt.resource.deploymentscripts.DeploymentScriptsClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
Expand All @@ -59,9 +69,9 @@ def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None,
base_url=None,
profile=KnownProfiles.default,
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
Expand All @@ -81,8 +91,8 @@ def _models_dict(cls, api_version):
def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:

* 2019-10-01-preview: :mod:`v2019_10_01_preview.models<azure.mgmt.resource.v2019_10_01_preview.models>`
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.resource.v2020_10_01.models>`
* 2019-10-01-preview: :mod:`v2019_10_01_preview.models<azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models>`
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.resource.deploymentscripts.v2020_10_01.models>`
"""
if api_version == '2019-10-01-preview':
from .v2019_10_01_preview import models
Expand All @@ -96,8 +106,8 @@ def models(cls, api_version=DEFAULT_API_VERSION):
def deployment_scripts(self):
"""Instance depends on the API version:

* 2019-10-01-preview: :class:`DeploymentScriptsOperations<azure.mgmt.resource.v2019_10_01_preview.operations.DeploymentScriptsOperations>`
* 2020-10-01: :class:`DeploymentScriptsOperations<azure.mgmt.resource.v2020_10_01.operations.DeploymentScriptsOperations>`
* 2019-10-01-preview: :class:`DeploymentScriptsOperations<azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.operations.DeploymentScriptsOperations>`
* 2020-10-01: :class:`DeploymentScriptsOperations<azure.mgmt.resource.deploymentscripts.v2020_10_01.operations.DeploymentScriptsOperations>`
"""
api_version = self._get_api_version('deployment_scripts')
if api_version == '2019-10-01-preview':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "16.0.0"
VERSION = "16.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from typing import Any
from typing import Any, 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 azure.core.credentials_async import AsyncTokenCredential

class DeploymentScriptsClientConfiguration(Configuration):
"""Configuration for DeploymentScriptsClient.
Expand All @@ -31,8 +34,8 @@ class DeploymentScriptsClientConfiguration(Configuration):

def __init__(
self,
credential, # type: "AsyncTokenCredential"
subscription_id, # type: str
credential: "AsyncTokenCredential",
subscription_id: str,
**kwargs # type: Any
) -> None:
if credential is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@
# regenerated.
# --------------------------------------------------------------------------

from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Serializer, Deserializer
from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from msrest import Deserializer, Serializer

from ._configuration import DeploymentScriptsClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

class _SDKClient(object):
def __init__(self, *args, **kwargs):
"""This is a fake class to support current implemetation of MultiApiClientMixin."
Expand All @@ -38,16 +45,17 @@ class DeploymentScriptsClient(MultiApiClientMixin, _SDKClient):
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Subscription Id which forms part of the URI for every service call.
:type subscription_id: str
:param str api_version: API version to use if no profile is provided, or if
missing in profile.
:param str base_url: Service URL
:param api_version: API version to use if no profile is provided, or if missing in profile.
:type api_version: str
:param base_url: Service URL
:type base_url: str
:param profile: A profile definition, from KnownProfiles to dict.
:type profile: azure.profiles.KnownProfiles
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

DEFAULT_API_VERSION = '2020-10-01'
_PROFILE_TAG = "azure.mgmt.resource.DeploymentScriptsClient"
_PROFILE_TAG = "azure.mgmt.resource.deploymentscripts.DeploymentScriptsClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
Expand All @@ -57,11 +65,11 @@ class DeploymentScriptsClient(MultiApiClientMixin, _SDKClient):

def __init__(
self,
credential, # type: "AsyncTokenCredential"
subscription_id, # type: str
api_version=None,
base_url=None,
profile=KnownProfiles.default,
credential: "AsyncTokenCredential",
subscription_id: str,
api_version: Optional[str] = None,
base_url: Optional[str] = None,
profile: KnownProfiles = KnownProfiles.default,
**kwargs # type: Any
) -> None:
if not base_url:
Expand All @@ -81,8 +89,8 @@ def _models_dict(cls, api_version):
def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:

* 2019-10-01-preview: :mod:`v2019_10_01_preview.models<azure.mgmt.resource.v2019_10_01_preview.models>`
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.resource.v2020_10_01.models>`
* 2019-10-01-preview: :mod:`v2019_10_01_preview.models<azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models>`
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.resource.deploymentscripts.v2020_10_01.models>`
"""
if api_version == '2019-10-01-preview':
from ..v2019_10_01_preview import models
Expand All @@ -96,8 +104,8 @@ def models(cls, api_version=DEFAULT_API_VERSION):
def deployment_scripts(self):
"""Instance depends on the API version:

* 2019-10-01-preview: :class:`DeploymentScriptsOperations<azure.mgmt.resource.v2019_10_01_preview.aio.operations.DeploymentScriptsOperations>`
* 2020-10-01: :class:`DeploymentScriptsOperations<azure.mgmt.resource.v2020_10_01.aio.operations.DeploymentScriptsOperations>`
* 2019-10-01-preview: :class:`DeploymentScriptsOperations<azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.aio.operations.DeploymentScriptsOperations>`
* 2020-10-01: :class:`DeploymentScriptsOperations<azure.mgmt.resource.deploymentscripts.v2020_10_01.aio.operations.DeploymentScriptsOperations>`
"""
api_version = self._get_api_version('deployment_scripts')
if api_version == '2019-10-01-preview':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# --------------------------------------------------------------------------

from ._deployment_scripts_client import DeploymentScriptsClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['DeploymentScriptsClient']

try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
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

VERSION = "unknown"

class DeploymentScriptsClientConfiguration(Configuration):
"""Configuration for DeploymentScriptsClient.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import DeploymentScriptsClientConfiguration
from .operations import DeploymentScriptsOperations
Expand Down Expand Up @@ -50,11 +51,30 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.deployment_scripts = DeploymentScriptsOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
Loading