Skip to content

update_file_system_association async

update_file_system_association(
    file_system_association_arn: FileSystemAssociationARN,
    *,
    config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
    user_name: Optional[DomainUserName] = None,
    password: Optional[DomainUserPassword] = None,
    audit_destination_arn: Optional[AuditDestinationARN] = None,
    cache_attributes: Optional[CacheAttributes] = None,
) -> UpdateFileSystemAssociationOutput

Updates a file system association. This operation is only supported in the FSx File Gateways.

Parameters:

  • file_system_association_arn (FileSystemAssociationARN) –

    The Amazon Resource Name (ARN) of the file system association that you want to update.

  • user_name (Optional[DomainUserName], default: None ) –

    The user name of the user credential that has permission to access the root share D$ of the Amazon FSx file system. The user account must belong to the Amazon FSx delegated admin user group.

  • password (Optional[DomainUserPassword], default: None ) –

    The password of the user credential.

  • audit_destination_arn (Optional[AuditDestinationARN], default: None ) –

    The Amazon Resource Name (ARN) of the storage used for the audit logs.

Raises:

  • InternalServerError –

    An internal server error has occurred during the request. For more information, see the error and message fields.

  • InvalidGatewayRequestException –

    An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • UnknownServiceError –

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

Source code in docs_src/capo_storage_gateway/_services/async_storage_gateway.py
async def update_file_system_association(
    self,
    file_system_association_arn: "capo_storage_gateway.types.file_system_association_arn.FileSystemAssociationARN",
    *,
    config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
    user_name: Optional[
        "capo_storage_gateway.types.domain_user_name.DomainUserName"
    ] = None,
    password: Optional[
        "capo_storage_gateway.types.domain_user_password.DomainUserPassword"
    ] = None,
    audit_destination_arn: Optional[
        "capo_storage_gateway.types.audit_destination_arn.AuditDestinationARN"
    ] = None,
    cache_attributes: Optional[
        "capo_storage_gateway.types.cache_attributes.CacheAttributes"
    ] = None,
) -> "capo_storage_gateway.types.update_file_system_association_output.UpdateFileSystemAssociationOutput":
    """<p>Updates a file system association. This operation is only supported in the FSx File Gateways.</p>

    Args:
        file_system_association_arn: <p>The Amazon Resource Name (ARN) of the file system association that you want to update.</p>
        user_name: <p>The user name of the user credential that has permission to access the root share D$ of the Amazon FSx file system. The user account must belong to the Amazon FSx delegated admin user group.</p>
        password: <p>The password of the user credential.</p>
        audit_destination_arn: <p>The Amazon Resource Name (ARN) of the storage used for the audit logs.</p>

    Raises:
        capo_storage_gateway.errors.internal_server_error.InternalServerError: <p>An internal server error has occurred during the request. For more information, see the error and message fields.</p>
        capo_storage_gateway.errors.invalid_gateway_request_exception.InvalidGatewayRequestException: <p>An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.</p>
        capo_storage_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_storage_gateway.types.update_file_system_association_input.UpdateFileSystemAssociationInput]",
    ) -> AsyncOperationResponse[
        "capo_storage_gateway.types.update_file_system_association_output.UpdateFileSystemAssociationOutput"
    ]:
        import capo_storage_gateway._operations.storage_gateway_20130630.update_file_system_association

        (
            output,
            http_response,
        ) = await capo_storage_gateway._operations.storage_gateway_20130630.update_file_system_association.async_update_file_system_association(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_storage_gateway.types.update_file_system_association_input.UpdateFileSystemAssociationInput",
    ) -> dict[str, Any]:
        import capo_storage_gateway.types.update_file_system_association_input

        return capo_storage_gateway.types.update_file_system_association_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateFileSystemAssociation", redact_input=_redact_input),
    )
    input_: capo_storage_gateway.types.update_file_system_association_input.UpdateFileSystemAssociationInput = {
        "file_system_association_arn": file_system_association_arn
    }
    if user_name is not None:
        input_["user_name"] = user_name
    if password is not None:
        input_["password"] = password
    if audit_destination_arn is not None:
        input_["audit_destination_arn"] = audit_destination_arn
    if cache_attributes is not None:
        input_["cache_attributes"] = cache_attributes

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