Skip to content
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
20 changes: 15 additions & 5 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 @@ -26,7 +26,6 @@
from .operations import ElasticPoolsOperations
from .operations import RecommendedElasticPoolsOperations
from .operations import ReplicationLinksOperations
from .operations import ServerAzureADAdministratorsOperations
from .operations import ServerCommunicationLinksOperations
from .operations import ServiceObjectivesOperations
from .operations import ElasticPoolActivitiesOperations
Expand Down Expand Up @@ -99,6 +98,9 @@
from .operations import ManagedDatabasesOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
from .operations import ServerAzureADAdministratorsOperations
from .operations import WorkloadGroupsOperations
from .operations import WorkloadClassifiersOperations
from . import models


Expand Down Expand Up @@ -134,8 +136,6 @@ class SqlManagementClient(SDKClient):
:vartype recommended_elastic_pools: azure.mgmt.sql.operations.RecommendedElasticPoolsOperations
:ivar replication_links: ReplicationLinks operations
:vartype replication_links: azure.mgmt.sql.operations.ReplicationLinksOperations
:ivar server_azure_ad_administrators: ServerAzureADAdministrators operations
:vartype server_azure_ad_administrators: azure.mgmt.sql.operations.ServerAzureADAdministratorsOperations
:ivar server_communication_links: ServerCommunicationLinks operations
:vartype server_communication_links: azure.mgmt.sql.operations.ServerCommunicationLinksOperations
:ivar service_objectives: ServiceObjectives operations
Expand Down Expand Up @@ -280,6 +280,12 @@ 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 server_azure_ad_administrators: ServerAzureADAdministrators operations
:vartype server_azure_ad_administrators: azure.mgmt.sql.operations.ServerAzureADAdministratorsOperations
: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 @@ -326,8 +332,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.replication_links = ReplicationLinksOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_azure_ad_administrators = ServerAzureADAdministratorsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_communication_links = ServerCommunicationLinksOperations(
self._client, self.config, self._serialize, self._deserialize)
self.service_objectives = ServiceObjectivesOperations(
Expand Down Expand Up @@ -472,3 +476,9 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_azure_ad_administrators = ServerAzureADAdministratorsOperations(
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)
12 changes: 11 additions & 1 deletion 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 @@ -655,6 +661,8 @@
'VulnerabilityAssessmentRecurringScansProperties',
'VulnerabilityAssessmentScanError',
'VulnerabilityAssessmentScanRecord',
'WorkloadClassifier',
'WorkloadGroup',
'RecoverableDatabasePaged',
'RestorableDroppedDatabasePaged',
'ServerPaged',
Expand All @@ -668,7 +676,6 @@
'RecommendedElasticPoolPaged',
'RecommendedElasticPoolMetricPaged',
'ReplicationLinkPaged',
'ServerAzureADAdministratorPaged',
'ServerCommunicationLinkPaged',
'ServiceObjectivePaged',
'ElasticPoolActivityPaged',
Expand Down Expand Up @@ -727,6 +734,9 @@
'ManagedDatabasePaged',
'PrivateEndpointConnectionPaged',
'PrivateLinkResourcePaged',
'ServerAzureADAdministratorPaged',
'WorkloadGroupPaged',
'WorkloadClassifierPaged',
'CheckNameAvailabilityReason',
'ServerConnectionType',
'SecurityAlertPolicyState',
Expand Down
135 changes: 127 additions & 8 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7123,7 +7123,7 @@ def __init__(self, **kwargs):


class ServerAzureADAdministrator(ProxyResource):
"""An server Active Directory Administrator.
"""Azure Active Directory administrator.

Variables are only populated by the server, and will be ignored when
sending a request.
Expand All @@ -7136,15 +7136,14 @@ class ServerAzureADAdministrator(ProxyResource):
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar administrator_type: Required. The type of administrator. Default
value: "ActiveDirectory" .
:ivar administrator_type: Required. Type of the sever administrator.
Default value: "ActiveDirectory" .
:vartype administrator_type: str
:param login: Required. The server administrator login value.
:param login: Required. Login name of the server administrator.
:type login: str
:param sid: Required. The server administrator Sid (Secure ID).
:param sid: Required. SID (object ID) of the server administrator.
:type sid: str
:param tenant_id: Required. The server Active Directory Administrator
tenant id.
:param tenant_id: Tenant ID of the administrator.
:type tenant_id: str
"""

Expand All @@ -7155,7 +7154,6 @@ class ServerAzureADAdministrator(ProxyResource):
'administrator_type': {'required': True, 'constant': True},
'login': {'required': True},
'sid': {'required': True},
'tenant_id': {'required': True},
}

_attribute_map = {
Expand Down Expand Up @@ -9247,3 +9245,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)
Loading