Skip to content
Closed
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
17 changes: 9 additions & 8 deletions azure-keyvault/azure/keyvault/key_vault_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -43,7 +43,7 @@ def __init__(
self.credentials = credentials


class KeyVaultClient(object):
class KeyVaultClient(SDKClient):
"""The key vault client performs cryptographic key operations and vault operations against the Key Vault service.

:ivar config: Configuration for client.
Expand All @@ -58,10 +58,10 @@ def __init__(
self, credentials):

self.config = KeyVaultClientConfiguration(credentials)
self._client = ServiceClient(self.config.credentials, self.config)
super(KeyVaultClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '7.0-preview'
self.api_version = '7.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -85,7 +85,8 @@ def create_key(
JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA',
'RSA-HSM', 'oct'
:type kty: str or ~azure.keyvault.models.JsonWebKeyType
:param key_size: The key size in bytes. For example, 1024 or 2048.
:param key_size: The key size in bits. For example: 2048, 3072, or
4096 for RSA.
:type key_size: int
:param key_ops:
:type key_ops: list[str or ~azure.keyvault.models.JsonWebKeyOperation]
Expand All @@ -96,7 +97,7 @@ def create_key(
:type tags: dict[str, str]
:param curve: Elliptic curve name. For valid values, see
JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384',
'P-521', 'SECP256K1'
'P-521', 'P-256K'
:type curve: str or ~azure.keyvault.models.JsonWebKeyCurveName
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
Expand Down Expand Up @@ -966,7 +967,7 @@ def sign(
more information on possible algorithm types, see
JsonWebKeySignatureAlgorithm. Possible values include: 'PS256',
'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256',
'ES384', 'ES512', 'ECDSA256'
'ES384', 'ES512', 'ES256K'
:type algorithm: str or
~azure.keyvault.models.JsonWebKeySignatureAlgorithm
:param value:
Expand Down Expand Up @@ -1053,7 +1054,7 @@ def verify(
information on possible algorithm types, see
JsonWebKeySignatureAlgorithm. Possible values include: 'PS256',
'PS384', 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256',
'ES384', 'ES512', 'ECDSA256'
'ES384', 'ES512', 'ES256K'
:type algorithm: str or
~azure.keyvault.models.JsonWebKeySignatureAlgorithm
:param digest: The digest used for signing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .attributes import Attributes
from .attributes_py3 import Attributes


class CertificateAttributes(Attributes):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .certificate_bundle import CertificateBundle
from .certificate_bundle_py3 import CertificateBundle


class DeletedCertificateBundle(CertificateBundle):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .certificate_item import CertificateItem
from .certificate_item_py3 import CertificateItem


class DeletedCertificateItem(CertificateItem):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .key_bundle import KeyBundle
from .key_bundle_py3 import KeyBundle


class DeletedKeyBundle(KeyBundle):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .key_item import KeyItem
from .key_item_py3 import KeyItem


class DeletedKeyItem(KeyItem):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .sas_definition_bundle import SasDefinitionBundle
from .sas_definition_bundle_py3 import SasDefinitionBundle


class DeletedSasDefinitionBundle(SasDefinitionBundle):
Expand Down Expand Up @@ -73,7 +73,7 @@ class DeletedSasDefinitionBundle(SasDefinitionBundle):
}

def __init__(self, *, recovery_id: str=None, **kwargs) -> None:
super(DeletedSasDefinitionBundle, self).__init__(, **kwargs)
super(DeletedSasDefinitionBundle, self).__init__(**kwargs)
self.recovery_id = recovery_id
self.scheduled_purge_date = None
self.deleted_date = None
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .sas_definition_item import SasDefinitionItem
from .sas_definition_item_py3 import SasDefinitionItem


class DeletedSasDefinitionItem(SasDefinitionItem):
Expand Down Expand Up @@ -57,7 +57,7 @@ class DeletedSasDefinitionItem(SasDefinitionItem):
}

def __init__(self, *, recovery_id: str=None, **kwargs) -> None:
super(DeletedSasDefinitionItem, self).__init__(, **kwargs)
super(DeletedSasDefinitionItem, self).__init__(**kwargs)
self.recovery_id = recovery_id
self.scheduled_purge_date = None
self.deleted_date = None
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .secret_bundle import SecretBundle
from .secret_bundle_py3 import SecretBundle


class DeletedSecretBundle(SecretBundle):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .secret_item import SecretItem
from .secret_item_py3 import SecretItem


class DeletedSecretItem(SecretItem):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .storage_account_item import StorageAccountItem
from .storage_account_item_py3 import StorageAccountItem


class DeletedStorageAccountItem(StorageAccountItem):
Expand Down Expand Up @@ -57,7 +57,7 @@ class DeletedStorageAccountItem(StorageAccountItem):
}

def __init__(self, *, recovery_id: str=None, **kwargs) -> None:
super(DeletedStorageAccountItem, self).__init__(, **kwargs)
super(DeletedStorageAccountItem, self).__init__(**kwargs)
self.recovery_id = recovery_id
self.scheduled_purge_date = None
self.deleted_date = None
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .storage_bundle import StorageBundle
from .storage_bundle_py3 import StorageBundle


class DeletedStorageBundle(StorageBundle):
Expand Down Expand Up @@ -71,7 +71,7 @@ class DeletedStorageBundle(StorageBundle):
}

def __init__(self, *, recovery_id: str=None, **kwargs) -> None:
super(DeletedStorageBundle, self).__init__(, **kwargs)
super(DeletedStorageBundle, self).__init__(**kwargs)
self.recovery_id = recovery_id
self.scheduled_purge_date = None
self.deleted_date = None
7 changes: 4 additions & 3 deletions azure-keyvault/azure/keyvault/models/json_web_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ class JsonWebKey(Model):

:param kid: Key identifier.
:type kid: str
:param kty: JsonWebKey key type (kty). Possible values include: 'EC',
'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
:param kty: JsonWebKey Key Type (kty), as defined in
https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40.
Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
:type kty: str or ~azure.keyvault.models.JsonWebKeyType
:param key_ops:
:type key_ops: list[str]
Expand All @@ -44,7 +45,7 @@ class JsonWebKey(Model):
:type t: bytes
:param crv: Elliptic curve name. For valid values, see
JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521',
'SECP256K1'
'P-256K'
:type crv: str or ~azure.keyvault.models.JsonWebKeyCurveName
:param x: X component of an EC public key.
:type x: bytes
Expand Down
7 changes: 4 additions & 3 deletions azure-keyvault/azure/keyvault/models/json_web_key_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ class JsonWebKey(Model):

:param kid: Key identifier.
:type kid: str
:param kty: JsonWebKey key type (kty). Possible values include: 'EC',
'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
:param kty: JsonWebKey Key Type (kty), as defined in
https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40.
Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
:type kty: str or ~azure.keyvault.models.JsonWebKeyType
:param key_ops:
:type key_ops: list[str]
Expand All @@ -44,7 +45,7 @@ class JsonWebKey(Model):
:type t: bytes
:param crv: Elliptic curve name. For valid values, see
JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521',
'SECP256K1'
'P-256K'
:type crv: str or ~azure.keyvault.models.JsonWebKeyCurveName
:param x: X component of an EC public key.
:type x: bytes
Expand Down
2 changes: 1 addition & 1 deletion azure-keyvault/azure/keyvault/models/key_attributes_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .attributes import Attributes
from .attributes_py3 import Attributes


class KeyAttributes(Attributes):
Expand Down
5 changes: 3 additions & 2 deletions azure-keyvault/azure/keyvault/models/key_create_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class KeyCreateParameters(Model):
JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM',
'oct'
:type kty: str or ~azure.keyvault.models.JsonWebKeyType
:param key_size: The key size in bytes. For example, 1024 or 2048.
:param key_size: The key size in bits. For example: 2048, 3072, or 4096
for RSA.
:type key_size: int
:param key_ops:
:type key_ops: list[str or ~azure.keyvault.models.JsonWebKeyOperation]
Expand All @@ -31,7 +32,7 @@ class KeyCreateParameters(Model):
:type tags: dict[str, str]
:param curve: Elliptic curve name. For valid values, see
JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521',
'SECP256K1'
'P-256K'
:type curve: str or ~azure.keyvault.models.JsonWebKeyCurveName
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class KeyCreateParameters(Model):
JsonWebKeyType. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM',
'oct'
:type kty: str or ~azure.keyvault.models.JsonWebKeyType
:param key_size: The key size in bytes. For example, 1024 or 2048.
:param key_size: The key size in bits. For example: 2048, 3072, or 4096
for RSA.
:type key_size: int
:param key_ops:
:type key_ops: list[str or ~azure.keyvault.models.JsonWebKeyOperation]
Expand All @@ -31,7 +32,7 @@ class KeyCreateParameters(Model):
:type tags: dict[str, str]
:param curve: Elliptic curve name. For valid values, see
JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521',
'SECP256K1'
'P-256K'
:type curve: str or ~azure.keyvault.models.JsonWebKeyCurveName
"""

Expand Down
14 changes: 11 additions & 3 deletions azure-keyvault/azure/keyvault/models/key_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,27 @@ class KeyProperties(Model):

:param exportable: Indicates if the private key can be exported.
:type exportable: bool
:param key_type: The key type.
:type key_type: str
:param key_size: The key size in bytes. For example; 1024 or 2048.
:param key_type: The type of key pair to be used for the certificate.
Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
:type key_type: str or ~azure.keyvault.models.JsonWebKeyType
:param key_size: The key size in bits. For example: 2048, 3072, or 4096
for RSA.
:type key_size: int
:param reuse_key: Indicates if the same key pair will be used on
certificate renewal.
:type reuse_key: bool
:param curve: Elliptic curve name. For valid values, see
JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521',
'P-256K'
:type curve: str or ~azure.keyvault.models.JsonWebKeyCurveName
"""

_attribute_map = {
'exportable': {'key': 'exportable', 'type': 'bool'},
'key_type': {'key': 'kty', 'type': 'str'},
'key_size': {'key': 'key_size', 'type': 'int'},
'reuse_key': {'key': 'reuse_key', 'type': 'bool'},
'curve': {'key': 'crv', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -39,3 +46,4 @@ def __init__(self, **kwargs):
self.key_type = kwargs.get('key_type', None)
self.key_size = kwargs.get('key_size', None)
self.reuse_key = kwargs.get('reuse_key', None)
self.curve = kwargs.get('curve', None)
16 changes: 12 additions & 4 deletions azure-keyvault/azure/keyvault/models/key_properties_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,33 @@ class KeyProperties(Model):

:param exportable: Indicates if the private key can be exported.
:type exportable: bool
:param key_type: The key type.
:type key_type: str
:param key_size: The key size in bytes. For example; 1024 or 2048.
:param key_type: The type of key pair to be used for the certificate.
Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
:type key_type: str or ~azure.keyvault.models.JsonWebKeyType
:param key_size: The key size in bits. For example: 2048, 3072, or 4096
for RSA.
:type key_size: int
:param reuse_key: Indicates if the same key pair will be used on
certificate renewal.
:type reuse_key: bool
:param curve: Elliptic curve name. For valid values, see
JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521',
'P-256K'
:type curve: str or ~azure.keyvault.models.JsonWebKeyCurveName
"""

_attribute_map = {
'exportable': {'key': 'exportable', 'type': 'bool'},
'key_type': {'key': 'kty', 'type': 'str'},
'key_size': {'key': 'key_size', 'type': 'int'},
'reuse_key': {'key': 'reuse_key', 'type': 'bool'},
'curve': {'key': 'crv', 'type': 'str'},
}

def __init__(self, *, exportable: bool=None, key_type: str=None, key_size: int=None, reuse_key: bool=None, **kwargs) -> None:
def __init__(self, *, exportable: bool=None, key_type=None, key_size: int=None, reuse_key: bool=None, curve=None, **kwargs) -> None:
super(KeyProperties, self).__init__(**kwargs)
self.exportable = exportable
self.key_type = key_type
self.key_size = key_size
self.reuse_key = reuse_key
self.curve = curve
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class KeySignParameters(Model):
For more information on possible algorithm types, see
JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384',
'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512',
'ECDSA256'
'ES256K'
:type algorithm: str or
~azure.keyvault.models.JsonWebKeySignatureAlgorithm
:param value: Required.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class KeySignParameters(Model):
For more information on possible algorithm types, see
JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384',
'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512',
'ECDSA256'
'ES256K'
:type algorithm: str or
~azure.keyvault.models.JsonWebKeySignatureAlgorithm
:param value: Required.
Expand Down
Loading