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

[ReleasePR azure-mgmt-sql] Add API for maintenance policy id #11439

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
7 changes: 7 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
from ._models_py3 import TrackedResource
from ._models_py3 import TransparentDataEncryption
from ._models_py3 import TransparentDataEncryptionActivity
from ._models_py3 import UnlinkParameters
from ._models_py3 import Usage
from ._models_py3 import VirtualCluster
from ._models_py3 import VirtualClusterUpdate
Expand Down Expand Up @@ -354,6 +355,7 @@
from ._models import TrackedResource
from ._models import TransparentDataEncryption
from ._models import TransparentDataEncryptionActivity
from ._models import UnlinkParameters
from ._models import Usage
from ._models import VirtualCluster
from ._models import VirtualClusterUpdate
Expand All @@ -375,6 +377,8 @@
from ._paged_models import ElasticPoolOperationPaged
from ._paged_models import ElasticPoolPaged
from ._paged_models import EncryptionProtectorPaged
from ._paged_models import ExtendedDatabaseBlobAuditingPolicyPaged
from ._paged_models import ExtendedServerBlobAuditingPolicyPaged
from ._paged_models import FailoverGroupPaged
from ._paged_models import FirewallRulePaged
from ._paged_models import GeoBackupPolicyPaged
Expand Down Expand Up @@ -705,6 +709,7 @@
'TrackedResource',
'TransparentDataEncryption',
'TransparentDataEncryptionActivity',
'UnlinkParameters',
'Usage',
'VirtualCluster',
'VirtualClusterUpdate',
Expand Down Expand Up @@ -748,6 +753,8 @@
'SubscriptionUsagePaged',
'VirtualClusterPaged',
'VirtualNetworkRulePaged',
'ExtendedDatabaseBlobAuditingPolicyPaged',
'ExtendedServerBlobAuditingPolicyPaged',
'ServerBlobAuditingPolicyPaged',
'DatabaseBlobAuditingPolicyPaged',
'DatabaseVulnerabilityAssessmentPaged',
Expand Down
91 changes: 79 additions & 12 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,10 @@ class Database(TrackedResource):
which means the replicas of this database will be spread across multiple
availability zones.
:type zone_redundant: bool
:param license_type: The license type to apply for this database. Possible
values include: 'LicenseIncluded', 'BasePrice'
:param license_type: The license type to apply for this database.
`LicenseIncluded` if you need a license, or `BasePrice` if you have a
license and are eligible for the Azure Hybrid Benefit. Possible values
include: 'LicenseIncluded', 'BasePrice'
:type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType
:ivar max_log_size_bytes: The max log size for this database.
:vartype max_log_size_bytes: long
Expand Down Expand Up @@ -802,8 +804,17 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
specified, storageAccountAccessKey is required.
auditing storage account.
If state is Enabled and storageEndpoint is specified, not specifying the
storageAccountAccessKey will use SQL server system-assigned managed
identity to access the storage.
Prerequisites for using managed identity authentication:
1. Assign SQL Server a system-assigned managed identity in Azure Active
Directory (AAD).
2. Grant SQL Server identity access to the storage account by adding
'Storage Blob Data Contributor' RBAC role to the server identity.
For more information, see [Auditing to storage using Managed Identity
authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the audit
logs in the storage account.
Expand Down Expand Up @@ -1233,8 +1244,10 @@ class DatabaseUpdate(Model):
which means the replicas of this database will be spread across multiple
availability zones.
:type zone_redundant: bool
:param license_type: The license type to apply for this database. Possible
values include: 'LicenseIncluded', 'BasePrice'
:param license_type: The license type to apply for this database.
`LicenseIncluded` if you need a license, or `BasePrice` if you have a
license and are eligible for the Azure Hybrid Benefit. Possible values
include: 'LicenseIncluded', 'BasePrice'
:type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType
:ivar max_log_size_bytes: The max log size for this database.
:vartype max_log_size_bytes: long
Expand Down Expand Up @@ -2671,8 +2684,17 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource):
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
specified, storageAccountAccessKey is required.
auditing storage account.
If state is Enabled and storageEndpoint is specified, not specifying the
storageAccountAccessKey will use SQL server system-assigned managed
identity to access the storage.
Prerequisites for using managed identity authentication:
1. Assign SQL Server a system-assigned managed identity in Azure Active
Directory (AAD).
2. Grant SQL Server identity access to the storage account by adding
'Storage Blob Data Contributor' RBAC role to the server identity.
For more information, see [Auditing to storage using Managed Identity
authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the audit
logs in the storage account.
Expand Down Expand Up @@ -2831,8 +2853,17 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource):
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
specified, storageAccountAccessKey is required.
auditing storage account.
If state is Enabled and storageEndpoint is specified, not specifying the
storageAccountAccessKey will use SQL server system-assigned managed
identity to access the storage.
Prerequisites for using managed identity authentication:
1. Assign SQL Server a system-assigned managed identity in Azure Active
Directory (AAD).
2. Grant SQL Server identity access to the storage account by adding
'Storage Blob Data Contributor' RBAC role to the server identity.
For more information, see [Auditing to storage using Managed Identity
authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the audit
logs in the storage account.
Expand Down Expand Up @@ -5125,6 +5156,9 @@ class ManagedInstance(TrackedResource):
:param instance_pool_id: The Id of the instance pool this managed server
belongs to.
:type instance_pool_id: str
:param maintenance_configuration_id: Specifies maintenance configuration
id to apply to this managed instance.
:type maintenance_configuration_id: str
:param minimal_tls_version: Minimal TLS version. Allowed values: 'None',
'1.0', '1.1', '1.2'
:type minimal_tls_version: str
Expand Down Expand Up @@ -5166,6 +5200,7 @@ class ManagedInstance(TrackedResource):
'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'},
'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'},
'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'},
'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'},
'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'},
}

Expand All @@ -5191,6 +5226,7 @@ def __init__(self, **kwargs):
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.maintenance_configuration_id = kwargs.get('maintenance_configuration_id', None)
self.minimal_tls_version = kwargs.get('minimal_tls_version', None)


Expand Down Expand Up @@ -5766,6 +5802,9 @@ class ManagedInstanceUpdate(Model):
:param instance_pool_id: The Id of the instance pool this managed server
belongs to.
:type instance_pool_id: str
:param maintenance_configuration_id: Specifies maintenance configuration
id to apply to this managed instance.
:type maintenance_configuration_id: str
:param minimal_tls_version: Minimal TLS version. Allowed values: 'None',
'1.0', '1.1', '1.2'
:type minimal_tls_version: str
Expand Down Expand Up @@ -5799,6 +5838,7 @@ class ManagedInstanceUpdate(Model):
'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'},
'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'},
'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'},
'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'},
'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}
Expand All @@ -5824,6 +5864,7 @@ def __init__(self, **kwargs):
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.maintenance_configuration_id = kwargs.get('maintenance_configuration_id', None)
self.minimal_tls_version = kwargs.get('minimal_tls_version', None)
self.tags = kwargs.get('tags', None)

Expand Down Expand Up @@ -7778,8 +7819,17 @@ class ServerBlobAuditingPolicy(ProxyResource):
storageEndpoint or isAzureMonitorTargetEnabled is required.
:type storage_endpoint: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If state is Enabled and storageEndpoint is
specified, storageAccountAccessKey is required.
auditing storage account.
If state is Enabled and storageEndpoint is specified, not specifying the
storageAccountAccessKey will use SQL server system-assigned managed
identity to access the storage.
Prerequisites for using managed identity authentication:
1. Assign SQL Server a system-assigned managed identity in Azure Active
Directory (AAD).
2. Grant SQL Server identity access to the storage account by adding
'Storage Blob Data Contributor' RBAC role to the server identity.
For more information, see [Auditing to storage using Managed Identity
authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
:type storage_account_access_key: str
:param retention_days: Specifies the number of days to keep in the audit
logs in the storage account.
Expand Down Expand Up @@ -9609,6 +9659,23 @@ def __init__(self, **kwargs):
self.percent_complete = None


class UnlinkParameters(Model):
"""Represents the parameters for Unlink Replication Link request.

:param forced_termination: Determines whether link will be terminated in a
forced or a friendly way.
:type forced_termination: bool
"""

_attribute_map = {
'forced_termination': {'key': 'forcedTermination', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(UnlinkParameters, self).__init__(**kwargs)
self.forced_termination = kwargs.get('forced_termination', None)


class Usage(Model):
"""ARM usage.

Expand Down
Loading