Skip to content

[AutoPR mariadb/resource-manager] Add Vnet resource for Microsoft.DBforMariaDB #3696

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

Merged
merged 1 commit into from
Oct 26, 2018
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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 @@ -68,6 +69,8 @@ class MariaDBManagementClient(SDKClient):
:vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations
:ivar firewall_rules: FirewallRules operations
:vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations
:ivar virtual_network_rules: VirtualNetworkRules operations
:vartype virtual_network_rules: azure.mgmt.rdbms.mariadb.operations.VirtualNetworkRulesOperations
:ivar databases: Databases operations
:vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations
:ivar configurations: Configurations operations
Expand Down Expand Up @@ -107,6 +110,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
7 changes: 7 additions & 0 deletions azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/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 @@ -46,6 +47,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 @@ -59,6 +61,7 @@
from .server_security_alert_policy import ServerSecurityAlertPolicy
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 @@ -69,6 +72,7 @@
ServerState,
GeoRedundantBackup,
SkuTier,
VirtualNetworkRuleState,
OperationOrigin,
ServerSecurityAlertPolicyState,
)
Expand All @@ -86,6 +90,7 @@
'ServerForCreate',
'ServerUpdateParameters',
'FirewallRule',
'VirtualNetworkRule',
'Database',
'Configuration',
'OperationDisplay',
Expand All @@ -99,6 +104,7 @@
'ServerSecurityAlertPolicy',
'ServerPaged',
'FirewallRulePaged',
'VirtualNetworkRulePaged',
'DatabasePaged',
'ConfigurationPaged',
'LogFilePaged',
Expand All @@ -108,6 +114,7 @@
'ServerState',
'GeoRedundantBackup',
'SkuTier',
'VirtualNetworkRuleState',
'OperationOrigin',
'ServerSecurityAlertPolicyState',
]
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
@@ -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.mariadb.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.mariadb.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.mariadb.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 @@ -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 @@ -22,6 +23,7 @@
__all__ = [
'ServersOperations',
'FirewallRulesOperations',
'VirtualNetworkRulesOperations',
'DatabasesOperations',
'ConfigurationsOperations',
'LogFilesOperations',
Expand Down
Loading