Skip to content

Commit e74852e

Browse files
authored
Merge branch 'main' into v1.6965.0
2 parents 05c5532 + b02fd09 commit e74852e

File tree

32 files changed

+940
-384
lines changed

32 files changed

+940
-384
lines changed

scaleway-async/scaleway_async/baremetal/v1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,13 +529,15 @@ async def reboot_server(
529529
server_id: str,
530530
zone: Optional[ScwZone] = None,
531531
boot_type: Optional[ServerBootType] = None,
532+
ssh_key_ids: Optional[List[str]] = None,
532533
) -> Server:
533534
"""
534535
Reboot an Elastic Metal server.
535536
Reboot the Elastic Metal server associated with the ID, use the `boot_type` `rescue` to reboot the server in rescue mode.
536537
:param server_id: ID of the server to reboot.
537538
:param zone: Zone to target. If none is passed will use default zone from the config.
538539
:param boot_type: The type of boot.
540+
:param ssh_key_ids: Additional SSH public key IDs to configure on rescue image.
539541
:return: :class:`Server <Server>`
540542
541543
Usage:
@@ -557,6 +559,7 @@ async def reboot_server(
557559
server_id=server_id,
558560
zone=zone,
559561
boot_type=boot_type,
562+
ssh_key_ids=ssh_key_ids,
560563
),
561564
self.client,
562565
),
@@ -571,13 +574,15 @@ async def start_server(
571574
server_id: str,
572575
zone: Optional[ScwZone] = None,
573576
boot_type: Optional[ServerBootType] = None,
577+
ssh_key_ids: Optional[List[str]] = None,
574578
) -> Server:
575579
"""
576580
Start an Elastic Metal server.
577581
Start the server associated with the ID.
578582
:param server_id: ID of the server to start.
579583
:param zone: Zone to target. If none is passed will use default zone from the config.
580584
:param boot_type: The type of boot.
585+
:param ssh_key_ids: Additional SSH public key IDs to configure on rescue image.
581586
:return: :class:`Server <Server>`
582587
583588
Usage:
@@ -599,6 +604,7 @@ async def start_server(
599604
server_id=server_id,
600605
zone=zone,
601606
boot_type=boot_type,
607+
ssh_key_ids=ssh_key_ids,
602608
),
603609
self.client,
604610
),

scaleway-async/scaleway_async/baremetal/v1/marshalling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,9 @@ def marshal_RebootServerRequest(
20012001
if request.boot_type is not None:
20022002
output["boot_type"] = request.boot_type
20032003

2004+
if request.ssh_key_ids is not None:
2005+
output["ssh_key_ids"] = request.ssh_key_ids
2006+
20042007
return output
20052008

20062009

@@ -2025,6 +2028,9 @@ def marshal_StartServerRequest(
20252028
if request.boot_type is not None:
20262029
output["boot_type"] = request.boot_type
20272030

2031+
if request.ssh_key_ids is not None:
2032+
output["ssh_key_ids"] = request.ssh_key_ids
2033+
20282034
return output
20292035

20302036

scaleway-async/scaleway_async/baremetal/v1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,11 @@ class RebootServerRequest:
17251725
The type of boot.
17261726
"""
17271727

1728+
ssh_key_ids: Optional[List[str]] = field(default_factory=list)
1729+
"""
1730+
Additional SSH public key IDs to configure on rescue image.
1731+
"""
1732+
17281733

17291734
@dataclass
17301735
class SetServerPrivateNetworksResponse:
@@ -1766,6 +1771,11 @@ class StartServerRequest:
17661771
The type of boot.
17671772
"""
17681773

1774+
ssh_key_ids: Optional[List[str]] = field(default_factory=list)
1775+
"""
1776+
Additional SSH public key IDs to configure on rescue image.
1777+
"""
1778+
17691779

17701780
@dataclass
17711781
class StopBMCAccessRequest:

scaleway-async/scaleway_async/container/v1beta1/api.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,18 @@ async def update_container(
746746
:param max_concurrency: Number of maximum concurrent executions of the container.
747747
:param protocol: Protocol the container uses.
748748
:param port: Port the container listens on.
749-
:param secret_environment_variables: Secret environment variables of the container.
749+
:param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.
750+
751+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
752+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
753+
754+
```json
755+
{
756+
"secret_environment_variables":[
757+
{"key":"TO_DELETE"}
758+
]
759+
}
760+
```.
750761
:param http_option: Possible values:
751762
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
752763
- enabled: Serve both HTTP and HTTPS traffic.

scaleway-async/scaleway_async/container/v1beta1/types.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,18 @@ class UpdateContainerRequest:
15561556

15571557
secret_environment_variables: Optional[List[Secret]] = field(default_factory=list)
15581558
"""
1559-
Secret environment variables of the container.
1559+
During an update, secret environment variables that are not specified in this field will be kept unchanged.
1560+
1561+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
1562+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
1563+
1564+
```json
1565+
{
1566+
"secret_environment_variables":[
1567+
{"key":"TO_DELETE"}
1568+
]
1569+
}
1570+
```.
15601571
"""
15611572

15621573
http_option: Optional[ContainerHttpOption] = ContainerHttpOption.UNKNOWN_HTTP_OPTION

scaleway-async/scaleway_async/domain/v2beta1/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .content import DOMAIN_TRANSIENT_STATUSES
1818
from .types import HostStatus
1919
from .content import HOST_TRANSIENT_STATUSES
20+
from .types import InboundTransferStatus
2021
from .types import LinkedProduct
2122
from .types import ListContactsRequestRole
2223
from .types import ListDNSZoneRecordsRequestOrderBy
@@ -79,6 +80,7 @@
7980
from .types import DNSZoneVersion
8081
from .types import Host
8182
from .types import DomainSummary
83+
from .types import InboundTransfer
8284
from .types import RenewableDomain
8385
from .types import SSLCertificate
8486
from .types import Task
@@ -122,6 +124,7 @@
122124
from .types import ListDNSZonesResponse
123125
from .types import ListDomainHostsResponse
124126
from .types import ListDomainsResponse
127+
from .types import ListInboundTransfersResponse
125128
from .types import ListRenewableDomainsResponse
126129
from .types import ListSSLCertificatesRequest
127130
from .types import ListSSLCertificatesResponse
@@ -146,6 +149,7 @@
146149
from .types import RegistrarApiListContactsRequest
147150
from .types import RegistrarApiListDomainHostsRequest
148151
from .types import RegistrarApiListDomainsRequest
152+
from .types import RegistrarApiListInboundTransfersRequest
149153
from .types import RegistrarApiListRenewableDomainsRequest
150154
from .types import RegistrarApiListTasksRequest
151155
from .types import RegistrarApiListTldsRequest
@@ -188,6 +192,7 @@
188192
"DOMAIN_TRANSIENT_STATUSES",
189193
"HostStatus",
190194
"HOST_TRANSIENT_STATUSES",
195+
"InboundTransferStatus",
191196
"LinkedProduct",
192197
"ListContactsRequestRole",
193198
"ListDNSZoneRecordsRequestOrderBy",
@@ -250,6 +255,7 @@
250255
"DNSZoneVersion",
251256
"Host",
252257
"DomainSummary",
258+
"InboundTransfer",
253259
"RenewableDomain",
254260
"SSLCertificate",
255261
"Task",
@@ -293,6 +299,7 @@
293299
"ListDNSZonesResponse",
294300
"ListDomainHostsResponse",
295301
"ListDomainsResponse",
302+
"ListInboundTransfersResponse",
296303
"ListRenewableDomainsResponse",
297304
"ListSSLCertificatesRequest",
298305
"ListSSLCertificatesResponse",
@@ -317,6 +324,7 @@
317324
"RegistrarApiListContactsRequest",
318325
"RegistrarApiListDomainHostsRequest",
319326
"RegistrarApiListDomainsRequest",
327+
"RegistrarApiListInboundTransfersRequest",
320328
"RegistrarApiListRenewableDomainsRequest",
321329
"RegistrarApiListTasksRequest",
322330
"RegistrarApiListTldsRequest",

scaleway-async/scaleway_async/domain/v2beta1/api.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
ImportRawDNSZoneRequestAXFRSource,
5959
ImportRawDNSZoneRequestBindSource,
6060
ImportRawDNSZoneResponse,
61+
InboundTransfer,
6162
ListContactsResponse,
6263
ListDNSZoneNameserversResponse,
6364
ListDNSZoneRecordsResponse,
@@ -66,6 +67,7 @@
6667
ListDNSZonesResponse,
6768
ListDomainHostsResponse,
6869
ListDomainsResponse,
70+
ListInboundTransfersResponse,
6971
ListRenewableDomainsResponse,
7072
ListSSLCertificatesResponse,
7173
ListTasksResponse,
@@ -131,6 +133,7 @@
131133
unmarshal_ListDNSZonesResponse,
132134
unmarshal_ListDomainHostsResponse,
133135
unmarshal_ListDomainsResponse,
136+
unmarshal_ListInboundTransfersResponse,
134137
unmarshal_ListRenewableDomainsResponse,
135138
unmarshal_ListSSLCertificatesResponse,
136139
unmarshal_ListTasksResponse,
@@ -1471,6 +1474,87 @@ async def list_tasks_all(
14711474
},
14721475
)
14731476

1477+
async def list_inbound_transfers(
1478+
self,
1479+
*,
1480+
page: int,
1481+
domain: str,
1482+
page_size: Optional[int] = None,
1483+
project_id: Optional[str] = None,
1484+
organization_id: Optional[str] = None,
1485+
) -> ListInboundTransfersResponse:
1486+
"""
1487+
:param page:
1488+
:param domain:
1489+
:param page_size:
1490+
:param project_id:
1491+
:param organization_id:
1492+
:return: :class:`ListInboundTransfersResponse <ListInboundTransfersResponse>`
1493+
1494+
Usage:
1495+
::
1496+
1497+
result = await api.list_inbound_transfers(
1498+
page=1,
1499+
domain="example",
1500+
)
1501+
"""
1502+
1503+
res = self._request(
1504+
"GET",
1505+
"/domain/v2beta1/inbound-transfers",
1506+
params={
1507+
"domain": domain,
1508+
"organization_id": organization_id
1509+
or self.client.default_organization_id,
1510+
"page": page,
1511+
"page_size": page_size or self.client.default_page_size,
1512+
"project_id": project_id or self.client.default_project_id,
1513+
},
1514+
)
1515+
1516+
self._throw_on_error(res)
1517+
return unmarshal_ListInboundTransfersResponse(res.json())
1518+
1519+
async def list_inbound_transfers_all(
1520+
self,
1521+
*,
1522+
page: int,
1523+
domain: str,
1524+
page_size: Optional[int] = None,
1525+
project_id: Optional[str] = None,
1526+
organization_id: Optional[str] = None,
1527+
) -> List[InboundTransfer]:
1528+
"""
1529+
:param page:
1530+
:param domain:
1531+
:param page_size:
1532+
:param project_id:
1533+
:param organization_id:
1534+
:return: :class:`List[InboundTransfer] <List[InboundTransfer]>`
1535+
1536+
Usage:
1537+
::
1538+
1539+
result = await api.list_inbound_transfers_all(
1540+
page=1,
1541+
domain="example",
1542+
)
1543+
"""
1544+
1545+
return await fetch_all_pages_async(
1546+
type=ListInboundTransfersResponse,
1547+
key="inbound_transfers",
1548+
fetcher=self.list_inbound_transfers,
1549+
args={
1550+
"page": page,
1551+
"domain": domain,
1552+
"page_size": page_size,
1553+
"project_id": project_id,
1554+
"organization_id": organization_id,
1555+
},
1556+
)
1557+
14741558
async def buy_domains(
14751559
self,
14761560
*,

0 commit comments

Comments
 (0)