Skip to content

Commit

Permalink
azure-mgmt-rdbms 1.2.0 ORCASQL VNET with API Version 2017-12-01 for P…
Browse files Browse the repository at this point in the history
…ublic Preview. (#2626)

* Generated from 1df93ae3fcc76e4c59c3a9122faf889318dbf91a

Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs

* Auto packaging

* azure-mgmt-rdbms 1.2.0

* Update HISTORY.rst
  • Loading branch information
AutorestCI authored and lmazuel committed May 31, 2018
1 parent b362f7f commit bddfd35
Show file tree
Hide file tree
Showing 41 changed files with 1,555 additions and 29 deletions.
11 changes: 10 additions & 1 deletion azure-mgmt-rdbms/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
Release History
===============

1.2.0 (2018-05-30)
++++++++++++++++++

**Features**

- Added operation group VirtualNetworkRulesOperations
- Added operation group ServerSecurityAlertPoliciesOperations (PostgreSQL only)
- Client class can be used as a context manager to keep the underlying HTTP session open for performance

1.1.1 (2018-04-17)
++++++++++++++++++

Expand Down Expand Up @@ -39,7 +48,7 @@ This version uses a next-generation code generator that *might* introduce breaki

- 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`,
- 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.
Expand Down
7 changes: 7 additions & 0 deletions azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .server_for_create_py3 import ServerForCreate
from .server_update_parameters_py3 import ServerUpdateParameters
from .firewall_rule_py3 import FirewallRule
from .virtual_network_rule_py3 import VirtualNetworkRule
from .database_py3 import Database
from .configuration_py3 import Configuration
from .operation_display_py3 import OperationDisplay
Expand All @@ -45,6 +46,7 @@
from .server_for_create import ServerForCreate
from .server_update_parameters import ServerUpdateParameters
from .firewall_rule import FirewallRule
from .virtual_network_rule import VirtualNetworkRule
from .database import Database
from .configuration import Configuration
from .operation_display import OperationDisplay
Expand All @@ -57,6 +59,7 @@
from .name_availability import NameAvailability
from .server_paged import ServerPaged
from .firewall_rule_paged import FirewallRulePaged
from .virtual_network_rule_paged import VirtualNetworkRulePaged
from .database_paged import DatabasePaged
from .configuration_paged import ConfigurationPaged
from .log_file_paged import LogFilePaged
Expand All @@ -67,6 +70,7 @@
ServerState,
GeoRedundantBackup,
SkuTier,
VirtualNetworkRuleState,
OperationOrigin,
)

Expand All @@ -83,6 +87,7 @@
'ServerForCreate',
'ServerUpdateParameters',
'FirewallRule',
'VirtualNetworkRule',
'Database',
'Configuration',
'OperationDisplay',
Expand All @@ -95,6 +100,7 @@
'NameAvailability',
'ServerPaged',
'FirewallRulePaged',
'VirtualNetworkRulePaged',
'DatabasePaged',
'ConfigurationPaged',
'LogFilePaged',
Expand All @@ -104,5 +110,6 @@
'ServerState',
'GeoRedundantBackup',
'SkuTier',
'VirtualNetworkRuleState',
'OperationOrigin',
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .proxy_resource import ProxyResource
from .proxy_resource_py3 import ProxyResource


class Configuration(ProxyResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .proxy_resource import ProxyResource
from .proxy_resource_py3 import ProxyResource


class Database(ProxyResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .proxy_resource import ProxyResource
from .proxy_resource_py3 import ProxyResource


class FirewallRule(ProxyResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .proxy_resource import ProxyResource
from .proxy_resource_py3 import ProxyResource


class LogFile(ProxyResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ class SkuTier(str, Enum):
memory_optimized = "MemoryOptimized"


class VirtualNetworkRuleState(str, Enum):

initializing = "Initializing"
in_progress = "InProgress"
ready = "Ready"
deleting = "Deleting"
unknown = "Unknown"


class OperationOrigin(str, Enum):

not_specified = "NotSpecified"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .server_properties_for_create import ServerPropertiesForCreate
from .server_properties_for_create_py3 import ServerPropertiesForCreate


class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .server_properties_for_create import ServerPropertiesForCreate
from .server_properties_for_create_py3 import ServerPropertiesForCreate


class ServerPropertiesForGeoRestore(ServerPropertiesForCreate):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .server_properties_for_create import ServerPropertiesForCreate
from .server_properties_for_create_py3 import ServerPropertiesForCreate


class ServerPropertiesForRestore(ServerPropertiesForCreate):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .tracked_resource import TrackedResource
from .tracked_resource_py3 import TrackedResource


class Server(TrackedResource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .proxy_resource import ProxyResource
from .proxy_resource_py3 import ProxyResource


class TrackedResource(ProxyResource):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 .proxy_resource import ProxyResource


class VirtualNetworkRule(ProxyResource):
"""A virtual network rule.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Resource ID
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param virtual_network_subnet_id: Required. The ARM resource id of the
virtual network subnet.
:type virtual_network_subnet_id: str
:param ignore_missing_vnet_service_endpoint: Create firewall rule before
the virtual network has vnet service endpoint enabled.
:type ignore_missing_vnet_service_endpoint: bool
:ivar state: Virtual Network Rule State. Possible values include:
'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown'
:vartype state: str or
~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'virtual_network_subnet_id': {'required': True},
'state': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'},
'state': {'key': 'properties.state', 'type': 'str'},
}

def __init__(self, **kwargs):
super(VirtualNetworkRule, self).__init__(**kwargs)
self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None)
self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None)
self.state = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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 msrest.paging import Paged


class VirtualNetworkRulePaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualNetworkRule <azure.mgmt.rdbms.mysql.models.VirtualNetworkRule>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'}
}

def __init__(self, *args, **kwargs):

super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 .proxy_resource_py3 import ProxyResource


class VirtualNetworkRule(ProxyResource):
"""A virtual network rule.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Resource ID
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param virtual_network_subnet_id: Required. The ARM resource id of the
virtual network subnet.
:type virtual_network_subnet_id: str
:param ignore_missing_vnet_service_endpoint: Create firewall rule before
the virtual network has vnet service endpoint enabled.
:type ignore_missing_vnet_service_endpoint: bool
:ivar state: Virtual Network Rule State. Possible values include:
'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown'
:vartype state: str or
~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'virtual_network_subnet_id': {'required': True},
'state': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'},
'state': {'key': 'properties.state', 'type': 'str'},
}

def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None:
super(VirtualNetworkRule, self).__init__(**kwargs)
self.virtual_network_subnet_id = virtual_network_subnet_id
self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint
self.state = None
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.servers_operations import ServersOperations
from .operations.firewall_rules_operations import FirewallRulesOperations
from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations
from .operations.databases_operations import DatabasesOperations
from .operations.configurations_operations import ConfigurationsOperations
from .operations.log_files_operations import LogFilesOperations
Expand Down Expand Up @@ -57,8 +58,8 @@ def __init__(
self.subscription_id = subscription_id


class MySQLManagementClient(object):
"""The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, log files and configurations with new business model.
class MySQLManagementClient(SDKClient):
"""The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model.
:ivar config: Configuration for client.
:vartype config: MySQLManagementClientConfiguration
Expand All @@ -67,6 +68,8 @@ class MySQLManagementClient(object):
:vartype servers: azure.mgmt.rdbms.mysql.operations.ServersOperations
:ivar firewall_rules: FirewallRules operations
:vartype firewall_rules: azure.mgmt.rdbms.mysql.operations.FirewallRulesOperations
:ivar virtual_network_rules: VirtualNetworkRules operations
:vartype virtual_network_rules: azure.mgmt.rdbms.mysql.operations.VirtualNetworkRulesOperations
:ivar databases: Databases operations
:vartype databases: azure.mgmt.rdbms.mysql.operations.DatabasesOperations
:ivar configurations: Configurations operations
Expand All @@ -93,7 +96,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = MySQLManagementClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(MySQLManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2017-12-01'
Expand All @@ -104,6 +107,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.firewall_rules = FirewallRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_network_rules = VirtualNetworkRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.databases = DatabasesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.configurations = ConfigurationsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from .servers_operations import ServersOperations
from .firewall_rules_operations import FirewallRulesOperations
from .virtual_network_rules_operations import VirtualNetworkRulesOperations
from .databases_operations import DatabasesOperations
from .configurations_operations import ConfigurationsOperations
from .log_files_operations import LogFilesOperations
Expand All @@ -21,6 +22,7 @@
__all__ = [
'ServersOperations',
'FirewallRulesOperations',
'VirtualNetworkRulesOperations',
'DatabasesOperations',
'ConfigurationsOperations',
'LogFilesOperations',
Expand Down
Loading

0 comments on commit bddfd35

Please sign in to comment.