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

[AutoPR track2_azure-mgmt-rdbms] Mariadb t2 config #5796

Closed
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
13 changes: 8 additions & 5 deletions sdk/rdbms/azure-mgmt-rdbms/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.3.0",
"use": "@autorest/python@5.6.6",
"commit": "62e437e7b686c6f4fbc3e7f8b34749899932c221",
"autorest": "3.4.2",
"use": [
"@autorest/python@5.8.0",
"@autorest/modelerfour@4.19.2"
],
"commit": "183313e5bd744c0946a0dbde961a15fca5f2f947",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/postgresql/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/postgresql/resource-manager/readme.md"
"autorest_command": "autorest specification/mariadb/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",
"readme": "specification/mariadb/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# --------------------------------------------------------------------------

from ._maria_db_management_client import MariaDBManagementClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['MariaDBManagementClient']

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 MariaDBManagementClientConfiguration(Configuration):
"""Configuration for MariaDBManagementClient.
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 MariaDBManagementClientConfiguration
from .operations import ServersOperations
Expand Down Expand Up @@ -167,6 +168,24 @@ def __init__(
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
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', min_length=1),
}
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
167 changes: 167 additions & 0 deletions sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_metadata.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
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

VERSION = "unknown"

class MariaDBManagementClientConfiguration(Configuration):
"""Configuration for MariaDBManagementClient.
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 Down Expand Up @@ -164,6 +165,23 @@ def __init__(
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
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', min_length=1),
}
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 @@ -46,7 +46,7 @@ async def get(
resource_group_name: str,
server_name: str,
advisor_name: str,
**kwargs
**kwargs: Any
) -> "_models.Advisor":
"""Get a recommendation action advisor.

Expand Down Expand Up @@ -107,7 +107,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.AdvisorsResultList"]:
"""List recommendation action advisors.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
async def execute(
self,
name_availability_request: "_models.NameAvailabilityRequest",
**kwargs
**kwargs: Any
) -> "_models.NameAvailability":
"""Check the availability of name for resource.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def _create_or_update_initial(
server_name: str,
configuration_name: str,
parameters: "_models.Configuration",
**kwargs
**kwargs: Any
) -> Optional["_models.Configuration"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]]
error_map = {
Expand Down Expand Up @@ -106,7 +106,7 @@ async def begin_create_or_update(
server_name: str,
configuration_name: str,
parameters: "_models.Configuration",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.Configuration"]:
"""Updates a configuration of a server.

Expand All @@ -120,8 +120,8 @@ async def begin_create_or_update(
:type parameters: ~azure.mgmt.rdbms.mariadb.models.Configuration
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either Configuration or the result of cls(response)
Expand Down Expand Up @@ -181,7 +181,7 @@ async def get(
resource_group_name: str,
server_name: str,
configuration_name: str,
**kwargs
**kwargs: Any
) -> "_models.Configuration":
"""Gets information about a configuration of server.

Expand Down Expand Up @@ -242,7 +242,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.ConfigurationListResult"]:
"""List all the configurations in a given server.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def _create_or_update_initial(
server_name: str,
database_name: str,
parameters: "_models.Database",
**kwargs
**kwargs: Any
) -> Optional["_models.Database"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]]
error_map = {
Expand Down Expand Up @@ -109,7 +109,7 @@ async def begin_create_or_update(
server_name: str,
database_name: str,
parameters: "_models.Database",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.Database"]:
"""Creates a new database or updates an existing database.

Expand All @@ -123,8 +123,8 @@ async def begin_create_or_update(
:type parameters: ~azure.mgmt.rdbms.mariadb.models.Database
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either Database or the result of cls(response)
Expand Down Expand Up @@ -184,7 +184,7 @@ async def _delete_initial(
resource_group_name: str,
server_name: str,
database_name: str,
**kwargs
**kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
Expand Down Expand Up @@ -230,7 +230,7 @@ async def begin_delete(
resource_group_name: str,
server_name: str,
database_name: str,
**kwargs
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes a database.

Expand All @@ -242,8 +242,8 @@ async def begin_delete(
:type database_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
Expand Down Expand Up @@ -299,7 +299,7 @@ async def get(
resource_group_name: str,
server_name: str,
database_name: str,
**kwargs
**kwargs: Any
) -> "_models.Database":
"""Gets information about a database.

Expand Down Expand Up @@ -360,7 +360,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.DatabaseListResult"]:
"""List all the databases in a given server.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def _create_or_update_initial(
server_name: str,
firewall_rule_name: str,
parameters: "_models.FirewallRule",
**kwargs
**kwargs: Any
) -> Optional["_models.FirewallRule"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]]
error_map = {
Expand Down Expand Up @@ -109,7 +109,7 @@ async def begin_create_or_update(
server_name: str,
firewall_rule_name: str,
parameters: "_models.FirewallRule",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.FirewallRule"]:
"""Creates a new firewall rule or updates an existing firewall rule.

Expand All @@ -123,8 +123,8 @@ async def begin_create_or_update(
:type parameters: ~azure.mgmt.rdbms.mariadb.models.FirewallRule
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either FirewallRule or the result of cls(response)
Expand Down Expand Up @@ -184,7 +184,7 @@ async def _delete_initial(
resource_group_name: str,
server_name: str,
firewall_rule_name: str,
**kwargs
**kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
Expand Down Expand Up @@ -230,7 +230,7 @@ async def begin_delete(
resource_group_name: str,
server_name: str,
firewall_rule_name: str,
**kwargs
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes a server firewall rule.

Expand All @@ -242,8 +242,8 @@ async def begin_delete(
:type firewall_rule_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
Expand Down Expand Up @@ -299,7 +299,7 @@ async def get(
resource_group_name: str,
server_name: str,
firewall_rule_name: str,
**kwargs
**kwargs: Any
) -> "_models.FirewallRule":
"""Gets information about a server firewall rule.

Expand Down Expand Up @@ -360,7 +360,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.FirewallRuleListResult"]:
"""List all the firewall rules in a given server.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def list(
self,
location_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PerformanceTierListResult"]:
"""List all the performance tiers at specified location in a given subscription.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(
self,
location_name: str,
operation_id: str,
**kwargs
**kwargs: Any
) -> "_models.RecommendedActionSessionsOperationStatus":
"""Recommendation action session operation status.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def list(
self,
location_name: str,
operation_id: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.RecommendationActionsResultList"]:
"""Recommendation action session operation result.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.LogFileListResult"]:
"""List all the log files in a given server.

Expand Down
Loading