Skip to content
Merged
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
68 changes: 46 additions & 22 deletions azure-mgmt-keyvault/azure/mgmt/keyvault/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,52 @@
# regenerated.
# --------------------------------------------------------------------------

from .sku import Sku
from .permissions import Permissions
from .access_policy_entry import AccessPolicyEntry
from .ip_rule import IPRule
from .virtual_network_rule import VirtualNetworkRule
from .network_rule_set import NetworkRuleSet
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
try:
from .sku_py3 import Sku
from .permissions_py3 import Permissions
from .access_policy_entry_py3 import AccessPolicyEntry
from .ip_rule_py3 import IPRule
from .virtual_network_rule_py3 import VirtualNetworkRule
from .network_rule_set_py3 import NetworkRuleSet
from .vault_properties_py3 import VaultProperties
from .vault_patch_properties_py3 import VaultPatchProperties
from .vault_access_policy_properties_py3 import VaultAccessPolicyProperties
from .deleted_vault_properties_py3 import DeletedVaultProperties
from .vault_create_or_update_parameters_py3 import VaultCreateOrUpdateParameters
from .vault_patch_parameters_py3 import VaultPatchParameters
from .vault_access_policy_parameters_py3 import VaultAccessPolicyParameters
from .vault_py3 import Vault
from .deleted_vault_py3 import DeletedVault
from .resource_py3 import Resource
from .vault_check_name_availability_parameters_py3 import VaultCheckNameAvailabilityParameters
from .check_name_availability_result_py3 import CheckNameAvailabilityResult
from .operation_display_py3 import OperationDisplay
from .log_specification_py3 import LogSpecification
from .service_specification_py3 import ServiceSpecification
from .operation_py3 import Operation
except (SyntaxError, ImportError):
from .sku import Sku
from .permissions import Permissions
from .access_policy_entry import AccessPolicyEntry
from .ip_rule import IPRule
from .virtual_network_rule import VirtualNetworkRule
from .network_rule_set import NetworkRuleSet
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ class AccessPolicyEntry(Model):
"""An identity that have access to the key vault. All identities in the array
must use the same tenant ID as the key vault's tenant ID.

:param tenant_id: The Azure Active Directory tenant ID that should be used
for authenticating requests to the key vault.
All required parameters must be populated in order to send to Azure.

:param tenant_id: Required. The Azure Active Directory tenant ID that
should be used for authenticating requests to the key vault.
:type tenant_id: str
:param object_id: The object ID of a user, service principal or security
group in the Azure Active Directory tenant for the vault. The object ID
must be unique for the list of access policies.
:param object_id: Required. The object ID of a user, service principal or
security group in the Azure Active Directory tenant for the vault. The
object ID must be unique for the list of access policies.
:type object_id: str
:param application_id: Application ID of the client making request on
behalf of a principal
:type application_id: str
:param permissions: Permissions the identity has for keys, secrets and
certificates.
:param permissions: Required. Permissions the identity has for keys,
secrets and certificates.
:type permissions: ~azure.mgmt.keyvault.models.Permissions
"""

Expand All @@ -44,9 +46,9 @@ class AccessPolicyEntry(Model):
'permissions': {'key': 'permissions', 'type': 'Permissions'},
}

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
self.permissions = permissions
def __init__(self, **kwargs):
super(AccessPolicyEntry, self).__init__(**kwargs)
self.tenant_id = kwargs.get('tenant_id', None)
self.object_id = kwargs.get('object_id', None)
self.application_id = kwargs.get('application_id', None)
self.permissions = kwargs.get('permissions', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AccessPolicyEntry(Model):
"""An identity that have access to the key vault. All identities in the array
must use the same tenant ID as the key vault's tenant ID.

All required parameters must be populated in order to send to Azure.

:param tenant_id: Required. The Azure Active Directory tenant ID that
should be used for authenticating requests to the key vault.
:type tenant_id: str
:param object_id: Required. The object ID of a user, service principal or
security group in the Azure Active Directory tenant for the vault. The
object ID must be unique for the list of access policies.
:type object_id: str
:param application_id: Application ID of the client making request on
behalf of a principal
:type application_id: str
:param permissions: Required. Permissions the identity has for keys,
secrets and certificates.
:type permissions: ~azure.mgmt.keyvault.models.Permissions
"""

_validation = {
'tenant_id': {'required': True},
'object_id': {'required': True},
'permissions': {'required': True},
}

_attribute_map = {
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'object_id': {'key': 'objectId', 'type': 'str'},
'application_id': {'key': 'applicationId', 'type': 'str'},
'permissions': {'key': 'permissions', 'type': 'Permissions'},
}

def __init__(self, *, tenant_id: str, object_id: str, permissions, application_id: str=None, **kwargs) -> None:
super(AccessPolicyEntry, self).__init__(**kwargs)
self.tenant_id = tenant_id
self.object_id = object_id
self.application_id = application_id
self.permissions = permissions
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class CheckNameAvailabilityResult(Model):
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self):
super(CheckNameAvailabilityResult, self).__init__()
def __init__(self, **kwargs):
super(CheckNameAvailabilityResult, self).__init__(**kwargs)
self.name_available = None
self.reason = None
self.message = None
Original file line number Diff line number Diff line change
@@ -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, **kwargs) -> None:
super(CheckNameAvailabilityResult, self).__init__(**kwargs)
self.name_available = None
self.reason = None
self.message = None
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class DeletedVault(Model):
'properties': {'key': 'properties', 'type': 'DeletedVaultProperties'},
}

def __init__(self, properties=None):
super(DeletedVault, self).__init__()
def __init__(self, **kwargs):
super(DeletedVault, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.properties = properties
self.properties = kwargs.get('properties', None)
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class DeletedVaultProperties(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self):
super(DeletedVaultProperties, self).__init__()
def __init__(self, **kwargs):
super(DeletedVaultProperties, self).__init__(**kwargs)
self.vault_id = None
self.location = None
self.deletion_date = None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class DeletedVaultProperties(Model):
"""Properties of the deleted vault.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar vault_id: The resource id of the original vault.
:vartype vault_id: str
:ivar location: The location of the original vault.
:vartype location: str
:ivar deletion_date: The deleted date.
:vartype deletion_date: datetime
:ivar scheduled_purge_date: The scheduled purged date.
:vartype scheduled_purge_date: datetime
:ivar tags: Tags of the original vault.
:vartype tags: dict[str, str]
"""

_validation = {
'vault_id': {'readonly': True},
'location': {'readonly': True},
'deletion_date': {'readonly': True},
'scheduled_purge_date': {'readonly': True},
'tags': {'readonly': True},
}

_attribute_map = {
'vault_id': {'key': 'vaultId', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'},
'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, **kwargs) -> None:
super(DeletedVaultProperties, self).__init__(**kwargs)
self.vault_id = None
self.location = None
self.deletion_date = None
self.scheduled_purge_date = None
self.tags = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class DeletedVault(Model):
"""Deleted vault information with extended details.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: The resource ID for the deleted key vault.
:vartype id: str
:ivar name: The name of the key vault.
:vartype name: str
:ivar type: The resource type of the key vault.
:vartype type: str
:param properties: Properties of the vault
:type properties: ~azure.mgmt.keyvault.models.DeletedVaultProperties
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'DeletedVaultProperties'},
}

def __init__(self, *, properties=None, **kwargs) -> None:
super(DeletedVault, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.properties = properties
10 changes: 6 additions & 4 deletions azure-mgmt-keyvault/azure/mgmt/keyvault/models/ip_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class IPRule(Model):
"""A rule governing the accesibility of a vault from a specific ip address or
ip range.

:param value: An IPv4 address range in CIDR notation, such as
All required parameters must be populated in order to send to Azure.

:param value: Required. An IPv4 address range in CIDR notation, such as
'124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that
start with 124.56.78).
:type value: str
Expand All @@ -30,6 +32,6 @@ class IPRule(Model):
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, value):
super(IPRule, self).__init__()
self.value = value
def __init__(self, **kwargs):
super(IPRule, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
Loading