Skip to content

Commit 5691267

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR] mariadb/resource-manager (#3332)
* [AutoPR mariadb/resource-manager] Add mariadb swagger spec (#3257) * Generated from d76559bb32dbc6be98d3f9cc774377be21694188 Add mariadb swagger spec * Generated from 74e04a40cc63c0e6634cce5256bc660b8986132e Fix readme and set properties * Packaging update of azure-mgmt-rdbms * Update version.py
1 parent f9a85de commit 5691267

File tree

70 files changed

+5163
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+5163
-9
lines changed

azure-mgmt-rdbms/README.rst

+3-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Microsoft Azure RDBMS Management Client Library.
66
Azure Resource Manager (ARM) is the next generation of management APIs that
77
replace the old Azure Service Management (ASM).
88

9-
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
9+
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
1010

1111
For the older Azure Service Management (ASM) libraries, see
1212
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
@@ -36,12 +36,8 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
3636
Usage
3737
=====
3838

39-
For code examples, see `PostgreSQL
40-
<https://docs.microsoft.com/python/api/overview/azure/postgresql>`__
41-
on docs.microsoft.com.
42-
43-
For code examples, see `MySQL
44-
<https://docs.microsoft.com/python/api/overview/azure/mysql>`__
39+
For code examples, see `RDBMS Management
40+
<https://docs.microsoft.com/python/api/overview/azure/>`__
4541
on docs.microsoft.com.
4642

4743

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .maria_db_management_client import MariaDBManagementClient
13+
from .version import VERSION
14+
15+
__all__ = ['MariaDBManagementClient']
16+
17+
__version__ = VERSION
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
from msrestazure import AzureConfiguration
15+
from .version import VERSION
16+
from .operations.servers_operations import ServersOperations
17+
from .operations.firewall_rules_operations import FirewallRulesOperations
18+
from .operations.databases_operations import DatabasesOperations
19+
from .operations.configurations_operations import ConfigurationsOperations
20+
from .operations.log_files_operations import LogFilesOperations
21+
from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations
22+
from .operations.check_name_availability_operations import CheckNameAvailabilityOperations
23+
from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations
24+
from .operations.operations import Operations
25+
from . import models
26+
27+
28+
class MariaDBManagementClientConfiguration(AzureConfiguration):
29+
"""Configuration for MariaDBManagementClient
30+
Note that all parameters used to create this instance are saved as instance
31+
attributes.
32+
33+
:param credentials: Credentials needed for the client to connect to Azure.
34+
:type credentials: :mod:`A msrestazure Credentials
35+
object<msrestazure.azure_active_directory>`
36+
:param subscription_id: The subscription ID that identifies an Azure
37+
subscription.
38+
:type subscription_id: str
39+
:param str base_url: Service URL
40+
"""
41+
42+
def __init__(
43+
self, credentials, subscription_id, base_url=None):
44+
45+
if credentials is None:
46+
raise ValueError("Parameter 'credentials' must not be None.")
47+
if subscription_id is None:
48+
raise ValueError("Parameter 'subscription_id' must not be None.")
49+
if not base_url:
50+
base_url = 'https://management.azure.com'
51+
52+
super(MariaDBManagementClientConfiguration, self).__init__(base_url)
53+
54+
self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION))
55+
self.add_user_agent('Azure-SDK-For-Python')
56+
57+
self.credentials = credentials
58+
self.subscription_id = subscription_id
59+
60+
61+
class MariaDBManagementClient(SDKClient):
62+
"""MariaDB Client
63+
64+
:ivar config: Configuration for client.
65+
:vartype config: MariaDBManagementClientConfiguration
66+
67+
:ivar servers: Servers operations
68+
:vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations
69+
:ivar firewall_rules: FirewallRules operations
70+
:vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations
71+
:ivar databases: Databases operations
72+
:vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations
73+
:ivar configurations: Configurations operations
74+
:vartype configurations: azure.mgmt.rdbms.mariadb.operations.ConfigurationsOperations
75+
:ivar log_files: LogFiles operations
76+
:vartype log_files: azure.mgmt.rdbms.mariadb.operations.LogFilesOperations
77+
:ivar location_based_performance_tier: LocationBasedPerformanceTier operations
78+
:vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.LocationBasedPerformanceTierOperations
79+
:ivar check_name_availability: CheckNameAvailability operations
80+
:vartype check_name_availability: azure.mgmt.rdbms.mariadb.operations.CheckNameAvailabilityOperations
81+
:ivar server_security_alert_policies: ServerSecurityAlertPolicies operations
82+
:vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.operations.ServerSecurityAlertPoliciesOperations
83+
:ivar operations: Operations operations
84+
:vartype operations: azure.mgmt.rdbms.mariadb.operations.Operations
85+
86+
:param credentials: Credentials needed for the client to connect to Azure.
87+
:type credentials: :mod:`A msrestazure Credentials
88+
object<msrestazure.azure_active_directory>`
89+
:param subscription_id: The subscription ID that identifies an Azure
90+
subscription.
91+
:type subscription_id: str
92+
:param str base_url: Service URL
93+
"""
94+
95+
def __init__(
96+
self, credentials, subscription_id, base_url=None):
97+
98+
self.config = MariaDBManagementClientConfiguration(credentials, subscription_id, base_url)
99+
super(MariaDBManagementClient, self).__init__(self.config.credentials, self.config)
100+
101+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
102+
self.api_version = '2018-06-01-preview'
103+
self._serialize = Serializer(client_models)
104+
self._deserialize = Deserializer(client_models)
105+
106+
self.servers = ServersOperations(
107+
self._client, self.config, self._serialize, self._deserialize)
108+
self.firewall_rules = FirewallRulesOperations(
109+
self._client, self.config, self._serialize, self._deserialize)
110+
self.databases = DatabasesOperations(
111+
self._client, self.config, self._serialize, self._deserialize)
112+
self.configurations = ConfigurationsOperations(
113+
self._client, self.config, self._serialize, self._deserialize)
114+
self.log_files = LogFilesOperations(
115+
self._client, self.config, self._serialize, self._deserialize)
116+
self.location_based_performance_tier = LocationBasedPerformanceTierOperations(
117+
self._client, self.config, self._serialize, self._deserialize)
118+
self.check_name_availability = CheckNameAvailabilityOperations(
119+
self._client, self.config, self._serialize, self._deserialize)
120+
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
121+
self._client, self.config, self._serialize, self._deserialize)
122+
self.operations = Operations(
123+
self._client, self.config, self._serialize, self._deserialize)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
try:
13+
from .proxy_resource_py3 import ProxyResource
14+
from .tracked_resource_py3 import TrackedResource
15+
from .storage_profile_py3 import StorageProfile
16+
from .server_properties_for_create_py3 import ServerPropertiesForCreate
17+
from .server_properties_for_default_create_py3 import ServerPropertiesForDefaultCreate
18+
from .server_properties_for_restore_py3 import ServerPropertiesForRestore
19+
from .server_properties_for_geo_restore_py3 import ServerPropertiesForGeoRestore
20+
from .sku_py3 import Sku
21+
from .server_py3 import Server
22+
from .server_for_create_py3 import ServerForCreate
23+
from .server_update_parameters_py3 import ServerUpdateParameters
24+
from .firewall_rule_py3 import FirewallRule
25+
from .database_py3 import Database
26+
from .configuration_py3 import Configuration
27+
from .operation_display_py3 import OperationDisplay
28+
from .operation_py3 import Operation
29+
from .operation_list_result_py3 import OperationListResult
30+
from .log_file_py3 import LogFile
31+
from .performance_tier_service_level_objectives_py3 import PerformanceTierServiceLevelObjectives
32+
from .performance_tier_properties_py3 import PerformanceTierProperties
33+
from .name_availability_request_py3 import NameAvailabilityRequest
34+
from .name_availability_py3 import NameAvailability
35+
from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy
36+
except (SyntaxError, ImportError):
37+
from .proxy_resource import ProxyResource
38+
from .tracked_resource import TrackedResource
39+
from .storage_profile import StorageProfile
40+
from .server_properties_for_create import ServerPropertiesForCreate
41+
from .server_properties_for_default_create import ServerPropertiesForDefaultCreate
42+
from .server_properties_for_restore import ServerPropertiesForRestore
43+
from .server_properties_for_geo_restore import ServerPropertiesForGeoRestore
44+
from .sku import Sku
45+
from .server import Server
46+
from .server_for_create import ServerForCreate
47+
from .server_update_parameters import ServerUpdateParameters
48+
from .firewall_rule import FirewallRule
49+
from .database import Database
50+
from .configuration import Configuration
51+
from .operation_display import OperationDisplay
52+
from .operation import Operation
53+
from .operation_list_result import OperationListResult
54+
from .log_file import LogFile
55+
from .performance_tier_service_level_objectives import PerformanceTierServiceLevelObjectives
56+
from .performance_tier_properties import PerformanceTierProperties
57+
from .name_availability_request import NameAvailabilityRequest
58+
from .name_availability import NameAvailability
59+
from .server_security_alert_policy import ServerSecurityAlertPolicy
60+
from .server_paged import ServerPaged
61+
from .firewall_rule_paged import FirewallRulePaged
62+
from .database_paged import DatabasePaged
63+
from .configuration_paged import ConfigurationPaged
64+
from .log_file_paged import LogFilePaged
65+
from .performance_tier_properties_paged import PerformanceTierPropertiesPaged
66+
from .maria_db_management_client_enums import (
67+
ServerVersion,
68+
SslEnforcementEnum,
69+
ServerState,
70+
GeoRedundantBackup,
71+
SkuTier,
72+
OperationOrigin,
73+
ServerSecurityAlertPolicyState,
74+
)
75+
76+
__all__ = [
77+
'ProxyResource',
78+
'TrackedResource',
79+
'StorageProfile',
80+
'ServerPropertiesForCreate',
81+
'ServerPropertiesForDefaultCreate',
82+
'ServerPropertiesForRestore',
83+
'ServerPropertiesForGeoRestore',
84+
'Sku',
85+
'Server',
86+
'ServerForCreate',
87+
'ServerUpdateParameters',
88+
'FirewallRule',
89+
'Database',
90+
'Configuration',
91+
'OperationDisplay',
92+
'Operation',
93+
'OperationListResult',
94+
'LogFile',
95+
'PerformanceTierServiceLevelObjectives',
96+
'PerformanceTierProperties',
97+
'NameAvailabilityRequest',
98+
'NameAvailability',
99+
'ServerSecurityAlertPolicy',
100+
'ServerPaged',
101+
'FirewallRulePaged',
102+
'DatabasePaged',
103+
'ConfigurationPaged',
104+
'LogFilePaged',
105+
'PerformanceTierPropertiesPaged',
106+
'ServerVersion',
107+
'SslEnforcementEnum',
108+
'ServerState',
109+
'GeoRedundantBackup',
110+
'SkuTier',
111+
'OperationOrigin',
112+
'ServerSecurityAlertPolicyState',
113+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .proxy_resource import ProxyResource
13+
14+
15+
class Configuration(ProxyResource):
16+
"""Represents a Configuration.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource ID
22+
:vartype id: str
23+
:ivar name: Resource name.
24+
:vartype name: str
25+
:ivar type: Resource type.
26+
:vartype type: str
27+
:param value: Value of the configuration.
28+
:type value: str
29+
:ivar description: Description of the configuration.
30+
:vartype description: str
31+
:ivar default_value: Default value of the configuration.
32+
:vartype default_value: str
33+
:ivar data_type: Data type of the configuration.
34+
:vartype data_type: str
35+
:ivar allowed_values: Allowed values of the configuration.
36+
:vartype allowed_values: str
37+
:param source: Source of the configuration.
38+
:type source: str
39+
"""
40+
41+
_validation = {
42+
'id': {'readonly': True},
43+
'name': {'readonly': True},
44+
'type': {'readonly': True},
45+
'description': {'readonly': True},
46+
'default_value': {'readonly': True},
47+
'data_type': {'readonly': True},
48+
'allowed_values': {'readonly': True},
49+
}
50+
51+
_attribute_map = {
52+
'id': {'key': 'id', 'type': 'str'},
53+
'name': {'key': 'name', 'type': 'str'},
54+
'type': {'key': 'type', 'type': 'str'},
55+
'value': {'key': 'properties.value', 'type': 'str'},
56+
'description': {'key': 'properties.description', 'type': 'str'},
57+
'default_value': {'key': 'properties.defaultValue', 'type': 'str'},
58+
'data_type': {'key': 'properties.dataType', 'type': 'str'},
59+
'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'},
60+
'source': {'key': 'properties.source', 'type': 'str'},
61+
}
62+
63+
def __init__(self, **kwargs):
64+
super(Configuration, self).__init__(**kwargs)
65+
self.value = kwargs.get('value', None)
66+
self.description = None
67+
self.default_value = None
68+
self.data_type = None
69+
self.allowed_values = None
70+
self.source = kwargs.get('source', None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class ConfigurationPaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`Configuration <azure.mgmt.rdbms.mariadb.models.Configuration>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[Configuration]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(ConfigurationPaged, self).__init__(*args, **kwargs)

0 commit comments

Comments
 (0)