Skip to content
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
@@ -1,5 +1,6 @@
# This file was automatically generated. DO NOT EDIT.
# If you have any remark or suggestion do not hesitate to open an issue.
from .types import Action
from .types import AlertRuleStatus
from .content import ALERT_RULE_TRANSIENT_STATUSES
from .types import AuthenticationEventFailureReason
Expand Down Expand Up @@ -128,6 +129,7 @@
from .api import AuditTrailV1Alpha1API

__all__ = [
"Action",
"AlertRuleStatus",
"ALERT_RULE_TRANSIENT_STATUSES",
"AuthenticationEventFailureReason",
Expand Down
12 changes: 11 additions & 1 deletion scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
)


class Action(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_ACTION = "unknown_action"
CREATE = "create"
UPDATE = "update"
DELETE = "delete"

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


class AlertRuleStatus(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_STATUS = "unknown_status"
ENABLED = "enabled"
Expand Down Expand Up @@ -627,7 +637,7 @@ class Resource:
updated_at: Optional[datetime] = None
deleted_at: Optional[datetime] = None
name: Optional[str] = None
action: Optional[str] = None
action: Optional[Action] = None
secm_secret_info: Optional[SecretManagerSecretInfo] = None

secm_secret_version_info: Optional[SecretManagerSecretVersionInfo] = None
Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/instance/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3832,6 +3832,8 @@ async def list_private_ni_cs(
"""
List all private NICs.
List all private NICs of a specified Instance.
Some private NICs, such as those in deleting, detaching, or in error state are
not listed. We strongly recommend migrating to v2alpha1 to retrieve all private NICs.
:param server_id: Instance to which the private NIC is attached.
:param zone: Zone to target. If none is passed will use default zone from the config.
:param tags: Private NIC tags.
Expand Down Expand Up @@ -3875,6 +3877,8 @@ async def list_private_ni_cs_all(
"""
List all private NICs.
List all private NICs of a specified Instance.
Some private NICs, such as those in deleting, detaching, or in error state are
not listed. We strongly recommend migrating to v2alpha1 to retrieve all private NICs.
:param server_id: Instance to which the private NIC is attached.
:param zone: Zone to target. If none is passed will use default zone from the config.
:param tags: Private NIC tags.
Expand Down Expand Up @@ -3915,6 +3919,12 @@ async def create_private_nic(
) -> CreatePrivateNICResponse:
"""
Create a private NIC connecting an Instance to a Private Network.
Create a private NIC connecting an Instance to a Private Network.
Some private NICs, such as those in deleting, detaching, or in error state are
not listed in v1.
Therefore, you may encounter quota limits errors when creating a new private NIC, even if your visible
count is below the threshold.
We strongly recommend migrating to v2alpha1 to see all private NICs.
:param server_id: UUID of the Instance the private NIC will be attached to.
:param private_network_id: UUID of the private network where the private NIC will be attached.
:param zone: Zone to target. If none is passed will use default zone from the config.
Expand Down
2 changes: 2 additions & 0 deletions scaleway-async/scaleway_async/instance/v2alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
from .types import DeleteTemplateRequest
from .types import DeleteTemplateUserDataRequest
from .types import DeleteUserDataRequest
from .types import DetachAndDeletePrivateNetworkInterfaceRequest
from .types import DetachServerFileSystemRequest
from .types import DetachServerIPRequest
from .types import DetachServerPrivateNetworkInterfaceRequest
Expand Down Expand Up @@ -250,6 +251,7 @@
"DeleteTemplateRequest",
"DeleteTemplateUserDataRequest",
"DeleteUserDataRequest",
"DetachAndDeletePrivateNetworkInterfaceRequest",
"DetachServerFileSystemRequest",
"DetachServerIPRequest",
"DetachServerPrivateNetworkInterfaceRequest",
Expand Down
33 changes: 33 additions & 0 deletions scaleway-async/scaleway_async/instance/v2alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,39 @@ async def delete_private_network_interface(

self._throw_on_error(res)

async def detach_and_delete_private_network_interface(
self,
*,
private_network_interface_id: str,
zone: Optional[ScwZone] = None,
) -> PrivateNetworkInterface:
"""
:param private_network_interface_id: ID of the private network interface to detach and delete.
:param zone: Zone to target. If none is passed will use default zone from the config.
:return: :class:`PrivateNetworkInterface <PrivateNetworkInterface>`

Usage:
::

result = await api.detach_and_delete_private_network_interface(
private_network_interface_id="example",
)
"""

param_zone = validate_path_param("zone", zone or self.client.default_zone)
param_private_network_interface_id = validate_path_param(
"private_network_interface_id", private_network_interface_id
)

res = self._request(
"POST",
f"/instance/v2alpha1/zones/{param_zone}/private-network-interfaces/{param_private_network_interface_id}/detach-and-delete",
body={},
)

self._throw_on_error(res)
return unmarshal_PrivateNetworkInterface(res.json())

async def list_placement_groups(
self,
*,
Expand Down
2 changes: 2 additions & 0 deletions scaleway-async/scaleway_async/instance/v2alpha1/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
PrivateNetworkInterfaceStatus.ATTACHING,
PrivateNetworkInterfaceStatus.DETACHING,
PrivateNetworkInterfaceStatus.SYNCING,
PrivateNetworkInterfaceStatus.DELETING,
]
"""
Lists transient statutes of the enum :class:`PrivateNetworkInterfaceStatus <PrivateNetworkInterfaceStatus>`.
Expand All @@ -39,6 +40,7 @@
ServerPrivateNetworkInterfaceStatus.ATTACHING,
ServerPrivateNetworkInterfaceStatus.DETACHING,
ServerPrivateNetworkInterfaceStatus.SYNCING,
ServerPrivateNetworkInterfaceStatus.DELETING,
]
"""
Lists transient statutes of the enum :class:`ServerPrivateNetworkInterfaceStatus <ServerPrivateNetworkInterfaceStatus>`.
Expand Down
19 changes: 19 additions & 0 deletions scaleway-async/scaleway_async/instance/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ class PrivateNetworkInterfaceStatus(str, Enum, metaclass=StrEnumMeta):
ATTACHING = "attaching"
DETACHING = "detaching"
SYNCING = "syncing"
DELETING = "deleting"
DETACH_ERROR = "detach_error"
DELETE_ERROR = "delete_error"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -208,6 +211,9 @@ class ServerPrivateNetworkInterfaceStatus(str, Enum, metaclass=StrEnumMeta):
ATTACHING = "attaching"
DETACHING = "detaching"
SYNCING = "syncing"
DELETING = "deleting"
DETACH_ERROR = "detach_error"
DELETE_ERROR = "delete_error"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -1756,6 +1762,19 @@ class DeleteUserDataRequest:
"""


@dataclass
class DetachAndDeletePrivateNetworkInterfaceRequest:
private_network_interface_id: str
"""
ID of the private network interface to detach and delete.
"""

zone: Optional[ScwZone] = None
"""
Zone to target. If none is passed will use default zone from the config.
"""


@dataclass
class DetachServerFileSystemRequest:
server_id: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .types import DataKeyAlgorithmSymmetricEncryption
from .types import KeyAlgorithmAsymmetricEncryption
from .types import KeyAlgorithmAsymmetricSigning
from .types import KeyAlgorithmKeyEncapsulation
from .types import KeyAlgorithmSymmetricEncryption
from .types import KeyOrigin
from .types import KeyState
Expand Down Expand Up @@ -51,6 +52,7 @@
"DataKeyAlgorithmSymmetricEncryption",
"KeyAlgorithmAsymmetricEncryption",
"KeyAlgorithmAsymmetricSigning",
"KeyAlgorithmKeyEncapsulation",
"KeyAlgorithmSymmetricEncryption",
"KeyOrigin",
"KeyState",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ def unmarshal_KeyUsage(data: Any) -> KeyUsage:
KeyAlgorithmAsymmetricSigning.UNKNOWN_ASYMMETRIC_SIGNING
)

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

return KeyUsage(**args)


Expand Down Expand Up @@ -535,6 +541,11 @@ def marshal_KeyUsage(
value=request.asymmetric_signing,
marshal_func=None,
),
OneOfPossibility(
param="key_encapsulation",
value=request.key_encapsulation,
marshal_func=None,
),
]
),
)
Expand Down
14 changes: 12 additions & 2 deletions scaleway-async/scaleway_async/key_manager/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class KeyAlgorithmAsymmetricEncryption(str, Enum, metaclass=StrEnumMeta):
RSA_OAEP_2048_SHA256 = "rsa_oaep_2048_sha256"
RSA_OAEP_3072_SHA256 = "rsa_oaep_3072_sha256"
RSA_OAEP_4096_SHA256 = "rsa_oaep_4096_sha256"
ML_KEM_768 = "ml_kem_768"
ML_KEM_1024 = "ml_kem_1024"

def __str__(self) -> str:
return str(self.value)
Expand All @@ -54,6 +52,15 @@ def __str__(self) -> str:
return str(self.value)


class KeyAlgorithmKeyEncapsulation(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_KEY_ENCAPSULATION = "unknown_key_encapsulation"
ML_KEM_768 = "ml_kem_768"
ML_KEM_1024 = "ml_kem_1024"

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


class KeyAlgorithmSymmetricEncryption(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_SYMMETRIC_ENCRYPTION = "unknown_symmetric_encryption"
AES_256_GCM = "aes_256_gcm"
Expand Down Expand Up @@ -87,6 +94,7 @@ class ListAlgorithmsRequestUsage(str, Enum, metaclass=StrEnumMeta):
SYMMETRIC_ENCRYPTION = "symmetric_encryption"
ASYMMETRIC_ENCRYPTION = "asymmetric_encryption"
ASYMMETRIC_SIGNING = "asymmetric_signing"
KEY_ENCAPSULATION = "key_encapsulation"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -141,6 +149,8 @@ class KeyUsage:
KeyAlgorithmAsymmetricSigning.UNKNOWN_ASYMMETRIC_SIGNING
)

key_encapsulation: Optional[KeyAlgorithmKeyEncapsulation] = None


@dataclass
class ListAlgorithmsResponseAlgorithm:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .content import DATABASE_TRANSIENT_STATUSES
from .types import ListDatabaseBackupsRequestOrderBy
from .types import ListDatabasesRequestOrderBy
from .types import Version
from .types import DatabaseBackup
from .types import Database
from .types import CreateDatabaseRequest
Expand All @@ -16,6 +17,8 @@
from .types import ListDatabaseBackupsResponse
from .types import ListDatabasesRequest
from .types import ListDatabasesResponse
from .types import ListVersionsRequest
from .types import ListVersionsResponse
from .types import RestoreDatabaseFromBackupRequest
from .types import UpdateDatabaseRequest
from .api import ServerlessSqldbV1Alpha1API
Expand All @@ -26,6 +29,7 @@
"DATABASE_TRANSIENT_STATUSES",
"ListDatabaseBackupsRequestOrderBy",
"ListDatabasesRequestOrderBy",
"Version",
"DatabaseBackup",
"Database",
"CreateDatabaseRequest",
Expand All @@ -37,6 +41,8 @@
"ListDatabaseBackupsResponse",
"ListDatabasesRequest",
"ListDatabasesResponse",
"ListVersionsRequest",
"ListVersionsResponse",
"RestoreDatabaseFromBackupRequest",
"UpdateDatabaseRequest",
"ServerlessSqldbV1Alpha1API",
Expand Down
Loading
Loading