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] Updated managed instance swagger and examples #4290

Merged
merged 2 commits into from
Feb 8, 2019
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
9 changes: 9 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition
from .managed_database_security_alert_policy_py3 import ManagedDatabaseSecurityAlertPolicy
from .managed_server_security_alert_policy_py3 import ManagedServerSecurityAlertPolicy
from .sensitivity_label_py3 import SensitivityLabel
from .database_operation_py3 import DatabaseOperation
from .elastic_pool_operation_py3 import ElasticPoolOperation
from .max_size_capability_py3 import MaxSizeCapability
Expand Down Expand Up @@ -267,6 +268,7 @@
from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition
from .managed_database_security_alert_policy import ManagedDatabaseSecurityAlertPolicy
from .managed_server_security_alert_policy import ManagedServerSecurityAlertPolicy
from .sensitivity_label import SensitivityLabel
from .database_operation import DatabaseOperation
from .elastic_pool_operation import ElasticPoolOperation
from .max_size_capability import MaxSizeCapability
Expand Down Expand Up @@ -357,6 +359,7 @@
from .server_dns_alias_paged import ServerDnsAliasPaged
from .restorable_dropped_managed_database_paged import RestorableDroppedManagedDatabasePaged
from .restore_point_paged import RestorePointPaged
from .sensitivity_label_paged import SensitivityLabelPaged
from .database_operation_paged import DatabaseOperationPaged
from .elastic_pool_operation_paged import ElasticPoolOperationPaged
from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged
Expand Down Expand Up @@ -401,6 +404,7 @@
ReadOnlyEndpointFailoverPolicy,
FailoverGroupReplicationRole,
IdentityType,
ManagedInstanceProxyOverride,
OperationOrigin,
SyncAgentState,
SyncMemberDbType,
Expand Down Expand Up @@ -443,6 +447,7 @@
InstanceFailoverGroupReplicationRole,
LongTermRetentionDatabaseState,
VulnerabilityAssessmentPolicyBaselineName,
SensitivityLabelSource,
CapabilityGroup,
)

Expand Down Expand Up @@ -555,6 +560,7 @@
'CreateDatabaseRestorePointDefinition',
'ManagedDatabaseSecurityAlertPolicy',
'ManagedServerSecurityAlertPolicy',
'SensitivityLabel',
'DatabaseOperation',
'ElasticPoolOperation',
'MaxSizeCapability',
Expand Down Expand Up @@ -645,6 +651,7 @@
'ServerDnsAliasPaged',
'RestorableDroppedManagedDatabasePaged',
'RestorePointPaged',
'SensitivityLabelPaged',
'DatabaseOperationPaged',
'ElasticPoolOperationPaged',
'VulnerabilityAssessmentScanRecordPaged',
Expand Down Expand Up @@ -688,6 +695,7 @@
'ReadOnlyEndpointFailoverPolicy',
'FailoverGroupReplicationRole',
'IdentityType',
'ManagedInstanceProxyOverride',
'OperationOrigin',
'SyncAgentState',
'SyncMemberDbType',
Expand Down Expand Up @@ -730,5 +738,6 @@
'InstanceFailoverGroupReplicationRole',
'LongTermRetentionDatabaseState',
'VulnerabilityAssessmentPolicyBaselineName',
'SensitivityLabelSource',
'CapabilityGroup',
]
6 changes: 4 additions & 2 deletions azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ 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: Proxy override of the managed instance.
:type proxy_override: str
: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
"""

_validation = {
Expand Down
8 changes: 5 additions & 3 deletions azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ 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: Proxy override of the managed instance.
:type proxy_override: str
: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
"""

_validation = {
Expand Down Expand Up @@ -103,7 +105,7 @@ class ManagedInstance(TrackedResource):
'proxy_override': {'key': 'properties.proxyOverride', '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: str=None, **kwargs) -> None:
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, **kwargs) -> None:
super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs)
self.identity = identity
self.sku = sku
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ 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: Proxy override of the managed instance.
:type proxy_override: str
: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 tags: Resource tags.
:type tags: dict[str, str]
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ 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: Proxy override of the managed instance.
:type proxy_override: str
: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 tags: Resource tags.
:type tags: dict[str, str]
"""
Expand Down Expand Up @@ -81,7 +83,7 @@ class ManagedInstanceUpdate(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, *, 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: str=None, tags=None, **kwargs) -> None:
def __init__(self, *, 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, tags=None, **kwargs) -> None:
super(ManagedInstanceUpdate, self).__init__(**kwargs)
self.sku = sku
self.fully_qualified_domain_name = None
Expand Down
58 changes: 58 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 SensitivityLabel(ProxyResource):
"""A sensitivity label.

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
:param label_name: The label name.
:type label_name: str
:param label_id: The label ID.
:type label_id: str
:param information_type: The information type.
:type information_type: str
:param information_type_id: The information type ID.
:type information_type_id: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'label_name': {'key': 'properties.labelName', 'type': 'str'},
'label_id': {'key': 'properties.labelId', 'type': 'str'},
'information_type': {'key': 'properties.informationType', 'type': 'str'},
'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(SensitivityLabel, self).__init__(**kwargs)
self.label_name = kwargs.get('label_name', None)
self.label_id = kwargs.get('label_id', None)
self.information_type = kwargs.get('information_type', None)
self.information_type_id = kwargs.get('information_type_id', None)
27 changes: 27 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_paged.py
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 SensitivityLabelPaged(Paged):
"""
A paging container for iterating over a list of :class:`SensitivityLabel <azure.mgmt.sql.models.SensitivityLabel>` object
"""

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

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

super(SensitivityLabelPaged, self).__init__(*args, **kwargs)
58 changes: 58 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/sensitivity_label_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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_py3 import ProxyResource


class SensitivityLabel(ProxyResource):
"""A sensitivity label.

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
:param label_name: The label name.
:type label_name: str
:param label_id: The label ID.
:type label_id: str
:param information_type: The information type.
:type information_type: str
:param information_type_id: The information type ID.
:type information_type_id: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'label_name': {'key': 'properties.labelName', 'type': 'str'},
'label_id': {'key': 'properties.labelId', 'type': 'str'},
'information_type': {'key': 'properties.informationType', 'type': 'str'},
'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'},
}

def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None:
super(SensitivityLabel, self).__init__(**kwargs)
self.label_name = label_name
self.label_id = label_id
self.information_type = information_type
self.information_type_id = information_type_id
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,13 @@ class IdentityType(str, Enum):
system_assigned = "SystemAssigned"


class ManagedInstanceProxyOverride(str, Enum):

proxy = "Proxy"
redirect = "Redirect"
default = "Default"


class OperationOrigin(str, Enum):

user = "user"
Expand Down Expand Up @@ -665,6 +672,12 @@ class VulnerabilityAssessmentPolicyBaselineName(str, Enum):
default = "default"


class SensitivityLabelSource(str, Enum):

current = "current"
recommended = "recommended"


class CapabilityGroup(str, Enum):

supported_editions = "supportedEditions"
Expand Down
4 changes: 4 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
from .restore_points_operations import RestorePointsOperations
from .managed_database_security_alert_policies_operations import ManagedDatabaseSecurityAlertPoliciesOperations
from .managed_server_security_alert_policies_operations import ManagedServerSecurityAlertPoliciesOperations
from .sensitivity_labels_operations import SensitivityLabelsOperations
from .database_operations import DatabaseOperations
from .elastic_pool_operations import ElasticPoolOperations
from .capabilities_operations import CapabilitiesOperations
Expand All @@ -86,6 +87,7 @@
from .recoverable_managed_databases_operations import RecoverableManagedDatabasesOperations
from .managed_instance_vulnerability_assessments_operations import ManagedInstanceVulnerabilityAssessmentsOperations
from .server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations
from .managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations

__all__ = [
'RecoverableDatabasesOperations',
Expand Down Expand Up @@ -149,6 +151,7 @@
'RestorePointsOperations',
'ManagedDatabaseSecurityAlertPoliciesOperations',
'ManagedServerSecurityAlertPoliciesOperations',
'SensitivityLabelsOperations',
'DatabaseOperations',
'ElasticPoolOperations',
'CapabilitiesOperations',
Expand All @@ -165,4 +168,5 @@
'RecoverableManagedDatabasesOperations',
'ManagedInstanceVulnerabilityAssessmentsOperations',
'ServerVulnerabilityAssessmentsOperations',
'ManagedDatabaseSensitivityLabelsOperations',
]
Loading