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

[ReleasePR track2_azure-mgmt-signalr] SignalR new Api version 2021-06-01-preview #18196

Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/signalr/azure-mgmt-signalr/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/signalr/azure-mgmt-signalr/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.3.0",
"use": "@autorest/[email protected]",
"commit": "867165cc24d81c487ad186c998c46ba55f81c77b",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/signalr/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/signalr/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-07-01-preview"
self.api_version = "2021-04-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-signalr/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
108 changes: 108 additions & 0 deletions sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"chosen_version": "2021-04-01-preview",
"total_api_version_list": ["2021-04-01-preview"],
"client": {
"name": "SignalRManagementClient",
"filename": "_signal_rmanagement_client",
"description": "REST API for Azure SignalR Service.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"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\": [\"SignalRManagementClientConfiguration\"]}}, \"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\": [\"SignalRManagementClientConfiguration\"]}}, \"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 Id which uniquely identify the 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 Id which uniquely identify the 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": {
"operations": "Operations",
"signal_r": "SignalROperations",
"usages": "UsagesOperations",
"signal_rprivate_endpoint_connections": "SignalRPrivateEndpointConnectionsOperations",
"signal_rprivate_link_resources": "SignalRPrivateLinkResourcesOperations",
"signal_rshared_private_link_resources": "SignalRSharedPrivateLinkResourcesOperations"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
from typing import Any, Optional

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

from ._configuration import SignalRManagementClientConfiguration
from .operations import Operations
from .operations import SignalROperations
from .operations import UsagesOperations
from .operations import SignalRPrivateEndpointConnectionsOperations
from .operations import SignalRPrivateLinkResourcesOperations
from .operations import UsagesOperations
from .operations import SignalRSharedPrivateLinkResourcesOperations
from . import models


Expand All @@ -33,12 +35,14 @@ class SignalRManagementClient(object):
:vartype operations: azure.mgmt.signalr.operations.Operations
:ivar signal_r: SignalROperations operations
:vartype signal_r: azure.mgmt.signalr.operations.SignalROperations
:ivar usages: UsagesOperations operations
:vartype usages: azure.mgmt.signalr.operations.UsagesOperations
:ivar signal_rprivate_endpoint_connections: SignalRPrivateEndpointConnectionsOperations operations
:vartype signal_rprivate_endpoint_connections: azure.mgmt.signalr.operations.SignalRPrivateEndpointConnectionsOperations
:ivar signal_rprivate_link_resources: SignalRPrivateLinkResourcesOperations operations
:vartype signal_rprivate_link_resources: azure.mgmt.signalr.operations.SignalRPrivateLinkResourcesOperations
:ivar usages: UsagesOperations operations
:vartype usages: azure.mgmt.signalr.operations.UsagesOperations
:ivar signal_rshared_private_link_resources: SignalRSharedPrivateLinkResourcesOperations operations
:vartype signal_rshared_private_link_resources: azure.mgmt.signalr.operations.SignalRSharedPrivateLinkResourcesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Expand Down Expand Up @@ -69,13 +73,33 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.signal_r = SignalROperations(
self._client, self._config, self._serialize, self._deserialize)
self.usages = UsagesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.signal_rprivate_endpoint_connections = SignalRPrivateEndpointConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.signal_rprivate_link_resources = SignalRPrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.usages = UsagesOperations(
self.signal_rshared_private_link_resources = SignalRSharedPrivateLinkResourcesOperations(
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"

VERSION = "0.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-07-01-preview"
self.api_version = "2021-04-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-signalr/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand All @@ -18,9 +19,10 @@
from ._configuration import SignalRManagementClientConfiguration
from .operations import Operations
from .operations import SignalROperations
from .operations import UsagesOperations
from .operations import SignalRPrivateEndpointConnectionsOperations
from .operations import SignalRPrivateLinkResourcesOperations
from .operations import UsagesOperations
from .operations import SignalRSharedPrivateLinkResourcesOperations
from .. import models


Expand All @@ -31,12 +33,14 @@ class SignalRManagementClient(object):
:vartype operations: azure.mgmt.signalr.aio.operations.Operations
:ivar signal_r: SignalROperations operations
:vartype signal_r: azure.mgmt.signalr.aio.operations.SignalROperations
:ivar usages: UsagesOperations operations
:vartype usages: azure.mgmt.signalr.aio.operations.UsagesOperations
:ivar signal_rprivate_endpoint_connections: SignalRPrivateEndpointConnectionsOperations operations
:vartype signal_rprivate_endpoint_connections: azure.mgmt.signalr.aio.operations.SignalRPrivateEndpointConnectionsOperations
:ivar signal_rprivate_link_resources: SignalRPrivateLinkResourcesOperations operations
:vartype signal_rprivate_link_resources: azure.mgmt.signalr.aio.operations.SignalRPrivateLinkResourcesOperations
:ivar usages: UsagesOperations operations
:vartype usages: azure.mgmt.signalr.aio.operations.UsagesOperations
:ivar signal_rshared_private_link_resources: SignalRSharedPrivateLinkResourcesOperations operations
:vartype signal_rshared_private_link_resources: azure.mgmt.signalr.aio.operations.SignalRSharedPrivateLinkResourcesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Expand Down Expand Up @@ -66,13 +70,32 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.signal_r = SignalROperations(
self._client, self._config, self._serialize, self._deserialize)
self.usages = UsagesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.signal_rprivate_endpoint_connections = SignalRPrivateEndpointConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.signal_rprivate_link_resources = SignalRPrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.usages = UsagesOperations(
self.signal_rshared_private_link_resources = SignalRSharedPrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""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.AsyncHttpResponse
"""
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 = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@

from ._operations import Operations
from ._signal_r_operations import SignalROperations
from ._usages_operations import UsagesOperations
from ._signal_rprivate_endpoint_connections_operations import SignalRPrivateEndpointConnectionsOperations
from ._signal_rprivate_link_resources_operations import SignalRPrivateLinkResourcesOperations
from ._usages_operations import UsagesOperations
from ._signal_rshared_private_link_resources_operations import SignalRSharedPrivateLinkResourcesOperations

__all__ = [
'Operations',
'SignalROperations',
'UsagesOperations',
'SignalRPrivateEndpointConnectionsOperations',
'SignalRPrivateLinkResourcesOperations',
'UsagesOperations',
'SignalRSharedPrivateLinkResourcesOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-07-01-preview"
api_version = "2021-04-01-preview"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -93,7 +93,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

Expand Down
Loading