diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py index 1a32efa27d9b..689af4ca294b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .key_vault_management_client import KeyVaultManagementClient -from .version import VERSION +from ._configuration import KeyVaultManagementClientConfiguration +from ._key_vault_management_client import KeyVaultManagementClient +__all__ = ['KeyVaultManagementClient', 'KeyVaultManagementClientConfiguration'] -__all__ = ['KeyVaultManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_configuration.py new file mode 100644 index 000000000000..71d3bade9787 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_configuration.py @@ -0,0 +1,50 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class KeyVaultManagementClientConfiguration(AzureConfiguration): + """Configuration for KeyVaultManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(KeyVaultManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-keyvault/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_key_vault_management_client.py similarity index 60% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/key_vault_management_client.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_key_vault_management_client.py index 03eab2e50b9c..6a67ac58223b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_key_vault_management_client.py @@ -11,45 +11,11 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.vaults_operations import VaultsOperations -from .operations.operations import Operations -from . import models - - -class KeyVaultManagementClientConfiguration(AzureConfiguration): - """Configuration for KeyVaultManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(KeyVaultManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('azure-mgmt-keyvault/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import KeyVaultManagementClientConfiguration +from .operations import VaultsOperations +from .operations import Operations +from . import models class KeyVaultManagementClient(SDKClient): diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py index 81aa4653a309..32bd8d5ce780 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py @@ -10,50 +10,50 @@ # -------------------------------------------------------------------------- try: - from .sku_py3 import Sku - from .permissions_py3 import Permissions - from .access_policy_entry_py3 import AccessPolicyEntry - from .vault_properties_py3 import VaultProperties - from .vault_patch_properties_py3 import VaultPatchProperties - from .vault_access_policy_properties_py3 import VaultAccessPolicyProperties - from .deleted_vault_properties_py3 import DeletedVaultProperties - from .vault_create_or_update_parameters_py3 import VaultCreateOrUpdateParameters - from .vault_patch_parameters_py3 import VaultPatchParameters - from .vault_access_policy_parameters_py3 import VaultAccessPolicyParameters - from .vault_py3 import Vault - from .deleted_vault_py3 import DeletedVault - from .resource_py3 import Resource - from .vault_check_name_availability_parameters_py3 import VaultCheckNameAvailabilityParameters - from .check_name_availability_result_py3 import CheckNameAvailabilityResult - from .operation_display_py3 import OperationDisplay - from .log_specification_py3 import LogSpecification - from .service_specification_py3 import ServiceSpecification - from .operation_py3 import Operation + from ._models_py3 import AccessPolicyEntry + from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import DeletedVault + from ._models_py3 import DeletedVaultProperties + from ._models_py3 import LogSpecification + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import Permissions + from ._models_py3 import Resource + from ._models_py3 import ServiceSpecification + from ._models_py3 import Sku + from ._models_py3 import Vault + from ._models_py3 import VaultAccessPolicyParameters + from ._models_py3 import VaultAccessPolicyProperties + from ._models_py3 import VaultCheckNameAvailabilityParameters + from ._models_py3 import VaultCreateOrUpdateParameters + from ._models_py3 import VaultPatchParameters + from ._models_py3 import VaultPatchProperties + from ._models_py3 import VaultProperties except (SyntaxError, ImportError): - from .sku import Sku - from .permissions import Permissions - from .access_policy_entry import AccessPolicyEntry - from .vault_properties import VaultProperties - from .vault_patch_properties import VaultPatchProperties - from .vault_access_policy_properties import VaultAccessPolicyProperties - from .deleted_vault_properties import DeletedVaultProperties - from .vault_create_or_update_parameters import VaultCreateOrUpdateParameters - from .vault_patch_parameters import VaultPatchParameters - from .vault_access_policy_parameters import VaultAccessPolicyParameters - from .vault import Vault - from .deleted_vault import DeletedVault - from .resource import Resource - from .vault_check_name_availability_parameters import VaultCheckNameAvailabilityParameters - from .check_name_availability_result import CheckNameAvailabilityResult - from .operation_display import OperationDisplay - from .log_specification import LogSpecification - from .service_specification import ServiceSpecification - from .operation import Operation -from .vault_paged import VaultPaged -from .deleted_vault_paged import DeletedVaultPaged -from .resource_paged import ResourcePaged -from .operation_paged import OperationPaged -from .key_vault_management_client_enums import ( + from ._models import AccessPolicyEntry + from ._models import CheckNameAvailabilityResult + from ._models import DeletedVault + from ._models import DeletedVaultProperties + from ._models import LogSpecification + from ._models import Operation + from ._models import OperationDisplay + from ._models import Permissions + from ._models import Resource + from ._models import ServiceSpecification + from ._models import Sku + from ._models import Vault + from ._models import VaultAccessPolicyParameters + from ._models import VaultAccessPolicyProperties + from ._models import VaultCheckNameAvailabilityParameters + from ._models import VaultCreateOrUpdateParameters + from ._models import VaultPatchParameters + from ._models import VaultPatchProperties + from ._models import VaultProperties +from ._paged_models import DeletedVaultPaged +from ._paged_models import OperationPaged +from ._paged_models import ResourcePaged +from ._paged_models import VaultPaged +from ._key_vault_management_client_enums import ( SkuName, KeyPermissions, SecretPermissions, @@ -65,25 +65,25 @@ ) __all__ = [ - 'Sku', - 'Permissions', 'AccessPolicyEntry', - 'VaultProperties', - 'VaultPatchProperties', - 'VaultAccessPolicyProperties', - 'DeletedVaultProperties', - 'VaultCreateOrUpdateParameters', - 'VaultPatchParameters', - 'VaultAccessPolicyParameters', - 'Vault', - 'DeletedVault', - 'Resource', - 'VaultCheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', - 'OperationDisplay', + 'DeletedVault', + 'DeletedVaultProperties', 'LogSpecification', - 'ServiceSpecification', 'Operation', + 'OperationDisplay', + 'Permissions', + 'Resource', + 'ServiceSpecification', + 'Sku', + 'Vault', + 'VaultAccessPolicyParameters', + 'VaultAccessPolicyProperties', + 'VaultCheckNameAvailabilityParameters', + 'VaultCreateOrUpdateParameters', + 'VaultPatchParameters', + 'VaultPatchProperties', + 'VaultProperties', 'VaultPaged', 'DeletedVaultPaged', 'ResourcePaged', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/key_vault_management_client_enums.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_key_vault_management_client_enums.py similarity index 100% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/key_vault_management_client_enums.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_key_vault_management_client_enums.py diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py new file mode 100644 index 000000000000..72df3e703a3d --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py @@ -0,0 +1,737 @@ +# 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.serialization import Model + + +class AccessPolicyEntry(Model): + """An identity that have access to the key vault. All identities in the array + must use the same tenant ID as the key vault's tenant ID. + + All required parameters must be populated in order to send to Azure. + + :param tenant_id: Required. The Azure Active Directory tenant ID that + should be used for authenticating requests to the key vault. + :type tenant_id: str + :param object_id: Required. The object ID of a user, service principal or + security group in the Azure Active Directory tenant for the vault. The + object ID must be unique for the list of access policies. + :type object_id: str + :param application_id: Application ID of the client making request on + behalf of a principal + :type application_id: str + :param permissions: Required. Permissions the identity has for keys, + secrets and certificates. + :type permissions: ~azure.mgmt.keyvault.v2016_10_01.models.Permissions + """ + + _validation = { + 'tenant_id': {'required': True}, + 'object_id': {'required': True}, + 'permissions': {'required': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'Permissions'}, + } + + def __init__(self, **kwargs): + super(AccessPolicyEntry, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.application_id = kwargs.get('application_id', None) + self.permissions = kwargs.get('permissions', None) + + +class CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: A boolean value that indicates whether the name is + available for you to use. If true, the name is available. If false, the + name has already been taken or is invalid and cannot be used. + :vartype name_available: bool + :ivar reason: The reason that a vault name could not be used. The Reason + element is only returned if NameAvailable is false. Possible values + include: 'AccountNameInvalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.keyvault.v2016_10_01.models.Reason + :ivar message: An error message explaining the Reason value in more + detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class DeletedVault(Model): + """Deleted vault information with extended details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID for the deleted key vault. + :vartype id: str + :ivar name: The name of the key vault. + :vartype name: str + :ivar type: The resource type of the key vault. + :vartype type: str + :param properties: Properties of the vault + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.DeletedVaultProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'DeletedVaultProperties'}, + } + + def __init__(self, **kwargs): + super(DeletedVault, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class DeletedVaultProperties(Model): + """Properties of the deleted vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar vault_id: The resource id of the original vault. + :vartype vault_id: str + :ivar location: The location of the original vault. + :vartype location: str + :ivar deletion_date: The deleted date. + :vartype deletion_date: datetime + :ivar scheduled_purge_date: The scheduled purged date. + :vartype scheduled_purge_date: datetime + :ivar tags: Tags of the original vault. + :vartype tags: dict[str, str] + """ + + _validation = { + 'vault_id': {'readonly': True}, + 'location': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DeletedVaultProperties, self).__init__(**kwargs) + self.vault_id = None + self.location = None + self.deletion_date = None + self.scheduled_purge_date = None + self.tags = None + + +class LogSpecification(Model): + """Log specification of operation. + + :param name: Name of log specification. + :type name: str + :param display_name: Display name of log specification. + :type display_name: str + :param blob_duration: Blob duration of specification. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class Operation(Model): + """Key Vault REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.keyvault.v2016_10_01.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param service_specification: One property of operation, include metric + specifications. + :type service_specification: + ~azure.mgmt.keyvault.v2016_10_01.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Key Vault. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class Permissions(Model): + """Permissions the identity has for keys, secrets, certificates and storage. + + :param keys: Permissions to keys + :type keys: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.KeyPermissions] + :param secrets: Permissions to secrets + :type secrets: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.SecretPermissions] + :param certificates: Permissions to certificates + :type certificates: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.CertificatePermissions] + :param storage: Permissions to storage accounts + :type storage: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.StoragePermissions] + """ + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[str]'}, + 'secrets': {'key': 'secrets', 'type': '[str]'}, + 'certificates': {'key': 'certificates', 'type': '[str]'}, + 'storage': {'key': 'storage', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Permissions, self).__init__(**kwargs) + self.keys = kwargs.get('keys', None) + self.secrets = kwargs.get('secrets', None) + self.certificates = kwargs.get('certificates', None) + self.storage = kwargs.get('storage', None) + + +class Resource(Model): + """Key Vault resource. + + 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: The Azure Resource Manager resource ID for the key vault. + :vartype id: str + :ivar name: The name of the key vault. + :vartype name: str + :ivar type: The resource type of the key vault. + :vartype type: str + :param location: Required. The supported Azure location where the key + vault should be created. + :type location: str + :param tags: The tags that will be assigned to the key vault. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ServiceSpecification(Model): + """One property of operation, include log specifications. + + :param log_specifications: Log specifications of operation. + :type log_specifications: + list[~azure.mgmt.keyvault.v2016_10_01.models.LogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + + +class Sku(Model): + """SKU details. + + 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 family: Required. SKU family name. Default value: "A" . + :vartype family: str + :param name: Required. SKU name to specify whether the key vault is a + standard vault or a premium vault. Possible values include: 'standard', + 'premium' + :type name: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuName + """ + + _validation = { + 'family': {'required': True, 'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'family': {'key': 'family', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'SkuName'}, + } + + family = "A" + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class Vault(Resource): + """Resource information with extended details. + + 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: The Azure Resource Manager resource ID for the key vault. + :vartype id: str + :ivar name: The name of the key vault. + :vartype name: str + :ivar type: The resource type of the key vault. + :vartype type: str + :param location: Required. The supported Azure location where the key + vault should be created. + :type location: str + :param tags: The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Required. Properties of the vault + :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + } + + def __init__(self, **kwargs): + super(Vault, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class VaultAccessPolicyParameters(Model): + """Parameters for updating the access policy in a vault. + + 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: The resource id of the access policy. + :vartype id: str + :ivar name: The resource name of the access policy. + :vartype name: str + :ivar type: The resource name of the access policy. + :vartype type: str + :ivar location: The resource type of the access policy. + :vartype location: str + :param properties: Required. Properties of the access policy + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultAccessPolicyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VaultAccessPolicyProperties'}, + } + + def __init__(self, **kwargs): + super(VaultAccessPolicyParameters, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.properties = kwargs.get('properties', None) + + +class VaultAccessPolicyProperties(Model): + """Properties of the vault access policy. + + All required parameters must be populated in order to send to Azure. + + :param access_policies: Required. An array of 0 to 16 identities that have + access to the key vault. All identities in the array must use the same + tenant ID as the key vault's tenant ID. + :type access_policies: + list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] + """ + + _validation = { + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + } + + def __init__(self, **kwargs): + super(VaultAccessPolicyProperties, self).__init__(**kwargs) + self.access_policies = kwargs.get('access_policies', None) + + +class VaultCheckNameAvailabilityParameters(Model): + """The parameters used to check the availability of the vault name. + + 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. + + :param name: Required. The vault name. + :type name: str + :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. + Default value: "Microsoft.KeyVault/vaults" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.KeyVault/vaults" + + def __init__(self, **kwargs): + super(VaultCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class VaultCreateOrUpdateParameters(Model): + """Parameters for creating or updating a vault. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The supported Azure location where the key + vault should be created. + :type location: str + :param tags: The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Required. Properties of the vault + :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties + """ + + _validation = { + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + } + + def __init__(self, **kwargs): + super(VaultCreateOrUpdateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + + +class VaultPatchParameters(Model): + """Parameters for creating or updating a vault. + + :param tags: The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Properties of the vault + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultPatchProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultPatchProperties'}, + } + + def __init__(self, **kwargs): + super(VaultPatchParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + + +class VaultPatchProperties(Model): + """Properties of the vault. + + :param tenant_id: The Azure Active Directory tenant ID that should be used + for authenticating requests to the key vault. + :type tenant_id: str + :param sku: SKU details + :type sku: ~azure.mgmt.keyvault.v2016_10_01.models.Sku + :param access_policies: An array of 0 to 16 identities that have access to + the key vault. All identities in the array must use the same tenant ID as + the key vault's tenant ID. + :type access_policies: + list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] + :param enabled_for_deployment: Property to specify whether Azure Virtual + Machines are permitted to retrieve certificates stored as secrets from the + key vault. + :type enabled_for_deployment: bool + :param enabled_for_disk_encryption: Property to specify whether Azure Disk + Encryption is permitted to retrieve secrets from the vault and unwrap + keys. + :type enabled_for_disk_encryption: bool + :param enabled_for_template_deployment: Property to specify whether Azure + Resource Manager is permitted to retrieve secrets from the key vault. + :type enabled_for_template_deployment: bool + :param enable_soft_delete: Property specifying whether recoverable + deletion ('soft' delete) is enabled for this key vault. The property may + not be set to false. + :type enable_soft_delete: bool + :param create_mode: The vault's create mode to indicate whether the vault + need to be recovered or not. Possible values include: 'recover', 'default' + :type create_mode: str or + ~azure.mgmt.keyvault.v2016_10_01.models.CreateMode + :param enable_purge_protection: Property specifying whether protection + against purge is enabled for this vault; it is only effective if soft + delete is also enabled. Once activated, the property may no longer be + reset to false. + :type enable_purge_protection: bool + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, + 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, + 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VaultPatchProperties, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.sku = kwargs.get('sku', None) + self.access_policies = kwargs.get('access_policies', None) + self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) + self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) + self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) + self.enable_soft_delete = kwargs.get('enable_soft_delete', None) + self.create_mode = kwargs.get('create_mode', None) + self.enable_purge_protection = kwargs.get('enable_purge_protection', None) + + +class VaultProperties(Model): + """Properties of the vault. + + All required parameters must be populated in order to send to Azure. + + :param tenant_id: Required. The Azure Active Directory tenant ID that + should be used for authenticating requests to the key vault. + :type tenant_id: str + :param sku: Required. SKU details + :type sku: ~azure.mgmt.keyvault.v2016_10_01.models.Sku + :param access_policies: An array of 0 to 16 identities that have access to + the key vault. All identities in the array must use the same tenant ID as + the key vault's tenant ID. When `createMode` is set to `recover`, access + policies are not required. Otherwise, access policies are required. + :type access_policies: + list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] + :param vault_uri: The URI of the vault for performing operations on keys + and secrets. + :type vault_uri: str + :param enabled_for_deployment: Property to specify whether Azure Virtual + Machines are permitted to retrieve certificates stored as secrets from the + key vault. + :type enabled_for_deployment: bool + :param enabled_for_disk_encryption: Property to specify whether Azure Disk + Encryption is permitted to retrieve secrets from the vault and unwrap + keys. + :type enabled_for_disk_encryption: bool + :param enabled_for_template_deployment: Property to specify whether Azure + Resource Manager is permitted to retrieve secrets from the key vault. + :type enabled_for_template_deployment: bool + :param enable_soft_delete: Property specifying whether recoverable + deletion is enabled for this key vault. Setting this property to true + activates the soft delete feature, whereby vaults or vault entities can be + recovered after deletion. Enabling this functionality is irreversible - + that is, the property does not accept false as its value. + :type enable_soft_delete: bool + :param create_mode: The vault's create mode to indicate whether the vault + need to be recovered or not. Possible values include: 'recover', 'default' + :type create_mode: str or + ~azure.mgmt.keyvault.v2016_10_01.models.CreateMode + :param enable_purge_protection: Property specifying whether protection + against purge is enabled for this vault. Setting this property to true + activates protection against purge for this vault and its content - only + the Key Vault service may initiate a hard, irrecoverable deletion. The + setting is effective only if soft delete is also enabled. Enabling this + functionality is irreversible - that is, the property does not accept + false as its value. + :type enable_purge_protection: bool + """ + + _validation = { + 'tenant_id': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, + 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, + 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VaultProperties, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.sku = kwargs.get('sku', None) + self.access_policies = kwargs.get('access_policies', None) + self.vault_uri = kwargs.get('vault_uri', None) + self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) + self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) + self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) + self.enable_soft_delete = kwargs.get('enable_soft_delete', None) + self.create_mode = kwargs.get('create_mode', None) + self.enable_purge_protection = kwargs.get('enable_purge_protection', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py new file mode 100644 index 000000000000..024c000cb5ed --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py @@ -0,0 +1,737 @@ +# 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.serialization import Model + + +class AccessPolicyEntry(Model): + """An identity that have access to the key vault. All identities in the array + must use the same tenant ID as the key vault's tenant ID. + + All required parameters must be populated in order to send to Azure. + + :param tenant_id: Required. The Azure Active Directory tenant ID that + should be used for authenticating requests to the key vault. + :type tenant_id: str + :param object_id: Required. The object ID of a user, service principal or + security group in the Azure Active Directory tenant for the vault. The + object ID must be unique for the list of access policies. + :type object_id: str + :param application_id: Application ID of the client making request on + behalf of a principal + :type application_id: str + :param permissions: Required. Permissions the identity has for keys, + secrets and certificates. + :type permissions: ~azure.mgmt.keyvault.v2016_10_01.models.Permissions + """ + + _validation = { + 'tenant_id': {'required': True}, + 'object_id': {'required': True}, + 'permissions': {'required': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'Permissions'}, + } + + def __init__(self, *, tenant_id: str, object_id: str, permissions, application_id: str=None, **kwargs) -> None: + super(AccessPolicyEntry, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.object_id = object_id + self.application_id = application_id + self.permissions = permissions + + +class CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: A boolean value that indicates whether the name is + available for you to use. If true, the name is available. If false, the + name has already been taken or is invalid and cannot be used. + :vartype name_available: bool + :ivar reason: The reason that a vault name could not be used. The Reason + element is only returned if NameAvailable is false. Possible values + include: 'AccountNameInvalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.keyvault.v2016_10_01.models.Reason + :ivar message: An error message explaining the Reason value in more + detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class DeletedVault(Model): + """Deleted vault information with extended details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID for the deleted key vault. + :vartype id: str + :ivar name: The name of the key vault. + :vartype name: str + :ivar type: The resource type of the key vault. + :vartype type: str + :param properties: Properties of the vault + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.DeletedVaultProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'DeletedVaultProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(DeletedVault, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class DeletedVaultProperties(Model): + """Properties of the deleted vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar vault_id: The resource id of the original vault. + :vartype vault_id: str + :ivar location: The location of the original vault. + :vartype location: str + :ivar deletion_date: The deleted date. + :vartype deletion_date: datetime + :ivar scheduled_purge_date: The scheduled purged date. + :vartype scheduled_purge_date: datetime + :ivar tags: Tags of the original vault. + :vartype tags: dict[str, str] + """ + + _validation = { + 'vault_id': {'readonly': True}, + 'location': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(DeletedVaultProperties, self).__init__(**kwargs) + self.vault_id = None + self.location = None + self.deletion_date = None + self.scheduled_purge_date = None + self.tags = None + + +class LogSpecification(Model): + """Log specification of operation. + + :param name: Name of log specification. + :type name: str + :param display_name: Display name of log specification. + :type display_name: str + :param blob_duration: Blob duration of specification. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class Operation(Model): + """Key Vault REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.keyvault.v2016_10_01.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param service_specification: One property of operation, include metric + specifications. + :type service_specification: + ~azure.mgmt.keyvault.v2016_10_01.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.service_specification = service_specification + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Key Vault. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Permissions(Model): + """Permissions the identity has for keys, secrets, certificates and storage. + + :param keys: Permissions to keys + :type keys: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.KeyPermissions] + :param secrets: Permissions to secrets + :type secrets: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.SecretPermissions] + :param certificates: Permissions to certificates + :type certificates: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.CertificatePermissions] + :param storage: Permissions to storage accounts + :type storage: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.StoragePermissions] + """ + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[str]'}, + 'secrets': {'key': 'secrets', 'type': '[str]'}, + 'certificates': {'key': 'certificates', 'type': '[str]'}, + 'storage': {'key': 'storage', 'type': '[str]'}, + } + + def __init__(self, *, keys=None, secrets=None, certificates=None, storage=None, **kwargs) -> None: + super(Permissions, self).__init__(**kwargs) + self.keys = keys + self.secrets = secrets + self.certificates = certificates + self.storage = storage + + +class Resource(Model): + """Key Vault resource. + + 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: The Azure Resource Manager resource ID for the key vault. + :vartype id: str + :ivar name: The name of the key vault. + :vartype name: str + :ivar type: The resource type of the key vault. + :vartype type: str + :param location: Required. The supported Azure location where the key + vault should be created. + :type location: str + :param tags: The tags that will be assigned to the key vault. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ServiceSpecification(Model): + """One property of operation, include log specifications. + + :param log_specifications: Log specifications of operation. + :type log_specifications: + list[~azure.mgmt.keyvault.v2016_10_01.models.LogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, *, log_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + + +class Sku(Model): + """SKU details. + + 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 family: Required. SKU family name. Default value: "A" . + :vartype family: str + :param name: Required. SKU name to specify whether the key vault is a + standard vault or a premium vault. Possible values include: 'standard', + 'premium' + :type name: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuName + """ + + _validation = { + 'family': {'required': True, 'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'family': {'key': 'family', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'SkuName'}, + } + + family = "A" + + def __init__(self, *, name, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + + +class Vault(Resource): + """Resource information with extended details. + + 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: The Azure Resource Manager resource ID for the key vault. + :vartype id: str + :ivar name: The name of the key vault. + :vartype name: str + :ivar type: The resource type of the key vault. + :vartype type: str + :param location: Required. The supported Azure location where the key + vault should be created. + :type location: str + :param tags: The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Required. Properties of the vault + :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + } + + def __init__(self, *, location: str, properties, tags=None, **kwargs) -> None: + super(Vault, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class VaultAccessPolicyParameters(Model): + """Parameters for updating the access policy in a vault. + + 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: The resource id of the access policy. + :vartype id: str + :ivar name: The resource name of the access policy. + :vartype name: str + :ivar type: The resource name of the access policy. + :vartype type: str + :ivar location: The resource type of the access policy. + :vartype location: str + :param properties: Required. Properties of the access policy + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultAccessPolicyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VaultAccessPolicyProperties'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(VaultAccessPolicyParameters, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.properties = properties + + +class VaultAccessPolicyProperties(Model): + """Properties of the vault access policy. + + All required parameters must be populated in order to send to Azure. + + :param access_policies: Required. An array of 0 to 16 identities that have + access to the key vault. All identities in the array must use the same + tenant ID as the key vault's tenant ID. + :type access_policies: + list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] + """ + + _validation = { + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + } + + def __init__(self, *, access_policies, **kwargs) -> None: + super(VaultAccessPolicyProperties, self).__init__(**kwargs) + self.access_policies = access_policies + + +class VaultCheckNameAvailabilityParameters(Model): + """The parameters used to check the availability of the vault name. + + 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. + + :param name: Required. The vault name. + :type name: str + :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. + Default value: "Microsoft.KeyVault/vaults" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.KeyVault/vaults" + + def __init__(self, *, name: str, **kwargs) -> None: + super(VaultCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + + +class VaultCreateOrUpdateParameters(Model): + """Parameters for creating or updating a vault. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The supported Azure location where the key + vault should be created. + :type location: str + :param tags: The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Required. Properties of the vault + :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties + """ + + _validation = { + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + } + + def __init__(self, *, location: str, properties, tags=None, **kwargs) -> None: + super(VaultCreateOrUpdateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.properties = properties + + +class VaultPatchParameters(Model): + """Parameters for creating or updating a vault. + + :param tags: The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Properties of the vault + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultPatchProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultPatchProperties'}, + } + + def __init__(self, *, tags=None, properties=None, **kwargs) -> None: + super(VaultPatchParameters, self).__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class VaultPatchProperties(Model): + """Properties of the vault. + + :param tenant_id: The Azure Active Directory tenant ID that should be used + for authenticating requests to the key vault. + :type tenant_id: str + :param sku: SKU details + :type sku: ~azure.mgmt.keyvault.v2016_10_01.models.Sku + :param access_policies: An array of 0 to 16 identities that have access to + the key vault. All identities in the array must use the same tenant ID as + the key vault's tenant ID. + :type access_policies: + list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] + :param enabled_for_deployment: Property to specify whether Azure Virtual + Machines are permitted to retrieve certificates stored as secrets from the + key vault. + :type enabled_for_deployment: bool + :param enabled_for_disk_encryption: Property to specify whether Azure Disk + Encryption is permitted to retrieve secrets from the vault and unwrap + keys. + :type enabled_for_disk_encryption: bool + :param enabled_for_template_deployment: Property to specify whether Azure + Resource Manager is permitted to retrieve secrets from the key vault. + :type enabled_for_template_deployment: bool + :param enable_soft_delete: Property specifying whether recoverable + deletion ('soft' delete) is enabled for this key vault. The property may + not be set to false. + :type enable_soft_delete: bool + :param create_mode: The vault's create mode to indicate whether the vault + need to be recovered or not. Possible values include: 'recover', 'default' + :type create_mode: str or + ~azure.mgmt.keyvault.v2016_10_01.models.CreateMode + :param enable_purge_protection: Property specifying whether protection + against purge is enabled for this vault; it is only effective if soft + delete is also enabled. Once activated, the property may no longer be + reset to false. + :type enable_purge_protection: bool + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, + 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, + 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + } + + def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, **kwargs) -> None: + super(VaultPatchProperties, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.sku = sku + self.access_policies = access_policies + self.enabled_for_deployment = enabled_for_deployment + self.enabled_for_disk_encryption = enabled_for_disk_encryption + self.enabled_for_template_deployment = enabled_for_template_deployment + self.enable_soft_delete = enable_soft_delete + self.create_mode = create_mode + self.enable_purge_protection = enable_purge_protection + + +class VaultProperties(Model): + """Properties of the vault. + + All required parameters must be populated in order to send to Azure. + + :param tenant_id: Required. The Azure Active Directory tenant ID that + should be used for authenticating requests to the key vault. + :type tenant_id: str + :param sku: Required. SKU details + :type sku: ~azure.mgmt.keyvault.v2016_10_01.models.Sku + :param access_policies: An array of 0 to 16 identities that have access to + the key vault. All identities in the array must use the same tenant ID as + the key vault's tenant ID. When `createMode` is set to `recover`, access + policies are not required. Otherwise, access policies are required. + :type access_policies: + list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] + :param vault_uri: The URI of the vault for performing operations on keys + and secrets. + :type vault_uri: str + :param enabled_for_deployment: Property to specify whether Azure Virtual + Machines are permitted to retrieve certificates stored as secrets from the + key vault. + :type enabled_for_deployment: bool + :param enabled_for_disk_encryption: Property to specify whether Azure Disk + Encryption is permitted to retrieve secrets from the vault and unwrap + keys. + :type enabled_for_disk_encryption: bool + :param enabled_for_template_deployment: Property to specify whether Azure + Resource Manager is permitted to retrieve secrets from the key vault. + :type enabled_for_template_deployment: bool + :param enable_soft_delete: Property specifying whether recoverable + deletion is enabled for this key vault. Setting this property to true + activates the soft delete feature, whereby vaults or vault entities can be + recovered after deletion. Enabling this functionality is irreversible - + that is, the property does not accept false as its value. + :type enable_soft_delete: bool + :param create_mode: The vault's create mode to indicate whether the vault + need to be recovered or not. Possible values include: 'recover', 'default' + :type create_mode: str or + ~azure.mgmt.keyvault.v2016_10_01.models.CreateMode + :param enable_purge_protection: Property specifying whether protection + against purge is enabled for this vault. Setting this property to true + activates protection against purge for this vault and its content - only + the Key Vault service may initiate a hard, irrecoverable deletion. The + setting is effective only if soft delete is also enabled. Enabling this + functionality is irreversible - that is, the property does not accept + false as its value. + :type enable_purge_protection: bool + """ + + _validation = { + 'tenant_id': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, + 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, + 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + } + + def __init__(self, *, tenant_id: str, sku, access_policies=None, vault_uri: str=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, **kwargs) -> None: + super(VaultProperties, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.sku = sku + self.access_policies = access_policies + self.vault_uri = vault_uri + self.enabled_for_deployment = enabled_for_deployment + self.enabled_for_disk_encryption = enabled_for_disk_encryption + self.enabled_for_template_deployment = enabled_for_template_deployment + self.enable_soft_delete = enable_soft_delete + self.create_mode = create_mode + self.enable_purge_protection = enable_purge_protection diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_paged_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_paged_models.py new file mode 100644 index 000000000000..59103664335e --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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 VaultPaged(Paged): + """ + A paging container for iterating over a list of :class:`Vault ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Vault]'} + } + + def __init__(self, *args, **kwargs): + + super(VaultPaged, self).__init__(*args, **kwargs) +class DeletedVaultPaged(Paged): + """ + A paging container for iterating over a list of :class:`DeletedVault ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeletedVault]'} + } + + def __init__(self, *args, **kwargs): + + super(DeletedVaultPaged, self).__init__(*args, **kwargs) +class ResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`Resource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Resource]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourcePaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry.py deleted file mode 100644 index 13e5fa19f392..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.serialization import Model - - -class AccessPolicyEntry(Model): - """An identity that have access to the key vault. All identities in the array - must use the same tenant ID as the key vault's tenant ID. - - All required parameters must be populated in order to send to Azure. - - :param tenant_id: Required. The Azure Active Directory tenant ID that - should be used for authenticating requests to the key vault. - :type tenant_id: str - :param object_id: Required. The object ID of a user, service principal or - security group in the Azure Active Directory tenant for the vault. The - object ID must be unique for the list of access policies. - :type object_id: str - :param application_id: Application ID of the client making request on - behalf of a principal - :type application_id: str - :param permissions: Required. Permissions the identity has for keys, - secrets and certificates. - :type permissions: ~azure.mgmt.keyvault.v2016_10_01.models.Permissions - """ - - _validation = { - 'tenant_id': {'required': True}, - 'object_id': {'required': True}, - 'permissions': {'required': True}, - } - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'application_id': {'key': 'applicationId', 'type': 'str'}, - 'permissions': {'key': 'permissions', 'type': 'Permissions'}, - } - - def __init__(self, **kwargs): - super(AccessPolicyEntry, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.object_id = kwargs.get('object_id', None) - self.application_id = kwargs.get('application_id', None) - self.permissions = kwargs.get('permissions', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry_py3.py deleted file mode 100644 index 65a925392f8b..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.serialization import Model - - -class AccessPolicyEntry(Model): - """An identity that have access to the key vault. All identities in the array - must use the same tenant ID as the key vault's tenant ID. - - All required parameters must be populated in order to send to Azure. - - :param tenant_id: Required. The Azure Active Directory tenant ID that - should be used for authenticating requests to the key vault. - :type tenant_id: str - :param object_id: Required. The object ID of a user, service principal or - security group in the Azure Active Directory tenant for the vault. The - object ID must be unique for the list of access policies. - :type object_id: str - :param application_id: Application ID of the client making request on - behalf of a principal - :type application_id: str - :param permissions: Required. Permissions the identity has for keys, - secrets and certificates. - :type permissions: ~azure.mgmt.keyvault.v2016_10_01.models.Permissions - """ - - _validation = { - 'tenant_id': {'required': True}, - 'object_id': {'required': True}, - 'permissions': {'required': True}, - } - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'application_id': {'key': 'applicationId', 'type': 'str'}, - 'permissions': {'key': 'permissions', 'type': 'Permissions'}, - } - - def __init__(self, *, tenant_id: str, object_id: str, permissions, application_id: str=None, **kwargs) -> None: - super(AccessPolicyEntry, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.object_id = object_id - self.application_id = application_id - self.permissions = permissions diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result.py deleted file mode 100644 index 90d9b3655ac2..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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.serialization import Model - - -class CheckNameAvailabilityResult(Model): - """The CheckNameAvailability operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: A boolean value that indicates whether the name is - available for you to use. If true, the name is available. If false, the - name has already been taken or is invalid and cannot be used. - :vartype name_available: bool - :ivar reason: The reason that a vault name could not be used. The Reason - element is only returned if NameAvailable is false. Possible values - include: 'AccountNameInvalid', 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.keyvault.v2016_10_01.models.Reason - :ivar message: An error message explaining the Reason value in more - detail. - :vartype message: str - """ - - _validation = { - 'name_available': {'readonly': True}, - 'reason': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'Reason'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResult, self).__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = None diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result_py3.py deleted file mode 100644 index 37d2f059496f..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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.serialization import Model - - -class CheckNameAvailabilityResult(Model): - """The CheckNameAvailability operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: A boolean value that indicates whether the name is - available for you to use. If true, the name is available. If false, the - name has already been taken or is invalid and cannot be used. - :vartype name_available: bool - :ivar reason: The reason that a vault name could not be used. The Reason - element is only returned if NameAvailable is false. Possible values - include: 'AccountNameInvalid', 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.keyvault.v2016_10_01.models.Reason - :ivar message: An error message explaining the Reason value in more - detail. - :vartype message: str - """ - - _validation = { - 'name_available': {'readonly': True}, - 'reason': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'Reason'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityResult, self).__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = None diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault.py deleted file mode 100644 index 609c601594ba..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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.serialization import Model - - -class DeletedVault(Model): - """Deleted vault information with extended details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource ID for the deleted key vault. - :vartype id: str - :ivar name: The name of the key vault. - :vartype name: str - :ivar type: The resource type of the key vault. - :vartype type: str - :param properties: Properties of the vault - :type properties: - ~azure.mgmt.keyvault.v2016_10_01.models.DeletedVaultProperties - """ - - _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'}, - 'properties': {'key': 'properties', 'type': 'DeletedVaultProperties'}, - } - - def __init__(self, **kwargs): - super(DeletedVault, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.properties = kwargs.get('properties', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_paged.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_paged.py deleted file mode 100644 index a1e0b00680bd..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 DeletedVaultPaged(Paged): - """ - A paging container for iterating over a list of :class:`DeletedVault ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DeletedVault]'} - } - - def __init__(self, *args, **kwargs): - - super(DeletedVaultPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties.py deleted file mode 100644 index 76fa9d43de1f..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.serialization import Model - - -class DeletedVaultProperties(Model): - """Properties of the deleted vault. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar vault_id: The resource id of the original vault. - :vartype vault_id: str - :ivar location: The location of the original vault. - :vartype location: str - :ivar deletion_date: The deleted date. - :vartype deletion_date: datetime - :ivar scheduled_purge_date: The scheduled purged date. - :vartype scheduled_purge_date: datetime - :ivar tags: Tags of the original vault. - :vartype tags: dict[str, str] - """ - - _validation = { - 'vault_id': {'readonly': True}, - 'location': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'scheduled_purge_date': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'vault_id': {'key': 'vaultId', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, - 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DeletedVaultProperties, self).__init__(**kwargs) - self.vault_id = None - self.location = None - self.deletion_date = None - self.scheduled_purge_date = None - self.tags = None diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties_py3.py deleted file mode 100644 index c78663f989b5..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.serialization import Model - - -class DeletedVaultProperties(Model): - """Properties of the deleted vault. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar vault_id: The resource id of the original vault. - :vartype vault_id: str - :ivar location: The location of the original vault. - :vartype location: str - :ivar deletion_date: The deleted date. - :vartype deletion_date: datetime - :ivar scheduled_purge_date: The scheduled purged date. - :vartype scheduled_purge_date: datetime - :ivar tags: Tags of the original vault. - :vartype tags: dict[str, str] - """ - - _validation = { - 'vault_id': {'readonly': True}, - 'location': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'scheduled_purge_date': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'vault_id': {'key': 'vaultId', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, - 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs) -> None: - super(DeletedVaultProperties, self).__init__(**kwargs) - self.vault_id = None - self.location = None - self.deletion_date = None - self.scheduled_purge_date = None - self.tags = None diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_py3.py deleted file mode 100644 index b95c97375eed..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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.serialization import Model - - -class DeletedVault(Model): - """Deleted vault information with extended details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource ID for the deleted key vault. - :vartype id: str - :ivar name: The name of the key vault. - :vartype name: str - :ivar type: The resource type of the key vault. - :vartype type: str - :param properties: Properties of the vault - :type properties: - ~azure.mgmt.keyvault.v2016_10_01.models.DeletedVaultProperties - """ - - _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'}, - 'properties': {'key': 'properties', 'type': 'DeletedVaultProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(DeletedVault, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.properties = properties diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification.py deleted file mode 100644 index 092f8d7039b9..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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.serialization import Model - - -class LogSpecification(Model): - """Log specification of operation. - - :param name: Name of log specification. - :type name: str - :param display_name: Display name of log specification. - :type display_name: str - :param blob_duration: Blob duration of specification. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.blob_duration = kwargs.get('blob_duration', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification_py3.py deleted file mode 100644 index 091c8250d3f2..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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.serialization import Model - - -class LogSpecification(Model): - """Log specification of operation. - - :param name: Name of log specification. - :type name: str - :param display_name: Display name of log specification. - :type display_name: str - :param blob_duration: Blob duration of specification. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: - super(LogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation.py deleted file mode 100644 index 5fce4f84421c..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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.serialization import Model - - -class Operation(Model): - """Key Vault REST API operation definition. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.keyvault.v2016_10_01.models.OperationDisplay - :param origin: The origin of operations. - :type origin: str - :param service_specification: One property of operation, include metric - specifications. - :type service_specification: - ~azure.mgmt.keyvault.v2016_10_01.models.ServiceSpecification - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.service_specification = kwargs.get('service_specification', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display.py deleted file mode 100644 index a596e12e83a9..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft Key Vault. - :type provider: str - :param resource: Resource on which the operation is performed etc. - :type resource: str - :param operation: Type of operation: get, read, delete, etc. - :type operation: str - :param description: Description of operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display_py3.py deleted file mode 100644 index 808fdd32c1fd..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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.serialization import Model - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft Key Vault. - :type provider: str - :param resource: Resource on which the operation is performed etc. - :type resource: str - :param operation: Type of operation: get, read, delete, etc. - :type operation: str - :param description: Description of operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_paged.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_paged.py deleted file mode 100644 index 7b2d05ee753d..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_py3.py deleted file mode 100644 index dd93f17bb0ff..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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.serialization import Model - - -class Operation(Model): - """Key Vault REST API operation definition. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.keyvault.v2016_10_01.models.OperationDisplay - :param origin: The origin of operations. - :type origin: str - :param service_specification: One property of operation, include metric - specifications. - :type service_specification: - ~azure.mgmt.keyvault.v2016_10_01.models.ServiceSpecification - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, name: str=None, display=None, origin: str=None, service_specification=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.service_specification = service_specification diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions.py deleted file mode 100644 index 4c2bb10cb1fc..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.serialization import Model - - -class Permissions(Model): - """Permissions the identity has for keys, secrets, certificates and storage. - - :param keys: Permissions to keys - :type keys: list[str or - ~azure.mgmt.keyvault.v2016_10_01.models.KeyPermissions] - :param secrets: Permissions to secrets - :type secrets: list[str or - ~azure.mgmt.keyvault.v2016_10_01.models.SecretPermissions] - :param certificates: Permissions to certificates - :type certificates: list[str or - ~azure.mgmt.keyvault.v2016_10_01.models.CertificatePermissions] - :param storage: Permissions to storage accounts - :type storage: list[str or - ~azure.mgmt.keyvault.v2016_10_01.models.StoragePermissions] - """ - - _attribute_map = { - 'keys': {'key': 'keys', 'type': '[str]'}, - 'secrets': {'key': 'secrets', 'type': '[str]'}, - 'certificates': {'key': 'certificates', 'type': '[str]'}, - 'storage': {'key': 'storage', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(Permissions, self).__init__(**kwargs) - self.keys = kwargs.get('keys', None) - self.secrets = kwargs.get('secrets', None) - self.certificates = kwargs.get('certificates', None) - self.storage = kwargs.get('storage', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions_py3.py deleted file mode 100644 index dfb233091f5f..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.serialization import Model - - -class Permissions(Model): - """Permissions the identity has for keys, secrets, certificates and storage. - - :param keys: Permissions to keys - :type keys: list[str or - ~azure.mgmt.keyvault.v2016_10_01.models.KeyPermissions] - :param secrets: Permissions to secrets - :type secrets: list[str or - ~azure.mgmt.keyvault.v2016_10_01.models.SecretPermissions] - :param certificates: Permissions to certificates - :type certificates: list[str or - ~azure.mgmt.keyvault.v2016_10_01.models.CertificatePermissions] - :param storage: Permissions to storage accounts - :type storage: list[str or - ~azure.mgmt.keyvault.v2016_10_01.models.StoragePermissions] - """ - - _attribute_map = { - 'keys': {'key': 'keys', 'type': '[str]'}, - 'secrets': {'key': 'secrets', 'type': '[str]'}, - 'certificates': {'key': 'certificates', 'type': '[str]'}, - 'storage': {'key': 'storage', 'type': '[str]'}, - } - - def __init__(self, *, keys=None, secrets=None, certificates=None, storage=None, **kwargs) -> None: - super(Permissions, self).__init__(**kwargs) - self.keys = keys - self.secrets = secrets - self.certificates = certificates - self.storage = storage diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource.py deleted file mode 100644 index 0c30e1ffcb16..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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.serialization import Model - - -class Resource(Model): - """Key Vault resource. - - 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: The Azure Resource Manager resource ID for the key vault. - :vartype id: str - :ivar name: The name of the key vault. - :vartype name: str - :ivar type: The resource type of the key vault. - :vartype type: str - :param location: Required. The supported Azure location where the key - vault should be created. - :type location: str - :param tags: The tags that will be assigned to the key vault. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_paged.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_paged.py deleted file mode 100644 index 69ccd6528635..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`Resource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Resource]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_py3.py deleted file mode 100644 index 57daac0d2a91..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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.serialization import Model - - -class Resource(Model): - """Key Vault resource. - - 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: The Azure Resource Manager resource ID for the key vault. - :vartype id: str - :ivar name: The name of the key vault. - :vartype name: str - :ivar type: The resource type of the key vault. - :vartype type: str - :param location: Required. The supported Azure location where the key - vault should be created. - :type location: str - :param tags: The tags that will be assigned to the key vault. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification.py deleted file mode 100644 index 386aa85a8fdb..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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.serialization import Model - - -class ServiceSpecification(Model): - """One property of operation, include log specifications. - - :param log_specifications: Log specifications of operation. - :type log_specifications: - list[~azure.mgmt.keyvault.v2016_10_01.models.LogSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__(self, **kwargs): - super(ServiceSpecification, self).__init__(**kwargs) - self.log_specifications = kwargs.get('log_specifications', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification_py3.py deleted file mode 100644 index fb2309d925d8..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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.serialization import Model - - -class ServiceSpecification(Model): - """One property of operation, include log specifications. - - :param log_specifications: Log specifications of operation. - :type log_specifications: - list[~azure.mgmt.keyvault.v2016_10_01.models.LogSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__(self, *, log_specifications=None, **kwargs) -> None: - super(ServiceSpecification, self).__init__(**kwargs) - self.log_specifications = log_specifications diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku.py deleted file mode 100644 index 2d9b6d4c0e85..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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.serialization import Model - - -class Sku(Model): - """SKU details. - - 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 family: Required. SKU family name. Default value: "A" . - :vartype family: str - :param name: Required. SKU name to specify whether the key vault is a - standard vault or a premium vault. Possible values include: 'standard', - 'premium' - :type name: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuName - """ - - _validation = { - 'family': {'required': True, 'constant': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'family': {'key': 'family', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'SkuName'}, - } - - family = "A" - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku_py3.py deleted file mode 100644 index de27350b9a0b..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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.serialization import Model - - -class Sku(Model): - """SKU details. - - 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 family: Required. SKU family name. Default value: "A" . - :vartype family: str - :param name: Required. SKU name to specify whether the key vault is a - standard vault or a premium vault. Possible values include: 'standard', - 'premium' - :type name: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuName - """ - - _validation = { - 'family': {'required': True, 'constant': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'family': {'key': 'family', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'SkuName'}, - } - - family = "A" - - def __init__(self, *, name, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault.py deleted file mode 100644 index 00ff8c07e743..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 .resource import Resource - - -class Vault(Resource): - """Resource information with extended details. - - 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: The Azure Resource Manager resource ID for the key vault. - :vartype id: str - :ivar name: The name of the key vault. - :vartype name: str - :ivar type: The resource type of the key vault. - :vartype type: str - :param location: Required. The supported Azure location where the key - vault should be created. - :type location: str - :param tags: The tags that will be assigned to the key vault. - :type tags: dict[str, str] - :param properties: Required. Properties of the vault - :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'VaultProperties'}, - } - - def __init__(self, **kwargs): - super(Vault, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters.py deleted file mode 100644 index 70b009f57e95..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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.serialization import Model - - -class VaultAccessPolicyParameters(Model): - """Parameters for updating the access policy in a vault. - - 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: The resource id of the access policy. - :vartype id: str - :ivar name: The resource name of the access policy. - :vartype name: str - :ivar type: The resource name of the access policy. - :vartype type: str - :ivar location: The resource type of the access policy. - :vartype location: str - :param properties: Required. Properties of the access policy - :type properties: - ~azure.mgmt.keyvault.v2016_10_01.models.VaultAccessPolicyProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'VaultAccessPolicyProperties'}, - } - - def __init__(self, **kwargs): - super(VaultAccessPolicyParameters, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.properties = kwargs.get('properties', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters_py3.py deleted file mode 100644 index c2ee240a9555..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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.serialization import Model - - -class VaultAccessPolicyParameters(Model): - """Parameters for updating the access policy in a vault. - - 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: The resource id of the access policy. - :vartype id: str - :ivar name: The resource name of the access policy. - :vartype name: str - :ivar type: The resource name of the access policy. - :vartype type: str - :ivar location: The resource type of the access policy. - :vartype location: str - :param properties: Required. Properties of the access policy - :type properties: - ~azure.mgmt.keyvault.v2016_10_01.models.VaultAccessPolicyProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'VaultAccessPolicyProperties'}, - } - - def __init__(self, *, properties, **kwargs) -> None: - super(VaultAccessPolicyParameters, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.properties = properties diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties.py deleted file mode 100644 index 6f19efbc0bef..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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.serialization import Model - - -class VaultAccessPolicyProperties(Model): - """Properties of the vault access policy. - - All required parameters must be populated in order to send to Azure. - - :param access_policies: Required. An array of 0 to 16 identities that have - access to the key vault. All identities in the array must use the same - tenant ID as the key vault's tenant ID. - :type access_policies: - list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] - """ - - _validation = { - 'access_policies': {'required': True}, - } - - _attribute_map = { - 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, - } - - def __init__(self, **kwargs): - super(VaultAccessPolicyProperties, self).__init__(**kwargs) - self.access_policies = kwargs.get('access_policies', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties_py3.py deleted file mode 100644 index a19bb22b5bd7..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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.serialization import Model - - -class VaultAccessPolicyProperties(Model): - """Properties of the vault access policy. - - All required parameters must be populated in order to send to Azure. - - :param access_policies: Required. An array of 0 to 16 identities that have - access to the key vault. All identities in the array must use the same - tenant ID as the key vault's tenant ID. - :type access_policies: - list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] - """ - - _validation = { - 'access_policies': {'required': True}, - } - - _attribute_map = { - 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, - } - - def __init__(self, *, access_policies, **kwargs) -> None: - super(VaultAccessPolicyProperties, self).__init__(**kwargs) - self.access_policies = access_policies diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters.py deleted file mode 100644 index 8ce72b48dc91..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.serialization import Model - - -class VaultCheckNameAvailabilityParameters(Model): - """The parameters used to check the availability of the vault name. - - 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. - - :param name: Required. The vault name. - :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. - Default value: "Microsoft.KeyVault/vaults" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.KeyVault/vaults" - - def __init__(self, **kwargs): - super(VaultCheckNameAvailabilityParameters, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters_py3.py deleted file mode 100644 index 633f652e6b15..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.serialization import Model - - -class VaultCheckNameAvailabilityParameters(Model): - """The parameters used to check the availability of the vault name. - - 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. - - :param name: Required. The vault name. - :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. - Default value: "Microsoft.KeyVault/vaults" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "Microsoft.KeyVault/vaults" - - def __init__(self, *, name: str, **kwargs) -> None: - super(VaultCheckNameAvailabilityParameters, self).__init__(**kwargs) - self.name = name diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters.py deleted file mode 100644 index ed8513b8fa66..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.serialization import Model - - -class VaultCreateOrUpdateParameters(Model): - """Parameters for creating or updating a vault. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The supported Azure location where the key - vault should be created. - :type location: str - :param tags: The tags that will be assigned to the key vault. - :type tags: dict[str, str] - :param properties: Required. Properties of the vault - :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties - """ - - _validation = { - 'location': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'VaultProperties'}, - } - - def __init__(self, **kwargs): - super(VaultCreateOrUpdateParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters_py3.py deleted file mode 100644 index 80d889d58e5b..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.serialization import Model - - -class VaultCreateOrUpdateParameters(Model): - """Parameters for creating or updating a vault. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The supported Azure location where the key - vault should be created. - :type location: str - :param tags: The tags that will be assigned to the key vault. - :type tags: dict[str, str] - :param properties: Required. Properties of the vault - :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties - """ - - _validation = { - 'location': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'VaultProperties'}, - } - - def __init__(self, *, location: str, properties, tags=None, **kwargs) -> None: - super(VaultCreateOrUpdateParameters, self).__init__(**kwargs) - self.location = location - self.tags = tags - self.properties = properties diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_paged.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_paged.py deleted file mode 100644 index db528baa43de..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 VaultPaged(Paged): - """ - A paging container for iterating over a list of :class:`Vault ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Vault]'} - } - - def __init__(self, *args, **kwargs): - - super(VaultPaged, self).__init__(*args, **kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters.py deleted file mode 100644 index 1e5c97adf0e6..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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.serialization import Model - - -class VaultPatchParameters(Model): - """Parameters for creating or updating a vault. - - :param tags: The tags that will be assigned to the key vault. - :type tags: dict[str, str] - :param properties: Properties of the vault - :type properties: - ~azure.mgmt.keyvault.v2016_10_01.models.VaultPatchProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'VaultPatchProperties'}, - } - - def __init__(self, **kwargs): - super(VaultPatchParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters_py3.py deleted file mode 100644 index 7b2ef2cf4b97..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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.serialization import Model - - -class VaultPatchParameters(Model): - """Parameters for creating or updating a vault. - - :param tags: The tags that will be assigned to the key vault. - :type tags: dict[str, str] - :param properties: Properties of the vault - :type properties: - ~azure.mgmt.keyvault.v2016_10_01.models.VaultPatchProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'VaultPatchProperties'}, - } - - def __init__(self, *, tags=None, properties=None, **kwargs) -> None: - super(VaultPatchParameters, self).__init__(**kwargs) - self.tags = tags - self.properties = properties diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties.py deleted file mode 100644 index 1a443f164840..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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.serialization import Model - - -class VaultPatchProperties(Model): - """Properties of the vault. - - :param tenant_id: The Azure Active Directory tenant ID that should be used - for authenticating requests to the key vault. - :type tenant_id: str - :param sku: SKU details - :type sku: ~azure.mgmt.keyvault.v2016_10_01.models.Sku - :param access_policies: An array of 0 to 16 identities that have access to - the key vault. All identities in the array must use the same tenant ID as - the key vault's tenant ID. - :type access_policies: - list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] - :param enabled_for_deployment: Property to specify whether Azure Virtual - Machines are permitted to retrieve certificates stored as secrets from the - key vault. - :type enabled_for_deployment: bool - :param enabled_for_disk_encryption: Property to specify whether Azure Disk - Encryption is permitted to retrieve secrets from the vault and unwrap - keys. - :type enabled_for_disk_encryption: bool - :param enabled_for_template_deployment: Property to specify whether Azure - Resource Manager is permitted to retrieve secrets from the key vault. - :type enabled_for_template_deployment: bool - :param enable_soft_delete: Property specifying whether recoverable - deletion ('soft' delete) is enabled for this key vault. The property may - not be set to false. - :type enable_soft_delete: bool - :param create_mode: The vault's create mode to indicate whether the vault - need to be recovered or not. Possible values include: 'recover', 'default' - :type create_mode: str or - ~azure.mgmt.keyvault.v2016_10_01.models.CreateMode - :param enable_purge_protection: Property specifying whether protection - against purge is enabled for this vault; it is only effective if soft - delete is also enabled. Once activated, the property may no longer be - reset to false. - :type enable_purge_protection: bool - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, - 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, - 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, - 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, - 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, - 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, - 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VaultPatchProperties, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.sku = kwargs.get('sku', None) - self.access_policies = kwargs.get('access_policies', None) - self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) - self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) - self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) - self.enable_soft_delete = kwargs.get('enable_soft_delete', None) - self.create_mode = kwargs.get('create_mode', None) - self.enable_purge_protection = kwargs.get('enable_purge_protection', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties_py3.py deleted file mode 100644 index 81ef53854e6a..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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.serialization import Model - - -class VaultPatchProperties(Model): - """Properties of the vault. - - :param tenant_id: The Azure Active Directory tenant ID that should be used - for authenticating requests to the key vault. - :type tenant_id: str - :param sku: SKU details - :type sku: ~azure.mgmt.keyvault.v2016_10_01.models.Sku - :param access_policies: An array of 0 to 16 identities that have access to - the key vault. All identities in the array must use the same tenant ID as - the key vault's tenant ID. - :type access_policies: - list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] - :param enabled_for_deployment: Property to specify whether Azure Virtual - Machines are permitted to retrieve certificates stored as secrets from the - key vault. - :type enabled_for_deployment: bool - :param enabled_for_disk_encryption: Property to specify whether Azure Disk - Encryption is permitted to retrieve secrets from the vault and unwrap - keys. - :type enabled_for_disk_encryption: bool - :param enabled_for_template_deployment: Property to specify whether Azure - Resource Manager is permitted to retrieve secrets from the key vault. - :type enabled_for_template_deployment: bool - :param enable_soft_delete: Property specifying whether recoverable - deletion ('soft' delete) is enabled for this key vault. The property may - not be set to false. - :type enable_soft_delete: bool - :param create_mode: The vault's create mode to indicate whether the vault - need to be recovered or not. Possible values include: 'recover', 'default' - :type create_mode: str or - ~azure.mgmt.keyvault.v2016_10_01.models.CreateMode - :param enable_purge_protection: Property specifying whether protection - against purge is enabled for this vault; it is only effective if soft - delete is also enabled. Once activated, the property may no longer be - reset to false. - :type enable_purge_protection: bool - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, - 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, - 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, - 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, - 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, - 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, - 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, - } - - def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, **kwargs) -> None: - super(VaultPatchProperties, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.sku = sku - self.access_policies = access_policies - self.enabled_for_deployment = enabled_for_deployment - self.enabled_for_disk_encryption = enabled_for_disk_encryption - self.enabled_for_template_deployment = enabled_for_template_deployment - self.enable_soft_delete = enable_soft_delete - self.create_mode = create_mode - self.enable_purge_protection = enable_purge_protection diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties.py deleted file mode 100644 index a0fb2e335b45..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.serialization import Model - - -class VaultProperties(Model): - """Properties of the vault. - - All required parameters must be populated in order to send to Azure. - - :param tenant_id: Required. The Azure Active Directory tenant ID that - should be used for authenticating requests to the key vault. - :type tenant_id: str - :param sku: Required. SKU details - :type sku: ~azure.mgmt.keyvault.v2016_10_01.models.Sku - :param access_policies: An array of 0 to 16 identities that have access to - the key vault. All identities in the array must use the same tenant ID as - the key vault's tenant ID. When `createMode` is set to `recover`, access - policies are not required. Otherwise, access policies are required. - :type access_policies: - list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] - :param vault_uri: The URI of the vault for performing operations on keys - and secrets. - :type vault_uri: str - :param enabled_for_deployment: Property to specify whether Azure Virtual - Machines are permitted to retrieve certificates stored as secrets from the - key vault. - :type enabled_for_deployment: bool - :param enabled_for_disk_encryption: Property to specify whether Azure Disk - Encryption is permitted to retrieve secrets from the vault and unwrap - keys. - :type enabled_for_disk_encryption: bool - :param enabled_for_template_deployment: Property to specify whether Azure - Resource Manager is permitted to retrieve secrets from the key vault. - :type enabled_for_template_deployment: bool - :param enable_soft_delete: Property specifying whether recoverable - deletion is enabled for this key vault. Setting this property to true - activates the soft delete feature, whereby vaults or vault entities can be - recovered after deletion. Enabling this functionality is irreversible - - that is, the property does not accept false as its value. - :type enable_soft_delete: bool - :param create_mode: The vault's create mode to indicate whether the vault - need to be recovered or not. Possible values include: 'recover', 'default' - :type create_mode: str or - ~azure.mgmt.keyvault.v2016_10_01.models.CreateMode - :param enable_purge_protection: Property specifying whether protection - against purge is enabled for this vault. Setting this property to true - activates protection against purge for this vault and its content - only - the Key Vault service may initiate a hard, irrecoverable deletion. The - setting is effective only if soft delete is also enabled. Enabling this - functionality is irreversible - that is, the property does not accept - false as its value. - :type enable_purge_protection: bool - """ - - _validation = { - 'tenant_id': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, - 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, - 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, - 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, - 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, - 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, - 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, - 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VaultProperties, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.sku = kwargs.get('sku', None) - self.access_policies = kwargs.get('access_policies', None) - self.vault_uri = kwargs.get('vault_uri', None) - self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) - self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) - self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) - self.enable_soft_delete = kwargs.get('enable_soft_delete', None) - self.create_mode = kwargs.get('create_mode', None) - self.enable_purge_protection = kwargs.get('enable_purge_protection', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties_py3.py deleted file mode 100644 index a9e934939cca..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.serialization import Model - - -class VaultProperties(Model): - """Properties of the vault. - - All required parameters must be populated in order to send to Azure. - - :param tenant_id: Required. The Azure Active Directory tenant ID that - should be used for authenticating requests to the key vault. - :type tenant_id: str - :param sku: Required. SKU details - :type sku: ~azure.mgmt.keyvault.v2016_10_01.models.Sku - :param access_policies: An array of 0 to 16 identities that have access to - the key vault. All identities in the array must use the same tenant ID as - the key vault's tenant ID. When `createMode` is set to `recover`, access - policies are not required. Otherwise, access policies are required. - :type access_policies: - list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] - :param vault_uri: The URI of the vault for performing operations on keys - and secrets. - :type vault_uri: str - :param enabled_for_deployment: Property to specify whether Azure Virtual - Machines are permitted to retrieve certificates stored as secrets from the - key vault. - :type enabled_for_deployment: bool - :param enabled_for_disk_encryption: Property to specify whether Azure Disk - Encryption is permitted to retrieve secrets from the vault and unwrap - keys. - :type enabled_for_disk_encryption: bool - :param enabled_for_template_deployment: Property to specify whether Azure - Resource Manager is permitted to retrieve secrets from the key vault. - :type enabled_for_template_deployment: bool - :param enable_soft_delete: Property specifying whether recoverable - deletion is enabled for this key vault. Setting this property to true - activates the soft delete feature, whereby vaults or vault entities can be - recovered after deletion. Enabling this functionality is irreversible - - that is, the property does not accept false as its value. - :type enable_soft_delete: bool - :param create_mode: The vault's create mode to indicate whether the vault - need to be recovered or not. Possible values include: 'recover', 'default' - :type create_mode: str or - ~azure.mgmt.keyvault.v2016_10_01.models.CreateMode - :param enable_purge_protection: Property specifying whether protection - against purge is enabled for this vault. Setting this property to true - activates protection against purge for this vault and its content - only - the Key Vault service may initiate a hard, irrecoverable deletion. The - setting is effective only if soft delete is also enabled. Enabling this - functionality is irreversible - that is, the property does not accept - false as its value. - :type enable_purge_protection: bool - """ - - _validation = { - 'tenant_id': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, - 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, - 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, - 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, - 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, - 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, - 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, - 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, - } - - def __init__(self, *, tenant_id: str, sku, access_policies=None, vault_uri: str=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, **kwargs) -> None: - super(VaultProperties, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.sku = sku - self.access_policies = access_policies - self.vault_uri = vault_uri - self.enabled_for_deployment = enabled_for_deployment - self.enabled_for_disk_encryption = enabled_for_disk_encryption - self.enabled_for_template_deployment = enabled_for_template_deployment - self.enable_soft_delete = enable_soft_delete - self.create_mode = create_mode - self.enable_purge_protection = enable_purge_protection diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_py3.py deleted file mode 100644 index 19b008121533..000000000000 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 .resource_py3 import Resource - - -class Vault(Resource): - """Resource information with extended details. - - 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: The Azure Resource Manager resource ID for the key vault. - :vartype id: str - :ivar name: The name of the key vault. - :vartype name: str - :ivar type: The resource type of the key vault. - :vartype type: str - :param location: Required. The supported Azure location where the key - vault should be created. - :type location: str - :param tags: The tags that will be assigned to the key vault. - :type tags: dict[str, str] - :param properties: Required. Properties of the vault - :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'VaultProperties'}, - } - - def __init__(self, *, location: str, properties, tags=None, **kwargs) -> None: - super(Vault, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/__init__.py index 6a14a7603b58..893317da8cec 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/__init__.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from .vaults_operations import VaultsOperations -from .operations import Operations +from ._vaults_operations import VaultsOperations +from ._operations import Operations __all__ = [ 'VaultsOperations', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_operations.py similarity index 90% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/operations.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_operations.py index b22981b17f5f..c85e2340b717 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.keyvault.v2016_10_01.models.OperationPaged[~azure.mgmt.keyvault.v2016_10_01.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.KeyVault/operations'} diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_vaults_operations.py similarity index 97% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/vaults_operations.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_vaults_operations.py index 521f16cf63a5..7aa7cf6d96b8 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_vaults_operations.py @@ -21,6 +21,8 @@ class VaultsOperations(object): """VaultsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -100,7 +102,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Vault', response) if response.status_code == 201: @@ -178,7 +179,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Vault', response) if response.status_code == 201: @@ -237,7 +237,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -301,7 +301,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Vault', response) @@ -381,7 +380,6 @@ def update_access_policy( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VaultAccessPolicyParameters', response) if response.status_code == 201: @@ -416,8 +414,7 @@ def list_by_resource_group( """ api_version = "2016-10-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -449,6 +446,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -459,12 +461,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VaultPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VaultPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VaultPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults'} @@ -488,8 +488,7 @@ def list_by_subscription( """ api_version = "2016-10-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -520,6 +519,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -530,12 +534,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VaultPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VaultPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VaultPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/vaults'} @@ -556,8 +558,7 @@ def list_deleted( """ api_version = "2016-10-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_deleted.metadata['url'] @@ -586,6 +587,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -596,12 +602,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DeletedVaultPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DeletedVaultPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DeletedVaultPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults'} @@ -659,7 +663,6 @@ def get_deleted( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DeletedVault', response) @@ -771,8 +774,7 @@ def list( """ api_version = "2015-11-01" - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -804,6 +806,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -814,12 +821,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} @@ -880,7 +885,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResult', response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py index b9f95c80c852..01c3fcfd1053 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py @@ -270,7 +270,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py index b6be3cbf8245..32b541cd9bd1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py @@ -928,9 +928,21 @@ class VaultPatchProperties(Model): Resource Manager is permitted to retrieve secrets from the key vault. :type enabled_for_template_deployment: bool :param enable_soft_delete: Property to specify whether the 'soft delete' - functionality is enabled for this key vault. If omitted, assume true as - default value. Once set to true, cannot be reverted to false. + functionality is enabled for this key vault. Once set to true, it cannot + be reverted to false. :type enable_soft_delete: bool + :param enable_rbac_authorization: Property that controls how data actions + are authorized. When true, the key vault will use Role Based Access + Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored (warning: this is a preview + feature). When false, the key vault will use the access policies specified + in vault properties, and any policy stored on Azure Resource Manager will + be ignored. If null or not specified, the value of this property will not + change. + :type enable_rbac_authorization: bool + :param soft_delete_retention_in_days: softDelete data retention days. It + accepts >=7 and <=90. + :type soft_delete_retention_in_days: int :param create_mode: The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default' :type create_mode: str or @@ -956,6 +968,8 @@ class VaultPatchProperties(Model): 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, @@ -970,6 +984,8 @@ def __init__(self, **kwargs): self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) self.enable_soft_delete = kwargs.get('enable_soft_delete', None) + self.enable_rbac_authorization = kwargs.get('enable_rbac_authorization', None) + self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', None) self.create_mode = kwargs.get('create_mode', None) self.enable_purge_protection = kwargs.get('enable_purge_protection', None) self.network_acls = kwargs.get('network_acls', None) @@ -1009,9 +1025,24 @@ class VaultProperties(Model): Resource Manager is permitted to retrieve secrets from the key vault. :type enabled_for_template_deployment: bool :param enable_soft_delete: Property to specify whether the 'soft delete' - functionality is enabled for this key vault. If omitted, assume true as - default value. Once set to true, cannot be reverted to false. + functionality is enabled for this key vault. If it's not set to any + value(true or false) when creating new key vault, it will be set to true + by default. Once set to true, it cannot be reverted to false. Default + value: True . :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It + accepts >=7 and <=90. Default value: 90 . + :type soft_delete_retention_in_days: int + :param enable_rbac_authorization: Property that controls how data actions + are authorized. When true, the key vault will use Role Based Access + Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored (warning: this is a preview + feature). When false, the key vault will use the access policies specified + in vault properties, and any policy stored on Azure Resource Manager will + be ignored. If null or not specified, the vault is created with the + default value of false. Note that management actions are always authorized + with RBAC. Default value: False . + :type enable_rbac_authorization: bool :param create_mode: The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default' :type create_mode: str or @@ -1048,6 +1079,8 @@ class VaultProperties(Model): 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, @@ -1063,7 +1096,9 @@ def __init__(self, **kwargs): self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) - self.enable_soft_delete = kwargs.get('enable_soft_delete', None) + self.enable_soft_delete = kwargs.get('enable_soft_delete', True) + self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', 90) + self.enable_rbac_authorization = kwargs.get('enable_rbac_authorization', False) self.create_mode = kwargs.get('create_mode', None) self.enable_purge_protection = kwargs.get('enable_purge_protection', None) self.network_acls = kwargs.get('network_acls', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py index 3c2d4b4aa332..7c0dcb3c6fd4 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py @@ -928,9 +928,21 @@ class VaultPatchProperties(Model): Resource Manager is permitted to retrieve secrets from the key vault. :type enabled_for_template_deployment: bool :param enable_soft_delete: Property to specify whether the 'soft delete' - functionality is enabled for this key vault. If omitted, assume true as - default value. Once set to true, cannot be reverted to false. + functionality is enabled for this key vault. Once set to true, it cannot + be reverted to false. :type enable_soft_delete: bool + :param enable_rbac_authorization: Property that controls how data actions + are authorized. When true, the key vault will use Role Based Access + Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored (warning: this is a preview + feature). When false, the key vault will use the access policies specified + in vault properties, and any policy stored on Azure Resource Manager will + be ignored. If null or not specified, the value of this property will not + change. + :type enable_rbac_authorization: bool + :param soft_delete_retention_in_days: softDelete data retention days. It + accepts >=7 and <=90. + :type soft_delete_retention_in_days: int :param create_mode: The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default' :type create_mode: str or @@ -956,12 +968,14 @@ class VaultPatchProperties(Model): 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, } - def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None: + def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, enable_rbac_authorization: bool=None, soft_delete_retention_in_days: int=None, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None: super(VaultPatchProperties, self).__init__(**kwargs) self.tenant_id = tenant_id self.sku = sku @@ -970,6 +984,8 @@ def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabl self.enabled_for_disk_encryption = enabled_for_disk_encryption self.enabled_for_template_deployment = enabled_for_template_deployment self.enable_soft_delete = enable_soft_delete + self.enable_rbac_authorization = enable_rbac_authorization + self.soft_delete_retention_in_days = soft_delete_retention_in_days self.create_mode = create_mode self.enable_purge_protection = enable_purge_protection self.network_acls = network_acls @@ -1009,9 +1025,24 @@ class VaultProperties(Model): Resource Manager is permitted to retrieve secrets from the key vault. :type enabled_for_template_deployment: bool :param enable_soft_delete: Property to specify whether the 'soft delete' - functionality is enabled for this key vault. If omitted, assume true as - default value. Once set to true, cannot be reverted to false. + functionality is enabled for this key vault. If it's not set to any + value(true or false) when creating new key vault, it will be set to true + by default. Once set to true, it cannot be reverted to false. Default + value: True . :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It + accepts >=7 and <=90. Default value: 90 . + :type soft_delete_retention_in_days: int + :param enable_rbac_authorization: Property that controls how data actions + are authorized. When true, the key vault will use Role Based Access + Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored (warning: this is a preview + feature). When false, the key vault will use the access policies specified + in vault properties, and any policy stored on Azure Resource Manager will + be ignored. If null or not specified, the vault is created with the + default value of false. Note that management actions are always authorized + with RBAC. Default value: False . + :type enable_rbac_authorization: bool :param create_mode: The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default' :type create_mode: str or @@ -1048,13 +1079,15 @@ class VaultProperties(Model): 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnectionItem]'}, } - def __init__(self, *, tenant_id: str, sku, access_policies=None, vault_uri: str=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None: + def __init__(self, *, tenant_id: str, sku, access_policies=None, vault_uri: str=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=True, soft_delete_retention_in_days: int=90, enable_rbac_authorization: bool=False, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None: super(VaultProperties, self).__init__(**kwargs) self.tenant_id = tenant_id self.sku = sku @@ -1064,6 +1097,8 @@ def __init__(self, *, tenant_id: str, sku, access_policies=None, vault_uri: str= self.enabled_for_disk_encryption = enabled_for_disk_encryption self.enabled_for_template_deployment = enabled_for_template_deployment self.enable_soft_delete = enable_soft_delete + self.soft_delete_retention_in_days = soft_delete_retention_in_days + self.enable_rbac_authorization = enable_rbac_authorization self.create_mode = create_mode self.enable_purge_protection = enable_purge_protection self.network_acls = network_acls diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py index 96a636513f33..d1555ea8b5c6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py @@ -270,7 +270,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp