Skip to content

update_run_cache

update_run_cache(
    id: RunCacheId,
    *,
    config_overrides: Optional[OmicsClientConfig] = None,
    cache_behavior: Optional[CacheBehavior] = None,
    description: Optional[UserCustomDescription] = None,
    name: Optional[UserCustomName] = None,
) -> None

Updates a run cache using its ID and returns a response with no body if the operation is successful. You can update the run cache description, name, or the default run cache behavior with CACHE_ON_FAILURE or CACHE_ALWAYS. To confirm that your run cache settings have been properly updated, use the GetRunCache API operation.

For more information, see How call caching works in the Amazon Web Services HealthOmics User Guide.

Parameters:

Raises:

Source code in docs_src/capo_omics/_services/omics.py
def update_run_cache(
    self,
    id: "capo_omics.types.run_cache_id.RunCacheId",
    *,
    config_overrides: Optional[OmicsClientConfig] = None,
    cache_behavior: Optional[
        "capo_omics.types.cache_behavior.CacheBehavior"
    ] = None,
    description: Optional[
        "capo_omics.types.user_custom_description.UserCustomDescription"
    ] = None,
    name: Optional["capo_omics.types.user_custom_name.UserCustomName"] = None,
) -> None:
    """<p>Updates a run cache using its ID and returns a response with no body if the operation is successful. You can update the run cache description, name, or the default run cache behavior with <code>CACHE_ON_FAILURE</code> or <code>CACHE_ALWAYS</code>. To confirm that your run cache settings have been properly updated, use the <code>GetRunCache</code> API operation.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/omics/latest/dev/how-run-cache.html">How call caching works</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>

    Args:
        cache_behavior: <p>Update the default run cache behavior.</p>
        description: <p>Update the run cache description.</p>
        id: <p>The identifier of the run cache you want to update.</p>
        name: <p>Update the name of the run cache.</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.
    """

    def _handler(
        req: "OperationRequest[capo_omics.types.update_run_cache_request.UpdateRunCacheRequest]",
    ) -> OperationResponse[None]:
        import capo_omics._operations.omics.update_run_cache

        output, http_response = (
            capo_omics._operations.omics.update_run_cache.update_run_cache(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRunCache")
    )
    input_: capo_omics.types.update_run_cache_request.UpdateRunCacheRequest = {
        "id": id
    }
    if cache_behavior is not None:
        input_["cache_behavior"] = cache_behavior
    if description is not None:
        input_["description"] = description
    if name is not None:
        input_["name"] = name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output