Skip to content

Commit d26746d

Browse files
author
SDKAuto
committed
CodeGen from PR 12567 in Azure/azure-rest-api-specs
Merge b1d8528007bb0bda962fd43ba2826c87249e794d into a35bdde
1 parent 7477eac commit d26746d

16 files changed

+5066
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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 ._configuration import MicrosoftPostgreSQLHyperscaleConfiguration
13+
from ._microsoft_postgre_sql_hyperscale import MicrosoftPostgreSQLHyperscale
14+
__all__ = ['MicrosoftPostgreSQLHyperscale', 'MicrosoftPostgreSQLHyperscaleConfiguration']
15+
16+
from .version import VERSION
17+
18+
__version__ = VERSION
19+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class MicrosoftPostgreSQLHyperscaleConfiguration(AzureConfiguration):
17+
"""Configuration for MicrosoftPostgreSQLHyperscale
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: The ID of the target subscription.
25+
:type subscription_id: str
26+
:param str base_url: Service URL
27+
"""
28+
29+
def __init__(
30+
self, credentials, subscription_id, base_url=None):
31+
32+
if credentials is None:
33+
raise ValueError("Parameter 'credentials' must not be None.")
34+
if subscription_id is None:
35+
raise ValueError("Parameter 'subscription_id' must not be None.")
36+
if not base_url:
37+
base_url = 'https://management.azure.com'
38+
39+
super(MicrosoftPostgreSQLHyperscaleConfiguration, self).__init__(base_url)
40+
41+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
42+
self.keep_alive = True
43+
44+
self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION))
45+
self.add_user_agent('Azure-SDK-For-Python')
46+
47+
self.credentials = credentials
48+
self.subscription_id = subscription_id
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
15+
from ._configuration import MicrosoftPostgreSQLHyperscaleConfiguration
16+
from .operations import ServerGroupsOperations
17+
from .operations import ServersOperations
18+
from .operations import ConfigurationsOperations
19+
from .operations import FirewallRulesOperations
20+
from .operations import RolesOperations
21+
from .operations import Operations
22+
from . import models
23+
24+
25+
class MicrosoftPostgreSQLHyperscale(SDKClient):
26+
"""The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL Hyperscale (Citus) resources including server groups, servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations.
27+
28+
:ivar config: Configuration for client.
29+
:vartype config: MicrosoftPostgreSQLHyperscaleConfiguration
30+
31+
:ivar server_groups: ServerGroups operations
32+
:vartype server_groups: azure.mgmt.rdbms.postgresqlhsc.operations.ServerGroupsOperations
33+
:ivar servers: Servers operations
34+
:vartype servers: azure.mgmt.rdbms.postgresqlhsc.operations.ServersOperations
35+
:ivar configurations: Configurations operations
36+
:vartype configurations: azure.mgmt.rdbms.postgresqlhsc.operations.ConfigurationsOperations
37+
:ivar firewall_rules: FirewallRules operations
38+
:vartype firewall_rules: azure.mgmt.rdbms.postgresqlhsc.operations.FirewallRulesOperations
39+
:ivar roles: Roles operations
40+
:vartype roles: azure.mgmt.rdbms.postgresqlhsc.operations.RolesOperations
41+
:ivar operations: Operations operations
42+
:vartype operations: azure.mgmt.rdbms.postgresqlhsc.operations.Operations
43+
44+
:param credentials: Credentials needed for the client to connect to Azure.
45+
:type credentials: :mod:`A msrestazure Credentials
46+
object<msrestazure.azure_active_directory>`
47+
:param subscription_id: The ID of the target subscription.
48+
:type subscription_id: str
49+
:param str base_url: Service URL
50+
"""
51+
52+
def __init__(
53+
self, credentials, subscription_id, base_url=None):
54+
55+
self.config = MicrosoftPostgreSQLHyperscaleConfiguration(credentials, subscription_id, base_url)
56+
super(MicrosoftPostgreSQLHyperscale, self).__init__(self.config.credentials, self.config)
57+
58+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
59+
self.api_version = '2020-10-05-privatepreview'
60+
self._serialize = Serializer(client_models)
61+
self._deserialize = Deserializer(client_models)
62+
63+
self.server_groups = ServerGroupsOperations(
64+
self._client, self.config, self._serialize, self._deserialize)
65+
self.servers = ServersOperations(
66+
self._client, self.config, self._serialize, self._deserialize)
67+
self.configurations = ConfigurationsOperations(
68+
self._client, self.config, self._serialize, self._deserialize)
69+
self.firewall_rules = FirewallRulesOperations(
70+
self._client, self.config, self._serialize, self._deserialize)
71+
self.roles = RolesOperations(
72+
self._client, self.config, self._serialize, self._deserialize)
73+
self.operations = Operations(
74+
self._client, self.config, self._serialize, self._deserialize)
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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 ._models_py3 import AzureEntityResource
14+
from ._models_py3 import FirewallRule
15+
from ._models_py3 import MaintenanceWindow
16+
from ._models_py3 import NameAvailability
17+
from ._models_py3 import NameAvailabilityRequest
18+
from ._models_py3 import Operation
19+
from ._models_py3 import OperationDisplay
20+
from ._models_py3 import ProxyResource
21+
from ._models_py3 import Resource
22+
from ._models_py3 import Role
23+
from ._models_py3 import ServerConfiguration
24+
from ._models_py3 import ServerGroup
25+
from ._models_py3 import ServerGroupConfiguration
26+
from ._models_py3 import ServerGroupForUpdate
27+
from ._models_py3 import ServerGroupPropertiesDelegatedSubnetArguments
28+
from ._models_py3 import ServerGroupServer
29+
from ._models_py3 import ServerNameItem
30+
from ._models_py3 import ServerProperties
31+
from ._models_py3 import ServerRoleGroup
32+
from ._models_py3 import ServerRoleGroupConfiguration
33+
from ._models_py3 import SystemData
34+
from ._models_py3 import TrackedResource
35+
except (SyntaxError, ImportError):
36+
from ._models import AzureEntityResource
37+
from ._models import FirewallRule
38+
from ._models import MaintenanceWindow
39+
from ._models import NameAvailability
40+
from ._models import NameAvailabilityRequest
41+
from ._models import Operation
42+
from ._models import OperationDisplay
43+
from ._models import ProxyResource
44+
from ._models import Resource
45+
from ._models import Role
46+
from ._models import ServerConfiguration
47+
from ._models import ServerGroup
48+
from ._models import ServerGroupConfiguration
49+
from ._models import ServerGroupForUpdate
50+
from ._models import ServerGroupPropertiesDelegatedSubnetArguments
51+
from ._models import ServerGroupServer
52+
from ._models import ServerNameItem
53+
from ._models import ServerProperties
54+
from ._models import ServerRoleGroup
55+
from ._models import ServerRoleGroupConfiguration
56+
from ._models import SystemData
57+
from ._models import TrackedResource
58+
from ._paged_models import FirewallRulePaged
59+
from ._paged_models import OperationPaged
60+
from ._paged_models import RolePaged
61+
from ._paged_models import ServerConfigurationPaged
62+
from ._paged_models import ServerGroupConfigurationPaged
63+
from ._paged_models import ServerGroupPaged
64+
from ._paged_models import ServerGroupServerPaged
65+
from ._microsoft_postgre_sql_hyperscale_enums import (
66+
PostgreSQLVersion,
67+
CitusVersion,
68+
ServerState,
69+
ServerHaState,
70+
ServerRole,
71+
ServerEdition,
72+
CreatedByType,
73+
CreateMode,
74+
ResourceProviderType,
75+
ConfigurationDataType,
76+
OperationOrigin,
77+
)
78+
79+
__all__ = [
80+
'AzureEntityResource',
81+
'FirewallRule',
82+
'MaintenanceWindow',
83+
'NameAvailability',
84+
'NameAvailabilityRequest',
85+
'Operation',
86+
'OperationDisplay',
87+
'ProxyResource',
88+
'Resource',
89+
'Role',
90+
'ServerConfiguration',
91+
'ServerGroup',
92+
'ServerGroupConfiguration',
93+
'ServerGroupForUpdate',
94+
'ServerGroupPropertiesDelegatedSubnetArguments',
95+
'ServerGroupServer',
96+
'ServerNameItem',
97+
'ServerProperties',
98+
'ServerRoleGroup',
99+
'ServerRoleGroupConfiguration',
100+
'SystemData',
101+
'TrackedResource',
102+
'ServerGroupPaged',
103+
'ServerGroupServerPaged',
104+
'ServerConfigurationPaged',
105+
'ServerGroupConfigurationPaged',
106+
'FirewallRulePaged',
107+
'RolePaged',
108+
'OperationPaged',
109+
'PostgreSQLVersion',
110+
'CitusVersion',
111+
'ServerState',
112+
'ServerHaState',
113+
'ServerRole',
114+
'ServerEdition',
115+
'CreatedByType',
116+
'CreateMode',
117+
'ResourceProviderType',
118+
'ConfigurationDataType',
119+
'OperationOrigin',
120+
]
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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 enum import Enum
13+
14+
15+
class PostgreSQLVersion(str, Enum):
16+
17+
one_one = "11"
18+
one_two = "12"
19+
20+
21+
class CitusVersion(str, Enum):
22+
23+
eight_full_stop_three = "8.3"
24+
nine_full_stop_zero = "9.0"
25+
nine_full_stop_one = "9.1"
26+
nine_full_stop_two = "9.2"
27+
nine_full_stop_three = "9.3"
28+
nine_full_stop_four = "9.4"
29+
nine_full_stop_five = "9.5"
30+
31+
32+
class ServerState(str, Enum):
33+
34+
ready = "Ready"
35+
dropping = "Dropping"
36+
disabled = "Disabled"
37+
starting = "Starting"
38+
stopping = "Stopping"
39+
stopped = "Stopped"
40+
updating = "Updating"
41+
provisioning = "Provisioning"
42+
43+
44+
class ServerHaState(str, Enum):
45+
46+
not_enabled = "NotEnabled"
47+
creating_standby = "CreatingStandby"
48+
replicating_data = "ReplicatingData"
49+
failing_over = "FailingOver"
50+
healthy = "Healthy"
51+
removing_standby = "RemovingStandby"
52+
not_sync = "NotSync"
53+
54+
55+
class ServerRole(str, Enum):
56+
57+
coordinator = "Coordinator"
58+
worker = "Worker"
59+
60+
61+
class ServerEdition(str, Enum):
62+
63+
general_purpose = "GeneralPurpose"
64+
memory_optimized = "MemoryOptimized"
65+
66+
67+
class CreatedByType(str, Enum):
68+
69+
user = "User"
70+
application = "Application"
71+
managed_identity = "ManagedIdentity"
72+
key = "Key"
73+
74+
75+
class CreateMode(str, Enum):
76+
77+
default = "Default"
78+
point_in_time_restore = "PointInTimeRestore"
79+
read_replica = "ReadReplica"
80+
81+
82+
class ResourceProviderType(str, Enum):
83+
84+
meru = "Meru"
85+
marlin = "Marlin"
86+
87+
88+
class ConfigurationDataType(str, Enum):
89+
90+
boolean = "Boolean"
91+
numeric = "Numeric"
92+
integer = "Integer"
93+
enumeration = "Enumeration"
94+
95+
96+
class OperationOrigin(str, Enum):
97+
98+
not_specified = "NotSpecified"
99+
user = "user"
100+
system = "system"

0 commit comments

Comments
 (0)