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] sql/resource-manager #4858

Closed
wants to merge 6 commits into from
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
4 changes: 4 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@
ReadOnlyEndpointFailoverPolicy,
FailoverGroupReplicationRole,
IdentityType,
ManagedServerCreateMode,
ManagedInstanceLicenseType,
ManagedInstanceProxyOverride,
OperationOrigin,
SyncAgentState,
Expand Down Expand Up @@ -709,6 +711,8 @@
'ReadOnlyEndpointFailoverPolicy',
'FailoverGroupReplicationRole',
'IdentityType',
'ManagedServerCreateMode',
'ManagedInstanceLicenseType',
'ManagedInstanceProxyOverride',
'OperationOrigin',
'SyncAgentState',
Expand Down
25 changes: 23 additions & 2 deletions azure-mgmt-sql/azure/mgmt/sql/models/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ class Database(TrackedResource):
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param sku: The name and tier of the SKU.
:param sku: The database SKU.
The list of SKUs may vary by region and support offer. To determine the
SKUs (including the SKU name, tier/edition, family, and capacity) that are
available to your subscription in an Azure region, use the
`Capabilities_ListByLocation` REST API or one of the following commands:
```azurecli
az sql db list-editions -l <location> -o table
````
```powershell
Get-AzSqlServerServiceObjective -Location <location>
````
:type sku: ~azure.mgmt.sql.models.Sku
:ivar kind: Kind of database. This is metadata used for the Azure portal
experience.
Expand Down Expand Up @@ -85,7 +95,8 @@ class Database(TrackedResource):
'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect',
'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed',
'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing',
'Paused', 'Resuming', 'Scaling'
'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
'OnlineChangingDwPerformanceTiers'
:vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus
:ivar database_id: The ID of the database.
:vartype database_id: str
Expand Down Expand Up @@ -146,6 +157,12 @@ class Database(TrackedResource):
:type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale
:ivar current_sku: The name and tier of the SKU.
:vartype current_sku: ~azure.mgmt.sql.models.Sku
:param auto_pause_delay: Time in minutes after which database is
automatically paused. A value of -1 means that automatic pause is disabled
:type auto_pause_delay: int
:param min_capacity: Minimal capacity that database will always have
allocated, if not paused
:type min_capacity: float
"""

_validation = {
Expand Down Expand Up @@ -202,6 +219,8 @@ class Database(TrackedResource):
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'read_scale': {'key': 'properties.readScale', 'type': 'str'},
'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'},
'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'},
'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -235,3 +254,5 @@ def __init__(self, **kwargs):
self.earliest_restore_date = None
self.read_scale = kwargs.get('read_scale', None)
self.current_sku = None
self.auto_pause_delay = kwargs.get('auto_pause_delay', None)
self.min_capacity = kwargs.get('min_capacity', None)
27 changes: 24 additions & 3 deletions azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ class Database(TrackedResource):
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param sku: The name and tier of the SKU.
:param sku: The database SKU.
The list of SKUs may vary by region and support offer. To determine the
SKUs (including the SKU name, tier/edition, family, and capacity) that are
available to your subscription in an Azure region, use the
`Capabilities_ListByLocation` REST API or one of the following commands:
```azurecli
az sql db list-editions -l <location> -o table
````
```powershell
Get-AzSqlServerServiceObjective -Location <location>
````
:type sku: ~azure.mgmt.sql.models.Sku
:ivar kind: Kind of database. This is metadata used for the Azure portal
experience.
Expand Down Expand Up @@ -85,7 +95,8 @@ class Database(TrackedResource):
'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect',
'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed',
'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing',
'Paused', 'Resuming', 'Scaling'
'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
'OnlineChangingDwPerformanceTiers'
:vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus
:ivar database_id: The ID of the database.
:vartype database_id: str
Expand Down Expand Up @@ -146,6 +157,12 @@ class Database(TrackedResource):
:type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale
:ivar current_sku: The name and tier of the SKU.
:vartype current_sku: ~azure.mgmt.sql.models.Sku
:param auto_pause_delay: Time in minutes after which database is
automatically paused. A value of -1 means that automatic pause is disabled
:type auto_pause_delay: int
:param min_capacity: Minimal capacity that database will always have
allocated, if not paused
:type min_capacity: float
"""

_validation = {
Expand Down Expand Up @@ -202,9 +219,11 @@ class Database(TrackedResource):
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'read_scale': {'key': 'properties.readScale', 'type': 'str'},
'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'},
'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'},
'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'},
}

def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None:
super(Database, self).__init__(location=location, tags=tags, **kwargs)
self.sku = sku
self.kind = None
Expand Down Expand Up @@ -235,3 +254,5 @@ def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, coll
self.earliest_restore_date = None
self.read_scale = read_scale
self.current_sku = None
self.auto_pause_delay = auto_pause_delay
self.min_capacity = min_capacity
13 changes: 12 additions & 1 deletion azure-mgmt-sql/azure/mgmt/sql/models/database_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class DatabaseUpdate(Model):
'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect',
'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed',
'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing',
'Paused', 'Resuming', 'Scaling'
'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
'OnlineChangingDwPerformanceTiers'
:vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus
:ivar database_id: The ID of the database.
:vartype database_id: str
Expand Down Expand Up @@ -129,6 +130,12 @@ class DatabaseUpdate(Model):
:type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale
:ivar current_sku: The name and tier of the SKU.
:vartype current_sku: ~azure.mgmt.sql.models.Sku
:param auto_pause_delay: Time in minutes after which database is
automatically paused. A value of -1 means that automatic pause is disabled
:type auto_pause_delay: int
:param min_capacity: Minimal capacity that database will always have
allocated, if not paused
:type min_capacity: float
:param tags: Resource tags.
:type tags: dict[str, str]
"""
Expand Down Expand Up @@ -174,6 +181,8 @@ class DatabaseUpdate(Model):
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'read_scale': {'key': 'properties.readScale', 'type': 'str'},
'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'},
'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'},
'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'},
'tags': {'key': 'tags', 'type': '{str}'},
}

Expand Down Expand Up @@ -206,4 +215,6 @@ def __init__(self, **kwargs):
self.earliest_restore_date = None
self.read_scale = kwargs.get('read_scale', None)
self.current_sku = None
self.auto_pause_delay = kwargs.get('auto_pause_delay', None)
self.min_capacity = kwargs.get('min_capacity', None)
self.tags = kwargs.get('tags', None)
15 changes: 13 additions & 2 deletions azure-mgmt-sql/azure/mgmt/sql/models/database_update_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class DatabaseUpdate(Model):
'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect',
'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed',
'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing',
'Paused', 'Resuming', 'Scaling'
'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
'OnlineChangingDwPerformanceTiers'
:vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus
:ivar database_id: The ID of the database.
:vartype database_id: str
Expand Down Expand Up @@ -129,6 +130,12 @@ class DatabaseUpdate(Model):
:type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale
:ivar current_sku: The name and tier of the SKU.
:vartype current_sku: ~azure.mgmt.sql.models.Sku
:param auto_pause_delay: Time in minutes after which database is
automatically paused. A value of -1 means that automatic pause is disabled
:type auto_pause_delay: int
:param min_capacity: Minimal capacity that database will always have
allocated, if not paused
:type min_capacity: float
:param tags: Resource tags.
:type tags: dict[str, str]
"""
Expand Down Expand Up @@ -174,10 +181,12 @@ class DatabaseUpdate(Model):
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'read_scale': {'key': 'properties.readScale', 'type': 'str'},
'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'},
'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'},
'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, tags=None, **kwargs) -> None:
def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, tags=None, **kwargs) -> None:
super(DatabaseUpdate, self).__init__(**kwargs)
self.sku = sku
self.create_mode = create_mode
Expand Down Expand Up @@ -206,4 +215,6 @@ def __init__(self, *, sku=None, create_mode=None, collation: str=None, max_size_
self.earliest_restore_date = None
self.read_scale = read_scale
self.current_sku = None
self.auto_pause_delay = auto_pause_delay
self.min_capacity = min_capacity
self.tags = tags
9 changes: 8 additions & 1 deletion azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ class ElasticPool(TrackedResource):
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param sku:
:param sku: The elastic pool SKU.
The list of SKUs may vary by region and support offer. To determine the
SKUs (including the SKU name, tier/edition, family, and capacity) that are
available to your subscription in an Azure region, use the
`Capabilities_ListByLocation` REST API or the following command:
```azurecli
az sql elastic-pool list-editions -l <location> -o table
````
:type sku: ~azure.mgmt.sql.models.Sku
:ivar kind: Kind of elastic pool. This is metadata used for the Azure
portal experience.
Expand Down
9 changes: 8 additions & 1 deletion azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ class ElasticPool(TrackedResource):
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param sku:
:param sku: The elastic pool SKU.
The list of SKUs may vary by region and support offer. To determine the
SKUs (including the SKU name, tier/edition, family, and capacity) that are
available to your subscription in an Azure region, use the
`Capabilities_ListByLocation` REST API or the following command:
```azurecli
az sql elastic-pool list-editions -l <location> -o table
````
:type sku: ~azure.mgmt.sql.models.Sku
:ivar kind: Kind of elastic pool. This is metadata used for the Azure
portal experience.
Expand Down
14 changes: 12 additions & 2 deletions azure-mgmt-sql/azure/mgmt/sql/models/import_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,19 @@ class ImportRequest(ExportRequest):
:param database_name: Required. The name of the database to import.
:type database_name: str
:param edition: Required. The edition for the database being created.
Possible values include: 'Web', 'Business', 'Basic', 'Standard',
The list of SKUs may vary by region and support offer. To determine the
SKUs (including the SKU name, tier/edition, family, and capacity) that are
available to your subscription in an Azure region, use the
`Capabilities_ListByLocation` REST API or one of the following commands:
```azurecli
az sql db list-editions -l <location> -o table
````
```powershell
Get-AzSqlServerServiceObjective -Location <location>
````
. Possible values include: 'Web', 'Business', 'Basic', 'Standard',
'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System',
'System2'
'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'
:type edition: str or ~azure.mgmt.sql.models.DatabaseEdition
:param service_objective_name: Required. The name of the service objective
to assign to the database. Possible values include: 'System', 'System0',
Expand Down
14 changes: 12 additions & 2 deletions azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,19 @@ class ImportRequest(ExportRequest):
:param database_name: Required. The name of the database to import.
:type database_name: str
:param edition: Required. The edition for the database being created.
Possible values include: 'Web', 'Business', 'Basic', 'Standard',
The list of SKUs may vary by region and support offer. To determine the
SKUs (including the SKU name, tier/edition, family, and capacity) that are
available to your subscription in an Azure region, use the
`Capabilities_ListByLocation` REST API or one of the following commands:
```azurecli
az sql db list-editions -l <location> -o table
````
```powershell
Get-AzSqlServerServiceObjective -Location <location>
````
. Possible values include: 'Web', 'Business', 'Basic', 'Standard',
'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System',
'System2'
'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'
:type edition: str or ~azure.mgmt.sql.models.DatabaseEdition
:param service_objective_name: Required. The name of the service objective
to assign to the database. Possible values include: 'System', 'System0',
Expand Down
Loading