diff --git a/scaleway-async/scaleway_async/jobs/v1alpha1/api.py b/scaleway-async/scaleway_async/jobs/v1alpha1/api.py index e4f5b068f..a3b9090c4 100644 --- a/scaleway-async/scaleway_async/jobs/v1alpha1/api.py +++ b/scaleway-async/scaleway_async/jobs/v1alpha1/api.py @@ -101,11 +101,11 @@ async def create_job_definition( cpu_limit=cpu_limit, memory_limit=memory_limit, image_uri=image_uri, + command=command, + description=description, region=region, name=name or random_name(prefix="job"), local_storage_capacity=local_storage_capacity, - command=command, - description=description, project_id=project_id, environment_variables=environment_variables, job_timeout=job_timeout, diff --git a/scaleway-async/scaleway_async/jobs/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/jobs/v1alpha1/marshalling.py index 27bd2a83c..0d63fb1c5 100644 --- a/scaleway-async/scaleway_async/jobs/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/jobs/v1alpha1/marshalling.py @@ -334,18 +334,18 @@ def marshal_CreateJobDefinitionRequest( if request.image_uri is not None: output["image_uri"] = request.image_uri - if request.name is not None: - output["name"] = request.name - - if request.local_storage_capacity is not None: - output["local_storage_capacity"] = request.local_storage_capacity - if request.command is not None: output["command"] = request.command if request.description is not None: output["description"] = request.description + if request.name is not None: + output["name"] = request.name + + if request.local_storage_capacity is not None: + output["local_storage_capacity"] = request.local_storage_capacity + if request.project_id is not None: output["project_id"] = request.project_id or defaults.default_project_id diff --git a/scaleway-async/scaleway_async/jobs/v1alpha1/types.py b/scaleway-async/scaleway_async/jobs/v1alpha1/types.py index 124e35e02..3e9dad045 100644 --- a/scaleway-async/scaleway_async/jobs/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/jobs/v1alpha1/types.py @@ -170,29 +170,29 @@ class CreateJobDefinitionRequest: Image to use for the job. """ - region: Optional[Region] + command: str """ - Region to target. If none is passed will use default region from the config. + Startup command. If empty or not defined, the image's default command is used. """ - name: Optional[str] + description: str """ - Name of the job definition. + Description of the job. """ - local_storage_capacity: Optional[int] + region: Optional[Region] """ - Local storage capacity of the job (in MiB). + Region to target. If none is passed will use default region from the config. """ - command: str + name: Optional[str] """ - Startup command. If empty or not defined, the image's default command is used. + Name of the job definition. """ - description: str + local_storage_capacity: Optional[int] """ - Description of the job. + Local storage capacity of the job (in MiB). """ project_id: Optional[str] diff --git a/scaleway/scaleway/jobs/v1alpha1/api.py b/scaleway/scaleway/jobs/v1alpha1/api.py index 94803b757..6c2ab413c 100644 --- a/scaleway/scaleway/jobs/v1alpha1/api.py +++ b/scaleway/scaleway/jobs/v1alpha1/api.py @@ -101,11 +101,11 @@ def create_job_definition( cpu_limit=cpu_limit, memory_limit=memory_limit, image_uri=image_uri, + command=command, + description=description, region=region, name=name or random_name(prefix="job"), local_storage_capacity=local_storage_capacity, - command=command, - description=description, project_id=project_id, environment_variables=environment_variables, job_timeout=job_timeout, diff --git a/scaleway/scaleway/jobs/v1alpha1/marshalling.py b/scaleway/scaleway/jobs/v1alpha1/marshalling.py index 27bd2a83c..0d63fb1c5 100644 --- a/scaleway/scaleway/jobs/v1alpha1/marshalling.py +++ b/scaleway/scaleway/jobs/v1alpha1/marshalling.py @@ -334,18 +334,18 @@ def marshal_CreateJobDefinitionRequest( if request.image_uri is not None: output["image_uri"] = request.image_uri - if request.name is not None: - output["name"] = request.name - - if request.local_storage_capacity is not None: - output["local_storage_capacity"] = request.local_storage_capacity - if request.command is not None: output["command"] = request.command if request.description is not None: output["description"] = request.description + if request.name is not None: + output["name"] = request.name + + if request.local_storage_capacity is not None: + output["local_storage_capacity"] = request.local_storage_capacity + if request.project_id is not None: output["project_id"] = request.project_id or defaults.default_project_id diff --git a/scaleway/scaleway/jobs/v1alpha1/types.py b/scaleway/scaleway/jobs/v1alpha1/types.py index 124e35e02..3e9dad045 100644 --- a/scaleway/scaleway/jobs/v1alpha1/types.py +++ b/scaleway/scaleway/jobs/v1alpha1/types.py @@ -170,29 +170,29 @@ class CreateJobDefinitionRequest: Image to use for the job. """ - region: Optional[Region] + command: str """ - Region to target. If none is passed will use default region from the config. + Startup command. If empty or not defined, the image's default command is used. """ - name: Optional[str] + description: str """ - Name of the job definition. + Description of the job. """ - local_storage_capacity: Optional[int] + region: Optional[Region] """ - Local storage capacity of the job (in MiB). + Region to target. If none is passed will use default region from the config. """ - command: str + name: Optional[str] """ - Startup command. If empty or not defined, the image's default command is used. + Name of the job definition. """ - description: str + local_storage_capacity: Optional[int] """ - Description of the job. + Local storage capacity of the job (in MiB). """ project_id: Optional[str]