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: 16 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .max_size_capability import MaxSizeCapability
from .service_objective_capability import ServiceObjectiveCapability
from .edition_capability import EditionCapability
from .server_version_capability import ServerVersionCapability
from .location_capabilities import LocationCapabilities
from .server_firewall_rule import ServerFirewallRule
from .sql_sub_resource import SqlSubResource
from .import_extension_request_parameters import ImportExtensionRequestParameters
Expand Down Expand Up @@ -63,6 +68,9 @@
from .recommended_elastic_pool_paged import RecommendedElasticPoolPaged
from .recommended_elastic_pool_metric_paged import RecommendedElasticPoolMetricPaged
from .sql_management_client_enums import (
CapabilityStatus,
MaxSizeUnits,
PerformanceLevelUnit,
StorageKeyType,
AuthenticationType,
ReplicationRole,
Expand Down Expand Up @@ -92,6 +100,11 @@
)

__all__ = [
'MaxSizeCapability',
'ServiceObjectiveCapability',
'EditionCapability',
'ServerVersionCapability',
'LocationCapabilities',
'ServerFirewallRule',
'SqlSubResource',
'ImportExtensionRequestParameters',
Expand Down Expand Up @@ -145,6 +158,9 @@
'ElasticPoolDatabaseActivityPaged',
'RecommendedElasticPoolPaged',
'RecommendedElasticPoolMetricPaged',
'CapabilityStatus',
'MaxSizeUnits',
'PerformanceLevelUnit',
'StorageKeyType',
'AuthenticationType',
'ReplicationRole',
Expand Down
29 changes: 19 additions & 10 deletions azure-mgmt-sql/azure/mgmt/sql/models/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,31 +103,40 @@ class Database(Resource):
:type recovery_services_recovery_point_resource_id: datetime
:param edition: The edition of the database. The DatabaseEditions
enumeration contains all the valid editions. If createMode is
NonReadableSecondary or OnlineSecondary, this value is ignored. Possible
values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'Free',
'Stretch', 'DataWarehouse', 'System'
NonReadableSecondary or OnlineSecondary, this value is ignored. To see
possible values, query the capabilities API
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
referred to by operationId: "Capabilities_List.". Possible values include:
'Web', 'Business', 'Basic', 'Standard', 'Premium', 'Free', 'Stretch',
'DataWarehouse', 'System'
:type edition: str or :class:`DatabaseEditions
<azure.mgmt.sql.models.DatabaseEditions>`
:param max_size_bytes: The max size of the database expressed in bytes. If
createMode is not Default, this value is ignored. Note: Only the following
sizes are supported (in addition to limitations being placed on each
edition): { 100 MB | 500 MB |1 GB | 5 GB | 10 GB | 20 GB | 30 GB … 150 GB
| 200 GB … 500 GB }
createMode is not Default, this value is ignored. To see possible values,
query the capabilities API
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
referred to by operationId: "Capabilities_List."
:type max_size_bytes: str
:param requested_service_objective_id: The configured service level
objective ID of the database. This is the service level objective that is
in the process of being applied to the database. Once successfully
updated, it will match the value of currentServiceObjectiveId property. If
requestedServiceObjectiveId and requestedServiceObjectiveName are both
updated, the value of requestedServiceObjectiveId overrides the value of
requestedServiceObjectiveName.
requestedServiceObjectiveName. To see possible values, query the
capabilities API
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
referred to by operationId: "Capabilities_List."
:type requested_service_objective_id: str
:param requested_service_objective_name: The name of the configured
service level objective of the database. This is the service level
objective that is in the process of being applied to the database. Once
successfully updated, it will match the value of serviceLevelObjective
property. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1',
'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'ElasticPool'
property. To see possible values, query the capabilities API
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
referred to by operationId: "Capabilities_List.". Possible values include:
'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11',
'P15', 'System', 'ElasticPool'
:type requested_service_objective_name: str or
:class:`ServiceObjectiveName <azure.mgmt.sql.models.ServiceObjectiveName>`
:ivar service_level_objective: The current service level objective of the
Expand Down
49 changes: 49 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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.serialization import Model


class EditionCapability(Model):
"""The server edition capabilities.

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

:ivar name: The edition name.
:vartype name: str
:ivar status: The status of the server edition. Possible values include:
'Visible', 'Available', 'Default', 'Disabled'
:vartype status: str or :class:`CapabilityStatus
<azure.mgmt.sql.models.CapabilityStatus>`
:ivar supported_service_level_objectives: The list of supported service
objectives for the edition.
:vartype supported_service_level_objectives: list of
:class:`ServiceObjectiveCapability
<azure.mgmt.sql.models.ServiceObjectiveCapability>`
"""

_validation = {
'name': {'readonly': True},
'status': {'readonly': True},
'supported_service_level_objectives': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'status': {'key': 'status', 'type': 'CapabilityStatus'},
'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'},
}

def __init__(self):
self.name = None
self.status = None
self.supported_service_level_objectives = None
48 changes: 48 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py
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 msrest.serialization import Model


class LocationCapabilities(Model):
"""The capabilities for a location.

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

:ivar name: The location name.
:vartype name: str
:ivar status: Azure SQL Database's status for the location. Possible
values include: 'Visible', 'Available', 'Default', 'Disabled'
:vartype status: str or :class:`CapabilityStatus
<azure.mgmt.sql.models.CapabilityStatus>`
:ivar supported_server_versions: The list of supported server versions.
:vartype supported_server_versions: list of
:class:`ServerVersionCapability
<azure.mgmt.sql.models.ServerVersionCapability>`
"""

_validation = {
'name': {'readonly': True},
'status': {'readonly': True},
'supported_server_versions': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'status': {'key': 'status', 'type': 'CapabilityStatus'},
'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'},
}

def __init__(self):
self.name = None
self.status = None
self.supported_server_versions = None
48 changes: 48 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py
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 msrest.serialization import Model


class MaxSizeCapability(Model):
"""The maximum size limits for a database.

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

:ivar limit: The maximum size of the database (see 'unit' for the units).
:vartype limit: long
:ivar unit: The units that the limit is expressed in. Possible values
include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes'
:vartype unit: str or :class:`MaxSizeUnits
<azure.mgmt.sql.models.MaxSizeUnits>`
:ivar status: The status of the maximum size capability. Possible values
include: 'Visible', 'Available', 'Default', 'Disabled'
:vartype status: str or :class:`CapabilityStatus
<azure.mgmt.sql.models.CapabilityStatus>`
"""

_validation = {
'limit': {'readonly': True},
'unit': {'readonly': True},
'status': {'readonly': True},
}

_attribute_map = {
'limit': {'key': 'limit', 'type': 'long'},
'unit': {'key': 'unit', 'type': 'MaxSizeUnits'},
'status': {'key': 'status', 'type': 'CapabilityStatus'},
}

def __init__(self):
self.limit = None
self.unit = None
self.status = None
47 changes: 47 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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.serialization import Model


class ServerVersionCapability(Model):
"""The server capabilities.

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

:ivar name: The server version name.
:vartype name: str
:ivar status: The status of the server version. Possible values include:
'Visible', 'Available', 'Default', 'Disabled'
:vartype status: str or :class:`CapabilityStatus
<azure.mgmt.sql.models.CapabilityStatus>`
:ivar supported_editions: The list of supported server editions.
:vartype supported_editions: list of :class:`EditionCapability
<azure.mgmt.sql.models.EditionCapability>`
"""

_validation = {
'name': {'readonly': True},
'status': {'readonly': True},
'supported_editions': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'status': {'key': 'status', 'type': 'CapabilityStatus'},
'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'},
}

def __init__(self):
self.name = None
self.status = None
self.supported_editions = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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.serialization import Model


class ServiceObjectiveCapability(Model):
"""The service objectives capabilities.

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

:ivar name: The service objective name.
:vartype name: str
:ivar status: The status of the service objective. Possible values
include: 'Visible', 'Available', 'Default', 'Disabled'
:vartype status: str or :class:`CapabilityStatus
<azure.mgmt.sql.models.CapabilityStatus>`
:ivar unit: Unit type used to measure service objective performance level.
Possible values include: 'DTU'
:vartype unit: str or :class:`PerformanceLevelUnit
<azure.mgmt.sql.models.PerformanceLevelUnit>`
:ivar value: Performance level value.
:vartype value: int
:ivar id: The unique ID of the service objective.
:vartype id: str
:ivar supported_max_sizes: The list of supported maximum database sizes
for this service objective.
:vartype supported_max_sizes: list of :class:`MaxSizeCapability
<azure.mgmt.sql.models.MaxSizeCapability>`
"""

_validation = {
'name': {'readonly': True},
'status': {'readonly': True},
'unit': {'readonly': True},
'value': {'readonly': True},
'id': {'readonly': True},
'supported_max_sizes': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'status': {'key': 'status', 'type': 'CapabilityStatus'},
'unit': {'key': 'performanceLevel.unit', 'type': 'PerformanceLevelUnit'},
'value': {'key': 'performanceLevel.value', 'type': 'int'},
'id': {'key': 'id', 'type': 'str'},
'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeCapability]'},
}

def __init__(self):
self.name = None
self.status = None
self.unit = None
self.value = None
self.id = None
self.supported_max_sizes = None
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@
from enum import Enum


class CapabilityStatus(Enum):

visible = "Visible"
available = "Available"
default = "Default"
disabled = "Disabled"


class MaxSizeUnits(Enum):

megabytes = "Megabytes"
gigabytes = "Gigabytes"
terabytes = "Terabytes"
petabytes = "Petabytes"


class PerformanceLevelUnit(Enum):

dtu = "DTU"


class StorageKeyType(Enum):

storage_access_key = "StorageAccessKey"
Expand Down
Loading