Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-keyvault] Adding 7.2-preview version #342

Open
wants to merge 1 commit into
base: sdkAutomation/azure-mgmt-keyvault
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,9 @@ class VaultPatchProperties(Model):
functionality is enabled for this key vault. If omitted, assume true as
default value. Once set to true, cannot be reverted to 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 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
Expand All @@ -956,6 +959,7 @@ 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'},
'create_mode': {'key': 'createMode', 'type': 'CreateMode'},
'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'},
'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'},
Expand All @@ -970,6 +974,7 @@ def __init__(self, **kwargs):
self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None)
self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None)
self.enable_soft_delete = kwargs.get('enable_soft_delete', None)
self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', None)
self.create_mode = kwargs.get('create_mode', None)
self.enable_purge_protection = kwargs.get('enable_purge_protection', None)
self.network_acls = kwargs.get('network_acls', None)
Expand Down Expand Up @@ -1009,9 +1014,14 @@ 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.
:type soft_delete_retention_in_days: int
:param create_mode: The vault's create mode to indicate whether the vault
need to be recovered or not. Possible values include: 'recover', 'default'
:type create_mode: str or
Expand Down Expand Up @@ -1048,6 +1058,7 @@ 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'},
'create_mode': {'key': 'createMode', 'type': 'CreateMode'},
'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'},
'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'},
Expand All @@ -1063,7 +1074,8 @@ 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', 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,9 @@ class VaultPatchProperties(Model):
functionality is enabled for this key vault. If omitted, assume true as
default value. Once set to true, cannot be reverted to 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 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
Expand All @@ -956,12 +959,13 @@ 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'},
'create_mode': {'key': 'createMode', 'type': 'CreateMode'},
'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'},
'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'},
}

def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None:
def __init__(self, *, tenant_id: str=None, sku=None, access_policies=None, enabled_for_deployment: bool=None, enabled_for_disk_encryption: bool=None, enabled_for_template_deployment: bool=None, enable_soft_delete: bool=None, soft_delete_retention_in_days: int=None, create_mode=None, enable_purge_protection: bool=None, network_acls=None, **kwargs) -> None:
super(VaultPatchProperties, self).__init__(**kwargs)
self.tenant_id = tenant_id
self.sku = sku
Expand All @@ -970,6 +974,7 @@ 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.create_mode = create_mode
self.enable_purge_protection = enable_purge_protection
self.network_acls = network_acls
Expand Down Expand Up @@ -1009,9 +1014,14 @@ 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.
:type soft_delete_retention_in_days: int
:param create_mode: The vault's create mode to indicate whether the vault
need to be recovered or not. Possible values include: 'recover', 'default'
:type create_mode: str or
Expand Down Expand Up @@ -1048,13 +1058,14 @@ 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'},
'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=None, 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
Expand All @@ -1064,6 +1075,7 @@ 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.create_mode = create_mode
self.enable_purge_protection = enable_purge_protection
self.network_acls = network_acls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down