-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR sql/resource-manager] New Cmdlets for Management.Sql to allow…
… customers to add TDE keys and set TDE protector (#3227) * Generated from bdb271f9fc7fa148176e6470e7e5b27cc2450c73 Changes for ManagedInstanceEncryptionProtectors * Generated from 724082f8646ab05191f7eee135fd674fd26d1a94 Changing operation id to ListByInstance as per Jared's recommendation * Generated from f5321fc054067d1d4e8937cfc92452bf4a6a4950 Addressed comments By @anuchandy - Changed comment to created or updated - changed operation if to listByInstance
- Loading branch information
1 parent
8524bd9
commit e429c66
Showing
11 changed files
with
1,042 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# 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 ManagedInstanceEncryptionProtector(ProxyResource): | ||
"""The managed instance encryption protector. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:ivar id: Resource ID. | ||
:vartype id: str | ||
:ivar name: Resource name. | ||
:vartype name: str | ||
:ivar type: Resource type. | ||
:vartype type: str | ||
:ivar kind: Kind of encryption protector. This is metadata used for the | ||
Azure portal experience. | ||
:vartype kind: str | ||
:param server_key_name: The name of the managed instance key. | ||
:type server_key_name: str | ||
:param server_key_type: Required. The encryption protector type like | ||
'ServiceManaged', 'AzureKeyVault'. Possible values include: | ||
'ServiceManaged', 'AzureKeyVault' | ||
:type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType | ||
:ivar uri: The URI of the server key. | ||
:vartype uri: str | ||
:ivar thumbprint: Thumbprint of the server key. | ||
:vartype thumbprint: str | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'kind': {'readonly': True}, | ||
'server_key_type': {'required': True}, | ||
'uri': {'readonly': True}, | ||
'thumbprint': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'kind': {'key': 'kind', 'type': 'str'}, | ||
'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, | ||
'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, | ||
'uri': {'key': 'properties.uri', 'type': 'str'}, | ||
'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) | ||
self.kind = None | ||
self.server_key_name = kwargs.get('server_key_name', None) | ||
self.server_key_type = kwargs.get('server_key_type', None) | ||
self.uri = None | ||
self.thumbprint = None |
27 changes: 27 additions & 0 deletions
27
azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_paged.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ManagedInstanceEncryptionProtectorPaged(Paged): | ||
""" | ||
A paging container for iterating over a list of :class:`ManagedInstanceEncryptionProtector <azure.mgmt.sql.models.ManagedInstanceEncryptionProtector>` object | ||
""" | ||
|
||
_attribute_map = { | ||
'next_link': {'key': 'nextLink', 'type': 'str'}, | ||
'current_page': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'} | ||
} | ||
|
||
def __init__(self, *args, **kwargs): | ||
|
||
super(ManagedInstanceEncryptionProtectorPaged, self).__init__(*args, **kwargs) |
71 changes: 71 additions & 0 deletions
71
azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_encryption_protector_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# 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 ManagedInstanceEncryptionProtector(ProxyResource): | ||
"""The managed instance encryption protector. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:ivar id: Resource ID. | ||
:vartype id: str | ||
:ivar name: Resource name. | ||
:vartype name: str | ||
:ivar type: Resource type. | ||
:vartype type: str | ||
:ivar kind: Kind of encryption protector. This is metadata used for the | ||
Azure portal experience. | ||
:vartype kind: str | ||
:param server_key_name: The name of the managed instance key. | ||
:type server_key_name: str | ||
:param server_key_type: Required. The encryption protector type like | ||
'ServiceManaged', 'AzureKeyVault'. Possible values include: | ||
'ServiceManaged', 'AzureKeyVault' | ||
:type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType | ||
:ivar uri: The URI of the server key. | ||
:vartype uri: str | ||
:ivar thumbprint: Thumbprint of the server key. | ||
:vartype thumbprint: str | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'kind': {'readonly': True}, | ||
'server_key_type': {'required': True}, | ||
'uri': {'readonly': True}, | ||
'thumbprint': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'kind': {'key': 'kind', 'type': 'str'}, | ||
'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, | ||
'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, | ||
'uri': {'key': 'properties.uri', 'type': 'str'}, | ||
'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: | ||
super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) | ||
self.kind = None | ||
self.server_key_name = server_key_name | ||
self.server_key_type = server_key_type | ||
self.uri = None | ||
self.thumbprint = None |
72 changes: 72 additions & 0 deletions
72
azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# 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 ManagedInstanceKey(ProxyResource): | ||
"""A managed instance key. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:ivar id: Resource ID. | ||
:vartype id: str | ||
:ivar name: Resource name. | ||
:vartype name: str | ||
:ivar type: Resource type. | ||
:vartype type: str | ||
:ivar kind: Kind of encryption protector. This is metadata used for the | ||
Azure portal experience. | ||
:vartype kind: str | ||
:param server_key_type: Required. The key type like 'ServiceManaged', | ||
'AzureKeyVault'. Possible values include: 'ServiceManaged', | ||
'AzureKeyVault' | ||
:type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType | ||
:param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, | ||
then the URI is required. | ||
:type uri: str | ||
:ivar thumbprint: Thumbprint of the key. | ||
:vartype thumbprint: str | ||
:ivar creation_date: The key creation date. | ||
:vartype creation_date: datetime | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'kind': {'readonly': True}, | ||
'server_key_type': {'required': True}, | ||
'thumbprint': {'readonly': True}, | ||
'creation_date': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'kind': {'key': 'kind', 'type': 'str'}, | ||
'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, | ||
'uri': {'key': 'properties.uri', 'type': 'str'}, | ||
'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, | ||
'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ManagedInstanceKey, self).__init__(**kwargs) | ||
self.kind = None | ||
self.server_key_type = kwargs.get('server_key_type', None) | ||
self.uri = kwargs.get('uri', None) | ||
self.thumbprint = None | ||
self.creation_date = None |
27 changes: 27 additions & 0 deletions
27
azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_paged.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ManagedInstanceKeyPaged(Paged): | ||
""" | ||
A paging container for iterating over a list of :class:`ManagedInstanceKey <azure.mgmt.sql.models.ManagedInstanceKey>` object | ||
""" | ||
|
||
_attribute_map = { | ||
'next_link': {'key': 'nextLink', 'type': 'str'}, | ||
'current_page': {'key': 'value', 'type': '[ManagedInstanceKey]'} | ||
} | ||
|
||
def __init__(self, *args, **kwargs): | ||
|
||
super(ManagedInstanceKeyPaged, self).__init__(*args, **kwargs) |
72 changes: 72 additions & 0 deletions
72
azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_key_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# 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 ManagedInstanceKey(ProxyResource): | ||
"""A managed instance key. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:ivar id: Resource ID. | ||
:vartype id: str | ||
:ivar name: Resource name. | ||
:vartype name: str | ||
:ivar type: Resource type. | ||
:vartype type: str | ||
:ivar kind: Kind of encryption protector. This is metadata used for the | ||
Azure portal experience. | ||
:vartype kind: str | ||
:param server_key_type: Required. The key type like 'ServiceManaged', | ||
'AzureKeyVault'. Possible values include: 'ServiceManaged', | ||
'AzureKeyVault' | ||
:type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType | ||
:param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, | ||
then the URI is required. | ||
:type uri: str | ||
:ivar thumbprint: Thumbprint of the key. | ||
:vartype thumbprint: str | ||
:ivar creation_date: The key creation date. | ||
:vartype creation_date: datetime | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'kind': {'readonly': True}, | ||
'server_key_type': {'required': True}, | ||
'thumbprint': {'readonly': True}, | ||
'creation_date': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'kind': {'key': 'kind', 'type': 'str'}, | ||
'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, | ||
'uri': {'key': 'properties.uri', 'type': 'str'}, | ||
'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, | ||
'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, | ||
} | ||
|
||
def __init__(self, *, server_key_type, uri: str=None, **kwargs) -> None: | ||
super(ManagedInstanceKey, self).__init__(**kwargs) | ||
self.kind = None | ||
self.server_key_type = server_key_type | ||
self.uri = uri | ||
self.thumbprint = None | ||
self.creation_date = None |
Oops, something went wrong.