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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from .types import KeyAlgorithmAsymmetricSigning
from .types import KeyAlgorithmSymmetricEncryption
from .types import KeyOrigin
from .types import KeyProtectionLevel
from .types import KeyState
from .types import ListAlgorithmsRequestUsage
from .types import ListKeysRequestOrderBy
Expand Down Expand Up @@ -50,7 +49,6 @@
"KeyAlgorithmAsymmetricSigning",
"KeyAlgorithmSymmetricEncryption",
"KeyOrigin",
"KeyProtectionLevel",
"KeyState",
"ListAlgorithmsRequestUsage",
"ListKeysRequestOrderBy",
Expand Down
10 changes: 0 additions & 10 deletions scaleway-async/scaleway_async/key_manager/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from .types import (
DataKeyAlgorithmSymmetricEncryption,
KeyOrigin,
KeyProtectionLevel,
ListAlgorithmsRequestUsage,
ListKeysRequestOrderBy,
ListKeysRequestUsage,
Expand Down Expand Up @@ -76,7 +75,6 @@ async def create_key(
tags: Optional[list[str]] = None,
rotation_policy: Optional[KeyRotationPolicy] = None,
origin: Optional[KeyOrigin] = None,
protection_level: Optional[KeyProtectionLevel] = None,
) -> Key:
"""
Create a key.
Expand All @@ -90,7 +88,6 @@ async def create_key(
:param tags: (Optional) List of the key's tags.
:param rotation_policy: If not specified, no rotation policy will be applied to the key.
:param origin: Refer to the `Key.Origin` enum for a description of values.
:param protection_level: Refer to the `Key.Protection` enum for a description of values.
:return: :class:`Key <Key>`

Usage:
Expand Down Expand Up @@ -119,7 +116,6 @@ async def create_key(
tags=tags,
rotation_policy=rotation_policy,
origin=origin,
protection_level=protection_level,
),
self.client,
),
Expand Down Expand Up @@ -469,7 +465,6 @@ async def list_keys(
tags: Optional[list[str]] = None,
name: Optional[str] = None,
usage: Optional[ListKeysRequestUsage] = None,
protection_level: Optional[KeyProtectionLevel] = None,
) -> ListKeysResponse:
"""
List keys.
Expand All @@ -484,7 +479,6 @@ async def list_keys(
:param tags: (Optional) List of tags to filter on.
:param name: (Optional) Filter by key name.
:param usage: Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
:param protection_level: Select from software or hsm.
:return: :class:`ListKeysResponse <ListKeysResponse>`

Usage:
Expand All @@ -510,7 +504,6 @@ async def list_keys(
"page": page,
"page_size": page_size or self.client.default_page_size,
"project_id": project_id or self.client.default_project_id,
"protection_level": protection_level,
"scheduled_for_deletion": scheduled_for_deletion,
"tags": tags,
"usage": usage,
Expand All @@ -533,7 +526,6 @@ async def list_keys_all(
tags: Optional[list[str]] = None,
name: Optional[str] = None,
usage: Optional[ListKeysRequestUsage] = None,
protection_level: Optional[KeyProtectionLevel] = None,
) -> list[Key]:
"""
List keys.
Expand All @@ -548,7 +540,6 @@ async def list_keys_all(
:param tags: (Optional) List of tags to filter on.
:param name: (Optional) Filter by key name.
:param usage: Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
:param protection_level: Select from software or hsm.
:return: :class:`list[Key] <list[Key]>`

Usage:
Expand All @@ -574,7 +565,6 @@ async def list_keys_all(
"tags": tags,
"name": name,
"usage": usage,
"protection_level": protection_level,
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
KeyAlgorithmAsymmetricSigning,
KeyAlgorithmSymmetricEncryption,
KeyOrigin,
KeyProtectionLevel,
KeyState,
KeyRotationPolicy,
KeyUsage,
Expand Down Expand Up @@ -180,12 +179,6 @@ def unmarshal_Key(data: Any) -> Key:
else:
args["origin"] = KeyOrigin.UNKNOWN_ORIGIN

field = data.get("protection_level", None)
if field is not None:
args["protection_level"] = field
else:
args["protection_level"] = KeyProtectionLevel.UNKNOWN_PROTECTION_LEVEL

field = data.get("region", None)
if field is not None:
args["region"] = field
Expand Down Expand Up @@ -533,9 +526,6 @@ def marshal_CreateKeyRequest(
if request.origin is not None:
output["origin"] = request.origin

if request.protection_level is not None:
output["protection_level"] = request.protection_level

return output


Expand Down
28 changes: 0 additions & 28 deletions scaleway-async/scaleway_async/key_manager/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ def __str__(self) -> str:
return str(self.value)


class KeyProtectionLevel(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_PROTECTION_LEVEL = "unknown_protection_level"
SOFTWARE = "software"
HSM = "hsm"

def __str__(self) -> str:
return str(self.value)


class KeyState(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_STATE = "unknown_state"
ENABLED = "enabled"
Expand Down Expand Up @@ -202,11 +193,6 @@ class Key:
Refer to the `Key.Origin` enum for a description of values.
"""

protection_level: KeyProtectionLevel
"""
Refer to the `Key.ProtectionLevel` enum for a description of values.
"""

region: ScwRegion
"""
Region where the key is stored.
Expand Down Expand Up @@ -295,13 +281,6 @@ class CreateKeyRequest:
Refer to the `Key.Origin` enum for a description of values.
"""

protection_level: Optional[KeyProtectionLevel] = (
KeyProtectionLevel.UNKNOWN_PROTECTION_LEVEL
)
"""
Refer to the `Key.Protection` enum for a description of values.
"""


@dataclass
class DataKey:
Expand Down Expand Up @@ -596,13 +575,6 @@ class ListKeysRequest:
Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
"""

protection_level: Optional[KeyProtectionLevel] = (
KeyProtectionLevel.UNKNOWN_PROTECTION_LEVEL
)
"""
Select from software or hsm.
"""


@dataclass
class ListKeysResponse:
Expand Down
2 changes: 0 additions & 2 deletions scaleway/scaleway/key_manager/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from .types import KeyAlgorithmAsymmetricSigning
from .types import KeyAlgorithmSymmetricEncryption
from .types import KeyOrigin
from .types import KeyProtectionLevel
from .types import KeyState
from .types import ListAlgorithmsRequestUsage
from .types import ListKeysRequestOrderBy
Expand Down Expand Up @@ -50,7 +49,6 @@
"KeyAlgorithmAsymmetricSigning",
"KeyAlgorithmSymmetricEncryption",
"KeyOrigin",
"KeyProtectionLevel",
"KeyState",
"ListAlgorithmsRequestUsage",
"ListKeysRequestOrderBy",
Expand Down
10 changes: 0 additions & 10 deletions scaleway/scaleway/key_manager/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from .types import (
DataKeyAlgorithmSymmetricEncryption,
KeyOrigin,
KeyProtectionLevel,
ListAlgorithmsRequestUsage,
ListKeysRequestOrderBy,
ListKeysRequestUsage,
Expand Down Expand Up @@ -76,7 +75,6 @@ def create_key(
tags: Optional[list[str]] = None,
rotation_policy: Optional[KeyRotationPolicy] = None,
origin: Optional[KeyOrigin] = None,
protection_level: Optional[KeyProtectionLevel] = None,
) -> Key:
"""
Create a key.
Expand All @@ -90,7 +88,6 @@ def create_key(
:param tags: (Optional) List of the key's tags.
:param rotation_policy: If not specified, no rotation policy will be applied to the key.
:param origin: Refer to the `Key.Origin` enum for a description of values.
:param protection_level: Refer to the `Key.Protection` enum for a description of values.
:return: :class:`Key <Key>`

Usage:
Expand Down Expand Up @@ -119,7 +116,6 @@ def create_key(
tags=tags,
rotation_policy=rotation_policy,
origin=origin,
protection_level=protection_level,
),
self.client,
),
Expand Down Expand Up @@ -469,7 +465,6 @@ def list_keys(
tags: Optional[list[str]] = None,
name: Optional[str] = None,
usage: Optional[ListKeysRequestUsage] = None,
protection_level: Optional[KeyProtectionLevel] = None,
) -> ListKeysResponse:
"""
List keys.
Expand All @@ -484,7 +479,6 @@ def list_keys(
:param tags: (Optional) List of tags to filter on.
:param name: (Optional) Filter by key name.
:param usage: Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
:param protection_level: Select from software or hsm.
:return: :class:`ListKeysResponse <ListKeysResponse>`

Usage:
Expand All @@ -510,7 +504,6 @@ def list_keys(
"page": page,
"page_size": page_size or self.client.default_page_size,
"project_id": project_id or self.client.default_project_id,
"protection_level": protection_level,
"scheduled_for_deletion": scheduled_for_deletion,
"tags": tags,
"usage": usage,
Expand All @@ -533,7 +526,6 @@ def list_keys_all(
tags: Optional[list[str]] = None,
name: Optional[str] = None,
usage: Optional[ListKeysRequestUsage] = None,
protection_level: Optional[KeyProtectionLevel] = None,
) -> list[Key]:
"""
List keys.
Expand All @@ -548,7 +540,6 @@ def list_keys_all(
:param tags: (Optional) List of tags to filter on.
:param name: (Optional) Filter by key name.
:param usage: Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
:param protection_level: Select from software or hsm.
:return: :class:`list[Key] <list[Key]>`

Usage:
Expand All @@ -574,7 +565,6 @@ def list_keys_all(
"tags": tags,
"name": name,
"usage": usage,
"protection_level": protection_level,
},
)

Expand Down
10 changes: 0 additions & 10 deletions scaleway/scaleway/key_manager/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
KeyAlgorithmAsymmetricSigning,
KeyAlgorithmSymmetricEncryption,
KeyOrigin,
KeyProtectionLevel,
KeyState,
KeyRotationPolicy,
KeyUsage,
Expand Down Expand Up @@ -180,12 +179,6 @@ def unmarshal_Key(data: Any) -> Key:
else:
args["origin"] = KeyOrigin.UNKNOWN_ORIGIN

field = data.get("protection_level", None)
if field is not None:
args["protection_level"] = field
else:
args["protection_level"] = KeyProtectionLevel.UNKNOWN_PROTECTION_LEVEL

field = data.get("region", None)
if field is not None:
args["region"] = field
Expand Down Expand Up @@ -533,9 +526,6 @@ def marshal_CreateKeyRequest(
if request.origin is not None:
output["origin"] = request.origin

if request.protection_level is not None:
output["protection_level"] = request.protection_level

return output


Expand Down
28 changes: 0 additions & 28 deletions scaleway/scaleway/key_manager/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ def __str__(self) -> str:
return str(self.value)


class KeyProtectionLevel(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_PROTECTION_LEVEL = "unknown_protection_level"
SOFTWARE = "software"
HSM = "hsm"

def __str__(self) -> str:
return str(self.value)


class KeyState(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_STATE = "unknown_state"
ENABLED = "enabled"
Expand Down Expand Up @@ -202,11 +193,6 @@ class Key:
Refer to the `Key.Origin` enum for a description of values.
"""

protection_level: KeyProtectionLevel
"""
Refer to the `Key.ProtectionLevel` enum for a description of values.
"""

region: ScwRegion
"""
Region where the key is stored.
Expand Down Expand Up @@ -295,13 +281,6 @@ class CreateKeyRequest:
Refer to the `Key.Origin` enum for a description of values.
"""

protection_level: Optional[KeyProtectionLevel] = (
KeyProtectionLevel.UNKNOWN_PROTECTION_LEVEL
)
"""
Refer to the `Key.Protection` enum for a description of values.
"""


@dataclass
class DataKey:
Expand Down Expand Up @@ -596,13 +575,6 @@ class ListKeysRequest:
Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
"""

protection_level: Optional[KeyProtectionLevel] = (
KeyProtectionLevel.UNKNOWN_PROTECTION_LEVEL
)
"""
Select from software or hsm.
"""


@dataclass
class ListKeysResponse:
Expand Down
Loading