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
14 changes: 5 additions & 9 deletions scaleway-async/scaleway_async/instance/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,15 +1025,15 @@ async def get_image(
async def create_image(
self,
root_volume: str,
default_bootscript: str,
public: bool,
zone: Optional[Zone] = None,
name: Optional[str] = None,
arch: Arch = Arch.X86_64,
default_bootscript: Optional[str] = None,
extra_volumes: Optional[Dict[str, VolumeTemplate]] = None,
organization: Optional[str] = None,
project: Optional[str] = None,
tags: Optional[List[str]] = None,
public: Optional[bool] = None,
) -> CreateImageResponse:
"""
Create an instance image
Expand All @@ -1056,11 +1056,7 @@ async def create_image(
Usage:
::

result = await api.create_image(
root_volume="example",
default_bootscript="example",
public=True,
)
result = await api.create_image(root_volume="example")
"""

param_zone = validate_path_param("zone", zone or self.client.default_zone)
Expand All @@ -1071,15 +1067,15 @@ async def create_image(
body=marshal_CreateImageRequest(
CreateImageRequest(
root_volume=root_volume,
default_bootscript=default_bootscript,
public=public,
zone=zone,
name=name or random_name(prefix="img"),
arch=arch,
default_bootscript=default_bootscript,
extra_volumes=extra_volumes,
organization=organization,
project=project,
tags=tags,
public=public,
),
self.client,
),
Expand Down
4 changes: 2 additions & 2 deletions scaleway-async/scaleway_async/instance/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ class CreateImageRequest:
Architecture of the image
"""

default_bootscript: str
default_bootscript: Optional[str]
"""
Default bootscript of the image
"""
Expand Down Expand Up @@ -2066,7 +2066,7 @@ class CreateImageRequest:
The tags of the image
"""

public: bool
public: Optional[bool]
"""
True to create a public image
"""
Expand Down
14 changes: 5 additions & 9 deletions scaleway/scaleway/instance/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,15 +1025,15 @@ def get_image(
def create_image(
self,
root_volume: str,
default_bootscript: str,
public: bool,
zone: Optional[Zone] = None,
name: Optional[str] = None,
arch: Arch = Arch.X86_64,
default_bootscript: Optional[str] = None,
extra_volumes: Optional[Dict[str, VolumeTemplate]] = None,
organization: Optional[str] = None,
project: Optional[str] = None,
tags: Optional[List[str]] = None,
public: Optional[bool] = None,
) -> CreateImageResponse:
"""
Create an instance image
Expand All @@ -1056,11 +1056,7 @@ def create_image(
Usage:
::

result = api.create_image(
root_volume="example",
default_bootscript="example",
public=True,
)
result = api.create_image(root_volume="example")
"""

param_zone = validate_path_param("zone", zone or self.client.default_zone)
Expand All @@ -1071,15 +1067,15 @@ def create_image(
body=marshal_CreateImageRequest(
CreateImageRequest(
root_volume=root_volume,
default_bootscript=default_bootscript,
public=public,
zone=zone,
name=name or random_name(prefix="img"),
arch=arch,
default_bootscript=default_bootscript,
extra_volumes=extra_volumes,
organization=organization,
project=project,
tags=tags,
public=public,
),
self.client,
),
Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/instance/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ class CreateImageRequest:
Architecture of the image
"""

default_bootscript: str
default_bootscript: Optional[str]
"""
Default bootscript of the image
"""
Expand Down Expand Up @@ -2066,7 +2066,7 @@ class CreateImageRequest:
The tags of the image
"""

public: bool
public: Optional[bool]
"""
True to create a public image
"""
Expand Down