Skip to content

invalidate_project_cache

invalidate_project_cache(
    project_name: NonEmptyString,
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
) -> InvalidateProjectCacheOutput

Resets the cache for a project.

Parameters:

  • project_name (NonEmptyString) –

    The name of the CodeBuild build project that the cache is reset for.

Raises:

Source code in docs_src/capo_codebuild/_services/code_build.py
def invalidate_project_cache(
    self,
    project_name: "capo_codebuild.types.non_empty_string.NonEmptyString",
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
) -> "capo_codebuild.types.invalidate_project_cache_output.InvalidateProjectCacheOutput":
    """<p>Resets the cache for a project.</p>

    Args:
        project_name: <p>The name of the CodeBuild build project that the cache is reset for.</p>

    Raises:
        capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
        capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
        capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codebuild.types.invalidate_project_cache_input.InvalidateProjectCacheInput]",
    ) -> OperationResponse[
        "capo_codebuild.types.invalidate_project_cache_output.InvalidateProjectCacheOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.invalidate_project_cache

        output, http_response = (
            capo_codebuild._operations.code_build_20161006.invalidate_project_cache.invalidate_project_cache(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("InvalidateProjectCache")
    )
    input_: capo_codebuild.types.invalidate_project_cache_input.InvalidateProjectCacheInput = {
        "project_name": project_name
    }

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