You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scaleway-async/scaleway_async/ipam/v1/api.py
+22-6Lines changed: 22 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
AttachIPRequest,
20
20
BookIPRequest,
21
21
CustomResource,
22
+
DetachIPRequest,
22
23
IP,
23
24
ListIPsResponse,
24
25
MoveIPRequest,
@@ -32,6 +33,7 @@
32
33
unmarshal_ListIPsResponse,
33
34
marshal_AttachIPRequest,
34
35
marshal_BookIPRequest,
36
+
marshal_DetachIPRequest,
35
37
marshal_MoveIPRequest,
36
38
marshal_ReleaseIPSetRequest,
37
39
marshal_UpdateIPRequest,
@@ -63,7 +65,7 @@ async def book_ip(
63
65
:param project_id: When creating an IP in a Private Network, the Project must match the Private Network's Project.
64
66
:param address: The requested address should not include the subnet mask (/suffix). Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already booked, then the call will fail.
65
67
:param tags: Tags for the IP.
66
-
:param resource: Custom resource to attach to the IP being booked. An example of a custom resource is a virtual machine hosted on an Elastic Metal server, or an additional user network interface on an Instance. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method.
68
+
:param resource: Custom resource to attach to the IP being booked. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method.
67
69
:return: :class:`IP <IP>`
68
70
69
71
Usage:
@@ -426,7 +428,7 @@ async def attach_ip(
426
428
) ->IP:
427
429
"""
428
430
Attach existing IP to custom resource.
429
-
Attach an existing IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server, or an additional user network interface on an Instance. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method.
431
+
Attach an existing IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method.
430
432
:param ip_id: IP ID.
431
433
:param resource: Custom resource to be attached to the IP.
432
434
:param region: Region to target. If none is passed will use default region from the config.
@@ -466,12 +468,14 @@ async def detach_ip(
466
468
self,
467
469
*,
468
470
ip_id: str,
471
+
resource: CustomResource,
469
472
region: Optional[Region] =None,
470
473
) ->IP:
471
474
"""
472
475
Detach existing IP from a custom resource.
473
476
Detach a private IP from a custom resource. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
474
477
:param ip_id: IP ID.
478
+
:param resource: Custom resource currently attached to the IP.
475
479
:param region: Region to target. If none is passed will use default region from the config.
Move an existing private IP from one custom resource (e.g. a virtual machine hosted on an Elastic Metal server) to another custom resource. This will detach it from the first resource, and attach it to the second. Do not use this method for moving IP addresses between standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
510
523
:param ip_id: IP ID.
524
+
:param from_resource: Custom resource currently attached to the IP.
511
525
:param region: Region to target. If none is passed will use default region from the config.
512
-
:param resource: Custom resource to be attached to the IP.
526
+
:param to_resource: Custom resource to be attached to the IP.
Copy file name to clipboardExpand all lines: scaleway-async/scaleway_async/ipam/v1/types.py
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -223,7 +223,7 @@ class BookIPRequest:
223
223
224
224
resource: Optional[CustomResource]
225
225
"""
226
-
Custom resource to attach to the IP being booked. An example of a custom resource is a virtual machine hosted on an Elastic Metal server, or an additional user network interface on an Instance. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method.
226
+
Custom resource to attach to the IP being booked. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method.
227
227
"""
228
228
229
229
@@ -234,6 +234,11 @@ class DetachIPRequest:
234
234
IP ID.
235
235
"""
236
236
237
+
resource: CustomResource
238
+
"""
239
+
Custom resource currently attached to the IP.
240
+
"""
241
+
237
242
region: Optional[Region]
238
243
"""
239
244
Region to target. If none is passed will use default region from the config.
@@ -351,12 +356,17 @@ class MoveIPRequest:
351
356
IP ID.
352
357
"""
353
358
359
+
from_resource: CustomResource
360
+
"""
361
+
Custom resource currently attached to the IP.
362
+
"""
363
+
354
364
region: Optional[Region]
355
365
"""
356
366
Region to target. If none is passed will use default region from the config.
Copy file name to clipboardExpand all lines: scaleway/scaleway/ipam/v1/api.py
+22-6Lines changed: 22 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
AttachIPRequest,
20
20
BookIPRequest,
21
21
CustomResource,
22
+
DetachIPRequest,
22
23
IP,
23
24
ListIPsResponse,
24
25
MoveIPRequest,
@@ -32,6 +33,7 @@
32
33
unmarshal_ListIPsResponse,
33
34
marshal_AttachIPRequest,
34
35
marshal_BookIPRequest,
36
+
marshal_DetachIPRequest,
35
37
marshal_MoveIPRequest,
36
38
marshal_ReleaseIPSetRequest,
37
39
marshal_UpdateIPRequest,
@@ -63,7 +65,7 @@ def book_ip(
63
65
:param project_id: When creating an IP in a Private Network, the Project must match the Private Network's Project.
64
66
:param address: The requested address should not include the subnet mask (/suffix). Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already booked, then the call will fail.
65
67
:param tags: Tags for the IP.
66
-
:param resource: Custom resource to attach to the IP being booked. An example of a custom resource is a virtual machine hosted on an Elastic Metal server, or an additional user network interface on an Instance. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method.
68
+
:param resource: Custom resource to attach to the IP being booked. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method.
67
69
:return: :class:`IP <IP>`
68
70
69
71
Usage:
@@ -426,7 +428,7 @@ def attach_ip(
426
428
) ->IP:
427
429
"""
428
430
Attach existing IP to custom resource.
429
-
Attach an existing IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server, or an additional user network interface on an Instance. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method.
431
+
Attach an existing IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method.
430
432
:param ip_id: IP ID.
431
433
:param resource: Custom resource to be attached to the IP.
432
434
:param region: Region to target. If none is passed will use default region from the config.
@@ -466,12 +468,14 @@ def detach_ip(
466
468
self,
467
469
*,
468
470
ip_id: str,
471
+
resource: CustomResource,
469
472
region: Optional[Region] =None,
470
473
) ->IP:
471
474
"""
472
475
Detach existing IP from a custom resource.
473
476
Detach a private IP from a custom resource. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
474
477
:param ip_id: IP ID.
478
+
:param resource: Custom resource currently attached to the IP.
475
479
:param region: Region to target. If none is passed will use default region from the config.
Move an existing private IP from one custom resource (e.g. a virtual machine hosted on an Elastic Metal server) to another custom resource. This will detach it from the first resource, and attach it to the second. Do not use this method for moving IP addresses between standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
510
523
:param ip_id: IP ID.
524
+
:param from_resource: Custom resource currently attached to the IP.
511
525
:param region: Region to target. If none is passed will use default region from the config.
512
-
:param resource: Custom resource to be attached to the IP.
526
+
:param to_resource: Custom resource to be attached to the IP.
Copy file name to clipboardExpand all lines: scaleway/scaleway/ipam/v1/types.py
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -223,7 +223,7 @@ class BookIPRequest:
223
223
224
224
resource: Optional[CustomResource]
225
225
"""
226
-
Custom resource to attach to the IP being booked. An example of a custom resource is a virtual machine hosted on an Elastic Metal server, or an additional user network interface on an Instance. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method.
226
+
Custom resource to attach to the IP being booked. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this for attaching IP addresses to standard Scaleway resources, as it will fail - instead, see the relevant product API for an equivalent method.
227
227
"""
228
228
229
229
@@ -234,6 +234,11 @@ class DetachIPRequest:
234
234
IP ID.
235
235
"""
236
236
237
+
resource: CustomResource
238
+
"""
239
+
Custom resource currently attached to the IP.
240
+
"""
241
+
237
242
region: Optional[Region]
238
243
"""
239
244
Region to target. If none is passed will use default region from the config.
@@ -351,12 +356,17 @@ class MoveIPRequest:
351
356
IP ID.
352
357
"""
353
358
359
+
from_resource: CustomResource
360
+
"""
361
+
Custom resource currently attached to the IP.
362
+
"""
363
+
354
364
region: Optional[Region]
355
365
"""
356
366
Region to target. If none is passed will use default region from the config.
0 commit comments