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

[AutoPR azure-mgmt-sql] [Hub Generated] Review request for Microsoft.Sql to add version preview/2019-06-01-preview #38

Open
wants to merge 1 commit into
base: sdkAutomation/azure-mgmt-sql
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
from .operations import ManagedDatabasesOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
from .operations import WorkloadGroupsOperations
from .operations import WorkloadClassifiersOperations
from . import models


Expand Down Expand Up @@ -280,6 +282,10 @@ class SqlManagementClient(SDKClient):
:vartype private_endpoint_connections: azure.mgmt.sql.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResources operations
:vartype private_link_resources: azure.mgmt.sql.operations.PrivateLinkResourcesOperations
:ivar workload_groups: WorkloadGroups operations
:vartype workload_groups: azure.mgmt.sql.operations.WorkloadGroupsOperations
:ivar workload_classifiers: WorkloadClassifiers operations
:vartype workload_classifiers: azure.mgmt.sql.operations.WorkloadClassifiersOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -472,3 +478,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.workload_groups = WorkloadGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.workload_classifiers = WorkloadClassifiersOperations(
self._client, self.config, self._serialize, self._deserialize)
10 changes: 10 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
from ._models_py3 import VulnerabilityAssessmentRecurringScansProperties
from ._models_py3 import VulnerabilityAssessmentScanError
from ._models_py3 import VulnerabilityAssessmentScanRecord
from ._models_py3 import WorkloadClassifier
from ._models_py3 import WorkloadGroup
except (SyntaxError, ImportError):
from ._models import AutomaticTuningOptions
from ._models import AutomaticTuningServerOptions
Expand Down Expand Up @@ -335,6 +337,8 @@
from ._models import VulnerabilityAssessmentRecurringScansProperties
from ._models import VulnerabilityAssessmentScanError
from ._models import VulnerabilityAssessmentScanRecord
from ._models import WorkloadClassifier
from ._models import WorkloadGroup
from ._paged_models import BackupShortTermRetentionPolicyPaged
from ._paged_models import DatabaseBlobAuditingPolicyPaged
from ._paged_models import DatabaseOperationPaged
Expand Down Expand Up @@ -407,6 +411,8 @@
from ._paged_models import VirtualClusterPaged
from ._paged_models import VirtualNetworkRulePaged
from ._paged_models import VulnerabilityAssessmentScanRecordPaged
from ._paged_models import WorkloadClassifierPaged
from ._paged_models import WorkloadGroupPaged
from ._sql_management_client_enums import (
CheckNameAvailabilityReason,
ServerConnectionType,
Expand Down Expand Up @@ -654,6 +660,8 @@
'VulnerabilityAssessmentRecurringScansProperties',
'VulnerabilityAssessmentScanError',
'VulnerabilityAssessmentScanRecord',
'WorkloadClassifier',
'WorkloadGroup',
'RecoverableDatabasePaged',
'RestorableDroppedDatabasePaged',
'ServerPaged',
Expand Down Expand Up @@ -726,6 +734,8 @@
'ManagedDatabasePaged',
'PrivateEndpointConnectionPaged',
'PrivateLinkResourcePaged',
'WorkloadGroupPaged',
'WorkloadClassifierPaged',
'CheckNameAvailabilityReason',
'ServerConnectionType',
'SecurityAlertPolicyState',
Expand Down
121 changes: 121 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9219,3 +9219,124 @@ def __init__(self, **kwargs):
self.errors = None
self.storage_container_path = None
self.number_of_failed_security_checks = None


class WorkloadClassifier(ProxyResource):
"""Workload classifier operations for a data warehouse.

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 member_name: Required. The workload classifier member name.
:type member_name: str
:param label: The workload classifier label.
:type label: str
:param context: The workload classifier context.
:type context: str
:param start_time: The workload classifier start time for classification.
:type start_time: str
:param end_time: The workload classifier end time for classification.
:type end_time: str
:param importance: The workload classifier importance.
:type importance: str
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'member_name': {'key': 'properties.memberName', 'type': 'str'},
'label': {'key': 'properties.label', 'type': 'str'},
'context': {'key': 'properties.context', 'type': 'str'},
'start_time': {'key': 'properties.startTime', 'type': 'str'},
'end_time': {'key': 'properties.endTime', 'type': 'str'},
'importance': {'key': 'properties.importance', 'type': 'str'},
}

def __init__(self, **kwargs):
super(WorkloadClassifier, self).__init__(**kwargs)
self.member_name = kwargs.get('member_name', None)
self.label = kwargs.get('label', None)
self.context = kwargs.get('context', None)
self.start_time = kwargs.get('start_time', None)
self.end_time = kwargs.get('end_time', None)
self.importance = kwargs.get('importance', None)


class WorkloadGroup(ProxyResource):
"""Workload group operations for a data warehouse.

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 min_resource_percent: Required. The workload group minimum
percentage resource.
:type min_resource_percent: int
:param max_resource_percent: Required. The workload group cap percentage
resource.
:type max_resource_percent: int
:param min_resource_percent_per_request: Required. The workload group
request minimum grant percentage.
:type min_resource_percent_per_request: float
:param max_resource_percent_per_request: The workload group request
maximum grant percentage.
:type max_resource_percent_per_request: float
:param importance: The workload group importance level.
:type importance: str
:param query_execution_timeout: The workload group query execution
timeout.
:type query_execution_timeout: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'min_resource_percent': {'required': True},
'max_resource_percent': {'required': True},
'min_resource_percent_per_request': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'min_resource_percent': {'key': 'properties.minResourcePercent', 'type': 'int'},
'max_resource_percent': {'key': 'properties.maxResourcePercent', 'type': 'int'},
'min_resource_percent_per_request': {'key': 'properties.minResourcePercentPerRequest', 'type': 'float'},
'max_resource_percent_per_request': {'key': 'properties.maxResourcePercentPerRequest', 'type': 'float'},
'importance': {'key': 'properties.importance', 'type': 'str'},
'query_execution_timeout': {'key': 'properties.queryExecutionTimeout', 'type': 'int'},
}

def __init__(self, **kwargs):
super(WorkloadGroup, self).__init__(**kwargs)
self.min_resource_percent = kwargs.get('min_resource_percent', None)
self.max_resource_percent = kwargs.get('max_resource_percent', None)
self.min_resource_percent_per_request = kwargs.get('min_resource_percent_per_request', None)
self.max_resource_percent_per_request = kwargs.get('max_resource_percent_per_request', None)
self.importance = kwargs.get('importance', None)
self.query_execution_timeout = kwargs.get('query_execution_timeout', None)
121 changes: 121 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9219,3 +9219,124 @@ def __init__(self, **kwargs) -> None:
self.errors = None
self.storage_container_path = None
self.number_of_failed_security_checks = None


class WorkloadClassifier(ProxyResource):
"""Workload classifier operations for a data warehouse.

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 member_name: Required. The workload classifier member name.
:type member_name: str
:param label: The workload classifier label.
:type label: str
:param context: The workload classifier context.
:type context: str
:param start_time: The workload classifier start time for classification.
:type start_time: str
:param end_time: The workload classifier end time for classification.
:type end_time: str
:param importance: The workload classifier importance.
:type importance: str
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'member_name': {'key': 'properties.memberName', 'type': 'str'},
'label': {'key': 'properties.label', 'type': 'str'},
'context': {'key': 'properties.context', 'type': 'str'},
'start_time': {'key': 'properties.startTime', 'type': 'str'},
'end_time': {'key': 'properties.endTime', 'type': 'str'},
'importance': {'key': 'properties.importance', 'type': 'str'},
}

def __init__(self, *, member_name: str, label: str=None, context: str=None, start_time: str=None, end_time: str=None, importance: str=None, **kwargs) -> None:
super(WorkloadClassifier, self).__init__(**kwargs)
self.member_name = member_name
self.label = label
self.context = context
self.start_time = start_time
self.end_time = end_time
self.importance = importance


class WorkloadGroup(ProxyResource):
"""Workload group operations for a data warehouse.

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 min_resource_percent: Required. The workload group minimum
percentage resource.
:type min_resource_percent: int
:param max_resource_percent: Required. The workload group cap percentage
resource.
:type max_resource_percent: int
:param min_resource_percent_per_request: Required. The workload group
request minimum grant percentage.
:type min_resource_percent_per_request: float
:param max_resource_percent_per_request: The workload group request
maximum grant percentage.
:type max_resource_percent_per_request: float
:param importance: The workload group importance level.
:type importance: str
:param query_execution_timeout: The workload group query execution
timeout.
:type query_execution_timeout: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'min_resource_percent': {'required': True},
'max_resource_percent': {'required': True},
'min_resource_percent_per_request': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'min_resource_percent': {'key': 'properties.minResourcePercent', 'type': 'int'},
'max_resource_percent': {'key': 'properties.maxResourcePercent', 'type': 'int'},
'min_resource_percent_per_request': {'key': 'properties.minResourcePercentPerRequest', 'type': 'float'},
'max_resource_percent_per_request': {'key': 'properties.maxResourcePercentPerRequest', 'type': 'float'},
'importance': {'key': 'properties.importance', 'type': 'str'},
'query_execution_timeout': {'key': 'properties.queryExecutionTimeout', 'type': 'int'},
}

def __init__(self, *, min_resource_percent: int, max_resource_percent: int, min_resource_percent_per_request: float, max_resource_percent_per_request: float=None, importance: str=None, query_execution_timeout: int=None, **kwargs) -> None:
super(WorkloadGroup, self).__init__(**kwargs)
self.min_resource_percent = min_resource_percent
self.max_resource_percent = max_resource_percent
self.min_resource_percent_per_request = min_resource_percent_per_request
self.max_resource_percent_per_request = max_resource_percent_per_request
self.importance = importance
self.query_execution_timeout = query_execution_timeout
26 changes: 26 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,3 +948,29 @@ class PrivateLinkResourcePaged(Paged):
def __init__(self, *args, **kwargs):

super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs)
class WorkloadGroupPaged(Paged):
"""
A paging container for iterating over a list of :class:`WorkloadGroup <azure.mgmt.sql.models.WorkloadGroup>` object
"""

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

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

super(WorkloadGroupPaged, self).__init__(*args, **kwargs)
class WorkloadClassifierPaged(Paged):
"""
A paging container for iterating over a list of :class:`WorkloadClassifier <azure.mgmt.sql.models.WorkloadClassifier>` object
"""

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

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

super(WorkloadClassifierPaged, self).__init__(*args, **kwargs)
4 changes: 4 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
from ._managed_databases_operations import ManagedDatabasesOperations
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
from ._private_link_resources_operations import PrivateLinkResourcesOperations
from ._workload_groups_operations import WorkloadGroupsOperations
from ._workload_classifiers_operations import WorkloadClassifiersOperations

__all__ = [
'RecoverableDatabasesOperations',
Expand Down Expand Up @@ -183,4 +185,6 @@
'ManagedDatabasesOperations',
'PrivateEndpointConnectionsOperations',
'PrivateLinkResourcesOperations',
'WorkloadGroupsOperations',
'WorkloadClassifiersOperations',
]
Loading