Skip to content

update_file_system async

update_file_system(
    *,
    config_overrides: Optional[AsyncFSxClientConfig] = None,
    file_system_id: Optional[FileSystemId] = None,
    client_request_token: Optional[ClientRequestToken] = None,
    storage_capacity: Optional[StorageCapacity] = None,
    windows_configuration: Optional[UpdateFileSystemWindowsConfiguration] = None,
    lustre_configuration: Optional[UpdateFileSystemLustreConfiguration] = None,
    ontap_configuration: Optional[UpdateFileSystemOntapConfiguration] = None,
    open_zfs_configuration: Optional[UpdateFileSystemOpenZFSConfiguration] = None,
    storage_type: Optional[StorageType] = None,
    file_system_type_version: Optional[FileSystemTypeVersion] = None,
    network_type: Optional[NetworkType] = None,
) -> UpdateFileSystemResponse

Use this operation to update the configuration of an existing Amazon FSx file system. You can update multiple properties in a single request.

For FSx for Windows File Server file systems, you can update the following properties:

  • AuditLogConfiguration

  • AutomaticBackupRetentionDays

  • DailyAutomaticBackupStartTime

  • DiskIopsConfiguration

  • SelfManagedActiveDirectoryConfiguration

  • StorageCapacity

  • StorageType

  • ThroughputCapacity

  • WeeklyMaintenanceStartTime

For FSx for Lustre file systems, you can update the following properties:

  • AutoImportPolicy

  • AutomaticBackupRetentionDays

  • DailyAutomaticBackupStartTime

  • DataCompressionType

  • FileSystemTypeVersion

  • LogConfiguration

  • LustreReadCacheConfiguration

  • LustreRootSquashConfiguration

  • MetadataConfiguration

  • PerUnitStorageThroughput

  • StorageCapacity

  • ThroughputCapacity

  • WeeklyMaintenanceStartTime

For FSx for ONTAP file systems, you can update the following properties:

  • AddRouteTableIds

  • AutomaticBackupRetentionDays

  • DailyAutomaticBackupStartTime

  • DiskIopsConfiguration

  • EndpointIpv6AddressRange

  • FsxAdminPassword

  • HAPairs

  • RemoveRouteTableIds

  • StorageCapacity

  • ThroughputCapacity

  • ThroughputCapacityPerHAPair

  • WeeklyMaintenanceStartTime

For FSx for OpenZFS file systems, you can update the following properties:

  • AddRouteTableIds

  • AutomaticBackupRetentionDays

  • CopyTagsToBackups

  • CopyTagsToVolumes

  • DailyAutomaticBackupStartTime

  • DiskIopsConfiguration

  • EndpointIpv6AddressRange

  • ReadCacheConfiguration

  • RemoveRouteTableIds

  • StorageCapacity

  • ThroughputCapacity

  • WeeklyMaintenanceStartTime

Parameters:

  • file_system_id (Optional[FileSystemId], default: None ) –

    The ID of the file system that you are updating.

  • client_request_token (Optional[ClientRequestToken], default: None ) –

    A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent updates. This string is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.

  • storage_capacity (Optional[StorageCapacity], default: None ) –

    Use this parameter to increase the storage capacity of an FSx for Windows File Server, FSx for Lustre, FSx for OpenZFS, or FSx for ONTAP file system. For second-generation FSx for ONTAP file systems, you can also decrease the storage capacity. Specifies the storage capacity target value, in GiB, for the file system that you're updating.

    You can't make a storage capacity increase request if there is an existing storage capacity increase request in progress.

    For Lustre file systems, the storage capacity target value can be the following:

    • For SCRATCH_2, PERSISTENT_1, and PERSISTENT_2 SSD deployment types, valid values are in multiples of 2400 GiB. The value must be greater than the current storage capacity.

    • For PERSISTENT HDD file systems, valid values are multiples of 6000 GiB for 12-MBps throughput per TiB file systems and multiples of 1800 GiB for 40-MBps throughput per TiB file systems. The values must be greater than the current storage capacity.

    • For SCRATCH_1 file systems, you can't increase the storage capacity.

    For more information, see Managing storage and throughput capacity in the FSx for Lustre User Guide.

    For FSx for OpenZFS file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. For more information, see Managing storage capacity in the FSx for OpenZFS User Guide.

    For Windows file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. To increase storage capacity, the file system must have at least 16 MBps of throughput capacity. For more information, see Managing storage capacity in the Amazon FSxfor Windows File Server User Guide.

    For ONTAP file systems, when increasing storage capacity, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. When decreasing storage capacity on second-generation file systems, the target value must be at least 9 percent smaller than the current SSD storage capacity. For more information, see File system storage capacity and IOPS in the Amazon FSx for NetApp ONTAP User Guide.

  • windows_configuration (Optional[UpdateFileSystemWindowsConfiguration], default: None ) –

    The configuration updates for an Amazon FSx for Windows File Server file system.

  • open_zfs_configuration (Optional[UpdateFileSystemOpenZFSConfiguration], default: None ) –

    The configuration updates for an FSx for OpenZFS file system.

  • file_system_type_version (Optional[FileSystemTypeVersion], default: None ) –

    The Lustre version you are updating an FSx for Lustre file system to. Valid values are 2.12 and 2.15. The value you choose must be newer than the file system's current Lustre version.

  • network_type (Optional[NetworkType], default: None ) –

    Changes the network type of an FSx for OpenZFS file system.

Raises:

  • BadRequest –

    A generic error indicating a failure with a client request.

  • FileSystemNotFound –

    No Amazon FSx file systems were found based upon supplied parameters.

  • IncompatibleParameterError –

    The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.

  • InternalServerError –

    A generic error indicating a server-side failure.

  • InvalidNetworkSettings –

    One or more network settings specified in the request are invalid.

  • MissingFileSystemConfiguration –

    A file system configuration is required for this operation.

  • ServiceLimitExceeded –

    An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.

  • UnsupportedOperation –

    The requested operation is not supported for this resource or API.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_fsx/_services/async_f_sx.py
async def update_file_system(
    self,
    *,
    config_overrides: Optional[AsyncFSxClientConfig] = None,
    file_system_id: Optional["capo_fsx.types.file_system_id.FileSystemId"] = None,
    client_request_token: Optional[
        "capo_fsx.types.client_request_token.ClientRequestToken"
    ] = None,
    storage_capacity: Optional[
        "capo_fsx.types.storage_capacity.StorageCapacity"
    ] = None,
    windows_configuration: Optional[
        "capo_fsx.types.update_file_system_windows_configuration.UpdateFileSystemWindowsConfiguration"
    ] = None,
    lustre_configuration: Optional[
        "capo_fsx.types.update_file_system_lustre_configuration.UpdateFileSystemLustreConfiguration"
    ] = None,
    ontap_configuration: Optional[
        "capo_fsx.types.update_file_system_ontap_configuration.UpdateFileSystemOntapConfiguration"
    ] = None,
    open_zfs_configuration: Optional[
        "capo_fsx.types.update_file_system_open_zfs_configuration.UpdateFileSystemOpenZFSConfiguration"
    ] = None,
    storage_type: Optional["capo_fsx.types.storage_type.StorageType"] = None,
    file_system_type_version: Optional[
        "capo_fsx.types.file_system_type_version.FileSystemTypeVersion"
    ] = None,
    network_type: Optional["capo_fsx.types.network_type.NetworkType"] = None,
) -> "capo_fsx.types.update_file_system_response.UpdateFileSystemResponse":
    """<p>Use this operation to update the configuration of an existing Amazon FSx file system. You can update multiple properties in a single request.</p> <p>For FSx for Windows File Server file systems, you can update the following properties:</p> <ul> <li> <p> <code>AuditLogConfiguration</code> </p> </li> <li> <p> <code>AutomaticBackupRetentionDays</code> </p> </li> <li> <p> <code>DailyAutomaticBackupStartTime</code> </p> </li> <li> <p> <code>DiskIopsConfiguration</code> </p> </li> <li> <p> <code>SelfManagedActiveDirectoryConfiguration</code> </p> </li> <li> <p> <code>StorageCapacity</code> </p> </li> <li> <p> <code>StorageType</code> </p> </li> <li> <p> <code>ThroughputCapacity</code> </p> </li> <li> <p> <code>WeeklyMaintenanceStartTime</code> </p> </li> </ul> <p>For FSx for Lustre file systems, you can update the following properties:</p> <ul> <li> <p> <code>AutoImportPolicy</code> </p> </li> <li> <p> <code>AutomaticBackupRetentionDays</code> </p> </li> <li> <p> <code>DailyAutomaticBackupStartTime</code> </p> </li> <li> <p> <code>DataCompressionType</code> </p> </li> <li> <p> <code>FileSystemTypeVersion</code> </p> </li> <li> <p> <code>LogConfiguration</code> </p> </li> <li> <p> <code>LustreReadCacheConfiguration</code> </p> </li> <li> <p> <code>LustreRootSquashConfiguration</code> </p> </li> <li> <p> <code>MetadataConfiguration</code> </p> </li> <li> <p> <code>PerUnitStorageThroughput</code> </p> </li> <li> <p> <code>StorageCapacity</code> </p> </li> <li> <p> <code>ThroughputCapacity</code> </p> </li> <li> <p> <code>WeeklyMaintenanceStartTime</code> </p> </li> </ul> <p>For FSx for ONTAP file systems, you can update the following properties:</p> <ul> <li> <p> <code>AddRouteTableIds</code> </p> </li> <li> <p> <code>AutomaticBackupRetentionDays</code> </p> </li> <li> <p> <code>DailyAutomaticBackupStartTime</code> </p> </li> <li> <p> <code>DiskIopsConfiguration</code> </p> </li> <li> <p> <code>EndpointIpv6AddressRange</code> </p> </li> <li> <p> <code>FsxAdminPassword</code> </p> </li> <li> <p> <code>HAPairs</code> </p> </li> <li> <p> <code>RemoveRouteTableIds</code> </p> </li> <li> <p> <code>StorageCapacity</code> </p> </li> <li> <p> <code>ThroughputCapacity</code> </p> </li> <li> <p> <code>ThroughputCapacityPerHAPair</code> </p> </li> <li> <p> <code>WeeklyMaintenanceStartTime</code> </p> </li> </ul> <p>For FSx for OpenZFS file systems, you can update the following properties:</p> <ul> <li> <p> <code>AddRouteTableIds</code> </p> </li> <li> <p> <code>AutomaticBackupRetentionDays</code> </p> </li> <li> <p> <code>CopyTagsToBackups</code> </p> </li> <li> <p> <code>CopyTagsToVolumes</code> </p> </li> <li> <p> <code>DailyAutomaticBackupStartTime</code> </p> </li> <li> <p> <code>DiskIopsConfiguration</code> </p> </li> <li> <p> <code>EndpointIpv6AddressRange</code> </p> </li> <li> <p> <code>ReadCacheConfiguration</code> </p> </li> <li> <p> <code>RemoveRouteTableIds</code> </p> </li> <li> <p> <code>StorageCapacity</code> </p> </li> <li> <p> <code>ThroughputCapacity</code> </p> </li> <li> <p> <code>WeeklyMaintenanceStartTime</code> </p> </li> </ul>

    Args:
        file_system_id: <p>The ID of the file system that you are updating.</p>
        client_request_token: <p>A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent updates. This string is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
        storage_capacity: <p>Use this parameter to increase the storage capacity of an FSx for Windows File Server, FSx for Lustre, FSx for OpenZFS, or FSx for ONTAP file system. For second-generation FSx for ONTAP file systems, you can also decrease the storage capacity. Specifies the storage capacity target value, in GiB, for the file system that you're updating. </p> <note> <p>You can't make a storage capacity increase request if there is an existing storage capacity increase request in progress.</p> </note> <p>For Lustre file systems, the storage capacity target value can be the following:</p> <ul> <li> <p>For <code>SCRATCH_2</code>, <code>PERSISTENT_1</code>, and <code>PERSISTENT_2 SSD</code> deployment types, valid values are in multiples of 2400 GiB. The value must be greater than the current storage capacity.</p> </li> <li> <p>For <code>PERSISTENT HDD</code> file systems, valid values are multiples of 6000 GiB for 12-MBps throughput per TiB file systems and multiples of 1800 GiB for 40-MBps throughput per TiB file systems. The values must be greater than the current storage capacity.</p> </li> <li> <p>For <code>SCRATCH_1</code> file systems, you can't increase the storage capacity.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/managing-storage-capacity.html">Managing storage and throughput capacity</a> in the <i>FSx for Lustre User Guide</i>.</p> <p>For FSx for OpenZFS file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/managing-storage-capacity.html">Managing storage capacity</a> in the <i>FSx for OpenZFS User Guide</i>.</p> <p>For Windows file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. To increase storage capacity, the file system must have at least 16 MBps of throughput capacity. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html">Managing storage capacity</a> in the <i>Amazon FSxfor Windows File Server User Guide</i>.</p> <p>For ONTAP file systems, when increasing storage capacity, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. When decreasing storage capacity on second-generation file systems, the target value must be at least 9 percent smaller than the current SSD storage capacity. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/storage-capacity-and-IOPS.html">File system storage capacity and IOPS</a> in the Amazon FSx for NetApp ONTAP User Guide.</p>
        windows_configuration: <p>The configuration updates for an Amazon FSx for Windows File Server file system.</p>
        open_zfs_configuration: <p>The configuration updates for an FSx for OpenZFS file system.</p>
        file_system_type_version: <p>The Lustre version you are updating an FSx for Lustre file system to. Valid values are <code>2.12</code> and <code>2.15</code>. The value you choose must be newer than the file system's current Lustre version.</p>
        network_type: <p>Changes the network type of an FSx for OpenZFS file system.</p>

    Raises:
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.file_system_not_found.FileSystemNotFound: <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
        capo_fsx.errors.incompatible_parameter_error.IncompatibleParameterError: <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.invalid_network_settings.InvalidNetworkSettings: <p>One or more network settings specified in the request are invalid.</p>
        capo_fsx.errors.missing_file_system_configuration.MissingFileSystemConfiguration: <p>A file system configuration is required for this operation.</p>
        capo_fsx.errors.service_limit_exceeded.ServiceLimitExceeded: <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.</p>
        capo_fsx.errors.unsupported_operation.UnsupportedOperation: <p>The requested operation is not supported for this resource or API.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_fsx.types.update_file_system_request.UpdateFileSystemRequest]",
    ) -> AsyncOperationResponse[
        "capo_fsx.types.update_file_system_response.UpdateFileSystemResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.update_file_system

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

    def _redact_input(
        input_: "capo_fsx.types.update_file_system_request.UpdateFileSystemRequest",
    ) -> dict[str, Any]:
        import capo_fsx.types.update_file_system_request

        return capo_fsx.types.update_file_system_request.redact_sensitive(input_)

    def _redact_output(
        output: "capo_fsx.types.update_file_system_response.UpdateFileSystemResponse",
    ) -> dict[str, Any]:
        import capo_fsx.types.update_file_system_response

        return capo_fsx.types.update_file_system_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateFileSystem",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_fsx.types.update_file_system_request.UpdateFileSystemRequest = {}
    if file_system_id is not None:
        input_["file_system_id"] = file_system_id
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if storage_capacity is not None:
        input_["storage_capacity"] = storage_capacity
    if windows_configuration is not None:
        input_["windows_configuration"] = windows_configuration
    if lustre_configuration is not None:
        input_["lustre_configuration"] = lustre_configuration
    if ontap_configuration is not None:
        input_["ontap_configuration"] = ontap_configuration
    if open_zfs_configuration is not None:
        input_["open_zfs_configuration"] = open_zfs_configuration
    if storage_type is not None:
        input_["storage_type"] = storage_type
    if file_system_type_version is not None:
        input_["file_system_type_version"] = file_system_type_version
    if network_type is not None:
        input_["network_type"] = network_type

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