Skip to content
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
16 changes: 10 additions & 6 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@
from .sync_member import SyncMember
from .subscription_usage import SubscriptionUsage
from .virtual_network_rule import VirtualNetworkRule
from .database_operation import DatabaseOperation
from .resource_move_definition import ResourceMoveDefinition
from .automatic_tuning_server_options import AutomaticTuningServerOptions
from .server_automatic_tuning import ServerAutomaticTuning
from .server_dns_alias import ServerDnsAlias
from .server_dns_alias_acquisition import ServerDnsAliasAcquisition
from .restore_point import RestorePoint
from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition
from .database_operation import DatabaseOperation
from .elastic_pool_operation import ElasticPoolOperation
from .backup_long_term_retention_policy_paged import BackupLongTermRetentionPolicyPaged
from .backup_long_term_retention_vault_paged import BackupLongTermRetentionVaultPaged
from .recoverable_database_paged import RecoverableDatabasePaged
Expand Down Expand Up @@ -137,9 +138,10 @@
from .sync_member_paged import SyncMemberPaged
from .subscription_usage_paged import SubscriptionUsagePaged
from .virtual_network_rule_paged import VirtualNetworkRulePaged
from .database_operation_paged import DatabaseOperationPaged
from .server_dns_alias_paged import ServerDnsAliasPaged
from .restore_point_paged import RestorePointPaged
from .database_operation_paged import DatabaseOperationPaged
from .elastic_pool_operation_paged import ElasticPoolOperationPaged
from .sql_management_client_enums import (
BackupLongTermRetentionPolicyState,
CapabilityStatus,
Expand Down Expand Up @@ -192,10 +194,10 @@
SyncDirection,
SyncMemberState,
VirtualNetworkRuleState,
ManagementOperationState,
AutomaticTuningServerMode,
AutomaticTuningServerReason,
RestorePointType,
ManagementOperationState,
)

__all__ = [
Expand Down Expand Up @@ -282,14 +284,15 @@
'SyncMember',
'SubscriptionUsage',
'VirtualNetworkRule',
'DatabaseOperation',
'ResourceMoveDefinition',
'AutomaticTuningServerOptions',
'ServerAutomaticTuning',
'ServerDnsAlias',
'ServerDnsAliasAcquisition',
'RestorePoint',
'CreateDatabaseRestorePointDefinition',
'DatabaseOperation',
'ElasticPoolOperation',
'BackupLongTermRetentionPolicyPaged',
'BackupLongTermRetentionVaultPaged',
'RecoverableDatabasePaged',
Expand Down Expand Up @@ -327,9 +330,10 @@
'SyncMemberPaged',
'SubscriptionUsagePaged',
'VirtualNetworkRulePaged',
'DatabaseOperationPaged',
'ServerDnsAliasPaged',
'RestorePointPaged',
'DatabaseOperationPaged',
'ElasticPoolOperationPaged',
'BackupLongTermRetentionPolicyState',
'CapabilityStatus',
'MaxSizeUnits',
Expand Down Expand Up @@ -381,8 +385,8 @@
'SyncDirection',
'SyncMemberState',
'VirtualNetworkRuleState',
'ManagementOperationState',
'AutomaticTuningServerMode',
'AutomaticTuningServerReason',
'RestorePointType',
'ManagementOperationState',
]
114 changes: 114 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# 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 .proxy_resource import ProxyResource


class ElasticPoolOperation(ProxyResource):
"""A elastic pool operation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar elastic_pool_name: The name of the elastic pool the operation is
being performed on.
:vartype elastic_pool_name: str
:ivar operation: The name of operation.
:vartype operation: str
:ivar operation_friendly_name: The friendly name of operation.
:vartype operation_friendly_name: str
:ivar percent_complete: The percentage of the operation completed.
:vartype percent_complete: int
:ivar server_name: The name of the server.
:vartype server_name: str
:ivar start_time: The operation start time.
:vartype start_time: datetime
:ivar state: The operation state.
:vartype state: str
:ivar error_code: The operation error code.
:vartype error_code: int
:ivar error_description: The operation error description.
:vartype error_description: str
:ivar error_severity: The operation error severity.
:vartype error_severity: int
:ivar is_user_error: Whether or not the error is a user error.
:vartype is_user_error: bool
:ivar estimated_completion_time: The estimated completion time of the
operation.
:vartype estimated_completion_time: datetime
:ivar description: The operation description.
:vartype description: str
:ivar is_cancellable: Whether the operation can be cancelled.
:vartype is_cancellable: bool
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'elastic_pool_name': {'readonly': True},
'operation': {'readonly': True},
'operation_friendly_name': {'readonly': True},
'percent_complete': {'readonly': True},
'server_name': {'readonly': True},
'start_time': {'readonly': True},
'state': {'readonly': True},
'error_code': {'readonly': True},
'error_description': {'readonly': True},
'error_severity': {'readonly': True},
'is_user_error': {'readonly': True},
'estimated_completion_time': {'readonly': True},
'description': {'readonly': True},
'is_cancellable': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'},
'operation': {'key': 'properties.operation', 'type': 'str'},
'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'},
'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'},
'server_name': {'key': 'properties.serverName', 'type': 'str'},
'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
'state': {'key': 'properties.state', 'type': 'str'},
'error_code': {'key': 'properties.errorCode', 'type': 'int'},
'error_description': {'key': 'properties.errorDescription', 'type': 'str'},
'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'},
'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'},
'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'},
'description': {'key': 'properties.description', 'type': 'str'},
'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'},
}

def __init__(self):
super(ElasticPoolOperation, self).__init__()
self.elastic_pool_name = None
self.operation = None
self.operation_friendly_name = None
self.percent_complete = None
self.server_name = None
self.start_time = None
self.state = None
self.error_code = None
self.error_description = None
self.error_severity = None
self.is_user_error = None
self.estimated_completion_time = None
self.description = None
self.is_cancellable = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


class ElasticPoolOperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`ElasticPoolOperation <azure.mgmt.sql.models.ElasticPoolOperation>` object
"""

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

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

super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs)
20 changes: 10 additions & 10 deletions azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,16 +468,6 @@ class VirtualNetworkRuleState(Enum):
unknown = "Unknown"


class ManagementOperationState(Enum):

pending = "Pending"
in_progress = "InProgress"
succeeded = "Succeeded"
failed = "Failed"
cancel_in_progress = "CancelInProgress"
cancelled = "Cancelled"


class AutomaticTuningServerMode(Enum):

custom = "Custom"
Expand All @@ -496,3 +486,13 @@ class RestorePointType(Enum):

continuous = "CONTINUOUS"
discrete = "DISCRETE"


class ManagementOperationState(Enum):

pending = "Pending"
in_progress = "InProgress"
succeeded = "Succeeded"
failed = "Failed"
cancel_in_progress = "CancelInProgress"
cancelled = "Cancelled"
6 changes: 4 additions & 2 deletions azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@
from .sync_members_operations import SyncMembersOperations
from .subscription_usages_operations import SubscriptionUsagesOperations
from .virtual_network_rules_operations import VirtualNetworkRulesOperations
from .database_operations import DatabaseOperations
from .server_automatic_tuning_operations import ServerAutomaticTuningOperations
from .server_dns_aliases_operations import ServerDnsAliasesOperations
from .restore_points_operations import RestorePointsOperations
from .database_operations import DatabaseOperations
from .elastic_pool_operations import ElasticPoolOperations

__all__ = [
'BackupLongTermRetentionPoliciesOperations',
Expand Down Expand Up @@ -89,8 +90,9 @@
'SyncMembersOperations',
'SubscriptionUsagesOperations',
'VirtualNetworkRulesOperations',
'DatabaseOperations',
'ServerAutomaticTuningOperations',
'ServerDnsAliasesOperations',
'RestorePointsOperations',
'DatabaseOperations',
'ElasticPoolOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DatabaseOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview".
:ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview".
"""

models = models
Expand All @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2017-03-01-preview"
self.api_version = "2017-10-01-preview"

self.config = config

Expand Down
Loading