Skip to content

update_run_group async

update_run_group(
    id: RunGroupId,
    *,
    config_overrides: Optional[AsyncOmicsClientConfig] = None,
    name: Optional[RunGroupName] = None,
    max_cpus: Optional[int] = None,
    max_runs: Optional[int] = None,
    max_duration: Optional[int] = None,
    max_gpus: Optional[int] = None,
) -> None

Updates the settings of a run group and returns a response with no body if the operation is successful.

You can update the following settings with UpdateRunGroup:

  • Maximum number of CPUs

  • Run time (measured in minutes)

  • Number of GPUs

  • Number of concurrent runs

  • Group name

To confirm that the settings have been successfully updated, use the ListRunGroups or GetRunGroup API operations to verify that the desired changes have been made.

Parameters:

  • id (RunGroupId) –

    The group's ID.

  • name (Optional[RunGroupName], default: None ) –

    A name for the group.

  • max_cpus (Optional[int], default: None ) –

    The maximum number of CPUs to use.

  • max_runs (Optional[int], default: None ) –

    The maximum number of concurrent runs for the group.

  • max_duration (Optional[int], default: None ) –

    A maximum run time for the group in minutes.

  • max_gpus (Optional[int], default: None ) –

    The maximum GPUs that can be used by a run group.

Raises:

Source code in docs_src/capo_omics/_services/async_omics.py
async def update_run_group(
    self,
    id: "capo_omics.types.run_group_id.RunGroupId",
    *,
    config_overrides: Optional[AsyncOmicsClientConfig] = None,
    name: Optional["capo_omics.types.run_group_name.RunGroupName"] = None,
    max_cpus: Optional[int] = None,
    max_runs: Optional[int] = None,
    max_duration: Optional[int] = None,
    max_gpus: Optional[int] = None,
) -> None:
    """<p>Updates the settings of a run group and returns a response with no body if the operation is successful.</p> <p>You can update the following settings with <code>UpdateRunGroup</code>:</p> <ul> <li> <p>Maximum number of CPUs</p> </li> <li> <p>Run time (measured in minutes)</p> </li> <li> <p>Number of GPUs</p> </li> <li> <p>Number of concurrent runs</p> </li> <li> <p>Group name</p> </li> </ul> <p>To confirm that the settings have been successfully updated, use the <code>ListRunGroups</code> or <code>GetRunGroup</code> API operations to verify that the desired changes have been made.</p>

    Args:
        id: <p>The group's ID.</p>
        name: <p>A name for the group.</p>
        max_cpus: <p>The maximum number of CPUs to use.</p>
        max_runs: <p>The maximum number of concurrent runs for the group.</p>
        max_duration: <p>A maximum run time for the group in minutes.</p>
        max_gpus: <p>The maximum GPUs that can be used by a run group.</p>

    Raises:
        capo_omics.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_omics.errors.conflict_exception.ConflictException: <p>The request cannot be applied to the target resource in its current state.</p>
        capo_omics.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred. Try the request again.</p>
        capo_omics.errors.request_timeout_exception.RequestTimeoutException: <p>The request timed out.</p>
        capo_omics.errors.resource_not_found_exception.ResourceNotFoundException: <p>The target resource was not found in the current Region.</p>
        capo_omics.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds a service quota.</p>
        capo_omics.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_omics.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_omics.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_omics.types.update_run_group_request.UpdateRunGroupRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_omics._operations.omics.update_run_group

        (
            output,
            http_response,
        ) = await capo_omics._operations.omics.update_run_group.async_update_run_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRunGroup")
    )
    input_: capo_omics.types.update_run_group_request.UpdateRunGroupRequest = {
        "id": id
    }
    if name is not None:
        input_["name"] = name
    if max_cpus is not None:
        input_["max_cpus"] = max_cpus
    if max_runs is not None:
        input_["max_runs"] = max_runs
    if max_duration is not None:
        input_["max_duration"] = max_duration
    if max_gpus is not None:
        input_["max_gpus"] = max_gpus

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output