Skip to main content

file_caches

Creates, updates, deletes, gets or lists a file_caches resource.

Overview

Namefile_caches
TypeResource
Idaws.fsx.file_caches

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
file_cachesarrayThe response object for the DescribeFileCaches operation.
next_tokenstring(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous NextToken value left off. (pattern: <code>^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_file_cachesselectregionReturns 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.
create_file_cacheinsertregion, FileCacheType, FileCacheTypeVersion, StorageCapacity, SubnetIdsCreates a new Amazon File Cache resource. You can use this operation with a client request token in the request that Amazon File Cache uses to ensure idempotent creation. If a cache with the specified client request token exists and the parameters match, CreateFileCache returns the description of the existing cache. If a cache with the specified client request token exists and the parameters don't match, this call returns IncompatibleParameterError. If a file cache with the specified client request token doesn't exist, CreateFileCache does the following: Creates a new, empty Amazon File Cache resource with an assigned ID, and an initial lifecycle state of CREATING. Returns the description of the cache in JSON format. The CreateFileCache call returns while the cache's lifecycle state is still CREATING. You can check the cache creation status by calling the DescribeFileCaches operation, which returns the cache state along with other information.
update_file_cacheupdateregion, FileCacheIdUpdates the configuration of an existing Amazon File Cache resource. You can update multiple properties in a single request.
delete_file_cachedeleteregionDeletes an Amazon File Cache resource. After deletion, the cache no longer exists, and its data is gone. The DeleteFileCache operation returns while the cache has the DELETING status. You can check the cache deletion status by calling the DescribeFileCaches operation, which returns a list of caches in your account. If you pass the cache ID for a deleted cache, the DescribeFileCaches operation returns a FileCacheNotFound error. The data in a deleted cache is also deleted and can't be recovered by any means.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
file_caches,
next_token
FROM aws.fsx.file_caches
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new Amazon File Cache resource. You can use this operation with a client request token in the request that Amazon File Cache uses to ensure idempotent creation. If a cache with the specified client request token exists and the parameters match, CreateFileCache returns the description of the existing cache. If a cache with the specified client request token exists and the parameters don't match, this call returns IncompatibleParameterError. If a file cache with the specified client request token doesn't exist, CreateFileCache does the following: Creates a new, empty Amazon File Cache resource with an assigned ID, and an initial lifecycle state of CREATING. Returns the description of the cache in JSON format. The CreateFileCache call returns while the cache's lifecycle state is still CREATING. You can check the cache creation status by calling the DescribeFileCaches operation, which returns the cache state along with other information.

INSERT INTO aws.fsx.file_caches (
ClientRequestToken,
FileCacheType,
FileCacheTypeVersion,
StorageCapacity,
SubnetIds,
SecurityGroupIds,
Tags,
CopyTagsToDataRepositoryAssociations,
KmsKeyId,
LustreConfiguration,
DataRepositoryAssociations,
region
)
SELECT
'{{ ClientRequestToken }}',
'{{ FileCacheType }}' /* required */,
'{{ FileCacheTypeVersion }}' /* required */,
{{ StorageCapacity }} /* required */,
'{{ SubnetIds }}' /* required */,
'{{ SecurityGroupIds }}',
'{{ Tags }}',
{{ CopyTagsToDataRepositoryAssociations }},
'{{ KmsKeyId }}',
'{{ LustreConfiguration }}',
'{{ DataRepositoryAssociations }}',
'{{ region }}'
RETURNING
file_cache
;

UPDATE examples

Updates the configuration of an existing Amazon File Cache resource. You can update multiple properties in a single request.

UPDATE aws.fsx.file_caches
SET
FileCacheId = '{{ FileCacheId }}',
ClientRequestToken = '{{ ClientRequestToken }}',
LustreConfiguration = '{{ LustreConfiguration }}'
WHERE
region = '{{ region }}' --required
AND FileCacheId = '{{ FileCacheId }}' --required
RETURNING
file_cache;

DELETE examples

Deletes an Amazon File Cache resource. After deletion, the cache no longer exists, and its data is gone. The DeleteFileCache operation returns while the cache has the DELETING status. You can check the cache deletion status by calling the DescribeFileCaches operation, which returns a list of caches in your account. If you pass the cache ID for a deleted cache, the DescribeFileCaches operation returns a FileCacheNotFound error. The data in a deleted cache is also deleted and can't be recovered by any means.

DELETE FROM aws.fsx.file_caches
WHERE region = '{{ region }}' --required
;