Skip to content

describe_file_caches async

describe_file_caches(
    *,
    config_overrides: Optional[AsyncFSxClientConfig] = None,
    file_cache_ids: Optional[FileCacheIds] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeFileCachesResponse

Returns the description of a specific Amazon File Cache resource, if a FileCacheIds value is provided for that cache. Otherwise, it returns descriptions of all caches owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.

When retrieving all cache descriptions, you can optionally specify the MaxResults parameter to limit the number of descriptions in a response. If more cache descriptions remain, the operation returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

This operation is used in an iterative process to retrieve a list of your cache descriptions. DescribeFileCaches is called first without a NextTokenvalue. Then the operation continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken.

When using this operation, keep the following in mind:

  • The implementation might return fewer than MaxResults cache descriptions while still including a NextToken value.

  • The order of caches returned in the response of one DescribeFileCaches call and the order of caches returned across the responses of a multicall iteration is unspecified.

Parameters:

  • file_cache_ids (Optional[FileCacheIds], default: None ) –

    IDs of the caches whose descriptions you want to retrieve (String).

Raises:

Source code in docs_src/capo_fsx/_services/async_f_sx.py
async def describe_file_caches(
    self,
    *,
    config_overrides: Optional[AsyncFSxClientConfig] = None,
    file_cache_ids: Optional["capo_fsx.types.file_cache_ids.FileCacheIds"] = None,
    max_results: Optional["capo_fsx.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_fsx.types.next_token.NextToken"] = None,
) -> "capo_fsx.types.describe_file_caches_response.DescribeFileCachesResponse":
    """<p>Returns the description of a specific Amazon File Cache resource, if a <code>FileCacheIds</code> value is provided for that cache. Otherwise, it returns descriptions of all caches owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.</p> <p>When retrieving all cache descriptions, you can optionally specify the <code>MaxResults</code> parameter to limit the number of descriptions in a response. If more cache descriptions remain, the operation returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p> <p>This operation is used in an iterative process to retrieve a list of your cache descriptions. <code>DescribeFileCaches</code> is called first without a <code>NextToken</code>value. Then the operation continues to be called with the <code>NextToken</code> parameter set to the value of the last <code>NextToken</code> value until a response has no <code>NextToken</code>.</p> <p>When using this operation, keep the following in mind:</p> <ul> <li> <p>The implementation might return fewer than <code>MaxResults</code> cache descriptions while still including a <code>NextToken</code> value.</p> </li> <li> <p>The order of caches returned in the response of one <code>DescribeFileCaches</code> call and the order of caches returned across the responses of a multicall iteration is unspecified.</p> </li> </ul>

    Args:
        file_cache_ids: <p>IDs of the caches whose descriptions you want to retrieve (String).</p>

    Raises:
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.file_cache_not_found.FileCacheNotFound: <p>No caches were found based upon supplied parameters.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_fsx.types.describe_file_caches_request.DescribeFileCachesRequest]",
    ) -> AsyncOperationResponse[
        "capo_fsx.types.describe_file_caches_response.DescribeFileCachesResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.describe_file_caches

        (
            output,
            http_response,
        ) = await capo_fsx._operations.aws_simba_api_service_v20180301.describe_file_caches.async_describe_file_caches(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeFileCaches")
    )
    input_: capo_fsx.types.describe_file_caches_request.DescribeFileCachesRequest = {}
    if file_cache_ids is not None:
        input_["file_cache_ids"] = file_cache_ids
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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