Skip to content

Commit

Permalink
[AutoPR sql/resource-manager] [DO NOT MERGE] Managed instance updates…
Browse files Browse the repository at this point in the history
… plus examples (#4930)

* Generated from 55ed369558052bec088510af32b4edcf2c58a43e

Remove unused def

* Generated from b7b23d950a94b03265f4552e40951c176c8652af

Fix managed instance create max public endpoint value
  • Loading branch information
AutorestCI authored Apr 23, 2019
1 parent c44b626 commit 1415768
Show file tree
Hide file tree
Showing 7 changed files with 298 additions and 105 deletions.
6 changes: 4 additions & 2 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@
ReadOnlyEndpointFailoverPolicy,
FailoverGroupReplicationRole,
IdentityType,
ManagedInstanceProxyOverride,
ManagedServerCreateMode,
ManagedInstanceLicenseType,
OperationOrigin,
SyncAgentState,
SyncMemberDbType,
Expand Down Expand Up @@ -709,7 +710,8 @@
'ReadOnlyEndpointFailoverPolicy',
'FailoverGroupReplicationRole',
'IdentityType',
'ManagedInstanceProxyOverride',
'ManagedServerCreateMode',
'ManagedInstanceLicenseType',
'OperationOrigin',
'SyncAgentState',
'SyncMemberDbType',
Expand Down
47 changes: 38 additions & 9 deletions azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ class ManagedInstance(TrackedResource):
:param identity: The Azure Active Directory identity of the managed
instance.
:type identity: ~azure.mgmt.sql.models.ResourceIdentity
:param sku: Managed instance sku
:param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4,
GP_Gen5, BC_Gen4, BC_Gen5
:type sku: ~azure.mgmt.sql.models.Sku
:param managed_instance_create_mode: Specifies the mode of database
creation.
Default: Regular instance creation.
Restore: Creates an instance by restoring a set of backups to specific
point in time. RestorePointInTime and SourceManagedInstanceId must be
specified. Possible values include: 'Default', 'PointInTimeRestore'
:type managed_instance_create_mode: str or
~azure.mgmt.sql.models.ManagedServerCreateMode
:ivar fully_qualified_domain_name: The fully qualified domain name of the
managed instance.
:vartype fully_qualified_domain_name: str
Expand All @@ -50,11 +59,16 @@ class ManagedInstance(TrackedResource):
:ivar state: The state of the managed instance.
:vartype state: str
:param license_type: The license type. Possible values are
'LicenseIncluded' and 'BasePrice'.
:type license_type: str
:param v_cores: The number of VCores.
'LicenseIncluded' (regular price inclusive of a new SQL license) and
'BasePrice' (discounted AHB price for bringing your own SQL licenses).
Possible values include: 'LicenseIncluded', 'BasePrice'
:type license_type: str or
~azure.mgmt.sql.models.ManagedInstanceLicenseType
:param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40,
64, 80.
:type v_cores: int
:param storage_size_in_gb: The maximum storage size in GB.
:param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum
value: 8192. Increments of 32 GB allowed only.
:type storage_size_in_gb: int
:param collation: Collation of the managed instance.
:type collation: str
Expand All @@ -66,10 +80,14 @@ class ManagedInstance(TrackedResource):
:param public_data_endpoint_enabled: Whether or not the public data
endpoint is enabled.
:type public_data_endpoint_enabled: bool
:param proxy_override: Connection type used for connecting to the
instance. Possible values include: 'Proxy', 'Redirect', 'Default'
:type proxy_override: str or
~azure.mgmt.sql.models.ManagedInstanceProxyOverride
:param source_managed_instance_id: The resource identifier of the source
managed instance associated with create operation of this instance.
:type source_managed_instance_id: str
:param restore_point_in_time: Specifies the point in time (ISO8601 format)
of the source database that will be restored to create the new database.
:type restore_point_in_time: datetime
:param proxy_override: Proxy override of the managed instance.
:type proxy_override: str
:param timezone_id: Id of the timezone. Allowed values are timezones
supported by Windows.
Windows keeps details on supported timezones, including the id, in
Expand All @@ -83,6 +101,9 @@ class ManagedInstance(TrackedResource):
An example of valid timezone id is "Pacific Standard Time" or "W. Europe
Standard Time".
:type timezone_id: str
:param instance_pool_id: The Id of the instance pool this managed server
belongs to.
:type instance_pool_id: str
"""

_validation = {
Expand All @@ -103,6 +124,7 @@ class ManagedInstance(TrackedResource):
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'ResourceIdentity'},
'sku': {'key': 'sku', 'type': 'Sku'},
'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'},
'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'},
'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'},
'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'},
Expand All @@ -115,14 +137,18 @@ class ManagedInstance(TrackedResource):
'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'},
'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'},
'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'},
'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'},
'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'},
'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'},
'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'},
'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ManagedInstance, self).__init__(**kwargs)
self.identity = kwargs.get('identity', None)
self.sku = kwargs.get('sku', None)
self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None)
self.fully_qualified_domain_name = None
self.administrator_login = kwargs.get('administrator_login', None)
self.administrator_login_password = kwargs.get('administrator_login_password', None)
Expand All @@ -135,5 +161,8 @@ def __init__(self, **kwargs):
self.dns_zone = None
self.dns_zone_partner = kwargs.get('dns_zone_partner', None)
self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None)
self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None)
self.restore_point_in_time = kwargs.get('restore_point_in_time', None)
self.proxy_override = kwargs.get('proxy_override', None)
self.timezone_id = kwargs.get('timezone_id', None)
self.instance_pool_id = kwargs.get('instance_pool_id', None)
49 changes: 39 additions & 10 deletions azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ class ManagedInstance(TrackedResource):
:param identity: The Azure Active Directory identity of the managed
instance.
:type identity: ~azure.mgmt.sql.models.ResourceIdentity
:param sku: Managed instance sku
:param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4,
GP_Gen5, BC_Gen4, BC_Gen5
:type sku: ~azure.mgmt.sql.models.Sku
:param managed_instance_create_mode: Specifies the mode of database
creation.
Default: Regular instance creation.
Restore: Creates an instance by restoring a set of backups to specific
point in time. RestorePointInTime and SourceManagedInstanceId must be
specified. Possible values include: 'Default', 'PointInTimeRestore'
:type managed_instance_create_mode: str or
~azure.mgmt.sql.models.ManagedServerCreateMode
:ivar fully_qualified_domain_name: The fully qualified domain name of the
managed instance.
:vartype fully_qualified_domain_name: str
Expand All @@ -50,11 +59,16 @@ class ManagedInstance(TrackedResource):
:ivar state: The state of the managed instance.
:vartype state: str
:param license_type: The license type. Possible values are
'LicenseIncluded' and 'BasePrice'.
:type license_type: str
:param v_cores: The number of VCores.
'LicenseIncluded' (regular price inclusive of a new SQL license) and
'BasePrice' (discounted AHB price for bringing your own SQL licenses).
Possible values include: 'LicenseIncluded', 'BasePrice'
:type license_type: str or
~azure.mgmt.sql.models.ManagedInstanceLicenseType
:param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40,
64, 80.
:type v_cores: int
:param storage_size_in_gb: The maximum storage size in GB.
:param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum
value: 8192. Increments of 32 GB allowed only.
:type storage_size_in_gb: int
:param collation: Collation of the managed instance.
:type collation: str
Expand All @@ -66,10 +80,14 @@ class ManagedInstance(TrackedResource):
:param public_data_endpoint_enabled: Whether or not the public data
endpoint is enabled.
:type public_data_endpoint_enabled: bool
:param proxy_override: Connection type used for connecting to the
instance. Possible values include: 'Proxy', 'Redirect', 'Default'
:type proxy_override: str or
~azure.mgmt.sql.models.ManagedInstanceProxyOverride
:param source_managed_instance_id: The resource identifier of the source
managed instance associated with create operation of this instance.
:type source_managed_instance_id: str
:param restore_point_in_time: Specifies the point in time (ISO8601 format)
of the source database that will be restored to create the new database.
:type restore_point_in_time: datetime
:param proxy_override: Proxy override of the managed instance.
:type proxy_override: str
:param timezone_id: Id of the timezone. Allowed values are timezones
supported by Windows.
Windows keeps details on supported timezones, including the id, in
Expand All @@ -83,6 +101,9 @@ class ManagedInstance(TrackedResource):
An example of valid timezone id is "Pacific Standard Time" or "W. Europe
Standard Time".
:type timezone_id: str
:param instance_pool_id: The Id of the instance pool this managed server
belongs to.
:type instance_pool_id: str
"""

_validation = {
Expand All @@ -103,6 +124,7 @@ class ManagedInstance(TrackedResource):
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'ResourceIdentity'},
'sku': {'key': 'sku', 'type': 'Sku'},
'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'},
'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'},
'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'},
'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'},
Expand All @@ -115,14 +137,18 @@ class ManagedInstance(TrackedResource):
'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'},
'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'},
'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'},
'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'},
'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'},
'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'},
'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'},
'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'},
}

def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, proxy_override=None, timezone_id: str=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, identity=None, sku=None, managed_instance_create_mode=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type=None, v_cores: int=None, storage_size_in_gb: int=None, collation: str=None, dns_zone_partner: str=None, public_data_endpoint_enabled: bool=None, source_managed_instance_id: str=None, restore_point_in_time=None, proxy_override: str=None, timezone_id: str=None, instance_pool_id: str=None, **kwargs) -> None:
super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs)
self.identity = identity
self.sku = sku
self.managed_instance_create_mode = managed_instance_create_mode
self.fully_qualified_domain_name = None
self.administrator_login = administrator_login
self.administrator_login_password = administrator_login_password
Expand All @@ -135,5 +161,8 @@ def __init__(self, *, location: str, tags=None, identity=None, sku=None, adminis
self.dns_zone = None
self.dns_zone_partner = dns_zone_partner
self.public_data_endpoint_enabled = public_data_endpoint_enabled
self.source_managed_instance_id = source_managed_instance_id
self.restore_point_in_time = restore_point_in_time
self.proxy_override = proxy_override
self.timezone_id = timezone_id
self.instance_pool_id = instance_pool_id
44 changes: 36 additions & 8 deletions azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ class ManagedInstanceUpdate(Model):
:param sku: Managed instance sku
:type sku: ~azure.mgmt.sql.models.Sku
:param managed_instance_create_mode: Specifies the mode of database
creation.
Default: Regular instance creation.
Restore: Creates an instance by restoring a set of backups to specific
point in time. RestorePointInTime and SourceManagedInstanceId must be
specified. Possible values include: 'Default', 'PointInTimeRestore'
:type managed_instance_create_mode: str or
~azure.mgmt.sql.models.ManagedServerCreateMode
:ivar fully_qualified_domain_name: The fully qualified domain name of the
managed instance.
:vartype fully_qualified_domain_name: str
Expand All @@ -35,11 +43,16 @@ class ManagedInstanceUpdate(Model):
:ivar state: The state of the managed instance.
:vartype state: str
:param license_type: The license type. Possible values are
'LicenseIncluded' and 'BasePrice'.
:type license_type: str
:param v_cores: The number of VCores.
'LicenseIncluded' (regular price inclusive of a new SQL license) and
'BasePrice' (discounted AHB price for bringing your own SQL licenses).
Possible values include: 'LicenseIncluded', 'BasePrice'
:type license_type: str or
~azure.mgmt.sql.models.ManagedInstanceLicenseType
:param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40,
64, 80.
:type v_cores: int
:param storage_size_in_gb: The maximum storage size in GB.
:param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum
value: 8192. Increments of 32 GB allowed only.
:type storage_size_in_gb: int
:param collation: Collation of the managed instance.
:type collation: str
Expand All @@ -51,10 +64,14 @@ class ManagedInstanceUpdate(Model):
:param public_data_endpoint_enabled: Whether or not the public data
endpoint is enabled.
:type public_data_endpoint_enabled: bool
:param proxy_override: Connection type used for connecting to the
instance. Possible values include: 'Proxy', 'Redirect', 'Default'
:type proxy_override: str or
~azure.mgmt.sql.models.ManagedInstanceProxyOverride
:param source_managed_instance_id: The resource identifier of the source
managed instance associated with create operation of this instance.
:type source_managed_instance_id: str
:param restore_point_in_time: Specifies the point in time (ISO8601 format)
of the source database that will be restored to create the new database.
:type restore_point_in_time: datetime
:param proxy_override: Proxy override of the managed instance.
:type proxy_override: str
:param timezone_id: Id of the timezone. Allowed values are timezones
supported by Windows.
Windows keeps details on supported timezones, including the id, in
Expand All @@ -68,6 +85,9 @@ class ManagedInstanceUpdate(Model):
An example of valid timezone id is "Pacific Standard Time" or "W. Europe
Standard Time".
:type timezone_id: str
:param instance_pool_id: The Id of the instance pool this managed server
belongs to.
:type instance_pool_id: str
:param tags: Resource tags.
:type tags: dict[str, str]
"""
Expand All @@ -80,6 +100,7 @@ class ManagedInstanceUpdate(Model):

_attribute_map = {
'sku': {'key': 'sku', 'type': 'Sku'},
'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'},
'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'},
'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'},
'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'},
Expand All @@ -92,14 +113,18 @@ class ManagedInstanceUpdate(Model):
'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'},
'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'},
'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'},
'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'},
'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'},
'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'},
'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'},
'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, **kwargs):
super(ManagedInstanceUpdate, self).__init__(**kwargs)
self.sku = kwargs.get('sku', None)
self.managed_instance_create_mode = kwargs.get('managed_instance_create_mode', None)
self.fully_qualified_domain_name = None
self.administrator_login = kwargs.get('administrator_login', None)
self.administrator_login_password = kwargs.get('administrator_login_password', None)
Expand All @@ -112,6 +137,9 @@ def __init__(self, **kwargs):
self.dns_zone = None
self.dns_zone_partner = kwargs.get('dns_zone_partner', None)
self.public_data_endpoint_enabled = kwargs.get('public_data_endpoint_enabled', None)
self.source_managed_instance_id = kwargs.get('source_managed_instance_id', None)
self.restore_point_in_time = kwargs.get('restore_point_in_time', None)
self.proxy_override = kwargs.get('proxy_override', None)
self.timezone_id = kwargs.get('timezone_id', None)
self.instance_pool_id = kwargs.get('instance_pool_id', None)
self.tags = kwargs.get('tags', None)
Loading

0 comments on commit 1415768

Please sign in to comment.