FSx / Client / update_file_cache

update_file_cache#

FSx.Client.update_file_cache(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.update_file_cache(
    FileCacheId='string',
    ClientRequestToken='string',
    LustreConfiguration={
        'WeeklyMaintenanceStartTime': 'string'
    }
)
Parameters:
  • FileCacheId (string) –

    [REQUIRED]

    The ID of the cache that you are updating.

  • ClientRequestToken (string) –

    (Optional) An idempotency token for resource creation, in a string of up to 64 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.

    This field is autopopulated if not provided.

  • LustreConfiguration (dict) –

    The configuration updates for an Amazon File Cache resource.

    • WeeklyMaintenanceStartTime (string) –

      A recurring weekly time, in the format D:HH:MM.

      D is the day of the week, for which 1 represents Monday and 7 represents Sunday. For further details, see the ISO-8601 spec as described on Wikipedia.

      HH is the zero-padded hour of the day (0-23), and MM is the zero-padded minute of the hour.

      For example, 1:05:00 specifies maintenance at 5 AM Monday.

Return type:

dict

Returns:

Response Syntax

{
    'FileCache': {
        'OwnerId': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'FileCacheId': 'string',
        'FileCacheType': 'LUSTRE',
        'FileCacheTypeVersion': 'string',
        'Lifecycle': 'AVAILABLE'|'CREATING'|'DELETING'|'UPDATING'|'FAILED',
        'FailureDetails': {
            'Message': 'string'
        },
        'StorageCapacity': 123,
        'VpcId': 'string',
        'SubnetIds': [
            'string',
        ],
        'NetworkInterfaceIds': [
            'string',
        ],
        'DNSName': 'string',
        'KmsKeyId': 'string',
        'ResourceARN': 'string',
        'LustreConfiguration': {
            'PerUnitStorageThroughput': 123,
            'DeploymentType': 'CACHE_1',
            'MountName': 'string',
            'WeeklyMaintenanceStartTime': 'string',
            'MetadataConfiguration': {
                'StorageCapacity': 123
            },
            'LogConfiguration': {
                'Level': 'DISABLED'|'WARN_ONLY'|'ERROR_ONLY'|'WARN_ERROR',
                'Destination': 'string'
            }
        },
        'DataRepositoryAssociationIds': [
            'string',
        ]
    }
}

Response Structure

  • (dict) –

    • FileCache (dict) –

      A description of the cache that was updated.

      • OwnerId (string) –

        An Amazon Web Services account ID. This ID is a 12-digit number that you use to construct Amazon Resource Names (ARNs) for resources.

      • CreationTime (datetime) –

        The time that the resource was created, in seconds (since 1970-01-01T00:00:00Z), also known as Unix time.

      • FileCacheId (string) –

        The system-generated, unique ID of the cache.

      • FileCacheType (string) –

        The type of cache, which must be LUSTRE.

      • FileCacheTypeVersion (string) –

        The Lustre version of the cache, which must be 2.12.

      • Lifecycle (string) –

        The lifecycle status of the cache. The following are the possible values and what they mean:

        • AVAILABLE - The cache is in a healthy state, and is reachable and available for use.

        • CREATING - The new cache is being created.

        • DELETING - An existing cache is being deleted.

        • UPDATING - The cache is undergoing a customer-initiated update.

        • FAILED - An existing cache has experienced an unrecoverable failure. When creating a new cache, the cache was unable to be created.

      • FailureDetails (dict) –

        A structure providing details of any failures that occurred.

        • Message (string) –

          A message describing any failures that occurred.

      • StorageCapacity (integer) –

        The storage capacity of the cache in gibibytes (GiB).

      • VpcId (string) –

        The ID of your virtual private cloud (VPC). For more information, see VPC and subnets in the Amazon VPC User Guide.

      • SubnetIds (list) –

        A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID in a call to the CreateFileCache operation.

        • (string) –

          The ID for a subnet. A subnet is a range of IP addresses in your virtual private cloud (VPC). For more information, see VPC and subnets in the Amazon VPC User Guide.

      • NetworkInterfaceIds (list) –

        A list of network interface IDs.

        • (string) –

          An elastic network interface ID. An elastic network interface is a logical networking component in a virtual private cloud (VPC) that represents a virtual network card. For more information, see Elastic Network Interfaces in the Amazon EC2 User Guide for Linux Instances.

      • DNSName (string) –

        The Domain Name System (DNS) name for the cache.

      • KmsKeyId (string) –

        Specifies the ID of the Key Management Service (KMS) key to use for encrypting data on an Amazon File Cache. If a KmsKeyId isn’t specified, the Amazon FSx-managed KMS key for your account is used. For more information, see Encrypt in the Key Management Service API Reference.

      • ResourceARN (string) –

        The Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify Amazon Web Services resources. We require an ARN when you need to specify a resource unambiguously across all of Amazon Web Services. For more information, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

      • LustreConfiguration (dict) –

        The configuration for the Amazon File Cache resource.

        • PerUnitStorageThroughput (integer) –

          Per unit storage throughput represents the megabytes per second of read or write throughput per 1 tebibyte of storage provisioned. Cache throughput capacity is equal to Storage capacity (TiB) * PerUnitStorageThroughput (MB/s/TiB). The only supported value is 1000.

        • DeploymentType (string) –

          The deployment type of the Amazon File Cache resource, which must be CACHE_1.

        • MountName (string) –

          You use the MountName value when mounting the cache. If you pass a cache ID to the DescribeFileCaches operation, it returns the the MountName value as part of the cache’s description.

        • WeeklyMaintenanceStartTime (string) –

          A recurring weekly time, in the format D:HH:MM.

          D is the day of the week, for which 1 represents Monday and 7 represents Sunday. For further details, see the ISO-8601 spec as described on Wikipedia.

          HH is the zero-padded hour of the day (0-23), and MM is the zero-padded minute of the hour.

          For example, 1:05:00 specifies maintenance at 5 AM Monday.

        • MetadataConfiguration (dict) –

          The configuration for a Lustre MDT (Metadata Target) storage volume.

          • StorageCapacity (integer) –

            The storage capacity of the Lustre MDT (Metadata Target) storage volume in gibibytes (GiB). The only supported value is 2400 GiB.

        • LogConfiguration (dict) –

          The configuration for Lustre logging used to write the enabled logging events for your Amazon File Cache resource to Amazon CloudWatch Logs.

          • Level (string) –

            The data repository events that are logged by Amazon FSx.

            • WARN_ONLY - only warning events are logged.

            • ERROR_ONLY - only error events are logged.

            • WARN_ERROR - both warning events and error events are logged.

            • DISABLED - logging of data repository events is turned off.

            Note that Amazon File Cache uses a default setting of WARN_ERROR, which can’t be changed.

          • Destination (string) –

            The Amazon Resource Name (ARN) that specifies the destination of the logs. The destination can be any Amazon CloudWatch Logs log group ARN. The destination ARN must be in the same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as your Amazon FSx file system.

      • DataRepositoryAssociationIds (list) –

        A list of IDs of data repository associations that are associated with this cache.

        • (string) –

Exceptions

  • FSx.Client.exceptions.BadRequest

  • FSx.Client.exceptions.UnsupportedOperation

  • FSx.Client.exceptions.IncompatibleParameterError

  • FSx.Client.exceptions.InternalServerError

  • FSx.Client.exceptions.FileCacheNotFound

  • FSx.Client.exceptions.MissingFileCacheConfiguration

  • FSx.Client.exceptions.ServiceLimitExceeded