diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/__init__.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/__init__.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 573b0537f795..b107cdf90f5f --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/key_vault_management_client.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/key_vault_management_client.py @@ -14,6 +14,7 @@ from msrestazure import AzureConfiguration from .version import VERSION from .operations.vaults_operations import VaultsOperations +from .operations.operations import Operations from . import models @@ -25,9 +26,9 @@ class KeyVaultManagementClientConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. + :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 """ @@ -39,14 +40,12 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(KeyVaultManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('keyvaultmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-keyvault/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials @@ -61,13 +60,15 @@ class KeyVaultManagementClient(object): :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` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. + :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 """ @@ -85,3 +86,5 @@ def __init__( 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/models/__init__.py old mode 100755 new mode 100644 index 729a38caa9d8..03de1e3a393c --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py @@ -13,14 +13,25 @@ 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, @@ -28,6 +39,8 @@ CertificatePermissions, StoragePermissions, CreateMode, + Reason, + AccessPolicyUpdateKind, ) __all__ = [ @@ -35,18 +48,31 @@ '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/models/access_policy_entry.py old mode 100755 new mode 100644 index e21e79188407..2b4ccd6fb4cb --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/access_policy_entry.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/access_policy_entry.py @@ -28,8 +28,7 @@ class AccessPolicyEntry(Model): :type application_id: str :param permissions: Permissions the identity has for keys, secrets and certificates. - :type permissions: :class:`Permissions - ` + :type permissions: ~azure.mgmt.keyvault.models.Permissions """ _validation = { @@ -46,6 +45,7 @@ class AccessPolicyEntry(Model): } def __init__(self, tenant_id, object_id, permissions, application_id=None): + super(AccessPolicyEntry, self).__init__() self.tenant_id = tenant_id self.object_id = object_id self.application_id = application_id diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/check_name_availability_result.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/check_name_availability_result.py new file mode 100644 index 000000000000..6e8d8b5a2a9b --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/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.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): + super(CheckNameAvailabilityResult, self).__init__() + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault.py old mode 100755 new mode 100644 index cf2e5bd6e46b..7b49d29ed836 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault.py @@ -25,8 +25,7 @@ class DeletedVault(Model): :ivar type: The resource type of the key vault. :vartype type: str :param properties: Properties of the vault - :type properties: :class:`DeletedVaultProperties - ` + :type properties: ~azure.mgmt.keyvault.models.DeletedVaultProperties """ _validation = { @@ -43,6 +42,7 @@ class DeletedVault(Model): } def __init__(self, properties=None): + super(DeletedVault, self).__init__() self.id = None self.name = None self.type = None diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_paged.py old mode 100755 new mode 100644 index a83951301114..756293a8c5eb --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_paged.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_paged.py @@ -14,7 +14,7 @@ class DeletedVaultPaged(Paged): """ - A paging container for iterating over a list of 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/models/deleted_vault_properties.py old mode 100755 new mode 100644 index 7dd2b0216eba..3247a439d946 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_properties.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/deleted_vault_properties.py @@ -27,7 +27,7 @@ class DeletedVaultProperties(Model): :ivar scheduled_purge_date: The scheduled purged date. :vartype scheduled_purge_date: datetime :ivar tags: Tags of the original vault. - :vartype tags: dict + :vartype tags: dict[str, str] """ _validation = { @@ -47,6 +47,7 @@ class DeletedVaultProperties(Model): } def __init__(self): + super(DeletedVaultProperties, self).__init__() self.vault_id = None self.location = None self.deletion_date = None diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/key_vault_management_client_enums.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/key_vault_management_client_enums.py old mode 100755 new mode 100644 index b36bd0601cd8..e432fd298ed5 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/key_vault_management_client_enums.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/key_vault_management_client_enums.py @@ -86,3 +86,16 @@ class CreateMode(Enum): recover = "recover" default = "default" + + +class Reason(Enum): + + account_name_invalid = "AccountNameInvalid" + already_exists = "AlreadyExists" + + +class AccessPolicyUpdateKind(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/models/log_specification.py new file mode 100644 index 000000000000..1c4e46d69fbd --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/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, name=None, display_name=None, blob_duration=None): + super(LogSpecification, self).__init__() + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation.py new file mode 100644 index 000000000000..27e52fdb7f54 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/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.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 + """ + + _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=None, display=None, origin=None, service_specification=None): + super(Operation, self).__init__() + self.name = name + self.display = display + self.origin = origin + self.service_specification = service_specification diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_display.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_display.py new file mode 100644 index 000000000000..ccb8d7adee3a --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/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, provider=None, resource=None, operation=None, description=None): + super(OperationDisplay, self).__init__() + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/operation_paged.py new file mode 100644 index 000000000000..cded4bbab821 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/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/models/permissions.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions.py old mode 100755 new mode 100644 index 1990a3986c85..25d73401a680 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/permissions.py @@ -16,17 +16,14 @@ class Permissions(Model): """Permissions the identity has for keys, secrets, certificates and storage. :param keys: Permissions to keys - :type keys: list of str or :class:`KeyPermissions - ` + :type keys: list[str or ~azure.mgmt.keyvault.models.KeyPermissions] :param secrets: Permissions to secrets - :type secrets: list of str or :class:`SecretPermissions - ` + :type secrets: list[str or ~azure.mgmt.keyvault.models.SecretPermissions] :param certificates: Permissions to certificates - :type certificates: list of str or :class:`CertificatePermissions - ` + :type certificates: list[str or + ~azure.mgmt.keyvault.models.CertificatePermissions] :param storage: Permissions to storage accounts - :type storage: list of str or :class:`StoragePermissions - ` + :type storage: list[str or ~azure.mgmt.keyvault.models.StoragePermissions] """ _attribute_map = { @@ -37,6 +34,7 @@ class Permissions(Model): } def __init__(self, keys=None, secrets=None, certificates=None, storage=None): + super(Permissions, self).__init__() self.keys = keys self.secrets = secrets self.certificates = certificates diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource.py old mode 100755 new mode 100644 index 91d0112ff745..9d91463bfeee --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource.py @@ -20,20 +20,20 @@ class Resource(Model): :ivar id: The Azure Resource Manager resource ID for the key vault. :vartype id: str - :param name: The name of the key vault. - :type name: 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: 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 + :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, - 'name': {'required': True}, + 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, } @@ -46,9 +46,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, name, location, tags=None): + def __init__(self, location, tags=None): + super(Resource, self).__init__() self.id = None - self.name = name + self.name = None self.type = None self.location = location self.tags = tags diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_paged.py old mode 100755 new mode 100644 index c6bb017444a4..1635ebc7fda1 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_paged.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/resource_paged.py @@ -14,7 +14,7 @@ class ResourcePaged(Paged): """ - A paging container for iterating over a list of 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/service_specification.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/service_specification.py new file mode 100644 index 000000000000..a4fa109f9243 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/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.models.LogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, log_specifications=None): + super(ServiceSpecification, self).__init__() + self.log_specifications = log_specifications diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku.py old mode 100755 new mode 100644 index 7444e328b7f9..69a4758e155f --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/sku.py @@ -22,7 +22,7 @@ class Sku(Model): :vartype family: str :param name: 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 :class:`SkuName ` + :type name: str or ~azure.mgmt.keyvault.models.SkuName """ _validation = { @@ -38,4 +38,5 @@ class Sku(Model): family = "A" def __init__(self, name): + super(Sku, self).__init__() self.name = name diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault.py old mode 100755 new mode 100644 index 46905dbac4f1..c47e0d8b68e0 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault.py @@ -20,23 +20,22 @@ class Vault(Resource): :ivar id: The Azure Resource Manager resource ID for the key vault. :vartype id: str - :param name: The name of the key vault. - :type name: 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: 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 + :type tags: dict[str, str] :param properties: Properties of the vault - :type properties: :class:`VaultProperties - ` + :type properties: ~azure.mgmt.keyvault.models.VaultProperties """ _validation = { 'id': {'readonly': True}, - 'name': {'required': True}, + 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, 'properties': {'required': True}, @@ -51,6 +50,6 @@ class Vault(Resource): 'properties': {'key': 'properties', 'type': 'VaultProperties'}, } - def __init__(self, name, location, properties, tags=None): - super(Vault, self).__init__(name=name, location=location, tags=tags) + def __init__(self, location, properties, tags=None): + super(Vault, self).__init__(location=location, tags=tags) self.properties = properties diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters.py new file mode 100644 index 000000000000..65667c484b09 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_parameters.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 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. + + :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: Properties of the access policy + :type properties: ~azure.mgmt.keyvault.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): + super(VaultAccessPolicyParameters, self).__init__() + self.id = None + self.name = None + self.type = None + self.location = None + self.properties = properties diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties.py new file mode 100644 index 000000000000..2c93c6b466aa --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_access_policy_properties.py @@ -0,0 +1,34 @@ +# 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. + + :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] + """ + + _validation = { + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + } + + def __init__(self, access_policies): + super(VaultAccessPolicyProperties, self).__init__() + self.access_policies = access_policies diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_check_name_availability_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_check_name_availability_parameters.py new file mode 100644 index 000000000000..ff2b7e738674 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_check_name_availability_parameters.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 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. + + :param name: The vault name. + :type name: str + :ivar type: 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): + super(VaultCheckNameAvailabilityParameters, self).__init__() + self.name = name diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters.py old mode 100755 new mode 100644 index 58af5285a6e3..8e5a87895bf7 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_create_or_update_parameters.py @@ -19,10 +19,9 @@ class VaultCreateOrUpdateParameters(Model): be created. :type location: str :param tags: The tags that will be assigned to the key vault. - :type tags: dict + :type tags: dict[str, str] :param properties: Properties of the vault - :type properties: :class:`VaultProperties - ` + :type properties: ~azure.mgmt.keyvault.models.VaultProperties """ _validation = { @@ -37,6 +36,7 @@ class VaultCreateOrUpdateParameters(Model): } def __init__(self, location, properties, tags=None): + super(VaultCreateOrUpdateParameters, self).__init__() self.location = location self.tags = tags self.properties = properties diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_paged.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_paged.py old mode 100755 new mode 100644 index e506499eb8ee..6ec2f41fabab --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_paged.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_paged.py @@ -14,7 +14,7 @@ class VaultPaged(Paged): """ - A paging container for iterating over a list of 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/models/vault_patch_parameters.py new file mode 100644 index 000000000000..ada3e9a9c58d --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_parameters.py @@ -0,0 +1,32 @@ +# 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.models.VaultPatchProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultPatchProperties'}, + } + + def __init__(self, tags=None, properties=None): + super(VaultPatchParameters, self).__init__() + 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/models/vault_patch_properties.py new file mode 100644 index 000000000000..6c50843e8b3b --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_patch_properties.py @@ -0,0 +1,67 @@ +# 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.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] + :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 to specify whether the 'soft delete' + functionality is enabled for this key vault. It does not accept false + 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.models.CreateMode + """ + + _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'}, + } + + def __init__(self, tenant_id=None, sku=None, access_policies=None, enabled_for_deployment=None, enabled_for_disk_encryption=None, enabled_for_template_deployment=None, enable_soft_delete=None, create_mode=None): + super(VaultPatchProperties, self).__init__() + 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 diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties.py old mode 100755 new mode 100644 index 0d49b5ee4950..fe7645a80b53 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/models/vault_properties.py @@ -15,19 +15,21 @@ class VaultProperties(Model): """Properties of the vault. + Variables are only populated by the server, and will be ignored when + sending a request. + :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: :class:`Sku ` + :type sku: ~azure.mgmt.keyvault.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 of :class:`AccessPolicyEntry - ` - :param vault_uri: The URI of the vault for performing operations on keys + :type access_policies: list[~azure.mgmt.keyvault.models.AccessPolicyEntry] + :ivar vault_uri: The URI of the vault for performing operations on keys and secrets. - :type vault_uri: str + :vartype 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. @@ -45,14 +47,13 @@ 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 :class:`CreateMode - ` + :type create_mode: str or ~azure.mgmt.keyvault.models.CreateMode """ _validation = { 'tenant_id': {'required': True}, 'sku': {'required': True}, - 'access_policies': {'max_items': 16}, + 'vault_uri': {'readonly': True}, } _attribute_map = { @@ -67,11 +68,12 @@ class VaultProperties(Model): 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, } - def __init__(self, tenant_id, sku, access_policies=None, vault_uri=None, enabled_for_deployment=None, enabled_for_disk_encryption=None, enabled_for_template_deployment=None, enable_soft_delete=None, create_mode=None): + def __init__(self, tenant_id, sku, access_policies=None, enabled_for_deployment=None, enabled_for_disk_encryption=None, enabled_for_template_deployment=None, enable_soft_delete=None, create_mode=None): + super(VaultProperties, self).__init__() self.tenant_id = tenant_id self.sku = sku self.access_policies = access_policies - self.vault_uri = vault_uri + self.vault_uri = None 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 diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/__init__.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/__init__.py old mode 100755 new mode 100644 index 1fbc1ef63985..6a14a7603b58 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/__init__.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/__init__.py @@ -10,7 +10,9 @@ # -------------------------------------------------------------------------- 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/operations/operations.py new file mode 100644 index 000000000000..d1f0cda7c339 --- /dev/null +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/operations.py @@ -0,0 +1,98 @@ +# 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 objec 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.models.OperationPaged[~azure.mgmt.keyvault.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/providers/Microsoft.KeyVault/operations' + + # 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 diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/vaults_operations.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/vaults_operations.py old mode 100755 new mode 100644 index 406b6bbc2a39..e83d5fb73f5a --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/vaults_operations.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/vaults_operations.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -27,6 +28,8 @@ class VaultsOperations(object): :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 @@ -46,16 +49,16 @@ def create_or_update( :param vault_name: Name of the vault :type vault_name: str :param parameters: Parameters to create or update the vault - :type parameters: :class:`VaultCreateOrUpdateParameters - ` + :type parameters: + ~azure.mgmt.keyvault.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`. - :rtype: :class:`Vault ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.keyvault.models.Vault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-10-01" @@ -64,7 +67,7 @@ def create_or_update( url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}' path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern='^[a-zA-Z0-9-]{3,24}$'), + '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) @@ -89,19 +92,95 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [201, 200]: + 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 + + 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.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 + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.VaultPatchParameters(tags=tags, properties=properties) + + api_version = "2016-10-01" + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}' + 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) @@ -123,9 +202,8 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-10-01" @@ -155,7 +233,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -180,9 +258,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Vault ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.keyvault.models.Vault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-10-01" @@ -212,7 +290,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -230,6 +308,86 @@ def get( return deserialized + 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.models.AccessPolicyUpdateKind + :param properties: Properties of the access policy + :type properties: + ~azure.mgmt.keyvault.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 + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.VaultAccessPolicyParameters(properties=properties) + + api_version = "2016-10-01" + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}' + 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 + 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 @@ -245,7 +403,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VaultPaged ` + :return: An iterator like instance of Vault + :rtype: + ~azure.mgmt.keyvault.models.VaultPaged[~azure.mgmt.keyvault.models.Vault] :raises: :class:`CloudError` """ api_version = "2016-10-01" @@ -284,7 +444,78 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + 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 + + 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.models.VaultPaged[~azure.mgmt.keyvault.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 = '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/vaults' + 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) @@ -312,8 +543,9 @@ def list_deleted( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeletedVaultPaged - ` + :return: An iterator like instance of DeletedVault + :rtype: + ~azure.mgmt.keyvault.models.DeletedVaultPaged[~azure.mgmt.keyvault.models.DeletedVault] :raises: :class:`CloudError` """ api_version = "2016-10-01" @@ -349,7 +581,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -381,10 +613,9 @@ def get_deleted( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeletedVault - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: DeletedVault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.keyvault.models.DeletedVault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-10-01" @@ -414,7 +645,7 @@ def get_deleted( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -432,25 +663,9 @@ def get_deleted( return deserialized - def purge_deleted( - self, vault_name, location, custom_headers=None, raw=False, **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: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _purge_deleted_initial( + self, vault_name, location, custom_headers=None, raw=False, **operation_config): api_version = "2016-10-01" # Construct URL @@ -477,18 +692,59 @@ def purge_deleted( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + 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 - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def purge_deleted( + self, vault_name, location, custom_headers=None, raw=False, **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: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._purge_deleted_initial( + vault_name=vault_name, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -501,10 +757,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -524,8 +776,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourcePaged - ` + :return: An iterator like instance of Resource + :rtype: + ~azure.mgmt.keyvault.models.ResourcePaged[~azure.mgmt.keyvault.models.Resource] :raises: :class:`CloudError` """ api_version = "2015-11-01" @@ -564,7 +817,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -582,3 +835,68 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + + 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.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + vault_name = models.VaultCheckNameAvailabilityParameters(name=name) + + api_version = "2016-10-01" + + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability' + 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 diff --git a/azure-mgmt-keyvault/azure/mgmt/keyvault/version.py b/azure-mgmt-keyvault/azure/mgmt/keyvault/version.py old mode 100755 new mode 100644 index 39e390a442c6..20ba78005d47 --- a/azure-mgmt-keyvault/azure/mgmt/keyvault/version.py +++ b/azure-mgmt-keyvault/azure/mgmt/keyvault/version.py @@ -9,6 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.40.0" - +VERSION = "2016-10-01" diff --git a/azure-mgmt-keyvault/build.json b/azure-mgmt-keyvault/build.json index 158e2881f289..0f2cdca14f78 100644 --- a/azure-mgmt-keyvault/build.json +++ b/azure-mgmt-keyvault/build.json @@ -1 +1,425 @@ -{"autorest": "1.0.1-20170521-2300-nightly", "date": "2017-05-22T21:39:33Z", "version": ""} \ No newline at end of file +{ + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4228", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_shasum": "b3897b8615417aa07cf9113d4bd18862b32f82f8", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4228", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4097.814575748631.personal-lock", + "options": { + "port": 64845, + "host": "2130734171", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4097.814575748631.personal-lock:64845" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4230", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_shasum": "3c9b387fbe18ce3a54b68bc0c24ddb0a4c850f25", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4230", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4097.814575748631.personal-lock", + "options": { + "port": 64845, + "host": "2130734171", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4097.814575748631.personal-lock:64845" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4097.814575748631.personal-lock", + "options": { + "port": 64845, + "host": "2130734171", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4097.814575748631.personal-lock:64845" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.3.38", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.1", + "autorest": "^2.0.4201", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.3.38", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4097.814575748631.personal-lock", + "options": { + "port": 64845, + "host": "2130734171", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4097.814575748631.personal-lock:64845" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.1.34", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "^2.3.13", + "autorest": "^2.0.4203", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_shasum": "b58d7e0542e081cf410fdbcdf8c14acf9cee16a7", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.1.34", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4097.814575748631.personal-lock", + "options": { + "port": 64845, + "host": "2130734171", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4097.814575748631.personal-lock:64845" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + } + ], + "autorest_bootstrap": {} +} \ No newline at end of file