From 6867dbc1d3891d768db9f5508d39f4367825a934 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 26 Jul 2018 11:48:11 -0700 Subject: [PATCH] KeyVault Mgmt multiapi (#2927) * KeyVault multiapi template * [AutoPR keyvault/resource-manager] KV multiapi Readme (#2928) * Generated from dc6eeefac40f35620e785bd22e81c8dc97984c79 KV multiapi Readme * Fix multiapi client * Generated from dc6eeefac40f35620e785bd22e81c8dc97984c79 (#3014) KV multiapi Readme --- .../keyvault/key_vault_management_client.py | 98 +- .../azure/mgmt/keyvault/models.py | 9 + .../mgmt/keyvault/v2016_10_01/__init__.py | 18 + .../key_vault_management_client.py | 90 ++ .../keyvault/v2016_10_01/models/__init__.py | 99 ++ .../models/access_policy_entry.py | 2 +- .../models/access_policy_entry_py3.py | 2 +- .../models/check_name_availability_result.py | 2 +- .../check_name_availability_result_py3.py | 2 +- .../{ => v2016_10_01}/models/deleted_vault.py | 3 +- .../models/deleted_vault_paged.py | 2 +- .../models/deleted_vault_properties.py | 0 .../models/deleted_vault_properties_py3.py | 0 .../models/deleted_vault_py3.py | 3 +- .../key_vault_management_client_enums.py | 105 ++ .../models/log_specification.py | 0 .../models/log_specification_py3.py | 0 .../{ => v2016_10_01}/models/operation.py | 4 +- .../models/operation_display.py | 0 .../models/operation_display_py3.py | 0 .../models/operation_paged.py | 2 +- .../{ => v2016_10_01}/models/operation_py3.py | 4 +- .../{ => v2016_10_01}/models/permissions.py | 11 +- .../models/permissions_py3.py | 11 +- .../{ => v2016_10_01}/models/resource.py | 0 .../models/resource_paged.py | 2 +- .../{ => v2016_10_01}/models/resource_py3.py | 0 .../models/service_specification.py | 2 +- .../models/service_specification_py3.py | 2 +- .../keyvault/{ => v2016_10_01}/models/sku.py | 2 +- .../{ => v2016_10_01}/models/sku_py3.py | 2 +- .../{ => v2016_10_01}/models/vault.py | 2 +- .../models/vault_access_policy_parameters.py | 3 +- .../vault_access_policy_parameters_py3.py | 3 +- .../models/vault_access_policy_properties.py | 3 +- .../vault_access_policy_properties_py3.py | 3 +- ...ault_check_name_availability_parameters.py | 0 ..._check_name_availability_parameters_py3.py | 0 .../vault_create_or_update_parameters.py | 2 +- .../vault_create_or_update_parameters_py3.py | 2 +- .../{ => v2016_10_01}/models/vault_paged.py | 2 +- .../models/vault_patch_parameters.py | 3 +- .../models/vault_patch_parameters_py3.py | 3 +- .../models/vault_patch_properties.py | 76 ++ .../models/vault_patch_properties_py3.py | 76 ++ .../v2016_10_01/models/vault_properties.py | 93 ++ .../models/vault_properties_py3.py | 93 ++ .../{ => v2016_10_01}/models/vault_py3.py | 2 +- .../{ => v2016_10_01}/operations/__init__.py | 0 .../v2016_10_01/operations/operations.py | 99 ++ .../operations/vaults_operations.py | 898 ++++++++++++++++++ .../mgmt/keyvault/v2016_10_01/version.py | 13 + .../mgmt/keyvault/v2018_02_14/__init__.py | 18 + .../key_vault_management_client.py | 90 ++ .../{ => v2018_02_14}/models/__init__.py | 0 .../v2018_02_14/models/access_policy_entry.py | 54 ++ .../models/access_policy_entry_py3.py | 54 ++ .../models/check_name_availability_result.py | 50 + .../check_name_availability_result_py3.py | 50 + .../v2018_02_14/models/deleted_vault.py | 50 + .../v2018_02_14/models/deleted_vault_paged.py | 27 + .../models/deleted_vault_properties.py | 55 ++ .../models/deleted_vault_properties_py3.py | 55 ++ .../v2018_02_14/models/deleted_vault_py3.py | 50 + .../{ => v2018_02_14}/models/ip_rule.py | 0 .../{ => v2018_02_14}/models/ip_rule_py3.py | 0 .../key_vault_management_client_enums.py | 0 .../v2018_02_14/models/log_specification.py | 36 + .../models/log_specification_py3.py | 36 + .../models/network_rule_set.py | 10 +- .../models/network_rule_set_py3.py | 10 +- .../keyvault/v2018_02_14/models/operation.py | 42 + .../v2018_02_14/models/operation_display.py | 40 + .../models/operation_display_py3.py | 40 + .../v2018_02_14/models/operation_paged.py | 27 + .../v2018_02_14/models/operation_py3.py | 42 + .../v2018_02_14/models/permissions.py | 44 + .../v2018_02_14/models/permissions_py3.py | 44 + .../keyvault/v2018_02_14/models/resource.py | 57 ++ .../v2018_02_14/models/resource_paged.py | 27 + .../v2018_02_14/models/resource_py3.py | 57 ++ .../models/service_specification.py | 29 + .../models/service_specification_py3.py | 29 + .../mgmt/keyvault/v2018_02_14/models/sku.py | 45 + .../keyvault/v2018_02_14/models/sku_py3.py | 45 + .../mgmt/keyvault/v2018_02_14/models/vault.py | 57 ++ .../models/vault_access_policy_parameters.py | 58 ++ .../vault_access_policy_parameters_py3.py | 58 ++ .../models/vault_access_policy_properties.py | 37 + .../vault_access_policy_properties_py3.py | 37 + ...ault_check_name_availability_parameters.py | 44 + ..._check_name_availability_parameters_py3.py | 44 + .../vault_create_or_update_parameters.py | 44 + .../vault_create_or_update_parameters_py3.py | 44 + .../v2018_02_14/models/vault_paged.py | 27 + .../models/vault_patch_parameters.py | 33 + .../models/vault_patch_parameters_py3.py | 33 + .../models/vault_patch_properties.py | 10 +- .../models/vault_patch_properties_py3.py | 10 +- .../models/vault_properties.py | 10 +- .../models/vault_properties_py3.py | 10 +- .../keyvault/v2018_02_14/models/vault_py3.py | 57 ++ .../models/virtual_network_rule.py | 0 .../models/virtual_network_rule_py3.py | 0 .../v2018_02_14/operations/__init__.py | 18 + .../operations/operations.py | 2 +- .../operations/vaults_operations.py | 33 +- .../mgmt/keyvault/v2018_02_14/version.py | 13 + .../azure/mgmt/keyvault/version.py | 2 +- azure-mgmt-keyvault/build.json | 1 - 110 files changed, 3648 insertions(+), 100 deletions(-) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/models.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/key_vault_management_client.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/access_policy_entry.py (96%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/access_policy_entry_py3.py (96%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/check_name_availability_result.py (96%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/check_name_availability_result_py3.py (96%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/deleted_vault.py (94%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/deleted_vault_paged.py (92%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/deleted_vault_properties.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/deleted_vault_properties_py3.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/deleted_vault_py3.py (94%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/key_vault_management_client_enums.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/log_specification.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/log_specification_py3.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/operation.py (91%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/operation_display.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/operation_display_py3.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/operation_paged.py (93%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/operation_py3.py (91%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/permissions.py (80%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/permissions_py3.py (79%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/resource.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/resource_paged.py (93%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/resource_py3.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/service_specification.py (93%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/service_specification_py3.py (93%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/sku.py (95%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/sku_py3.py (95%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault.py (96%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_access_policy_parameters.py (95%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_access_policy_parameters_py3.py (95%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_access_policy_properties.py (92%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_access_policy_properties_py3.py (92%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_check_name_availability_parameters.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_check_name_availability_parameters_py3.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_create_or_update_parameters.py (95%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_create_or_update_parameters_py3.py (95%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_paged.py (93%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_patch_parameters.py (92%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_patch_parameters_py3.py (92%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties_py3.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/models/vault_py3.py (96%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2016_10_01}/operations/__init__.py (100%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/operations.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/vaults_operations.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/version.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/__init__.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/key_vault_management_client.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/__init__.py (100%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/access_policy_entry.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/access_policy_entry_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/check_name_availability_result.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/check_name_availability_result_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_paged.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_properties.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_properties_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_py3.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/ip_rule.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/ip_rule_py3.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/key_vault_management_client_enums.py (100%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/log_specification.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/log_specification_py3.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/network_rule_set.py (84%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/network_rule_set_py3.py (84%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_display.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_display_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_paged.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/permissions.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/permissions_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource_paged.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/service_specification.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/service_specification_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/sku.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/sku_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_parameters.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_parameters_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_properties.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_properties_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_check_name_availability_parameters.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_check_name_availability_parameters_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_create_or_update_parameters.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_create_or_update_parameters_py3.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_paged.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_parameters.py create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_parameters_py3.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/vault_patch_properties.py (92%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/vault_patch_properties_py3.py (93%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/vault_properties.py (93%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/vault_properties_py3.py (93%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_py3.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/virtual_network_rule.py (100%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/models/virtual_network_rule_py3.py (100%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/__init__.py rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/operations/operations.py (97%) rename azure-mgmt-keyvault/azure/mgmt/keyvault/{ => v2018_02_14}/operations/vaults_operations.py (96%) create mode 100644 azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/version.py delete mode 100644 azure-mgmt-keyvault/build.json diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/key_vault_management_client.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/key_vault_management_client.py index 469d32def90e..f1750035510f 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/key_vault_management_client.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/key_vault_management_client.py @@ -12,10 +12,10 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration + +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin from .version import VERSION -from .operations.vaults_operations import VaultsOperations -from .operations.operations import Operations -from . import models class KeyVaultManagementClientConfiguration(AzureConfiguration): @@ -52,17 +52,12 @@ def __init__( self.subscription_id = subscription_id -class KeyVaultManagementClient(SDKClient): +class KeyVaultManagementClient(MultiApiClientMixin, SDKClient): """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. :ivar config: Configuration for client. :vartype config: KeyVaultManagementClientConfiguration - :ivar vaults: Vaults operations - :vartype vaults: azure.mgmt.keyvault.operations.VaultsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.keyvault.operations.Operations - :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` @@ -70,21 +65,80 @@ class KeyVaultManagementClient(SDKClient): Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param str api_version: API version to use if no profile is provided, or if + missing in profile. :param str base_url: Service URL + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles """ - def __init__( - self, credentials, subscription_id, base_url=None): + DEFAULT_API_VERSION = '2018-02-14' + _PROFILE_TAG = "azure.mgmt.keyvault.KeyVaultManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION + }}, + _PROFILE_TAG + " latest" + ) + def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default): self.config = KeyVaultManagementClientConfiguration(credentials, subscription_id, base_url) - super(KeyVaultManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-02-14' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.vaults = VaultsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) + super(KeyVaultManagementClient, self).__init__( + credentials, + self.config, + api_version=api_version, + profile=profile + ) + +############ Generated from here ############ + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2016-10-01: :mod:`v2016_10_01.models` + * 2018-02-14: :mod:`v2018_02_14.models` + """ + if api_version == '2016-10-01': + from .v2016_10_01 import models + return models + elif api_version == '2018-02-14': + from .v2018_02_14 import models + return models + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + + @property + def operations(self): + """Instance depends on the API version: + + * 2016-10-01: :class:`Operations` + * 2018-02-14: :class:`Operations` + """ + api_version = self._get_api_version('operations') + if api_version == '2016-10-01': + from .v2016_10_01.operations import Operations as OperationClass + elif api_version == '2018-02-14': + from .v2018_02_14.operations import Operations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vaults(self): + """Instance depends on the API version: + + * 2016-10-01: :class:`VaultsOperations` + * 2018-02-14: :class:`VaultsOperations` + """ + api_version = self._get_api_version('vaults') + if api_version == '2016-10-01': + from .v2016_10_01.operations import VaultsOperations as OperationClass + elif api_version == '2018-02-14': + from .v2018_02_14.operations import VaultsOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models.py new file mode 100644 index 000000000000..f4869c3760fb --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- +import warnings + +from .v2018_02_14.models import * diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py new file mode 100644 index 000000000000..1a32efa27d9b --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py @@ -0,0 +1,18 @@ +# 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 .key_vault_management_client import KeyVaultManagementClient +from .version import VERSION + +__all__ = ['KeyVaultManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/key_vault_management_client.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/key_vault_management_client.py new file mode 100644 index 000000000000..03eab2e50b9c --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/key_vault_management_client.py @@ -0,0 +1,90 @@ +# 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.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 + + +class KeyVaultManagementClient(SDKClient): + """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + + :ivar config: Configuration for client. + :vartype config: KeyVaultManagementClientConfiguration + + :ivar vaults: Vaults operations + :vartype vaults: azure.mgmt.keyvault.v2016_10_01.operations.VaultsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.keyvault.v2016_10_01.operations.Operations + + :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): + + self.config = KeyVaultManagementClientConfiguration(credentials, subscription_id, base_url) + super(KeyVaultManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2016-10-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.vaults = VaultsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py new file mode 100644 index 000000000000..81aa4653a309 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py @@ -0,0 +1,99 @@ +# 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. +# -------------------------------------------------------------------------- + +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 +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 ( + SkuName, + KeyPermissions, + SecretPermissions, + CertificatePermissions, + StoragePermissions, + CreateMode, + Reason, + AccessPolicyUpdateKind, +) + +__all__ = [ + 'Sku', + 'Permissions', + 'AccessPolicyEntry', + 'VaultProperties', + 'VaultPatchProperties', + 'VaultAccessPolicyProperties', + 'DeletedVaultProperties', + 'VaultCreateOrUpdateParameters', + 'VaultPatchParameters', + 'VaultAccessPolicyParameters', + 'Vault', + 'DeletedVault', + 'Resource', + 'VaultCheckNameAvailabilityParameters', + 'CheckNameAvailabilityResult', + 'OperationDisplay', + 'LogSpecification', + 'ServiceSpecification', + 'Operation', + 'VaultPaged', + 'DeletedVaultPaged', + 'ResourcePaged', + 'OperationPaged', + 'SkuName', + 'KeyPermissions', + 'SecretPermissions', + 'CertificatePermissions', + 'StoragePermissions', + 'CreateMode', + 'Reason', + 'AccessPolicyUpdateKind', +] diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/access_policy_entry.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry.py similarity index 96% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/access_policy_entry.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry.py index 532fd4ad3cc4..13e5fa19f392 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/access_policy_entry.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry.py @@ -30,7 +30,7 @@ class AccessPolicyEntry(Model): :type application_id: str :param permissions: Required. Permissions the identity has for keys, secrets and certificates. - :type permissions: ~azure.mgmt.keyvault.models.Permissions + :type permissions: ~azure.mgmt.keyvault.v2016_10_01.models.Permissions """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/access_policy_entry_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry_py3.py similarity index 96% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/access_policy_entry_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry_py3.py index 1862c8f5e881..65a925392f8b 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/access_policy_entry_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/access_policy_entry_py3.py @@ -30,7 +30,7 @@ class AccessPolicyEntry(Model): :type application_id: str :param permissions: Required. Permissions the identity has for keys, secrets and certificates. - :type permissions: ~azure.mgmt.keyvault.models.Permissions + :type permissions: ~azure.mgmt.keyvault.v2016_10_01.models.Permissions """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/check_name_availability_result.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result.py similarity index 96% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/check_name_availability_result.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result.py index eb924fe2ecd6..90d9b3655ac2 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/check_name_availability_result.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result.py @@ -25,7 +25,7 @@ class CheckNameAvailabilityResult(Model): :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.models.Reason + :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 diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/check_name_availability_result_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result_py3.py similarity index 96% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/check_name_availability_result_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result_py3.py index cd818840e171..37d2f059496f 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/check_name_availability_result_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/check_name_availability_result_py3.py @@ -25,7 +25,7 @@ class CheckNameAvailabilityResult(Model): :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.models.Reason + :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 diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault.py similarity index 94% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault.py index fde8fff07353..609c601594ba 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault.py @@ -25,7 +25,8 @@ class DeletedVault(Model): :ivar type: The resource type of the key vault. :vartype type: str :param properties: Properties of the vault - :type properties: ~azure.mgmt.keyvault.models.DeletedVaultProperties + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.DeletedVaultProperties """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_paged.py similarity index 92% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_paged.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_paged.py index 756293a8c5eb..a1e0b00680bd 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_paged.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_paged.py @@ -14,7 +14,7 @@ class DeletedVaultPaged(Paged): """ - A paging container for iterating over a list of :class:`DeletedVault ` object + A paging container for iterating over a list of :class:`DeletedVault ` object """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_properties.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_properties_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties_py3.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_properties_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_properties_py3.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_py3.py similarity index 94% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_py3.py index 5ef53e97840f..b95c97375eed 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/deleted_vault_py3.py @@ -25,7 +25,8 @@ class DeletedVault(Model): :ivar type: The resource type of the key vault. :vartype type: str :param properties: Properties of the vault - :type properties: ~azure.mgmt.keyvault.models.DeletedVaultProperties + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.DeletedVaultProperties """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/key_vault_management_client_enums.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/key_vault_management_client_enums.py new file mode 100644 index 000000000000..08be1813c36c --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/key_vault_management_client_enums.py @@ -0,0 +1,105 @@ +# 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 enum import Enum + + +class SkuName(str, Enum): + + standard = "standard" + premium = "premium" + + +class KeyPermissions(str, Enum): + + encrypt = "encrypt" + decrypt = "decrypt" + wrap_key = "wrapKey" + unwrap_key = "unwrapKey" + sign = "sign" + verify = "verify" + get = "get" + list = "list" + create = "create" + update = "update" + import_enum = "import" + delete = "delete" + backup = "backup" + restore = "restore" + recover = "recover" + purge = "purge" + + +class SecretPermissions(str, Enum): + + get = "get" + list = "list" + set = "set" + delete = "delete" + backup = "backup" + restore = "restore" + recover = "recover" + purge = "purge" + + +class CertificatePermissions(str, Enum): + + get = "get" + list = "list" + delete = "delete" + create = "create" + import_enum = "import" + update = "update" + managecontacts = "managecontacts" + getissuers = "getissuers" + listissuers = "listissuers" + setissuers = "setissuers" + deleteissuers = "deleteissuers" + manageissuers = "manageissuers" + recover = "recover" + purge = "purge" + + +class StoragePermissions(str, Enum): + + get = "get" + list = "list" + delete = "delete" + set = "set" + update = "update" + regeneratekey = "regeneratekey" + recover = "recover" + purge = "purge" + backup = "backup" + restore = "restore" + setsas = "setsas" + listsas = "listsas" + getsas = "getsas" + deletesas = "deletesas" + + +class CreateMode(str, Enum): + + recover = "recover" + default = "default" + + +class Reason(str, Enum): + + account_name_invalid = "AccountNameInvalid" + already_exists = "AlreadyExists" + + +class AccessPolicyUpdateKind(str, Enum): + + add = "add" + replace = "replace" + remove = "remove" diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/log_specification.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/log_specification.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/log_specification_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification_py3.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/log_specification_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/log_specification_py3.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation.py similarity index 91% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation.py index 201a18369a5d..5fce4f84421c 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation.py @@ -18,13 +18,13 @@ class Operation(Model): :param name: Operation name: {provider}/{resource}/{operation} :type name: str :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.keyvault.models.OperationDisplay + :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.models.ServiceSpecification + ~azure.mgmt.keyvault.v2016_10_01.models.ServiceSpecification """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_display.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_display.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_display_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display_py3.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_display_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_display_py3.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_paged.py similarity index 93% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_paged.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_paged.py index cded4bbab821..7b2d05ee753d 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_paged.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_paged.py @@ -14,7 +14,7 @@ class OperationPaged(Paged): """ - A paging container for iterating over a list of :class:`Operation ` object + A paging container for iterating over a list of :class:`Operation ` object """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_py3.py similarity index 91% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_py3.py index caad53eed64b..dd93f17bb0ff 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/operation_py3.py @@ -18,13 +18,13 @@ class Operation(Model): :param name: Operation name: {provider}/{resource}/{operation} :type name: str :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.keyvault.models.OperationDisplay + :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.models.ServiceSpecification + ~azure.mgmt.keyvault.v2016_10_01.models.ServiceSpecification """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions.py similarity index 80% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions.py index cd774ee7763f..4c2bb10cb1fc 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions.py @@ -16,14 +16,17 @@ 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.models.KeyPermissions] + :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.models.SecretPermissions] + :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.models.CertificatePermissions] + ~azure.mgmt.keyvault.v2016_10_01.models.CertificatePermissions] :param storage: Permissions to storage accounts - :type storage: list[str or ~azure.mgmt.keyvault.models.StoragePermissions] + :type storage: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.StoragePermissions] """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions_py3.py similarity index 79% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions_py3.py index a46b41e32517..dfb233091f5f 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/permissions_py3.py @@ -16,14 +16,17 @@ 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.models.KeyPermissions] + :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.models.SecretPermissions] + :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.models.CertificatePermissions] + ~azure.mgmt.keyvault.v2016_10_01.models.CertificatePermissions] :param storage: Permissions to storage accounts - :type storage: list[str or ~azure.mgmt.keyvault.models.StoragePermissions] + :type storage: list[str or + ~azure.mgmt.keyvault.v2016_10_01.models.StoragePermissions] """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_paged.py similarity index 93% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_paged.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_paged.py index 1635ebc7fda1..69ccd6528635 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_paged.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_paged.py @@ -14,7 +14,7 @@ class ResourcePaged(Paged): """ - A paging container for iterating over a list of :class:`Resource ` object + A paging container for iterating over a list of :class:`Resource ` object """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_py3.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/resource_py3.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/service_specification.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification.py similarity index 93% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/service_specification.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification.py index e049692e09c0..386aa85a8fdb 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/service_specification.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification.py @@ -17,7 +17,7 @@ class ServiceSpecification(Model): :param log_specifications: Log specifications of operation. :type log_specifications: - list[~azure.mgmt.keyvault.models.LogSpecification] + list[~azure.mgmt.keyvault.v2016_10_01.models.LogSpecification] """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/service_specification_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification_py3.py similarity index 93% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/service_specification_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification_py3.py index b34f83c19eee..fb2309d925d8 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/service_specification_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/service_specification_py3.py @@ -17,7 +17,7 @@ class ServiceSpecification(Model): :param log_specifications: Log specifications of operation. :type log_specifications: - list[~azure.mgmt.keyvault.models.LogSpecification] + list[~azure.mgmt.keyvault.v2016_10_01.models.LogSpecification] """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku.py similarity index 95% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku.py index 821f817256a4..2d9b6d4c0e85 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku.py @@ -25,7 +25,7 @@ class Sku(Model): :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.models.SkuName + :type name: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuName """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku_py3.py similarity index 95% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku_py3.py index f14fc4dafab0..de27350b9a0b 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/sku_py3.py @@ -25,7 +25,7 @@ class Sku(Model): :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.models.SkuName + :type name: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuName """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault.py similarity index 96% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault.py index 6ec3c66c53e1..00ff8c07e743 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault.py @@ -32,7 +32,7 @@ class Vault(Resource): :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.models.VaultProperties + :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters.py similarity index 95% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters.py index a2a6e5db234e..41906816834b 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters.py @@ -29,7 +29,8 @@ class VaultAccessPolicyParameters(Model): :ivar location: The resource type of the the access policy. :vartype location: str :param properties: Required. Properties of the access policy - :type properties: ~azure.mgmt.keyvault.models.VaultAccessPolicyProperties + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultAccessPolicyProperties """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters_py3.py similarity index 95% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters_py3.py index 0b3bc1b438c7..e093648aaa50 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_parameters_py3.py @@ -29,7 +29,8 @@ class VaultAccessPolicyParameters(Model): :ivar location: The resource type of the the access policy. :vartype location: str :param properties: Required. Properties of the access policy - :type properties: ~azure.mgmt.keyvault.models.VaultAccessPolicyProperties + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultAccessPolicyProperties """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties.py similarity index 92% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties.py index cf906d226126..6f19efbc0bef 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties.py @@ -20,7 +20,8 @@ class VaultAccessPolicyProperties(Model): :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.models.AccessPolicyEntry] + :type access_policies: + list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties_py3.py similarity index 92% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties_py3.py index bacfa890f9f2..a19bb22b5bd7 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_access_policy_properties_py3.py @@ -20,7 +20,8 @@ class VaultAccessPolicyProperties(Model): :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.models.AccessPolicyEntry] + :type access_policies: + list[~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyEntry] """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_check_name_availability_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_check_name_availability_parameters.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_check_name_availability_parameters_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters_py3.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_check_name_availability_parameters_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_check_name_availability_parameters_py3.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters.py similarity index 95% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters.py index 17d358af45c4..ed8513b8fa66 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters.py @@ -23,7 +23,7 @@ class VaultCreateOrUpdateParameters(Model): :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.models.VaultProperties + :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters_py3.py similarity index 95% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters_py3.py index 861fc58686cb..80d889d58e5b 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_create_or_update_parameters_py3.py @@ -23,7 +23,7 @@ class VaultCreateOrUpdateParameters(Model): :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.models.VaultProperties + :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_paged.py similarity index 93% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_paged.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_paged.py index 6ec2f41fabab..db528baa43de 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_paged.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_paged.py @@ -14,7 +14,7 @@ class VaultPaged(Paged): """ - A paging container for iterating over a list of :class:`Vault ` object + A paging container for iterating over a list of :class:`Vault ` object """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters.py similarity index 92% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_parameters.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters.py index b38fcc1b32df..1e5c97adf0e6 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_parameters.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters.py @@ -18,7 +18,8 @@ class VaultPatchParameters(Model): :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.models.VaultPatchProperties + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultPatchProperties """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_parameters_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters_py3.py similarity index 92% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_parameters_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters_py3.py index 16bf148f7b8c..7b2ef2cf4b97 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_parameters_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_parameters_py3.py @@ -18,7 +18,8 @@ class VaultPatchParameters(Model): :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.models.VaultPatchProperties + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultPatchProperties """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties.py new file mode 100644 index 000000000000..1a443f164840 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties.py @@ -0,0 +1,76 @@ +# 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties_py3.py new file mode 100644 index 000000000000..81ef53854e6a --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_patch_properties_py3.py @@ -0,0 +1,76 @@ +# 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties.py new file mode 100644 index 000000000000..16999701488a --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties.py @@ -0,0 +1,93 @@ +# 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. + :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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties_py3.py new file mode 100644 index 000000000000..4cb34c5e92df --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_properties_py3.py @@ -0,0 +1,93 @@ +# 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. + :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/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_py3.py similarity index 96% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_py3.py index 50f96583598a..19b008121533 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/vault_py3.py @@ -32,7 +32,7 @@ class Vault(Resource): :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.models.VaultProperties + :type properties: ~azure.mgmt.keyvault.v2016_10_01.models.VaultProperties """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/__init__.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/__init__.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/operations/__init__.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/__init__.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/operations.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/operations.py new file mode 100644 index 000000000000..5ada6c32a9a2 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/operations.py @@ -0,0 +1,99 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2016-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-10-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Key Vault Rest API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~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): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.KeyVault/operations'} diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/vaults_operations.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/vaults_operations.py new file mode 100644 index 000000000000..9d6147086410 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/vaults_operations.py @@ -0,0 +1,898 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VaultsOperations(object): + """VaultsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar filter: The filter to apply on the operation. Constant value: "resourceType eq 'Microsoft.KeyVault/vaults'". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.filter = "resourceType eq 'Microsoft.KeyVault/vaults'" + + self.config = config + + def create_or_update( + self, resource_group_name, vault_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a key vault in the specified subscription. + + :param resource_group_name: The name of the Resource Group to which + the server belongs. + :type resource_group_name: str + :param vault_name: Name of the vault + :type vault_name: str + :param parameters: Parameters to create or update the vault + :type parameters: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultCreateOrUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.keyvault.v2016_10_01.models.Vault or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2016-10-01" + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Vault', response) + if response.status_code == 201: + deserialized = self._deserialize('Vault', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} + + def update( + self, resource_group_name, vault_name, tags=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Update a key vault in the specified subscription. + + :param resource_group_name: The name of the Resource Group to which + the server belongs. + :type resource_group_name: str + :param vault_name: Name of the vault + :type vault_name: str + :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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.keyvault.v2016_10_01.models.Vault or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.VaultPatchParameters(tags=tags, properties=properties) + + api_version = "2016-10-01" + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VaultPatchParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Vault', response) + if response.status_code == 201: + deserialized = self._deserialize('Vault', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} + + def delete( + self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): + """Deletes the specified Azure key vault. + + :param resource_group_name: The name of the Resource Group to which + the vault belongs. + :type resource_group_name: str + :param vault_name: The name of the vault to delete + :type vault_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2016-10-01" + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} + + def get( + self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified Azure key vault. + + :param resource_group_name: The name of the Resource Group to which + the vault belongs. + :type resource_group_name: str + :param vault_name: The name of the vault. + :type vault_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.keyvault.v2016_10_01.models.Vault or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2016-10-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Vault', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} + + def update_access_policy( + self, resource_group_name, vault_name, operation_kind, properties, custom_headers=None, raw=False, **operation_config): + """Update access policies in a key vault in the specified subscription. + + :param resource_group_name: The name of the Resource Group to which + the vault belongs. + :type resource_group_name: str + :param vault_name: Name of the vault + :type vault_name: str + :param operation_kind: Name of the operation. Possible values include: + 'add', 'replace', 'remove' + :type operation_kind: str or + ~azure.mgmt.keyvault.v2016_10_01.models.AccessPolicyUpdateKind + :param properties: Properties of the access policy + :type properties: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultAccessPolicyProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VaultAccessPolicyParameters or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultAccessPolicyParameters or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.VaultAccessPolicyParameters(properties=properties) + + api_version = "2016-10-01" + + # Construct URL + url = self.update_access_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'operationKind': self._serialize.url("operation_kind", operation_kind, 'AccessPolicyUpdateKind'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VaultAccessPolicyParameters', response) + if response.status_code == 201: + deserialized = self._deserialize('VaultAccessPolicyParameters', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_access_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'} + + def list_by_resource_group( + self, resource_group_name, top=None, custom_headers=None, raw=False, **operation_config): + """The List operation gets information about the vaults associated with + the subscription and within the specified resource group. + + :param resource_group_name: The name of the Resource Group to which + the vault belongs. + :type resource_group_name: str + :param top: Maximum number of results to return. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Vault + :rtype: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultPaged[~azure.mgmt.keyvault.v2016_10_01.models.Vault] + :raises: :class:`CloudError` + """ + api_version = "2016-10-01" + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VaultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VaultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults'} + + def list_by_subscription( + self, top=None, custom_headers=None, raw=False, **operation_config): + """The List operation gets information about the vaults associated with + the subscription. + + :param top: Maximum number of results to return. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Vault + :rtype: + ~azure.mgmt.keyvault.v2016_10_01.models.VaultPaged[~azure.mgmt.keyvault.v2016_10_01.models.Vault] + :raises: :class:`CloudError` + """ + api_version = "2016-10-01" + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.VaultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VaultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/vaults'} + + def list_deleted( + self, custom_headers=None, raw=False, **operation_config): + """Gets information about the deleted vaults in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeletedVault + :rtype: + ~azure.mgmt.keyvault.v2016_10_01.models.DeletedVaultPaged[~azure.mgmt.keyvault.v2016_10_01.models.DeletedVault] + :raises: :class:`CloudError` + """ + api_version = "2016-10-01" + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_deleted.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DeletedVaultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DeletedVaultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults'} + + def get_deleted( + self, vault_name, location, custom_headers=None, raw=False, **operation_config): + """Gets the deleted Azure key vault. + + :param vault_name: The name of the vault. + :type vault_name: str + :param location: The location of the deleted vault. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeletedVault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.keyvault.v2016_10_01.models.DeletedVault or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2016-10-01" + + # Construct URL + url = self.get_deleted.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DeletedVault', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}'} + + + def _purge_deleted_initial( + self, vault_name, location, custom_headers=None, raw=False, **operation_config): + api_version = "2016-10-01" + + # Construct URL + url = self.purge_deleted.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def purge_deleted( + self, vault_name, location, custom_headers=None, raw=False, polling=True, **operation_config): + """Permanently deletes the specified vault. aka Purges the deleted Azure + key vault. + + :param vault_name: The name of the soft-deleted vault. + :type vault_name: str + :param location: The location of the soft-deleted vault. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._purge_deleted_initial( + vault_name=vault_name, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + purge_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'} + + def list( + self, top=None, custom_headers=None, raw=False, **operation_config): + """The List operation gets information about the vaults associated with + the subscription. + + :param top: Maximum number of results to return. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Resource + :rtype: + ~azure.mgmt.keyvault.v2016_10_01.models.ResourcePaged[~azure.mgmt.keyvault.v2016_10_01.models.Resource] + :raises: :class:`CloudError` + """ + api_version = "2015-11-01" + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("self.filter", self.filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} + + def check_name_availability( + self, name, custom_headers=None, raw=False, **operation_config): + """Checks that the vault name is valid and is not already in use. + + :param name: The vault name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.keyvault.v2016_10_01.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + vault_name = models.VaultCheckNameAvailabilityParameters(name=name) + + api_version = "2016-10-01" + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability'} diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/version.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/version.py new file mode 100644 index 000000000000..20ba78005d47 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2016-10-01" + diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/__init__.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/__init__.py new file mode 100644 index 000000000000..1a32efa27d9b --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/__init__.py @@ -0,0 +1,18 @@ +# 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 .key_vault_management_client import KeyVaultManagementClient +from .version import VERSION + +__all__ = ['KeyVaultManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/key_vault_management_client.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/key_vault_management_client.py new file mode 100644 index 000000000000..170f31503e68 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/key_vault_management_client.py @@ -0,0 +1,90 @@ +# 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.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 + + +class KeyVaultManagementClient(SDKClient): + """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + + :ivar config: Configuration for client. + :vartype config: KeyVaultManagementClientConfiguration + + :ivar vaults: Vaults operations + :vartype vaults: azure.mgmt.keyvault.v2018_02_14.operations.VaultsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.keyvault.v2018_02_14.operations.Operations + + :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): + + self.config = KeyVaultManagementClientConfiguration(credentials, subscription_id, base_url) + super(KeyVaultManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-02-14' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.vaults = VaultsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/__init__.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/__init__.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/access_policy_entry.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/access_policy_entry.py new file mode 100644 index 000000000000..316bd458eb72 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/access_policy_entry.py @@ -0,0 +1,54 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/access_policy_entry_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/access_policy_entry_py3.py new file mode 100644 index 000000000000..8f3d16f47d21 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/access_policy_entry_py3.py @@ -0,0 +1,54 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/check_name_availability_result.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/check_name_availability_result.py new file mode 100644 index 000000000000..f771a62c00d4 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/check_name_availability_result.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 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/check_name_availability_result_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/check_name_availability_result_py3.py new file mode 100644 index 000000000000..c5edbce96b9c --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/check_name_availability_result_py3.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 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault.py new file mode 100644 index 000000000000..c0631d8e0a71 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault.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 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_paged.py new file mode 100644 index 000000000000..774bc2867e41 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_properties.py new file mode 100644 index 000000000000..76fa9d43de1f --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_properties.py @@ -0,0 +1,55 @@ +# 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_properties_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_properties_py3.py new file mode 100644 index 000000000000..c78663f989b5 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_properties_py3.py @@ -0,0 +1,55 @@ +# 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_py3.py new file mode 100644 index 000000000000..cfb2ff7c7d16 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/deleted_vault_py3.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 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/models/ip_rule.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/ip_rule.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/ip_rule.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/ip_rule.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/ip_rule_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/ip_rule_py3.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/ip_rule_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/ip_rule_py3.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/key_vault_management_client_enums.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/key_vault_management_client_enums.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/key_vault_management_client_enums.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/key_vault_management_client_enums.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/log_specification.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/log_specification.py new file mode 100644 index 000000000000..092f8d7039b9 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/log_specification.py @@ -0,0 +1,36 @@ +# 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/log_specification_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/log_specification_py3.py new file mode 100644 index 000000000000..091c8250d3f2 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/log_specification_py3.py @@ -0,0 +1,36 @@ +# 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/azure-mgmt-keyvault/azure/mgmt/keyvault/models/network_rule_set.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/network_rule_set.py similarity index 84% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/network_rule_set.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/network_rule_set.py index 59ccba80617a..2ea783d3745d 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/network_rule_set.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/network_rule_set.py @@ -18,16 +18,18 @@ class NetworkRuleSet(Model): :param bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None' - :type bypass: str or ~azure.mgmt.keyvault.models.NetworkRuleBypassOptions + :type bypass: str or + ~azure.mgmt.keyvault.v2018_02_14.models.NetworkRuleBypassOptions :param default_action: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny' - :type default_action: str or ~azure.mgmt.keyvault.models.NetworkRuleAction + :type default_action: str or + ~azure.mgmt.keyvault.v2018_02_14.models.NetworkRuleAction :param ip_rules: The list of IP address rules. - :type ip_rules: list[~azure.mgmt.keyvault.models.IPRule] + :type ip_rules: list[~azure.mgmt.keyvault.v2018_02_14.models.IPRule] :param virtual_network_rules: The list of virtual network rules. :type virtual_network_rules: - list[~azure.mgmt.keyvault.models.VirtualNetworkRule] + list[~azure.mgmt.keyvault.v2018_02_14.models.VirtualNetworkRule] """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/network_rule_set_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/network_rule_set_py3.py similarity index 84% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/network_rule_set_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/network_rule_set_py3.py index ae74ff44fa86..d2737a27bdd3 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/network_rule_set_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/network_rule_set_py3.py @@ -18,16 +18,18 @@ class NetworkRuleSet(Model): :param bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None' - :type bypass: str or ~azure.mgmt.keyvault.models.NetworkRuleBypassOptions + :type bypass: str or + ~azure.mgmt.keyvault.v2018_02_14.models.NetworkRuleBypassOptions :param default_action: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny' - :type default_action: str or ~azure.mgmt.keyvault.models.NetworkRuleAction + :type default_action: str or + ~azure.mgmt.keyvault.v2018_02_14.models.NetworkRuleAction :param ip_rules: The list of IP address rules. - :type ip_rules: list[~azure.mgmt.keyvault.models.IPRule] + :type ip_rules: list[~azure.mgmt.keyvault.v2018_02_14.models.IPRule] :param virtual_network_rules: The list of virtual network rules. :type virtual_network_rules: - list[~azure.mgmt.keyvault.models.VirtualNetworkRule] + list[~azure.mgmt.keyvault.v2018_02_14.models.VirtualNetworkRule] """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation.py new file mode 100644 index 000000000000..a441348b414d --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation.py @@ -0,0 +1,42 @@ +# 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.v2018_02_14.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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_display.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_display.py new file mode 100644 index 000000000000..6aaa72c83818 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_display.py @@ -0,0 +1,40 @@ +# 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: Decription 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_display_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_display_py3.py new file mode 100644 index 000000000000..75671557dbee --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_display_py3.py @@ -0,0 +1,40 @@ +# 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: Decription 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_paged.py new file mode 100644 index 000000000000..ab7cb03540fd --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_py3.py new file mode 100644 index 000000000000..48b88f1b00f1 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/operation_py3.py @@ -0,0 +1,42 @@ +# 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.v2018_02_14.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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/permissions.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/permissions.py new file mode 100644 index 000000000000..856a529a63af --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/permissions.py @@ -0,0 +1,44 @@ +# 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.v2018_02_14.models.KeyPermissions] + :param secrets: Permissions to secrets + :type secrets: list[str or + ~azure.mgmt.keyvault.v2018_02_14.models.SecretPermissions] + :param certificates: Permissions to certificates + :type certificates: list[str or + ~azure.mgmt.keyvault.v2018_02_14.models.CertificatePermissions] + :param storage: Permissions to storage accounts + :type storage: list[str or + ~azure.mgmt.keyvault.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/permissions_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/permissions_py3.py new file mode 100644 index 000000000000..c7aa14d7e9f2 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/permissions_py3.py @@ -0,0 +1,44 @@ +# 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.v2018_02_14.models.KeyPermissions] + :param secrets: Permissions to secrets + :type secrets: list[str or + ~azure.mgmt.keyvault.v2018_02_14.models.SecretPermissions] + :param certificates: Permissions to certificates + :type certificates: list[str or + ~azure.mgmt.keyvault.v2018_02_14.models.CertificatePermissions] + :param storage: Permissions to storage accounts + :type storage: list[str or + ~azure.mgmt.keyvault.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource.py new file mode 100644 index 000000000000..0c30e1ffcb16 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource.py @@ -0,0 +1,57 @@ +# 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource_paged.py new file mode 100644 index 000000000000..f477ced541b2 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource_py3.py new file mode 100644 index 000000000000..57daac0d2a91 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/resource_py3.py @@ -0,0 +1,57 @@ +# 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/service_specification.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/service_specification.py new file mode 100644 index 000000000000..a26175428221 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/service_specification.py @@ -0,0 +1,29 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/service_specification_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/service_specification_py3.py new file mode 100644 index 000000000000..9114833bac86 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/service_specification_py3.py @@ -0,0 +1,29 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/sku.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/sku.py new file mode 100644 index 000000000000..4360e2fa97d4 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/sku.py @@ -0,0 +1,45 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/sku_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/sku_py3.py new file mode 100644 index 000000000000..7e3d96c6ca6c --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/sku_py3.py @@ -0,0 +1,45 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault.py new file mode 100644 index 000000000000..a7d64de499b8 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault.py @@ -0,0 +1,57 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_parameters.py new file mode 100644 index 000000000000..5168714ccd2c --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_parameters.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from 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 the access policy. + :vartype location: str + :param properties: Required. Properties of the access policy + :type properties: + ~azure.mgmt.keyvault.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_parameters_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_parameters_py3.py new file mode 100644 index 000000000000..8509b075d938 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_parameters_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from 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 the access policy. + :vartype location: str + :param properties: Required. Properties of the access policy + :type properties: + ~azure.mgmt.keyvault.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_properties.py new file mode 100644 index 000000000000..1ef523c9f121 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_properties.py @@ -0,0 +1,37 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_properties_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_properties_py3.py new file mode 100644 index 000000000000..8d3de4191e52 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_access_policy_properties_py3.py @@ -0,0 +1,37 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_check_name_availability_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_check_name_availability_parameters.py new file mode 100644 index 000000000000..b49bc5dbb513 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_check_name_availability_parameters.py @@ -0,0 +1,44 @@ +# 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 availabity 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_check_name_availability_parameters_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_check_name_availability_parameters_py3.py new file mode 100644 index 000000000000..74afce9a8c85 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_check_name_availability_parameters_py3.py @@ -0,0 +1,44 @@ +# 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 availabity 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_create_or_update_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_create_or_update_parameters.py new file mode 100644 index 000000000000..13f9da5ca8a2 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_create_or_update_parameters.py @@ -0,0 +1,44 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_create_or_update_parameters_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..715bac8f816b --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_create_or_update_parameters_py3.py @@ -0,0 +1,44 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_paged.py new file mode 100644 index 000000000000..c358d80f82a6 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class 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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_parameters.py new file mode 100644 index 000000000000..bb1c0a99d25c --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_parameters.py @@ -0,0 +1,33 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_parameters_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_parameters_py3.py new file mode 100644 index 000000000000..34fae2979254 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_parameters_py3.py @@ -0,0 +1,33 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_properties.py similarity index 92% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_properties.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_properties.py index e1e4b1b5b89d..7674794ab3ff 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_properties.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_properties.py @@ -19,11 +19,12 @@ class VaultPatchProperties(Model): for authenticating requests to the key vault. :type tenant_id: str :param sku: SKU details - :type sku: ~azure.mgmt.keyvault.models.Sku + :type sku: ~azure.mgmt.keyvault.v2018_02_14.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.models.AccessPolicyEntry] + :type access_policies: + list[~azure.mgmt.keyvault.v2018_02_14.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. @@ -41,7 +42,8 @@ class VaultPatchProperties(Model): :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.models.CreateMode + :type create_mode: str or + ~azure.mgmt.keyvault.v2018_02_14.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 @@ -52,7 +54,7 @@ class VaultPatchProperties(Model): :type enable_purge_protection: bool :param network_acls: A collection of rules governing the accessibility of the vault from specific network locations. - :type network_acls: ~azure.mgmt.keyvault.models.NetworkRuleSet + :type network_acls: ~azure.mgmt.keyvault.v2018_02_14.models.NetworkRuleSet """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_properties_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_properties_py3.py similarity index 93% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_properties_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_properties_py3.py index c31e17f365cc..24e4915641d6 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_properties_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_patch_properties_py3.py @@ -19,11 +19,12 @@ class VaultPatchProperties(Model): for authenticating requests to the key vault. :type tenant_id: str :param sku: SKU details - :type sku: ~azure.mgmt.keyvault.models.Sku + :type sku: ~azure.mgmt.keyvault.v2018_02_14.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.models.AccessPolicyEntry] + :type access_policies: + list[~azure.mgmt.keyvault.v2018_02_14.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. @@ -41,7 +42,8 @@ class VaultPatchProperties(Model): :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.models.CreateMode + :type create_mode: str or + ~azure.mgmt.keyvault.v2018_02_14.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 @@ -52,7 +54,7 @@ class VaultPatchProperties(Model): :type enable_purge_protection: bool :param network_acls: A collection of rules governing the accessibility of the vault from specific network locations. - :type network_acls: ~azure.mgmt.keyvault.models.NetworkRuleSet + :type network_acls: ~azure.mgmt.keyvault.v2018_02_14.models.NetworkRuleSet """ _attribute_map = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_properties.py similarity index 93% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_properties.py index a09d68c304b0..3a93a4bd2568 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_properties.py @@ -21,11 +21,12 @@ class VaultProperties(Model): should be used for authenticating requests to the key vault. :type tenant_id: str :param sku: Required. SKU details - :type sku: ~azure.mgmt.keyvault.models.Sku + :type sku: ~azure.mgmt.keyvault.v2018_02_14.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.models.AccessPolicyEntry] + :type access_policies: + list[~azure.mgmt.keyvault.v2018_02_14.models.AccessPolicyEntry] :param vault_uri: The URI of the vault for performing operations on keys and secrets. :type vault_uri: str @@ -46,7 +47,8 @@ class VaultProperties(Model): :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.models.CreateMode + :type create_mode: str or + ~azure.mgmt.keyvault.v2018_02_14.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 @@ -57,7 +59,7 @@ class VaultProperties(Model): :type enable_purge_protection: bool :param network_acls: A collection of rules governing the accessibility of the vault from specific network locations. - :type network_acls: ~azure.mgmt.keyvault.models.NetworkRuleSet + :type network_acls: ~azure.mgmt.keyvault.v2018_02_14.models.NetworkRuleSet """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_properties_py3.py similarity index 93% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_properties_py3.py index e25654b6d375..d704747bc465 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties_py3.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_properties_py3.py @@ -21,11 +21,12 @@ class VaultProperties(Model): should be used for authenticating requests to the key vault. :type tenant_id: str :param sku: Required. SKU details - :type sku: ~azure.mgmt.keyvault.models.Sku + :type sku: ~azure.mgmt.keyvault.v2018_02_14.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.models.AccessPolicyEntry] + :type access_policies: + list[~azure.mgmt.keyvault.v2018_02_14.models.AccessPolicyEntry] :param vault_uri: The URI of the vault for performing operations on keys and secrets. :type vault_uri: str @@ -46,7 +47,8 @@ class VaultProperties(Model): :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.models.CreateMode + :type create_mode: str or + ~azure.mgmt.keyvault.v2018_02_14.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 @@ -57,7 +59,7 @@ class VaultProperties(Model): :type enable_purge_protection: bool :param network_acls: A collection of rules governing the accessibility of the vault from specific network locations. - :type network_acls: ~azure.mgmt.keyvault.models.NetworkRuleSet + :type network_acls: ~azure.mgmt.keyvault.v2018_02_14.models.NetworkRuleSet """ _validation = { diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_py3.py new file mode 100644 index 000000000000..091e1ae14782 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/vault_py3.py @@ -0,0 +1,57 @@ +# 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.v2018_02_14.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/azure-mgmt-keyvault/azure/mgmt/keyvault/models/virtual_network_rule.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/virtual_network_rule.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/virtual_network_rule.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/virtual_network_rule.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/virtual_network_rule_py3.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/virtual_network_rule_py3.py similarity index 100% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/models/virtual_network_rule_py3.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/virtual_network_rule_py3.py diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/__init__.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/__init__.py new file mode 100644 index 000000000000..6a14a7603b58 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/__init__.py @@ -0,0 +1,18 @@ +# 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 .vaults_operations import VaultsOperations +from .operations import Operations + +__all__ = [ + 'VaultsOperations', + 'Operations', +] diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/operations.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/operations.py similarity index 97% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/operations/operations.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/operations.py index 911cde2fcd34..935ad35c09a6 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/operations.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/operations.py @@ -48,7 +48,7 @@ def list( overrides`. :return: An iterator like instance of Operation :rtype: - ~azure.mgmt.keyvault.models.OperationPaged[~azure.mgmt.keyvault.models.Operation] + ~azure.mgmt.keyvault.v2018_02_14.models.OperationPaged[~azure.mgmt.keyvault.v2018_02_14.models.Operation] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/vaults_operations.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/vaults_operations.py similarity index 96% rename from azure-mgmt-keyvault/azure/mgmt/keyvault/operations/vaults_operations.py rename to azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/vaults_operations.py index cc8675b21b99..ea55cb63a1b5 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/vaults_operations.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/vaults_operations.py @@ -104,7 +104,7 @@ def create_or_update( :type vault_name: str :param parameters: Parameters to create or update the vault :type parameters: - ~azure.mgmt.keyvault.models.VaultCreateOrUpdateParameters + ~azure.mgmt.keyvault.v2018_02_14.models.VaultCreateOrUpdateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -113,9 +113,9 @@ def create_or_update( :return: An instance of LROPoller that returns Vault or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.keyvault.models.Vault] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.keyvault.v2018_02_14.models.Vault] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.keyvault.models.Vault]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.keyvault.v2018_02_14.models.Vault]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -157,14 +157,15 @@ def update( :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.models.VaultPatchProperties + :type properties: + ~azure.mgmt.keyvault.v2018_02_14.models.VaultPatchProperties :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: Vault or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.keyvault.models.Vault or + :rtype: ~azure.mgmt.keyvault.v2018_02_14.models.Vault or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -294,7 +295,7 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: Vault or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.keyvault.models.Vault or + :rtype: ~azure.mgmt.keyvault.v2018_02_14.models.Vault or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -356,17 +357,18 @@ def update_access_policy( :param operation_kind: Name of the operation. Possible values include: 'add', 'replace', 'remove' :type operation_kind: str or - ~azure.mgmt.keyvault.models.AccessPolicyUpdateKind + ~azure.mgmt.keyvault.v2018_02_14.models.AccessPolicyUpdateKind :param properties: Properties of the access policy :type properties: - ~azure.mgmt.keyvault.models.VaultAccessPolicyProperties + ~azure.mgmt.keyvault.v2018_02_14.models.VaultAccessPolicyProperties :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: VaultAccessPolicyParameters or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.keyvault.models.VaultAccessPolicyParameters or + :rtype: + ~azure.mgmt.keyvault.v2018_02_14.models.VaultAccessPolicyParameters or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -442,7 +444,7 @@ def list_by_resource_group( overrides`. :return: An iterator like instance of Vault :rtype: - ~azure.mgmt.keyvault.models.VaultPaged[~azure.mgmt.keyvault.models.Vault] + ~azure.mgmt.keyvault.v2018_02_14.models.VaultPaged[~azure.mgmt.keyvault.v2018_02_14.models.Vault] :raises: :class:`CloudError` """ api_version = "2018-02-14" @@ -515,7 +517,7 @@ def list_by_subscription( overrides`. :return: An iterator like instance of Vault :rtype: - ~azure.mgmt.keyvault.models.VaultPaged[~azure.mgmt.keyvault.models.Vault] + ~azure.mgmt.keyvault.v2018_02_14.models.VaultPaged[~azure.mgmt.keyvault.v2018_02_14.models.Vault] :raises: :class:`CloudError` """ api_version = "2018-02-14" @@ -584,7 +586,7 @@ def list_deleted( overrides`. :return: An iterator like instance of DeletedVault :rtype: - ~azure.mgmt.keyvault.models.DeletedVaultPaged[~azure.mgmt.keyvault.models.DeletedVault] + ~azure.mgmt.keyvault.v2018_02_14.models.DeletedVaultPaged[~azure.mgmt.keyvault.v2018_02_14.models.DeletedVault] :raises: :class:`CloudError` """ api_version = "2018-02-14" @@ -654,7 +656,7 @@ def get_deleted( :param operation_config: :ref:`Operation configuration overrides`. :return: DeletedVault or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.keyvault.models.DeletedVault or + :rtype: ~azure.mgmt.keyvault.v2018_02_14.models.DeletedVault or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -801,7 +803,7 @@ def list( overrides`. :return: An iterator like instance of Resource :rtype: - ~azure.mgmt.keyvault.models.ResourcePaged[~azure.mgmt.keyvault.models.Resource] + ~azure.mgmt.keyvault.v2018_02_14.models.ResourcePaged[~azure.mgmt.keyvault.v2018_02_14.models.Resource] :raises: :class:`CloudError` """ api_version = "2015-11-01" @@ -872,7 +874,8 @@ def check_name_availability( :param operation_config: :ref:`Operation configuration overrides`. :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.keyvault.models.CheckNameAvailabilityResult or + :rtype: + ~azure.mgmt.keyvault.v2018_02_14.models.CheckNameAvailabilityResult or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/version.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/version.py new file mode 100644 index 000000000000..289e229b0371 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2018-02-14" + diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/version.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/version.py index a39916c162ce..24b9de3384da 100644 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/version.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0" diff --git a/azure-mgmt-keyvault/build.json b/azure-mgmt-keyvault/build.json deleted file mode 100644 index 158e2881f289..000000000000 --- a/azure-mgmt-keyvault/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.0.1-20170521-2300-nightly", "date": "2017-05-22T21:39:33Z", "version": ""} \ No newline at end of file