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
22 changes: 21 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 All @@ -34,6 +44,14 @@ class AuthenticationEventFailureReason(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_FAILURE_REASON = "unknown_failure_reason"
INVALID_MFA = "invalid_mfa"
INVALID_PASSWORD = "invalid_password"
INVALID_CAPTCHA = "invalid_captcha"
INVALID_AUTHENTICATION_CODE = "invalid_authentication_code"
INVALID_PASSKEY = "invalid_passkey"
PASSKEY_UV_NOT_MET = "passkey_uv_not_met"
PASSKEY_UV_NOT_VERIFIED = "passkey_uv_not_verified"
EXPIRED_SESSION = "expired_session"
AUTHENTICATION_CODE_REQUIRED = "authentication_code_required"
MFA_REQUIRED = "mfa_required"

def __str__(self) -> str:
return str(self.value)
Expand All @@ -42,6 +60,7 @@ def __str__(self) -> str:
class AuthenticationEventMFAType(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_MFA_TYPE = "unknown_mfa_type"
TOTP = "totp"
WEBAUTHN = "webauthn"

def __str__(self) -> str:
return str(self.value)
Expand All @@ -53,6 +72,7 @@ class AuthenticationEventMethod(str, Enum, metaclass=StrEnumMeta):
AUTHENTICATION_CODE = "authentication_code"
OAUTH2 = "oauth2"
SAML = "saml"
PASSKEY = "passkey"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -627,7 +647,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
4 changes: 4 additions & 0 deletions scaleway-async/scaleway_async/domain/v2beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,7 @@ async def buy_domains(
*,
domains: list[str],
duration_in_years: int,
auto_renew: bool,
project_id: Optional[str] = None,
owner_contact_id: Optional[str] = None,
owner_contact: Optional[NewContact] = None,
Expand All @@ -1628,6 +1629,7 @@ async def buy_domains(
You can provide a domain's already existing contact or a new contact.
:param domains:
:param duration_in_years:
:param auto_renew: Enable the `auto renew` feature for all the requested domains. This means the domain will be automatically renewed before its expiry date.
:param project_id:
:param owner_contact_id:
One-Of ('owner_contact_type'): at most one of 'owner_contact_id', 'owner_contact' could be set.
Expand All @@ -1649,6 +1651,7 @@ async def buy_domains(
result = await api.buy_domains(
domains=[],
duration_in_years=1,
auto_renew=False,
)
"""

Expand All @@ -1659,6 +1662,7 @@ async def buy_domains(
RegistrarApiBuyDomainsRequest(
domains=domains,
duration_in_years=duration_in_years,
auto_renew=auto_renew,
project_id=project_id,
owner_contact_id=owner_contact_id,
owner_contact=owner_contact,
Expand Down
3 changes: 3 additions & 0 deletions scaleway-async/scaleway_async/domain/v2beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3229,6 +3229,9 @@ def marshal_RegistrarApiBuyDomainsRequest(
if request.duration_in_years is not None:
output["duration_in_years"] = request.duration_in_years

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

if request.project_id is not None:
output["project_id"] = request.project_id
else:
Expand Down
5 changes: 5 additions & 0 deletions scaleway-async/scaleway_async/domain/v2beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,11 @@ class RegisterExternalDomainResponse:
class RegistrarApiBuyDomainsRequest:
domains: list[str]
duration_in_years: int
auto_renew: bool
"""
Enable the `auto renew` feature for all the requested domains. This means the domain will be automatically renewed before its expiry date.
"""

project_id: Optional[str] = None
owner_contact_id: Optional[str] = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
from .types import PlanUsageDetails
from .types import HeadStageResponseHeadStage
from .types import ListHeadStagesResponseHeadStage
from .types import Node
from .types import PipelineStages
from .types import PurgeRequest
from .types import VPCEndpoint
Expand Down Expand Up @@ -107,6 +108,7 @@
from .types import ListDNSStagesResponse
from .types import ListHeadStagesRequest
from .types import ListHeadStagesResponse
from .types import ListNodesResponse
from .types import ListPipelinesRequest
from .types import ListPipelinesResponse
from .types import ListPipelinesWithStagesRequest
Expand Down Expand Up @@ -197,6 +199,7 @@
"PlanUsageDetails",
"HeadStageResponseHeadStage",
"ListHeadStagesResponseHeadStage",
"Node",
"PipelineStages",
"PurgeRequest",
"VPCEndpoint",
Expand Down Expand Up @@ -251,6 +254,7 @@
"ListDNSStagesResponse",
"ListHeadStagesRequest",
"ListHeadStagesResponse",
"ListNodesResponse",
"ListPipelinesRequest",
"ListPipelinesResponse",
"ListPipelinesWithStagesRequest",
Expand Down
27 changes: 25 additions & 2 deletions scaleway-async/scaleway_async/edge_services/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
ListDNSStagesResponse,
ListHeadStagesResponse,
ListHeadStagesResponseHeadStage,
ListNodesResponse,
ListPipelinesResponse,
ListPipelinesWithStagesResponse,
ListPlansResponse,
Expand Down Expand Up @@ -123,6 +124,7 @@
unmarshal_ListCacheStagesResponse,
unmarshal_ListDNSStagesResponse,
unmarshal_ListHeadStagesResponse,
unmarshal_ListNodesResponse,
unmarshal_ListPipelinesResponse,
unmarshal_ListPipelinesWithStagesResponse,
unmarshal_ListPlansResponse,
Expand Down Expand Up @@ -165,6 +167,27 @@
class EdgeServicesV1Beta1API(API):
""" """

async def list_nodes(
self,
) -> ListNodesResponse:
"""

:return: :class:`ListNodesResponse <ListNodesResponse>`

Usage:
::

result = await api.list_nodes()
"""

res = self._request(
"GET",
"/edge-services/v1beta1/nodes",
)

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

async def list_pipelines(
self,
*,
Expand Down Expand Up @@ -935,7 +958,7 @@ async def create_dns_stage(
"""
Create DNS stage.
Create a new DNS stage. You must specify the `fqdns` field to customize the domain endpoint, using a domain you already own.
:param fqdns: Fully Qualified Domain Name (in the format subdomain.example.com) to attach to the stage.
:param fqdns: Custom Fully Qualified Domain Name to be configured (only 1 FQDN can be setup for now).
:param tls_stage_id: TLS stage ID the DNS stage will be linked to.
One-Of ('next'): at most one of 'tls_stage_id', 'cache_stage_id', 'backend_stage_id' could be set.
:param cache_stage_id: Cache stage ID the DNS stage will be linked to.
Expand Down Expand Up @@ -1021,7 +1044,7 @@ async def update_dns_stage(
Update DNS stage.
Update the parameters of an existing DNS stage, specified by its `dns_stage_id`.
:param dns_stage_id: ID of the DNS stage to update.
:param fqdns: Fully Qualified Domain Name (in the format subdomain.example.com) attached to the stage.
:param fqdns: Custom Fully Qualified Domain Name to be configured (only 1 FQDN can be setup for now).
:param tls_stage_id: TLS stage ID the DNS stage will be linked to.
One-Of ('next'): at most one of 'tls_stage_id', 'cache_stage_id', 'backend_stage_id' could be set.
:param cache_stage_id: Cache stage ID the DNS stage will be linked to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
ListDNSStagesResponse,
ListHeadStagesResponseHeadStage,
ListHeadStagesResponse,
Node,
ListNodesResponse,
ListPipelinesResponse,
ListPipelinesWithStagesResponse,
ListPlansResponse,
Expand Down Expand Up @@ -1496,6 +1498,48 @@ def unmarshal_ListHeadStagesResponse(data: Any) -> ListHeadStagesResponse:
return ListHeadStagesResponse(**args)


def unmarshal_Node(data: Any) -> Node:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'Node' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

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

return Node(**args)


def unmarshal_ListNodesResponse(data: Any) -> ListNodesResponse:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'ListNodesResponse' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

field = data.get("nodes", None)
if field is not None:
args["nodes"] = (
[unmarshal_Node(v) for v in field] if field is not None else None
)
else:
args["nodes"] = None

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

return ListNodesResponse(**args)


def unmarshal_ListPipelinesResponse(data: Any) -> ListPipelinesResponse:
if not isinstance(data, dict):
raise TypeError(
Expand Down
19 changes: 15 additions & 4 deletions scaleway-async/scaleway_async/edge_services/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,13 @@ class DNSStage:

default_fqdn: str
"""
Default Fully Qualified Domain Name attached to the stage.
Default Fully Qualified Domain Name provided for the Pipeline.
"""

default_private_fqdn: str
fqdns: list[str]
"""
List of additional (custom) Fully Qualified Domain Names attached to the stage.
Custom Fully Qualified Domain Names configured (only the first one is valid).
"""

type_: DNSStageType
Expand Down Expand Up @@ -838,6 +838,11 @@ class ListHeadStagesResponseHeadStage:
dns_stage_id: Optional[str] = None


@dataclass
class Node:
ip: str


@dataclass
class PipelineStages:
dns_stages: list[DNSStage]
Expand Down Expand Up @@ -1055,7 +1060,7 @@ class CreateDNSStageRequest:

fqdns: Optional[list[str]] = field(default_factory=list)
"""
Fully Qualified Domain Name (in the format subdomain.example.com) to attach to the stage.
Custom Fully Qualified Domain Name to be configured (only 1 FQDN can be setup for now).
"""

wildcard_domain: Optional[bool] = False
Expand Down Expand Up @@ -1573,6 +1578,12 @@ class ListHeadStagesResponse:
"""


@dataclass
class ListNodesResponse:
nodes: list[Node]
total_count: int


@dataclass
class ListPipelinesRequest:
order_by: Optional[ListPipelinesRequestOrderBy] = (
Expand Down Expand Up @@ -2049,7 +2060,7 @@ class UpdateDNSStageRequest:

fqdns: Optional[list[str]] = field(default_factory=list)
"""
Fully Qualified Domain Name (in the format subdomain.example.com) attached to the stage.
Custom Fully Qualified Domain Name to be configured (only 1 FQDN can be setup for now).
"""

wildcard_domain: Optional[bool] = False
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
Loading
Loading