From 5f3705e22e84a4dbfcd3db57377259e59129117c Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 24 Feb 2020 21:04:31 +0000 Subject: [PATCH] Generated from 497f37d011e45d90e7a5f190b1326ec89e2719c8 Merge pull request #6 from Khushboo-Baheti/master merge --- .../operations/_vaults_operations.py | 2 +- .../keyvault/v2019_09_01/models/_models.py | 48 ++++++++++++++++--- .../v2019_09_01/models/_models_py3.py | 48 ++++++++++++++++--- .../operations/_vaults_operations.py | 2 +- 4 files changed, 86 insertions(+), 14 deletions(-) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py index b9f95c80c852..01c3fcfd1053 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py @@ -270,7 +270,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py index b6be3cbf8245..60abc414518d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py @@ -928,9 +928,22 @@ class VaultPatchProperties(Model): Resource Manager is permitted to retrieve secrets from the key vault. :type enabled_for_template_deployment: bool :param enable_soft_delete: Property to specify whether the 'soft delete' - functionality is enabled for this key vault. If omitted, assume true as - default value. Once set to true, cannot be reverted to false. + functionality is enabled for this key vault. If omitted, assume false as + default value when patching an existing vault. Once set to true, cannot be + reverted to false. Default value: False . :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It + accepts >=7 and <=90. + :type soft_delete_retention_in_days: int + :param enable_rbac_authorization: Property that controls how data actions + are authorized. When true, the key vault will use Role Based Access + Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored (warning: this is a preview + feature). When false, the key vault will use the access policies specified + in vault properties, and any policy stored on Azure Resource Manager will + be ignored. If null or not specified, the value of this property will not + change. + :type enable_rbac_authorization: bool :param create_mode: The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default' :type create_mode: str or @@ -956,6 +969,8 @@ class VaultPatchProperties(Model): 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, @@ -969,7 +984,9 @@ def __init__(self, **kwargs): self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) - self.enable_soft_delete = kwargs.get('enable_soft_delete', None) + self.enable_soft_delete = kwargs.get('enable_soft_delete', False) + self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', None) + self.enable_rbac_authorization = kwargs.get('enable_rbac_authorization', None) self.create_mode = kwargs.get('create_mode', None) self.enable_purge_protection = kwargs.get('enable_purge_protection', None) self.network_acls = kwargs.get('network_acls', None) @@ -1009,9 +1026,24 @@ class VaultProperties(Model): Resource Manager is permitted to retrieve secrets from the key vault. :type enabled_for_template_deployment: bool :param enable_soft_delete: Property to specify whether the 'soft delete' - functionality is enabled for this key vault. If omitted, assume true as - default value. Once set to true, cannot be reverted to false. + functionality is enabled for this key vault. If it's not set to any + value(true or false) when creating new key vault, it will be set to true + by default. Once it's been set to true value, it can NOT be reverted to + false. Default value: True . :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It + accepts >=7 and <=90. Default value: 90 . + :type soft_delete_retention_in_days: int + :param enable_rbac_authorization: Property that controls how data actions + are authorized. When true, the key vault will use Role Based Access + Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored (warning: this is a preview + feature). When false, the key vault will use the access policies specified + in vault properties, and any policy stored on Azure Resource Manager will + be ignored. If null or not specified, the vault is created with the + default value of false. Note that management actions are always authorized + with RBAC. Default value: False . + :type enable_rbac_authorization: bool :param create_mode: The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default' :type create_mode: str or @@ -1048,6 +1080,8 @@ class VaultProperties(Model): 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, @@ -1063,7 +1097,9 @@ def __init__(self, **kwargs): self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) - self.enable_soft_delete = kwargs.get('enable_soft_delete', None) + self.enable_soft_delete = kwargs.get('enable_soft_delete', True) + self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', 90) + self.enable_rbac_authorization = kwargs.get('enable_rbac_authorization', False) self.create_mode = kwargs.get('create_mode', None) self.enable_purge_protection = kwargs.get('enable_purge_protection', None) self.network_acls = kwargs.get('network_acls', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py index 3c2d4b4aa332..41283e280c98 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py @@ -928,9 +928,22 @@ class VaultPatchProperties(Model): Resource Manager is permitted to retrieve secrets from the key vault. :type enabled_for_template_deployment: bool :param enable_soft_delete: Property to specify whether the 'soft delete' - functionality is enabled for this key vault. If omitted, assume true as - default value. Once set to true, cannot be reverted to false. + functionality is enabled for this key vault. If omitted, assume false as + default value when patching an existing vault. Once set to true, cannot be + reverted to false. Default value: False . :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It + accepts >=7 and <=90. + :type soft_delete_retention_in_days: int + :param enable_rbac_authorization: Property that controls how data actions + are authorized. When true, the key vault will use Role Based Access + Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored (warning: this is a preview + feature). When false, the key vault will use the access policies specified + in vault properties, and any policy stored on Azure Resource Manager will + be ignored. If null or not specified, the value of this property will not + change. + :type enable_rbac_authorization: bool :param create_mode: The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default' :type create_mode: str or @@ -956,12 +969,14 @@ class VaultPatchProperties(Model): 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, } - def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None: + def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=False, soft_delete_retention_in_days: int=None, enable_rbac_authorization: bool=None, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None: super(VaultPatchProperties, self).__init__(**kwargs) self.tenant_id = tenant_id self.sku = sku @@ -970,6 +985,8 @@ def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabl self.enabled_for_disk_encryption = enabled_for_disk_encryption self.enabled_for_template_deployment = enabled_for_template_deployment self.enable_soft_delete = enable_soft_delete + self.soft_delete_retention_in_days = soft_delete_retention_in_days + self.enable_rbac_authorization = enable_rbac_authorization self.create_mode = create_mode self.enable_purge_protection = enable_purge_protection self.network_acls = network_acls @@ -1009,9 +1026,24 @@ class VaultProperties(Model): Resource Manager is permitted to retrieve secrets from the key vault. :type enabled_for_template_deployment: bool :param enable_soft_delete: Property to specify whether the 'soft delete' - functionality is enabled for this key vault. If omitted, assume true as - default value. Once set to true, cannot be reverted to false. + functionality is enabled for this key vault. If it's not set to any + value(true or false) when creating new key vault, it will be set to true + by default. Once it's been set to true value, it can NOT be reverted to + false. Default value: True . :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It + accepts >=7 and <=90. Default value: 90 . + :type soft_delete_retention_in_days: int + :param enable_rbac_authorization: Property that controls how data actions + are authorized. When true, the key vault will use Role Based Access + Control (RBAC) for authorization of data actions, and the access policies + specified in vault properties will be ignored (warning: this is a preview + feature). When false, the key vault will use the access policies specified + in vault properties, and any policy stored on Azure Resource Manager will + be ignored. If null or not specified, the vault is created with the + default value of false. Note that management actions are always authorized + with RBAC. Default value: False . + :type enable_rbac_authorization: bool :param create_mode: The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default' :type create_mode: str or @@ -1048,13 +1080,15 @@ class VaultProperties(Model): 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, 'create_mode': {'key': 'createMode', 'type': 'CreateMode'}, 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnectionItem]'}, } - def __init__(self, *, tenant_id: str, sku, access_policies=None, vault_uri: str=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None: + def __init__(self, *, tenant_id: str, sku, access_policies=None, vault_uri: str=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=True, soft_delete_retention_in_days: int=90, enable_rbac_authorization: bool=False, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None: super(VaultProperties, self).__init__(**kwargs) self.tenant_id = tenant_id self.sku = sku @@ -1064,6 +1098,8 @@ def __init__(self, *, tenant_id: str, sku, access_policies=None, vault_uri: str= self.enabled_for_disk_encryption = enabled_for_disk_encryption self.enabled_for_template_deployment = enabled_for_template_deployment self.enable_soft_delete = enable_soft_delete + self.soft_delete_retention_in_days = soft_delete_retention_in_days + self.enable_rbac_authorization = enable_rbac_authorization self.create_mode = create_mode self.enable_purge_protection = enable_purge_protection self.network_acls = network_acls diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py index 96a636513f33..d1555ea8b5c6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py @@ -270,7 +270,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp