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

[ReleasePR track2_azure-mgmt-rdbms] Add optional param - private DNS zone to server API #18094

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
1 change: 1 addition & 0 deletions sdk/rdbms/azure-mgmt-rdbms/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/rdbms/azure-mgmt-rdbms/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "b39d3318a9cba7203da3d56e4cdc69a7e14d3912",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/postgresqlhsc/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/postgresqlhsc/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 ._configuration import MicrosoftPostgreSQLHyperscaleConfiguration
from ._microsoft_postgre_sql_hyperscale import MicrosoftPostgreSQLHyperscale
__all__ = ['MicrosoftPostgreSQLHyperscale', 'MicrosoftPostgreSQLHyperscaleConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 msrestazure import AzureConfiguration

from .version import VERSION


class MicrosoftPostgreSQLHyperscaleConfiguration(AzureConfiguration):
"""Configuration for MicrosoftPostgreSQLHyperscale
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(MicrosoftPostgreSQLHyperscaleConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import MicrosoftPostgreSQLHyperscaleConfiguration
from .operations import ServerGroupsOperations
from .operations import ServersOperations
from .operations import ConfigurationsOperations
from .operations import FirewallRulesOperations
from .operations import RolesOperations
from .operations import Operations
from . import models


class MicrosoftPostgreSQLHyperscale(SDKClient):
"""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.

:ivar config: Configuration for client.
:vartype config: MicrosoftPostgreSQLHyperscaleConfiguration

:ivar server_groups: ServerGroups operations
:vartype server_groups: azure.mgmt.rdbms.postgresqlhsc.operations.ServerGroupsOperations
:ivar servers: Servers operations
:vartype servers: azure.mgmt.rdbms.postgresqlhsc.operations.ServersOperations
:ivar configurations: Configurations operations
:vartype configurations: azure.mgmt.rdbms.postgresqlhsc.operations.ConfigurationsOperations
:ivar firewall_rules: FirewallRules operations
:vartype firewall_rules: azure.mgmt.rdbms.postgresqlhsc.operations.FirewallRulesOperations
:ivar roles: Roles operations
:vartype roles: azure.mgmt.rdbms.postgresqlhsc.operations.RolesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.rdbms.postgresqlhsc.operations.Operations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = MicrosoftPostgreSQLHyperscaleConfiguration(credentials, subscription_id, base_url)
super(MicrosoftPostgreSQLHyperscale, 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 = '2020-10-05-privatepreview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.server_groups = ServerGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.servers = ServersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.configurations = ConfigurationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.firewall_rules = FirewallRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.roles = RolesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# 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.
# --------------------------------------------------------------------------

try:
from ._models_py3 import AzureEntityResource
from ._models_py3 import FirewallRule
from ._models_py3 import MaintenanceWindow
from ._models_py3 import NameAvailability
from ._models_py3 import NameAvailabilityRequest
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import Role
from ._models_py3 import ServerConfiguration
from ._models_py3 import ServerGroup
from ._models_py3 import ServerGroupConfiguration
from ._models_py3 import ServerGroupForUpdate
from ._models_py3 import ServerGroupPropertiesDelegatedSubnetArguments
from ._models_py3 import ServerGroupPropertiesPrivateDnsZoneArguments
from ._models_py3 import ServerGroupServer
from ._models_py3 import ServerNameItem
from ._models_py3 import ServerProperties
from ._models_py3 import ServerRoleGroup
from ._models_py3 import ServerRoleGroupConfiguration
from ._models_py3 import SystemData
from ._models_py3 import TrackedResource
except (SyntaxError, ImportError):
from ._models import AzureEntityResource
from ._models import FirewallRule
from ._models import MaintenanceWindow
from ._models import NameAvailability
from ._models import NameAvailabilityRequest
from ._models import Operation
from ._models import OperationDisplay
from ._models import ProxyResource
from ._models import Resource
from ._models import Role
from ._models import ServerConfiguration
from ._models import ServerGroup
from ._models import ServerGroupConfiguration
from ._models import ServerGroupForUpdate
from ._models import ServerGroupPropertiesDelegatedSubnetArguments
from ._models import ServerGroupPropertiesPrivateDnsZoneArguments
from ._models import ServerGroupServer
from ._models import ServerNameItem
from ._models import ServerProperties
from ._models import ServerRoleGroup
from ._models import ServerRoleGroupConfiguration
from ._models import SystemData
from ._models import TrackedResource
from ._paged_models import FirewallRulePaged
from ._paged_models import OperationPaged
from ._paged_models import RolePaged
from ._paged_models import ServerConfigurationPaged
from ._paged_models import ServerGroupConfigurationPaged
from ._paged_models import ServerGroupPaged
from ._paged_models import ServerGroupServerPaged
from ._microsoft_postgre_sql_hyperscale_enums import (
PostgreSQLVersion,
CitusVersion,
ServerState,
ServerHaState,
ServerRole,
ServerEdition,
CreatedByType,
CreateMode,
ResourceProviderType,
ConfigurationDataType,
OperationOrigin,
)

__all__ = [
'AzureEntityResource',
'FirewallRule',
'MaintenanceWindow',
'NameAvailability',
'NameAvailabilityRequest',
'Operation',
'OperationDisplay',
'ProxyResource',
'Resource',
'Role',
'ServerConfiguration',
'ServerGroup',
'ServerGroupConfiguration',
'ServerGroupForUpdate',
'ServerGroupPropertiesDelegatedSubnetArguments',
'ServerGroupPropertiesPrivateDnsZoneArguments',
'ServerGroupServer',
'ServerNameItem',
'ServerProperties',
'ServerRoleGroup',
'ServerRoleGroupConfiguration',
'SystemData',
'TrackedResource',
'ServerGroupPaged',
'ServerGroupServerPaged',
'ServerConfigurationPaged',
'ServerGroupConfigurationPaged',
'FirewallRulePaged',
'RolePaged',
'OperationPaged',
'PostgreSQLVersion',
'CitusVersion',
'ServerState',
'ServerHaState',
'ServerRole',
'ServerEdition',
'CreatedByType',
'CreateMode',
'ResourceProviderType',
'ConfigurationDataType',
'OperationOrigin',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# 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 enum import Enum


class PostgreSQLVersion(str, Enum):

one_one = "11"
one_two = "12"


class CitusVersion(str, Enum):

eight_full_stop_three = "8.3"
nine_full_stop_zero = "9.0"
nine_full_stop_one = "9.1"
nine_full_stop_two = "9.2"
nine_full_stop_three = "9.3"
nine_full_stop_four = "9.4"
nine_full_stop_five = "9.5"


class ServerState(str, Enum):

ready = "Ready"
dropping = "Dropping"
disabled = "Disabled"
starting = "Starting"
stopping = "Stopping"
stopped = "Stopped"
updating = "Updating"
provisioning = "Provisioning"


class ServerHaState(str, Enum):

not_enabled = "NotEnabled"
creating_standby = "CreatingStandby"
replicating_data = "ReplicatingData"
failing_over = "FailingOver"
healthy = "Healthy"
removing_standby = "RemovingStandby"
not_sync = "NotSync"


class ServerRole(str, Enum):

coordinator = "Coordinator"
worker = "Worker"


class ServerEdition(str, Enum):

general_purpose = "GeneralPurpose"
memory_optimized = "MemoryOptimized"


class CreatedByType(str, Enum):

user = "User"
application = "Application"
managed_identity = "ManagedIdentity"
key = "Key"


class CreateMode(str, Enum):

default = "Default"
point_in_time_restore = "PointInTimeRestore"
read_replica = "ReadReplica"


class ResourceProviderType(str, Enum):

meru = "Meru"
marlin = "Marlin"


class ConfigurationDataType(str, Enum):

boolean = "Boolean"
numeric = "Numeric"
integer = "Integer"
enumeration = "Enumeration"


class OperationOrigin(str, Enum):

not_specified = "NotSpecified"
user = "user"
system = "system"
Loading